@font-face {
  font-family: "Alfa Slab One";
  src: url("../assets/fonts/alfa-slab-one-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --navy: #111a3a;
  --navy-2: #1b2550;
  --red: #d5382c;
  --gold: #ffc53d;
  --ink: #1d2340;
  --ink-2: #565c74;
  --line: #e7e3d9;
  --paper: #ffffff;
  --paper-2: #f6f3ec;
  --blue: #1f6fd6;
  --display: "Alfa Slab One", "Rockwell", Georgia, serif;
  --body: "Atkinson Hyperlegible", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --sheet-h: 200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: #f4f1ea;
  font: 400 16px/1.5 var(--body);
}
button, input { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1em; height: 1em; flex: none; }

/* ------------------------------------------------------------ page */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  align-items: start;
}
.kicker { margin: 0 0 12px; color: var(--gold); font-weight: 700; }
h1 {
  margin: 0;
  font: 400 clamp(2.4rem, 1.6rem + 3vw, 3.9rem)/1.02 var(--display);
  color: #fff;
  max-width: 13ch;
}
.lede { max-width: 54ch; margin: 20px 0 8px; font-size: 1.125rem; color: rgb(255 255 255 / 0.82); }
.clock { margin: 0 0 40px; color: rgb(255 255 255 / 0.6); font-size: 0.95rem; }
h2 {
  margin: 40px 0 12px;
  font: 400 1.35rem/1.2 var(--display);
  color: var(--gold);
}

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 600px; }
.feature {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  width: 100%;
  padding: 12px 14px 12px 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.feature:hover { background: rgb(255 255 255 / 0.05); }
.feature:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.feature[aria-pressed="true"] { background: rgb(255 255 255 / 0.08); border-left-color: var(--gold); }
.f-ico { color: var(--gold); font-size: 22px; padding-top: 1px; }
.f-body strong { display: block; font-size: 1.06rem; color: #fff; }
.f-body span { display: block; color: rgb(255 255 255 / 0.7); font-size: 0.97rem; max-width: 56ch; }

.qr-sign { margin: 6px 0 10px 45px; }
.sign {
  display: flex; gap: 16px; align-items: center;
  max-width: 360px; padding: 14px;
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--gold); border-radius: 10px;
}
.sign strong { display: block; font: 400 1.15rem/1.15 var(--display); color: var(--navy); }
.sign span { display: block; font-size: 0.92rem; color: var(--ink-2); }
.sign-qr { width: 96px; height: 96px; flex: none; }
.sign-qr svg { width: 100%; height: 100%; display: block; }
.ghost {
  margin-top: 10px; padding: 8px 14px;
  background: transparent; border: 1.5px solid rgb(255 255 255 / 0.5); border-radius: 999px;
  color: #fff; font-weight: 700; cursor: pointer;
}
.ghost:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.facts { margin: 0; display: grid; gap: 14px; max-width: 600px; }
.facts div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.facts dt { font-weight: 700; color: #fff; }
.facts dd { margin: 0; color: rgb(255 255 255 / 0.72); }
.credits { margin: 40px 0 0; font-size: 0.85rem; color: rgb(255 255 255 / 0.5); max-width: 60ch; }

/* ------------------------------------------------------------ phone frame */
.phone-wrap { position: sticky; top: 24px; }
.phone {
  width: 390px;
  height: min(820px, calc(100vh - 48px));
  min-height: 640px;
  padding: 12px;
  border-radius: 56px;
  background: #060a1c;
  box-shadow: inset 0 0 0 2px #2b3360, 0 40px 90px rgb(0 0 0 / 0.45);
}
.screen {
  --top-inset: 46px;
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 44px;
  background: #c7dea2;
  color: var(--ink);
  isolation: isolate;
}
.screen::before {
  content: "";
  position: absolute; z-index: 6; top: 11px; left: 50%;
  width: 110px; height: 30px; margin-left: -55px;
  border-radius: 20px; background: #060a1c;
}
/* A soft haze where the tilted map meets the top bar. */
.screen::after {
  content: "";
  position: absolute; z-index: 2; inset: 0 0 auto;
  height: calc(var(--top-inset) + 110px);
  background: linear-gradient(rgb(255 250 238 / 0.92), rgb(255 250 238 / 0));
  pointer-events: none;
}
#map { position: absolute; inset: 0; }

/* ------------------------------------------------------------ app chrome */
.topbar {
  position: absolute; z-index: 3; left: 12px; right: 12px; top: var(--top-inset);
  display: flex; gap: 8px;
}
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 14px;
  background: var(--paper); border-radius: 23px;
  box-shadow: 0 2px 12px rgb(17 26 58 / 0.16);
  color: var(--ink-2); font-size: 18px;
}
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 400 16px var(--body); color: var(--ink);
}
.search:focus-within { box-shadow: 0 0 0 3px var(--gold), 0 2px 12px rgb(17 26 58 / 0.16); }
.search input::-webkit-search-cancel-button { display: none; }
.locate:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.chips {
  position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--top-inset) + 54px);
  display: flex; gap: 8px; padding: 0 12px 6px;
  overflow-x: auto; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px 0 10px;
  border: 0; border-radius: 17px;
  background: rgb(255 255 255 / 0.94); color: var(--ink);
  font-size: 14px; font-weight: 700;
  box-shadow: 0 1px 6px rgb(17 26 58 / 0.14);
  cursor: pointer;
}
.chip .ico { font-size: 16px; color: var(--c); }
.chip[aria-pressed="true"] { background: var(--c); color: var(--f, #fff); }
.chip[aria-pressed="true"] .ico { color: inherit; }
.chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

.offline-badge {
  position: absolute; z-index: 3; left: 12px; top: calc(var(--top-inset) + 96px);
  display: flex; align-items: center; gap: 6px; margin: 0;
  padding: 4px 10px; border-radius: 12px;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 700;
}

.locate {
  position: absolute; z-index: 3; right: 12px; bottom: calc(var(--sheet-h) + 12px);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--paper); color: var(--blue); font-size: 22px;
  box-shadow: 0 2px 10px rgb(17 26 58 / 0.2);
  cursor: pointer;
  transition: bottom 0.25s ease;
}
.attrib {
  position: absolute; z-index: 3; left: 10px; bottom: calc(var(--sheet-h) + 4px);
  margin: 0; font-size: 10px; color: #4a5068; text-shadow: 0 0 2px #fff;
  transition: bottom 0.25s ease;
}

.toast {
  position: absolute; z-index: 5; left: 12px; right: 12px; top: calc(var(--top-inset) + 128px);
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px;
  background: var(--navy); color: #fff; font-size: 15px;
  box-shadow: 0 8px 24px rgb(17 26 58 / 0.3);
}
.toast .ico { font-size: 20px; color: var(--gold); margin-top: 2px; }

/* ------------------------------------------------------------ sheet */
.sheet {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  max-height: 60%;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 18px 20px;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 28px rgb(17 26 58 / 0.2);
}
.handle { width: 40px; height: 5px; margin: 2px auto 10px; border-radius: 3px; background: #d4d1c8; }
.sheet h3 { margin: 0; font: 400 1.32rem/1.15 var(--display); color: var(--navy); }
.sheet h4 { margin: 18px 0 6px; font-size: 0.95rem; color: var(--ink-2); }
.sheet p { margin: 6px 0; }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }

.home-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.link {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--blue); font-weight: 700; font-size: 0.92rem;
}
.headliner {
  display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center;
  width: 100%; padding: 8px; text-align: left; cursor: pointer;
  background: var(--navy); color: #fff; border: 0; border-radius: 16px;
}
.headliner img { width: 128px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.headliner b { display: block; font: 400 1.12rem/1.15 var(--display); color: #fff; margin: 1px 0 2px; }
.headliner .when { display: block; color: var(--gold); font-weight: 700; font-size: 0.85rem; }
.headliner .muted { display: block; color: rgb(255 255 255 / 0.72); font-size: 0.8rem; line-height: 1.25; }
.poster { display: block; width: 100%; margin: 12px 0 4px; padding: 0; border: 0; background: none; cursor: pointer; }
.poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; display: block; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.quick button {
  display: grid; justify-items: center; gap: 4px;
  padding: 10px 2px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--paper); color: var(--ink); font-size: 0.8rem; font-weight: 700;
  cursor: pointer;
}
.quick button .ico { font-size: 21px; color: var(--c); }
.quick button:focus-visible, .row:focus-visible, .headliner:focus-visible, .btn:focus-visible, .close:focus-visible, .sheet button:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

.presented {
  margin: 12px -18px -20px; padding: 8px 18px 12px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--ink-2);
  background: var(--paper-2);
}
.presented b { color: var(--navy); }
.presented .ico { color: #b8860b; }
.presented.flash { background: #fff1c7; }

.list { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  width: 100%; padding: 9px 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.row.static { cursor: default; }
.row .dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: var(--f, #fff); font-size: 15px;
}
.row b { display: block; color: var(--ink); line-height: 1.25; }
.row span { display: block; color: var(--ink-2); font-size: 0.88rem; line-height: 1.3; }
.row em { font-style: normal; color: var(--ink-2); font-size: 0.85rem; white-space: nowrap; }
.row mark { background: #ffe9a6; color: inherit; border-radius: 3px; }
.time-col { font-weight: 700; color: var(--navy); font-size: 0.9rem; text-align: center; line-height: 1.15; }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px;
  padding: 3px 10px 3px 8px; border-radius: 12px;
  background: var(--c); color: var(--f, #fff); font-size: 0.8rem; font-weight: 700;
}
.close {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #efede7; color: var(--ink); font-size: 18px; cursor: pointer;
}
.sponsor-line { display: flex; align-items: center; gap: 6px; color: #8a6400; font-weight: 700; font-size: 0.9rem; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 16px; border-radius: 23px; border: 0;
  background: var(--blue); color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 0 #164f9a;
}
.btn.secondary { background: #efede7; color: var(--ink); box-shadow: none; flex: 1; }
.btn.red { background: var(--red); box-shadow: 0 3px 0 #9e2318; }
.btn.wide { width: 100%; }
.btn .ico { font-size: 18px; }

.route-sum { display: flex; align-items: baseline; gap: 10px; }
.route-sum b { font: 400 2rem/1 var(--display); color: var(--blue); }

.note input {
  width: 100%; height: 46px; margin-top: 10px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper-2);
  font-size: 16px;
}
.note input:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: transparent; }
.car-photo { width: 100%; height: 140px; margin-top: 10px; object-fit: cover; border-radius: 12px; display: block; }
.that-way {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  margin: 12px 0 4px; padding: 10px; border-radius: 16px; background: var(--navy); color: #fff;
}
.that-way .arrow {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 28px;
}
.that-way .arrow .ico { transform: rotate(var(--turn)); }
.that-way b { display: block; font: 400 1.15rem/1.15 var(--display); }
.that-way .muted { display: block; color: rgb(255 255 255 / 0.75); font-size: 0.88rem; }
.that-way img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tile { padding: 10px; border-radius: 12px; background: var(--paper-2); }
.tile b { display: block; font: 400 1.25rem/1.1 var(--display); color: var(--navy); }
.tile span { font-size: 0.78rem; color: var(--ink-2); line-height: 1.2; display: block; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: 112px 1fr 44px; gap: 8px; align-items: center; font-size: 0.88rem; }
.bars .track { height: 10px; }
.bars .fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--navy); }
.bars em { font-style: normal; text-align: right; color: var(--ink-2); }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 4px; border-bottom: 1px solid var(--line); }
.cols div { flex: 1; background: var(--navy); border-radius: 4px 4px 0 0; position: relative; }
.cols div:hover, .cols div:focus-visible { background: var(--blue); outline: none; }
.cols div[data-tip]:hover::after, .cols div[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  padding: 3px 7px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 0.75rem; white-space: nowrap;
}
.col-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--ink-2); margin-top: 4px; }


