/* ============================================================
   Benny's Town Trail — map / helper page
   Navy stadium background + cream ticket, matching the entry page.
   Mobile first.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --royal:  #0e2a6c;   /* headings, primary */
  --navy:   #020d2f;   /* background */
  --gold:   #cb9121;   /* accents, main button */
  --cream:  #e7e0da;   /* ticket card */
  --steel:  #5a719b;   /* secondary / muted */
  --white:  #ffffff;

  --ink:    #1a2238;   /* body text on cream */
  --ink-mut:#54607a;   /* muted body text on cream */
  --line:   rgba(14, 42, 108, .16);

  --ticket-radius: 18px;
  --notch: 18px;       /* size of the scalloped side notches */
  --tap: 44px;         /* minimum tap target */

  --shadow-card: 0 24px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--white);
  background-color: var(--navy);
  /* stadium-light glow behind the ticket */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(203, 145, 33, .22), transparent 55%),
    radial-gradient(90% 60% at 12% 0%, rgba(90, 113, 155, .30), transparent 50%),
    radial-gradient(90% 60% at 88% 0%, rgba(90, 113, 155, .30), transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 540px;
  margin: 0 auto;
  padding: 22px 16px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Brand line above the ticket ---------- */
.eyebrow { text-align: center; margin: 6px 0 16px; }
.eyebrow .bash {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: clamp(15px, 4.5vw, 20px);
  color: var(--gold);
  margin: 0;
}
.eyebrow .sub {
  font-size: 12px;
  color: var(--steel);
  letter-spacing: .03em;
  margin: 2px 0 0;
}

/* ============================================================
   Ticket card
   ============================================================ */
.ticket {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--ticket-radius);
  box-shadow: var(--shadow-card);
  padding: 24px 20px 18px;
}

/* Side notches (the classic ticket pinch) */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--notch) * 2);
  height: calc(var(--notch) * 2);
  background: var(--navy);
  border-radius: 50%;
  transform: translateY(-50%);
}
.ticket::before { left:  calc(var(--notch) * -1); }
.ticket::after  { right: calc(var(--notch) * -1); }

.ticket h1 {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  color: var(--royal);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .98;
  font-size: clamp(30px, 9vw, 46px);
  margin: 2px 0 12px;
  text-align: center;
  text-shadow: 3px 3px 0 var(--gold);   /* hard offset, big heading only */
}

.lead {
  color: var(--ink);
  font-size: 15px;
  text-align: center;
  margin: 0 auto 16px;
  max-width: 36ch;
}

/* Dashed perforation line (full-bleed across the ticket) */
.perf {
  border: none;
  border-top: 2px dashed rgba(14, 42, 108, .35);
  margin: 18px -20px;
}

/* ====================== Map hero (tap to zoom) ================== */
.map { margin: 0 0 4px; }

.map__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  -webkit-tap-highlight-color: rgba(14, 42, 108, .15);
}
.map__btn img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 120px;            /* keep a tappable area even while loading */
  background: #d9e3ee;
}

.map__hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 13, 47, .82);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  pointer-events: none;          /* taps fall through to the button */
}
.map__hint svg { width: 16px; height: 16px; }

/* ========================= Progress ============================ */
.progress { margin: 4px 0 8px; }
.progress__row { display: flex; justify-content: center; margin-bottom: 8px; }
.progress__count { font-size: 14px; color: var(--ink-mut); }
.progress__count strong { color: var(--royal); font-size: 16px; }

.progress__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(14, 42, 108, .14);
  overflow: hidden;
}
.progress__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--gold);
  transition: width .3s ease;
}

/* ========================= Checklist =========================== */
.stops { list-style: none; margin: 6px 0 0; padding: 0; }

.stop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.stop:last-child { border-bottom: none; }

.stop__num {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--royal);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.stop.is-done .stop__num { background: var(--gold); color: var(--navy); }

.stop__name {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  min-width: 0;
}

