@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=Space+Grotesk:wght@400;600&display=swap');

:root {
  color-scheme: light;
  --bg: #f2f2f2;
  --bg-accent: #ffffff;
  --ink: #191919;
  --muted: #707070;
  --brand: #2c74ac;
  --brand-strong: #215a87;
  --accent: #f44336;
  --card: #ffffff;
  --border: #e0e0e0;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.1);
  --footer-height: 28px;
  --map-bar-height: 64px;
  --content-width: 1100px;
  --bg-gradient: linear-gradient(180deg, #f7f9fb 0%, #eef2f6 100%);
  --hero-gradient: linear-gradient(135deg, rgba(44, 116, 172, 0.14), rgba(244, 67, 54, 0.05));
  --button-bg: #ffffff;
  --button-text: var(--brand);
  --button-border: rgba(44, 116, 172, 0.35);
  --button-hover-bg: #f0f6fb;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b1016;
  --bg-accent: #111720;
  --ink: #e7eef6;
  --muted: #9aa4b2;
  --brand: #3d86c7;
  --brand-strong: #2f6da5;
  --accent: #f97316;
  --card: #141b24;
  --border: #273244;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --bg-gradient:
    radial-gradient(800px circle at 20% -10%, rgba(61, 134, 199, 0.2), transparent 60%),
    linear-gradient(180deg, #0b1016 0%, #0f1620 100%);
  --hero-gradient:
    radial-gradient(650px circle at 20% 10%, rgba(61, 134, 199, 0.25), transparent 60%),
    linear-gradient(135deg, rgba(61, 134, 199, 0.18), rgba(249, 115, 22, 0.08));
  --button-bg: var(--brand);
  --button-text: #ffffff;
  --button-border: transparent;
  --button-hover-bg: var(--brand-strong);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg-gradient);
}

a {
  color: inherit;
  text-decoration-color: currentColor;
}

a:visited,
a:active,
a:hover {
  color: inherit;
}

h1, h2 {
  font-family: 'Fraunces', serif;
  margin: 0 0 0.5rem 0;
}

h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 2vw + 0.5rem, 2rem);
}

.hero {
  padding: 1.8rem 1.5rem 1.2rem;
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
}

.hero__content {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.hero__actions {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 719px) {
  .hero__actions {
    position: static;
    margin: 0 auto 0.75rem;
    display: flex;
    justify-content: center;
  }
}

.hero__logo {
  width: min(360px, 80vw);
  height: auto;
  display: block;
  margin: 0 auto 0.6rem;
}

.hero__title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.1rem, 1.4vw + 0.6rem, 1.6rem);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.layout {
  max-width: var(--content-width);
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.app-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-border);
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.card__button:hover {
  background: var(--button-hover-bg);
  transform: translateY(-1px);
}

.card__button:hover,
.card__button:visited,
.card__button:active {
  color: var(--button-text);
}

.card__button:visited,
.card__button:active {
  background: var(--button-bg);
}

.calendar-grid {
  display: grid;
  gap: 1.5rem;
}

.calendar-grid {
  grid-template-columns: minmax(0, 1fr);
}

.month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.month-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.month-nav__link:hover {
  background: var(--button-hover-bg);
  transform: translateY(-1px);
}

.month-nav__link:visited,
.month-nav__link:active {
  color: var(--button-text);
}

.month-title {
  margin-bottom: 0.75rem;
}

.event-links {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.event-links--inline {
  gap: 0.4rem;
  margin-top: 0;
}

.event-links--inline a {
  border: 1px solid var(--border);
  background: var(--bg-accent);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.calendar-table th {
  text-transform: none;
  letter-spacing: 0.03em;
}

.calendar-table td {
  vertical-align: top;
}

.calendar-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.calendar-name {
  font-weight: 600;
}

.event-links a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.event-links a:hover {
  text-decoration: underline;
}

.card__button:visited:hover,
.card__button:active:hover {
  background: var(--button-hover-bg);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.qrv-page {
  overflow-x: hidden;
}

.qrv-page .card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card__link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card__link:hover,
.card__link:visited,
.card__link:active {
  color: var(--brand);
  text-decoration: underline;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--bg-accent);
  transform: translateY(-1px);
}

.theme-toggle--small {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
}

.card__toggle {
  border: 1px solid var(--border);
  background: #eef1f5;
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.card__toggle:hover {
  background: #e2e6ee;
}

:root[data-theme='dark'] .card__toggle {
  background: #1b2432;
  border-color: #2f3b50;
  color: #e7eef6;
}

:root[data-theme='dark'] .card__toggle:hover {
  background: #243147;
}

.floating-back {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--footer-height) + 1rem);
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-border);
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  z-index: 30;
}

.floating-back:hover {
  background: var(--button-hover-bg);
}

