/* ==========================================================================
   Twin City Trivia — prototype front end
   Brand core is Ember's (Forest Green #415B3C, Amber #FABA20, Oswald + Inter).
   The execution here is deliberately dark-first: a night-out brand reads
   better on a dark canvas, and amber becomes a real accent instead of
   decoration. Swapping to a light canvas is a token change, not a rewrite.
   ========================================================================== */

:root {
  /* brand (locked) */
  --green: #415b3c;
  --amber: #faba20;
  --cream: #fff4d6;

  /* canvas */
  --ink-900: #0d1309;
  --ink-800: #121a0e;
  --ink-700: #18220f;
  --surface: #1b2614;
  --surface-2: #223019;
  --line: #31411f;
  --line-soft: #26331a;

  /* text */
  --fg: #f4f1e4;
  --fg-muted: #b9c4a8;
  --fg-dim: #8b9a7a;
  --on-amber: #1a1403;

  /* accents */
  --amber-soft: #ffd56a;
  --lime: #9ad356;
  --rose: #ff6b6b;

  /* type */
  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* metrics */
  --wrap: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --pad: clamp(16px, 4vw, 28px);
  --ring: 0 0 0 3px rgba(250, 186, 32, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A warm glow behind the top of the page so the dark canvas isn't flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(70% 55% at 18% 0%, rgba(65, 91, 60, 0.55), transparent 70%),
    radial-gradient(45% 45% at 88% 4%, rgba(250, 186, 32, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

a { color: var(--amber-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

h1, h2, h3, h4 {
  /* Venue and event names are user data — a long one must break, not widen the page. */
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- header ---------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 19, 9, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand:hover { text-decoration: none; }

.brand__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--amber);
  color: var(--on-amber);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fg);
  line-height: 1.05;
}
.brand__name small {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  color: var(--fg-dim);
  font-weight: 400;
}

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 9px 13px;
  border-radius: 8px;
}
.site-nav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--amber); background: rgba(250, 186, 32, 0.1); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- buttons --------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary { background: var(--amber); color: var(--on-amber); font-weight: 600; }
.btn--primary:hover { background: var(--amber-soft); }

.btn--ghost { background: rgba(255, 255, 255, 0.04); color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--green); }

/* ---------- hero ------------------------------------------------------ */

main { position: relative; z-index: 1; }

.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(32px, 5vw, 56px); }

.hero__inner { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: 1.15fr 0.85fr; align-items: center; }

.hero h1 {
  font-size: clamp(2.7rem, 8.5vw, 5.4rem);
  margin: 14px 0 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
  display: block;
}

.hero__lede {
  margin: 22px 0 0;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 54ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--amber);
}
.stat__label {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 7px;
}

/* ---------- sections -------------------------------------------------- */

.section { padding: clamp(40px, 7vw, 76px) 0; }
.section--alt { background: var(--ink-800); border-block: 1px solid var(--line-soft); }

.section__head { margin-bottom: 28px; }
.section__head h2 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin-top: 10px; }
.section__head p { color: var(--fg-muted); margin: 12px 0 0; max-width: 62ch; }

.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- event cards ----------------------------------------------- */

.event-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.event-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.event-card:hover { border-color: var(--green); transform: translateY(-2px); background: var(--surface-2); }

.event-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.event-card__time {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--amber);
}

.event-card__title {
  font-size: 1.16rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  line-height: 1.2;
}

.event-card__venue { color: var(--fg); font-weight: 500; font-size: 0.97rem; }
.event-card__meta { color: var(--fg-dim); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }

.pill {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--fg-muted);
  white-space: nowrap;
  flex: none;
}
.pill--trivia { color: var(--lime); border-color: rgba(154, 211, 86, 0.4); background: rgba(154, 211, 86, 0.1); }
.pill--music_bingo { color: var(--amber-soft); border-color: rgba(250, 186, 32, 0.4); background: rgba(250, 186, 32, 0.1); }
.pill--football_bingo { color: #ff9f6b; border-color: rgba(255, 159, 107, 0.4); background: rgba(255, 159, 107, 0.1); }
.pill--tonight { color: var(--on-amber); background: var(--amber); border-color: var(--amber); font-weight: 600; }

/* ---------- finder ---------------------------------------------------- */

.finder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  margin-bottom: 26px;
  position: sticky;
  top: 68px;
  z-index: 20;
}

.finder__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.finder__row + .finder__row { margin-top: 12px; }

.search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
}
.search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--fg);
  font: inherit;
  padding: 13px 0;
  min-width: 0;
}
.search input::placeholder { color: var(--fg-dim); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--amber); }

select {
  background: var(--ink-800);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font: inherit;
  font-size: 0.94rem;
  cursor: pointer;
  max-width: 100%;
}
select:focus { border-color: var(--amber); outline: none; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.13s ease;
}
.chip:hover { color: var(--fg); border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); border-color: var(--amber); font-weight: 600; }

.result-count { color: var(--fg-dim); font-size: 0.87rem; margin-left: auto; }

.day-group { margin-bottom: 30px; }
.day-group__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 11px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
}
.day-group__head h3 { font-size: 1.25rem; letter-spacing: 0.03em; }
.day-group__head span { color: var(--fg-dim); font-size: 0.85rem; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-dim);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- formats / markets ----------------------------------------- */

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.format-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.format-card h3 { font-size: 1.35rem; }
.format-card p { color: var(--fg-muted); margin: 0; font-size: 0.95rem; }
.format-card__count {
  font-family: var(--font-display);
  color: var(--amber);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: 8px;
}

.market-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.market {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-weight: 500;
}
.market:hover { border-color: var(--amber); text-decoration: none; background: var(--surface-2); }
.market span { color: var(--fg-dim); font-size: 0.84rem; font-variant-numeric: tabular-nums; }

/* ---------- venues ---------------------------------------------------- */

.venue-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px;
}
.venue-card h3 { font-size: 1.1rem; letter-spacing: 0; text-transform: none; }
.venue-card p { margin: 8px 0 0; color: var(--fg-dim); font-size: 0.89rem; }
.venue-card__links { display: flex; gap: 12px; margin-top: 12px; font-size: 0.86rem; }

/* ---------- cta band -------------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, var(--green), #2c3f28);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.cta-band h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.cta-band p { color: #dfe7d6; margin: 10px 0 0; max-width: 50ch; }

/* ---------- footer ---------------------------------------------------- */

.site-footer {
  background: var(--ink-800);
  border-top: 1px solid var(--line-soft);
  padding: clamp(36px, 6vw, 60px) 0 28px;
  margin-top: clamp(40px, 7vw, 80px);
}
.site-footer__grid { display: grid; gap: 30px; grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); }
.site-footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  margin-bottom: 13px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--fg-muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--amber); }
.site-footer__bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--fg-dim);
  font-size: 0.82rem;
}

.proto-note {
  background: rgba(250, 186, 32, 0.12);
  border: 1px solid rgba(250, 186, 32, 0.4);
  color: var(--amber-soft);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-size: 0.86rem;
  margin-bottom: 20px;
}

/* ---------- responsive ------------------------------------------------ */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--ink-800);
    border-bottom: 1px solid var(--line);
    padding: 10px var(--pad) 18px;
    gap: 2px;
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-header__inner { position: relative; }
  .finder { position: static; }
  .result-count { margin-left: 0; width: 100%; }
}

@media (max-width: 520px) {
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