/* Directions (map pin) link */
.stop__dir {
  flex: none;
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  color: var(--steel);
  border-radius: 10px;
  text-decoration: none;
}
.stop__dir:hover, .stop__dir:focus-visible { color: var(--royal); background: rgba(14, 42, 108, .06); }
.stop__dir svg { width: 22px; height: 22px; }

/* Single-character letter input */
.stop__letter {
  flex: none;
  width: var(--tap); height: var(--tap);
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--royal);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  caret-color: var(--royal);
}
.stop__letter:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(14, 42, 108, .14);
}
.stop.is-done .stop__letter { border-color: var(--gold); background: #fffdf6; }

.noscript { color: var(--ink-mut); padding: 12px 0; text-align: center; }

/* ===================== Reveal (all 10 found) =================== */
.reveal { text-align: center; }
.reveal[hidden] { display: none; }
.reveal__title {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  color: var(--royal);
  font-size: 26px;
  margin: 4px 0 4px;
  text-shadow: 2px 2px 0 var(--gold);
}
.reveal__sub { color: var(--ink-mut); font-size: 14px; margin: 0 0 10px; }
.reveal__letters {
  font-family: 'Anton', sans-serif;
  letter-spacing: .18em;
  font-size: clamp(28px, 9vw, 40px);
  color: var(--royal);
  text-transform: uppercase;
  margin: 0 0 18px;
  word-break: break-word;
}

/* ============================ Buttons ========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn--gold {
  background: var(--gold);
  color: var(--navy);            /* dark text on gold for AA contrast */
  box-shadow: 0 5px 0 #9c6e15;
}
.btn--gold:active { transform: translateY(2px); box-shadow: 0 3px 0 #9c6e15; }

/* Drop-down instruction after "Enter the draw" */
.drawinfo {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 12px;
  transition: grid-template-rows .3s ease;
}
.drawinfo[hidden] {
  display: grid;            /* keep it a grid so the row animation works */
  grid-template-rows: 0fr;
  margin-top: 0;
}
.drawinfo__inner {
  overflow: hidden;
  background: rgba(14, 42, 108, .06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;          /* vertical padding added when open (below) */
  text-align: left;
}
.drawinfo:not([hidden]) .drawinfo__inner { padding: 14px 16px; }
.drawinfo__title {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  color: var(--royal);
  font-size: 18px;
  margin: 0 0 6px;
}
.drawinfo p { color: var(--ink); font-size: 14px; margin: 0 0 8px; }
.drawinfo p:last-child { margin-bottom: 0; }
.drawinfo__note { color: var(--ink-mut); font-size: 13px; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .drawinfo { transition: none; }
}

.startover {
  display: inline-block;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--ink-mut);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  min-height: var(--tap);
}
.startover:hover { color: var(--royal); }

/* ============================ Footer ========================== */
.footer { text-align: center; margin-top: 22px; }
.tagline {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
  font-size: clamp(13px, 4vw, 16px);
  margin: 0 0 8px;
}
.credit { color: var(--steel); font-size: 12px; margin: 0; }
.credit a { color: var(--steel); }
.credit a:hover { color: var(--white); }

/* ================= Fullscreen zoom overlay ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 13, 47, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;            /* we handle pinch/pan ourselves */
}
/* The class sets display:flex, which would otherwise beat [hidden] —
   keep the overlay closed until it's opened. */
.lightbox[hidden] { display: none; }

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;        /* all pinch/pan handled in JS */
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.lightbox__close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 2;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
}
.lightbox__close svg { width: 24px; height: 24px; }
.lightbox__tip {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  background: rgba(2, 13, 47, .5);
  padding: 6px 12px;
  border-radius: 999px;
  transition: opacity .4s ease;
}

/* ================= Storage notice banner ====================== */
.notice {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 40;
  max-width: 540px;
  margin: 0 auto;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notice[hidden] { display: none; }
.notice p { margin: 0; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.notice a { color: var(--gold); }
.notice__btn {
  align-self: flex-end;
  min-height: 40px;
  padding: 8px 20px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.notice__btn:active { transform: translateY(1px); }

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .progress__fill, .lightbox__tip { transition: none; }
}