.floating-back:hover,
.floating-back:visited,
.floating-back:active {
  color: var(--button-text);
}

.floating-back:visited,
.floating-back:active {
  background: var(--button-bg);
}

.floating-back:visited:hover,
.floating-back:active:hover {
  background: var(--button-hover-bg);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(900px, calc(100% - 32px));
  padding: 12px 16px;
  background: #0b2e59;
  color: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(8, 19, 38, 0.28);
  font-size: 0.95rem;
  z-index: 1200;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner__button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  background: #ffffff;
  color: #0b2e59;
  cursor: pointer;
}

.cookie-banner__button:hover {
  filter: brightness(0.96);
}

.cookie-banner--hidden {
  display: none;
}

@media (max-width: 720px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 18px;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 0.6s ease forwards;
}

.form {
  display: grid;
  gap: 1rem;
}

.form__checks {
  display: grid;
  gap: 0.6rem;
}

.form__checks--bands {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.filters-grid {
  display: grid;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.filters-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.check input[type='checkbox'] {
  width: 18px;
  height: 18px;
}

.contest-grid {
  display: grid;
  gap: 0.4rem 1.2rem;
}

.turnstile {
  margin: 0.25rem 0;
}

@media (min-width: 720px) {
  .contest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form--inline {
  align-items: end;
}

@media (min-width: 720px) {
  .form--inline {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.form__turnstile {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.form__hint {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 719px) {
  .form__turnstile {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (min-width: 720px) {
  .form__turnstile {
    grid-column: 2;
    justify-content: flex-end;
  }

  .form__hint {
    grid-column: 1 / -1;
  }
}

label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  background: var(--bg-accent);
  line-height: 1.2;
  width: 100%;
}

input[readonly],
textarea[readonly] {
  background: #eef1f5;
  color: #6b7280;
  cursor: not-allowed;
}

:root[data-theme='dark'] input[readonly],
:root[data-theme='dark'] textarea[readonly] {
  background: #0f1620;
  color: #93a0b1;
}
textarea {
  resize: vertical;
  min-height: calc((1.2em + 1.5rem) * 3);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(44, 116, 172, 0.35);
  border-color: transparent;
}

button {
  border: 1px solid var(--button-border);
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:hover {
  background: var(--button-hover-bg);
  transform: translateY(-1px);
}

.map {
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
}

.map--full {
  height: 100%;
  border-radius: 0;
}

.full-map {
  background: var(--bg);
}

.full-map.has-footer {
  padding-bottom: 0;
}

.map-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: var(--map-bar-height);
  display: flex;
  align-items: center;
}

.map-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.map-bar__logo {
  width: 54px;
  height: auto;
}

.map-bar__title {
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  flex: 1;
  padding: 0 1rem;
}

.map-bar__link {
  color: var(--button-text);
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.map-bar__link:hover {
  background: var(--button-hover-bg);
}

.map-bar__link:hover,
.map-bar__link:visited,
.map-bar__link:active {
  color: var(--button-text);
}

.map-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.language-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.language-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
}

.language-toggle__button.is-active {
  background: var(--button-bg);
  color: var(--button-text);
}

.language-toggle__button:hover {
  background: var(--button-hover-bg);
  color: var(--button-text);
}

.map-shell {
  height: calc(100vh - var(--map-bar-height) - var(--footer-height));
  position: relative;
}

.map-filters {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
  max-width: min(320px, calc(100% - 32px));
}

.map-filters__title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.map-filters__list {
  gap: 0.5rem;
}

.table-wrap {
  overflow-x: auto;
}

.table-filters {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.table-filters__title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.table-filters__list {
  gap: 0.5rem;
}

.meta-grid {
  display: grid;
  gap: 0.5rem 1.5rem;
}

@media (min-width: 720px) {
  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.meta-row {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.meta-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.button--link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

.button--link:hover {
  text-decoration: underline;
  background: none;
  transform: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:nth-child(even) td {
  background: #f6f8fb;
}

:root[data-theme='dark'] tbody tr:nth-child(even) td {
  background: #0f1620;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.status__icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.status--yes {
  background: #e6f2fb;
  color: #1f5f8e;
}

.status--no {
  background: #f0f0f0;
  color: #8a8a8a;
}

th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert ul {
  margin: 0;
  padding-left: 1rem;
}

.alert--success {
  background: #eaf2f9;
  color: #1f5680;
  border: 1px solid rgba(44, 116, 172, 0.2);
}

.alert--error {
  background: #fdeceb;
  color: #b12b22;
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.muted {
  color: var(--muted);
}

.has-footer {
  padding-bottom: var(--footer-height);
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  color: #ffffff;
  z-index: 20;
  backdrop-filter: blur(6px);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