/* ------------------------------------------------------------ map markers */
.mk { width: 34px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.mk:focus-visible { outline: none; }
.mk:focus-visible .pin-shape path { stroke: var(--gold); stroke-width: 4; }
.pin-shape { position: absolute; left: 0; top: 0; width: 34px; height: 44px; filter: drop-shadow(0 2px 2px rgb(10 15 36 / 0.35)); }
.pin-ico {
  position: absolute; left: 0; top: 5px; width: 34px; height: 24px;
  display: grid; place-items: center; color: var(--f, #fff); font-size: 15px;
}
.mk .pin-shape, .mk .pin-ico { transition: transform 0.15s ease; transform-origin: 17px 44px; }
.mk.essential { width: 30px; height: 39px; }
.mk.essential .pin-shape { width: 30px; height: 39px; }
.mk.essential .pin-ico { width: 30px; top: 4px; font-size: 13px; }
.mk.essential .pin-shape, .mk.essential .pin-ico { transform-origin: 15px 39px; }
/* Zoomed out, the always-on pins shrink to dots so the fair stays readable. */
.lbl-far .mk.essential .pin-shape { display: none; }
.lbl-far .mk.essential .pin-ico {
  left: 5px; top: 17px; width: 20px; height: 20px; font-size: 11px;
  border-radius: 50%; background: var(--c); border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgb(10 15 36 / 0.4);
}
.lbl-far .mk.essential .pin-ico[style*="#ffffff"] { border-color: #d5382c; }
.lbl-far .mk.essential.sp .pin-ico { border: 2.5px solid var(--gold); }
.lbl-far .mk .sp-star { display: none; }
.sp-star {
  position: absolute; right: -5px; top: -4px; width: 17px; height: 17px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-size: 10px; border: 1.5px solid #fff;
}
.pin-name {
  position: absolute; left: 50%; bottom: calc(100% + 4px);
  transform: translateX(-50%);
  padding: 3px 9px; border-radius: 10px;
  background: var(--navy); color: #fff; font: 700 12px/1.2 var(--body); white-space: nowrap;
  box-shadow: 0 2px 6px rgb(10 15 36 / 0.3);
  opacity: 0; pointer-events: none;
}
.mk.selected { z-index: 3; }
.mk.selected .pin-shape, .mk.selected .pin-ico { transform: scale(1.3); }
.mk.selected .pin-name { opacity: 1; bottom: calc(100% + 16px); }
.mk.car .pin-ico { font-size: 17px; }
.mk.drop { animation: drop 0.5s cubic-bezier(0.3, 1.4, 0.6, 1) var(--d, 0ms) both; }
@keyframes drop {
  from { opacity: 0; translate: 0 -28px; }
  to { opacity: 1; translate: 0 0; }
}

.cluster {
  display: grid; place-items: center;
  min-width: 38px; height: 38px; padding: 0 8px;
  border-radius: 19px; border: 3px solid var(--ring);
  background: #fff; color: var(--navy); font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 6px rgb(10 15 36 / 0.35), inset 0 -3px 0 rgb(17 26 58 / 0.08);
}
.cluster.big { min-width: 46px; height: 46px; border-radius: 23px; font-size: 16px; }
.mk-cluster { width: auto; height: auto; }
.mk-cluster:focus-visible .cluster { box-shadow: 0 0 0 3px var(--gold); }

.area-label { pointer-events: none; white-space: nowrap; }
.area-label span {
  display: block;
  font: 400 13px/1 var(--display);
  color: var(--navy);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff;
}
.area-label.water span { color: #1c5a84; font-size: 12px; text-shadow: 0 0 3px #bfe3f5, 0 0 6px #bfe3f5; }
/* Ribbon banners, after the red ribbon in the fair's logo. */
.area-label.ribbon span {
  padding: 6px 18px 7px;
  background: var(--red); color: #fff; font-size: 14px; text-shadow: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
}
.area-label.ribbon { z-index: 2; filter: drop-shadow(0 2px 0 rgb(17 26 58 / 0.35)); }
.area-label.ribbon.blue span { background: #2563b8; }
.lbl-far .area-label:not(.ribbon) { visibility: hidden; }
.you {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgb(31 111 214 / 0.5), 0 1px 4px rgb(0 0 0 / 0.3);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(31 111 214 / 0.45), 0 1px 4px rgb(0 0 0 / 0.3); }
  100% { box-shadow: 0 0 0 18px rgb(31 111 214 / 0), 0 1px 4px rgb(0 0 0 / 0.3); }
}
.maplibregl-ctrl-attrib { display: none; }

/* ------------------------------------------------------------ small screens */
@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 28px 16px 48px; }
  .stage > * { min-width: 0; }
  .phone-wrap { position: static; order: -1; }
  .story { display: contents; }
  .kicker, h1, .lede, .clock { order: -2; }
  .clock { margin-bottom: 0; }
  .phone { width: 100%; height: 82svh; min-height: 560px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .screen { --top-inset: 12px; border-radius: 20px; }
  .screen::before { display: none; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .qr-sign { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .you, .mk.drop, .stub-bottom { animation: none; }
  .mk .pin-shape, .mk .pin-ico, .locate, .attrib { transition: none; }
}
