/* ====================================================================
   NOM NOM TAIWAN — base styles · MOBILE-FIRST
   Breakpoints: sm 768 / md 1024 / lg 1200
   ==================================================================== */

:root {
  /* ── Brand HEX (unchanged) ── */
  --magenta: #DA1884;
  --magenta-deep: #B01270;
  --cream: #F4EFE6;
  --cream-warm: #EDE5D4;
  --ink: #0E0A0A;
  --ink-soft: #2A1F22;
  --orange: #E8763A;
  --gold: #E8B43A;

  /* ── Magenta scale · oklch (50–900) ── */
  --magenta-50:  oklch(0.97 0.04  345);
  --magenta-100: oklch(0.94 0.07  345);
  --magenta-200: oklch(0.88 0.11  345);
  --magenta-300: oklch(0.78 0.17  345);
  --magenta-400: oklch(0.66 0.23  345);
  --magenta-500: oklch(0.53 0.27  345); /* ≈ #DA1884 */
  --magenta-600: oklch(0.47 0.26  345); /* ≈ #B01270 */
  --magenta-700: oklch(0.40 0.23  345);
  --magenta-800: oklch(0.32 0.18  345);
  --magenta-900: oklch(0.24 0.12  345);

  /* ── Neutral scale · oklch (50–900) ── */
  --neutral-50:  oklch(0.97 0.008 85);  /* ≈ #F4EFE6 */
  --neutral-100: oklch(0.94 0.010 80);  /* ≈ #EDE5D4 */
  --neutral-200: oklch(0.88 0.010 50);
  --neutral-300: oklch(0.76 0.009 30);
  --neutral-400: oklch(0.62 0.008 20);
  --neutral-500: oklch(0.48 0.007 20);
  --neutral-600: oklch(0.36 0.006 20);
  --neutral-700: oklch(0.28 0.008 20);
  --neutral-800: oklch(0.20 0.010 20);
  --neutral-900: oklch(0.10 0.010 20);  /* ≈ #0E0A0A */

  --paper: var(--cream);
  --fg: var(--ink);
  --brand: var(--magenta);

  --font-display: "Archivo Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Spectral", Georgia, serif;
  --font-tc: "Noto Serif TC", "Songti TC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1480px;
  --pad-x: 20px;       /* mobile gutters */
  --section-y: 72px;   /* mobile vertical rhythm */
}

@media (min-width: 768px) {
  :root { --pad-x: 32px; --section-y: 100px; }
}
@media (min-width: 1200px) {
  :root { --pad-x: 40px; --section-y: 120px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

html, body {
  background: var(--paper);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 3px;
}

body {
  background-image:
    radial-gradient(rgba(14, 10, 10, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit; cursor: pointer; border: none; background: none; color: inherit;
  /* Touch hit-target: WCAG 44x44 */
  min-height: 44px;
}

img, svg { display: block; max-width: 100%; }

img[loading="lazy"] { content-visibility: auto; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---------- Type system ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.88;
  text-wrap: balance;
}

.tc {
  font-family: var(--font-tc);
  font-weight: 700;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}

.body-lg { font-size: 17px; line-height: 1.55; }
.body-xl { font-size: 19px; line-height: 1.5; letter-spacing: -0.01em; }
@media (min-width: 768px) {
  .body-lg { font-size: 19px; }
  .body-xl { font-size: 22px; }
}

/* ---------- Brand tile (the "NOM" / character squares) ---------- */
/* 桃紅色底，白色字，文字上下左右置中 */

.brand-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  text-align: center;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(218, 24, 132, 0.30);
  flex-shrink: 0;
}
.brand-tile.tile-tc {
  font-family: var(--font-tc);
  font-weight: 900;
  letter-spacing: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  color: var(--ink);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    padding 0.3s ease,
    backdrop-filter 0.35s ease;
}
.site-header > * { pointer-events: auto; }
.site-header.is-scrolled {
  background: rgba(244, 239, 230, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: rgba(14, 10, 10, 0.08);
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-header.is-on-dark { color: var(--cream); }
.site-header.is-on-dark.is-scrolled {
  background: rgba(14, 10, 10, 0.65);
  border-bottom-color: rgba(244, 239, 230, 0.1);
}
.site-header .logo-mark,
.site-header nav a,
.site-header .order-btn {
  transition: opacity 0.2s ease, color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
@media (hover: hover) {
  .site-header nav a:hover { opacity: 0.6; }
  .site-header .order-btn:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }
}

.site-header .logo-mark {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 768px) {
  .site-header { padding: 18px var(--pad-x); }
  .site-header .logo-mark { font-size: 18px; }
}

.site-header nav { display: none; }
@media (min-width: 1024px) {
  .site-header nav { display: block; }
  .site-header nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
}

.site-header .order-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
@media (min-width: 768px) {
  .site-header .order-btn { font-size: 11px; padding: 10px 18px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 96px 0 48px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}
/* the container is the hero's only flex child — it must carry the grow +
   distribution, otherwise everything below it is dead space */
.hero > .container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--magenta-500) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 55% 65% at 90% 75%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 90% 75%, black 0%, transparent 100%);
}
@media (min-width: 768px) {
  .hero { padding: 120px 0 60px; }
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  font-size: 10px;
}
.hero-eyebrow .left, .hero-eyebrow .right {
  display: flex; gap: 14px; flex-wrap: wrap;
}
@media (min-width: 768px) {
  .hero-eyebrow { padding-bottom: 24px; font-size: 11px; }
  .hero-eyebrow .left, .hero-eyebrow .right { gap: 28px; }
}

.hero-title-wrap {
  position: relative;
  padding: 32px 0 0;
}
@media (min-width: 768px) {
  .hero-title-wrap { padding: 48px 0 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.84;
  position: relative;
  z-index: 3;
}

/* Inline TC characters in the hero title — magenta brand tile */
.hero-title .hero-tc {
  font-family: var(--font-tc);
  font-weight: 900;
  font-size: clamp(24px, 6.9vw, 138px);
  line-height: 1;
  color: #fff;
  background: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.04em 0.16em 0.1em;
  border-radius: 0.12em;
  letter-spacing: 0;
  vertical-align: -0.04em;
  margin: 0 0.06em;
  box-shadow: 0 8px 24px rgba(218, 24, 132, 0.28);
  flex-shrink: 0;
}


.hero-title .row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.hero-title .row .word {
  /* 9.6vw = widest row (CRISPY.+酥+CHICKEN.) fitting 100vw — no clipped glyphs */
  font-size: clamp(30px, 8.7vw, 190px);
  line-height: 0.84;
}
.hero-title .row.r1 { justify-content: flex-start; }
.hero-title .row.r2 { justify-content: flex-end; margin-top: 4px; }
.hero-title em {
  font-style: italic;
  color: var(--brand);
  /* match the plain word exactly — same size, leading & baseline so the
     accent word can't float up or get shaved by the .is-clip mask */
  font-size: 1em;
  line-height: inherit;
  vertical-align: baseline;
  display: inline-block;
}

@media (min-width: 768px) {
  .hero-title .row { gap: 16px; }
  .hero-title .row.r2 { margin-top: -6px; }
}

/* Hero brand tile: the magenta NOM square */
.hero-tile {
  width: clamp(56px, 14vw, 200px);
  height: clamp(56px, 14vw, 200px);
  font-size: clamp(28px, 7vw, 110px);
  border-radius: 14px;
}
.hero-tile.tile-tc {
  font-size: clamp(36px, 9vw, 130px);
}
@media (min-width: 768px) {
  .hero-tile { border-radius: 22px; }
}

.hero-bottom {
  position: relative;
  z-index: 4;            /* always above the decorative polaroids */
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
@media (min-width: 1024px) {
  .hero-bottom {
    margin-top: 56px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: end;
  }
}

.hero-tagline {
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  max-width: 560px;
  text-wrap: pretty;
}
@media (min-width: 768px) { .hero-tagline { font-size: 20px; } }
@media (min-width: 1024px) { .hero-tagline { font-size: 22px; line-height: 1.4; } }

/* Live truck banner in hero — same visual language as the find-section
   next-stop card (mono caps, live dot, magenta), data-driven from admin. */
.hero-truck-live {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(218, 24, 132, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 100%;
  flex-wrap: wrap;
}
.hero-truck-live .sep-bar {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.4);
}
.hero-truck-live .place { font-weight: 600; }
/* Hidden until real schedule data arrives — no default-text flash */
.hero-truck-live { visibility: hidden; }
.hero-truck-live.ready { visibility: visible; }
/* Pulse only while actually open */
.hero-truck-live:not(.is-open) .live-dot::before { animation: none; opacity: 0.75; }
.hero-truck-live .arrow { transition: transform 0.25s ease; }
@media (hover: hover) {
  .hero-truck-live:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(218, 24, 132, 0.4);
  }
  .hero-truck-live:hover .arrow { transform: translateX(4px); }
}
@media (min-width: 768px) {
  .hero-truck-live { font-size: 12px; padding: 14px 24px; gap: 14px; }
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-meta .m-item .label {
  font-size: 10px;
  opacity: 0.6;
  margin-bottom: 4px;
}
.hero-meta .m-item .val {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: none;
  letter-spacing: -0.02em;
  /* "11:30 — sold out" must never wrap; shrink to fit the narrow grid cell */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .hero-meta { gap: 24px; font-size: 13px; }
  .hero-meta .m-item .val { font-size: clamp(15px, 1.5vw, 22px); }
}

/* Hero polaroid stack — desktop only. z-index:1 so they sit BEHIND the title text. */
.hero-poly { display: none; }
@media (min-width: 1024px) {
  .hero-poly {
    display: block;
    position: absolute;
    pointer-events: none;
    z-index: 1;
  }
  /* Fluid offsets + sizes — scale with the hero box (100vh) and viewport
     width so the 3-polaroid cluster holds its arrangement while resizing
     instead of jumping between fixed-px breakpoints (the old 跑版). */
  .hero-poly.p1 { top: clamp(40px, 6vh, 64px);   right: clamp(0px, 2vw, 40px); transform: rotate(7deg); }
  .hero-poly.p2 { top: clamp(300px, 42vh, 400px); right: clamp(20%, 24vw, 26%); transform: rotate(-9deg); }
  .hero-poly.p3 { top: clamp(520px, 66vh, 640px); right: clamp(-2%, 0vw, 2%);   transform: rotate(4deg); }
  /* widths scale fluidly (hero-scoped so story stack / mobile carousel untouched) */
  .hero-poly .polaroid.p-sm { width: clamp(180px, 16vw, 220px); }
  .hero-poly .polaroid.p-md { width: clamp(220px, 20vw, 280px); }
}

/* Mobile-only polaroid carousel */
.hero-poly-mobile {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 24px calc(var(--pad-x) * -1) 0;
  padding: 8px var(--pad-x);
  scrollbar-width: none;
}
.hero-poly-mobile::-webkit-scrollbar { display: none; }
.hero-poly-mobile > * { scroll-snap-align: start; flex-shrink: 0; }
@media (min-width: 1024px) {
  .hero-poly-mobile { display: none; }
}

/* ---------- Marquee ---------- */

.marquee {
  background: var(--brand);
  color: #fff;
  padding: 16px 0;
  overflow: hidden;
  border-block: 1px solid var(--ink);
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  gap: 32px;
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: -0.02em;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
@media (min-width: 768px) {
  .marquee { padding: 22px 0; }
  .marquee-track { gap: 48px; font-size: 56px; }
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 32px;
}
.marquee-track .sep {
  opacity: 0.6;
  font-family: var(--font-tc);
  font-size: 26px;
}
@media (min-width: 768px) {
  .marquee-track .sep { font-size: 38px; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Section heads ---------- */

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "num num"
    "title tc";   /* title + TC mark share the bottom row (same line) */
  align-items: end;
  gap: 16px 16px;
  align-items: end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 36px;
}
.section-head .num { grid-area: num; }
.section-head h2 { grid-area: title; }
.section-head .tc-mark { grid-area: tc; text-align: right; }

@media (min-width: 1024px) {
  .section-head {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "num title tc";
    gap: 32px;
    padding-bottom: 36px;
    margin-bottom: 48px;
  }
}

.section-head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 11vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 400;
}
.section-head h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--brand);
  font-size: 1.06em;
  letter-spacing: -0.02em;
}
.section-head .tc-mark {
  font-family: var(--font-tc);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}
@media (min-width: 768px) {
  .section-head .tc-mark { font-size: 28px; }
}

/* ---------- Menu ---------- */

.menu {
  padding: var(--section-y) 0;
  position: relative;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px 24px;
  position: relative;
}
@media (min-width: 768px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }
}
@media (min-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(12, 1fr); gap: 64px 24px; }
  .menu-item.col-4 { grid-column: span 4; }
  .menu-item.col-6 { grid-column: span 6; }
}

.menu-item {
  position: relative;
  padding: 12px 0;
}

.menu-item .number {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.menu-item .img-wrap {
  position: relative;
  margin-bottom: 18px;
  will-change: transform;
}
@media (hover: hover) {
  /* transition only in the hover state — a base-state transform transition
     would intercept GSAP's entrance frames (iron rule) */
  .menu-item:hover .img-wrap {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: rotate(0deg) scale(1.02) !important;
  }
}

.menu-item h3 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 4px;
}
.menu-item h3 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--brand);
  font-size: 1.06em;
}
.menu-item .tc-name {
  font-family: var(--font-tc);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.menu-item .desc {
  font-size: 14px;
  line-height: 1.55;
  max-width: 38ch;
  opacity: 0.85;
}
/* Price chip pinned to the polaroid's top-right corner */
.menu-item .price {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
  background: var(--brand);
  color: #fff;
  padding: 7px 14px 8px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(218, 24, 132, 0.32);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}
@media (min-width: 768px) {
  .menu-item h3 { font-size: 36px; }
  .menu-item .tc-name { font-size: 22px; }
  .menu-item .price {
    font-size: 24px;
    padding: 8px 18px 9px;
    top: 14px;
    right: 14px;
  }
}
@media (hover: hover) {
  .menu-item:hover .price {
    transform: rotate(0deg) scale(1.08);
    box-shadow: 0 14px 30px rgba(218, 24, 132, 0.42);
  }
}

/* ---------- Polaroid ---------- */

.polaroid {
  background: #fffdf8;
  padding: 10px 10px 36px;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 14px 28px rgba(14, 10, 10, 0.16),
    0 6px 10px rgba(14, 10, 10, 0.10);
  position: relative;
  display: inline-block;
  max-width: 100%;
}
@media (min-width: 768px) {
  .polaroid { padding: 12px 12px 44px; }
}
.polaroid .photo {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.polaroid .caption {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #2a1f22;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .polaroid .caption { font-size: 10px; bottom: 14px; }
}

.polaroid.p-sm { width: 200px; }
.polaroid.p-md { width: 240px; }
.polaroid.p-lg { width: 100%; }
@media (min-width: 768px) {
  .polaroid.p-sm { width: 220px; }
  .polaroid.p-md { width: 280px; }
}

.placeholder {
  width: 100%; height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}
@media (min-width: 768px) { .placeholder { font-size: 10px; } }
.placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.08) 0 6px,
    rgba(255,255,255,0) 6px 12px
  );
}
.placeholder span { position: relative; z-index: 1; line-height: 1.4; }

.ph-fries { background: linear-gradient(135deg, #E8763A, #C9531A); }
.ph-chicken { background: linear-gradient(135deg, #C58B3E, #8A5A22); }
.ph-fryer { background: linear-gradient(135deg, #1A1413, #3a2a1f); }
.ph-basket { background: linear-gradient(135deg, #B01270, #7a0d48); }
.ph-bao { background: linear-gradient(135deg, #E8B43A, #B8852A); }
.ph-tea { background: linear-gradient(135deg, #2A1F22, #4a3438); }

/* ---------- Story ---------- */

.story {
  padding: var(--section-y) 0;
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.story .section-head { border-color: var(--cream); color: var(--cream); }
.story .section-head h2 em { color: var(--brand); }

.story-grid {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
@media (min-width: 1024px) {
  .story-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
  }
}

.story-text {
  display: flex; flex-direction: column; gap: 24px;
}
.story-text p {
  font-size: 16px; line-height: 1.6; max-width: 52ch;
}
.story-text p.lede {
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.15;
  letter-spacing: -0.02em; max-width: 22ch;
}
.story-text p.lede em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: var(--brand);
  font-size: 1.08em;
}
.story-tc {
  font-family: var(--font-tc);
  font-size: 17px; line-height: 1.85;
  font-weight: 400;
  opacity: 0.78;
  border-left: 2px solid var(--brand);
  padding-left: 18px;
  max-width: 42ch;
}
@media (min-width: 768px) {
  .story-text p { font-size: 18px; }
  .story-text p.lede { font-size: 32px; }
  .story-tc { font-size: 18px; padding-left: 20px; }
}

.story-poly-stack {
  position: relative;
  height: 520px;
  margin: 0 -8px;
}
.story-poly-stack .polaroid {
  position: absolute;
  max-width: calc(50% + 20px);
}
.story-poly-stack .polaroid:nth-child(1) { top: 0; left: 0; transform: rotate(-6deg); z-index: 1; }
.story-poly-stack .polaroid:nth-child(2) { top: 100px; right: 0; transform: rotate(5deg); z-index: 2; }
.story-poly-stack .polaroid:nth-child(3) { bottom: 0; left: 22%; transform: rotate(-2deg); z-index: 3; }
@media (hover: hover) {
  .story-poly-stack .polaroid:hover {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: rotate(0deg) translateY(-8px) scale(1.02);
    z-index: 5;
  }
}

@media (min-width: 1024px) {
  .story-poly-stack { height: 540px; }
  .story-poly-stack .polaroid:nth-child(1) { left: 8%; }
  .story-poly-stack .polaroid:nth-child(2) { right: 6%; }
  .story-poly-stack .polaroid:nth-child(3) { left: 28%; }
}

/* Stats strip */
.story-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  border-top: 1px solid var(--cream);
  padding-top: 28px;
}
.story-stats .stat .n {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--brand);
}
.story-stats .stat .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.8;
}
@media (min-width: 768px) {
  .story-stats { grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 80px; padding-top: 32px; }
  .story-stats .stat .n { font-size: 64px; }
  .story-stats .stat .l { font-size: 11px; }
}

/* ---------- Find us ---------- */

.find {
  padding: var(--section-y) 0;
  background: var(--cream-warm);
  position: relative;
}

.find-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .find-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 56px;
    align-items: stretch;
  }
}

.next-stop {
  background: var(--brand);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  container-type: inline-size;  /* h3 sizes to THIS card, not the viewport */
}
@media (min-width: 768px) { .next-stop { padding: 32px; gap: 24px; } }
.next-stop::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
}
.next-stop > * { position: relative; }

.next-stop .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (min-width: 768px) { .next-stop .label { font-size: 11px; } }

.live-dot { display: inline-flex; align-items: center; gap: 8px; }
.live-dot::before {
  content: "";
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.next-stop h3 {
  font-family: var(--font-display);
  font-size: 40px; line-height: 0.92;
  letter-spacing: -0.03em; font-weight: 400;
}
@media (min-width: 768px) { .next-stop h3 { font-size: 56px; } }
.next-stop .addr { font-size: 15px; line-height: 1.5; opacity: 0.92; }

.next-stop .countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 20px;
}
.next-stop .countdown .c { text-align: center; }
.next-stop .countdown .n {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.next-stop .countdown .l {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.85;
}
@media (min-width: 768px) {
  .next-stop .countdown .n { font-size: 44px; }
  .next-stop .countdown .l { font-size: 10px; letter-spacing: 0.16em; }
}

.next-stop .cta-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px;
}
.next-stop .cta-row .btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 999px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
}
.next-stop .cta-row .btn.primary { background: #fff; color: var(--ink); border: none; }
.next-stop .cta-row .btn.ghost { background: transparent; color: #fff; border: 1px solid #fff; }

/* Map */
.map-card {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--ink);
  overflow: hidden;
  min-height: 320px;
  border-radius: 4px;
  /* Allow pinch-zoom inside map */
  touch-action: pinch-zoom;
}
@media (min-width: 768px) { .map-card { min-height: 420px; } }
@media (min-width: 1024px) { .map-card { min-height: 520px; } }

.map-bg { position: absolute; inset: 0; }
.map-pins { position: absolute; inset: 0; }

/* Real OSM map — hidden until Leaflet boots, then replaces the SVG */
.osm-map { position: absolute; inset: 0; z-index: 2; display: none; }
.map-card.has-osm .osm-map { display: block; }
.map-card.has-osm .map-bg,
.map-card.has-osm .map-pins { display: none; }
.map-card.has-osm { touch-action: auto; }
/* Tint tiles toward the site's cream/ink palette */
.osm-map .leaflet-tile-pane {
  filter: sepia(0.32) saturate(0.62) contrast(0.92) brightness(1.04);
}
.osm-map .leaflet-control-attribution {
  font-family: var(--font-mono);
  font-size: 8px;
  background: rgba(244, 239, 230, 0.85);
  color: var(--ink);
}
/* divIcon markers reuse .map-pin look; Leaflet positions via iconAnchor */
.leaflet-marker-icon.map-pin { margin: 0 !important; background: none; border: none; }

.map-pin {
  position: absolute;
  width: 44px; height: 44px;            /* 44px touch target */
  margin-left: -22px; margin-top: -36px; /* center anchor */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.map-pin .head {
  width: 22px; height: 22px;
  background: var(--ink);
  border: 2px solid var(--cream);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.2s, width 0.2s, height 0.2s;
}
.map-pin.active .head, .map-pin:focus-visible .head {
  background: var(--brand);
  width: 26px; height: 26px;
  animation: pinBounce 1.4s ease-in-out infinite;
}
.map-pin .label {
  position: absolute;
  top: 0; left: 36px;
  background: var(--ink);
  color: var(--cream);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.map-pin.label-left .label {
  left: auto;
  right: 36px;
}
.map-pin.active .label { opacity: 1; background: var(--brand); }
/* Touch-equivalent for hover */
@media (hover: hover) {
  .map-pin:hover .label { opacity: 1; }
}
@keyframes pinBounce {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  50% { transform: rotate(-45deg) translateY(-4px); }
}

/* Schedule */
.schedule {
  margin-top: 32px;
  border-top: 1px solid var(--ink);
}
@media (min-width: 768px) { .schedule { margin-top: 48px; } }

.schedule-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  grid-template-areas:
    "day place status"
    "day time time";
  gap: 4px 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(14, 10, 10, 0.15);
  align-items: center;
  font-size: 13px;
  transition: background 0.2s;
}
.schedule-row .day { grid-area: day; }
.schedule-row .place { grid-area: place; }
.schedule-row .addr { display: none; }
.schedule-row .time { grid-area: time; }
.schedule-row .status { grid-area: status; }

@media (min-width: 1024px) {
  .schedule-row {
    grid-template-columns: 80px 1.2fr 1fr 1fr auto;
    grid-template-areas: "day place addr time status";
    gap: 24px;
    padding: 22px 0;
    font-size: 14px;
  }
  .schedule-row .addr { display: block; grid-area: addr; }
}

@media (hover: hover) {
  .schedule-row:hover { background: rgba(218, 24, 132, 0.06); }
}
.schedule-row.next {
  background: var(--brand);
  color: #fff;
  margin: 0 calc(var(--pad-x) * -0.5);
  padding-left: calc(var(--pad-x) * 0.5);
  padding-right: calc(var(--pad-x) * 0.5);
}
.schedule-row .day {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.schedule-row .place {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) { .schedule-row .place { font-size: 22px; } }
.schedule-row .addr {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.schedule-row .time {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.75;
}
@media (min-width: 1024px) { .schedule-row .time { font-size: 11px; opacity: 1; } }
.schedule-row .status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}
@media (min-width: 768px) { .schedule-row .status { font-size: 10px; } }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 0 28px;
}
@media (min-width: 768px) { .footer { padding: 80px 0 32px; } }

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
@media (min-width: 640px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}
@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; }
}

.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.7;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }

.footer .big {
  font-family: var(--font-display);
  font-size: clamp(64px, 13vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-top: 40px;
  color: var(--brand);
}
.footer .big em { color: var(--cream); font-style: italic; }
@media (min-width: 768px) { .footer .big { margin-top: 56px; } }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 24px;
  opacity: 0.6;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; margin-top: 32px; }
}

/* ---------- Interactive polish ---------- */

/* Header order CTA — full transition target */
.site-header .order-btn { background: transparent; }

/* Section heads — TC mark subtle hover */
/* colour only — a CSS transform transition here hijacks GSAP's entrance
   frames and can freeze the element mid-flight (tc-mark stuck at y:60) */
.section-head .tc-mark {
  transition: color 0.3s ease;
}
@media (hover: hover) {
  .section-head:hover .tc-mark { color: var(--brand); }
}

/* Hero meta items — divider feel on desktop */
@media (min-width: 768px) {
  .hero-meta .m-item {
    padding-left: 14px;
    border-left: 1px solid rgba(14, 10, 10, 0.18);
  }
  .hero-meta .m-item:first-child { padding-left: 0; border-left: 0; }
}

/* Story stat number — pop on view */
.story-stats .stat .n {
  transition: transform 0.3s ease, color 0.3s ease;
}
@media (hover: hover) {
  .story-stats .stat:hover .n { transform: translateY(-3px); }
}

/* Map pins — bigger touch + clear active state */
.map-pin:focus { outline: none; }
.map-pin .head { transition: transform 0.2s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease; }
@media (hover: hover) {
  .map-pin:hover .head { background: var(--brand); }
}

/* Next-stop CTA — promote inline-styled buttons to first-class */
.next-stop button {
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
@media (hover: hover) {
  .next-stop button:hover { transform: translateY(-2px); }
}

/* Schedule row — clearer NEXT chip */
.schedule-row.next .status {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
  font-weight: 700;
}

/* Footer — newsletter hint pointer */
.footer ul li {
  transition: color 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .footer ul li:hover { color: var(--brand); transform: translateX(3px); cursor: pointer; }
}

/* Order ahead button in hero header — make text pop */
.order-btn { white-space: nowrap; }

/* ---------- Mobile nav toggle --------- */

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  border: none;
  background: none;
  min-height: auto;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

/* Drawer */
.nav-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 85vw);
  background: var(--cream);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 88px 32px 40px;
  gap: 32px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(14,10,10,0.1);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nav-drawer nav ul li a {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  padding: 10px 0;
  border-bottom: 1px solid rgba(14,10,10,0.1);
  transition: color 0.15s ease;
}
.nav-drawer nav ul li a:hover { color: var(--brand); }
.drawer-order {
  align-self: flex-start;
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14,10,10,0.4);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

@media (min-width: 1024px) {
  .nav-drawer, .nav-backdrop { display: none; }
}

/* ---------- Next-stop CTAs ---------- */

.next-stop-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.stop-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 999px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.stop-btn:hover { transform: translateY(-2px); }
.stop-btn-primary {
  background: var(--cream);
  color: var(--ink);
  border: none;
}
.stop-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

/* ---------- Film grain overlay ---------- */
/* Fractal-noise texture, fixed full-screen, subtle flicker — adds hand-made
   "手感" per adam-ui. Sits above content, below nav drawer (z 100). */
.grain {
  position: fixed;
  inset: -25%;
  width: 150%;
  height: 150%;
  z-index: 80;
  pointer-events: none;
  /* no blend mode: multiply forced a full-page recomposite every frame the
     page changed — plain low-alpha noise reads ~identical on cream and is
     composited once on the GPU */
  opacity: 0.045;
  will-change: transform;
  contain: strict;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: grainShift 0.6s steps(2) infinite;
  will-change: transform;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -3%); }
  75%  { transform: translate(-2%, -2%); }
  100% { transform: translate(3%, 3%); }
}


/* ---------- Hero masked-word reveal (adam-ui cinema揭開) ---------- */
/* JS wraps each .word's text in .word-inner; the .word becomes a clip mask
   so the inner text rises from a hard edge instead of fading in place. */
.hero-title .word.is-clip {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  /* line-height 0.84 is tighter than the glyphs — pad so the clip edge
     doesn't shave ascenders or the italic overhang, then pull back so
     layout is unchanged. */
  padding: 0.18em 0.12em;
  margin: -0.18em -0.12em;
}
.hero-title .word.is-clip .word-inner {
  display: inline-block;
  will-change: transform;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none; }
  .live-dot::before { animation: none; }
  .map-pin.active .head { animation: none; }
  .grain { display: none; }
}

/* ============================================================
   Batch UX pass — mobile header, map polish, typography fixes
   ============================================================ */

/* ---- Header: live status pill replaces the old Order-ahead button ---- */
.header-truck-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 320px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(218, 24, 132, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.header-truck-live .hl-label { font-weight: 600; flex-shrink: 0; }
.header-truck-live .hl-place { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (hover: hover) {
  .header-truck-live:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(218, 24, 132, 0.38); }
}
@media (max-width: 1023px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 25fr) minmax(0, 70fr) minmax(36px, 5fr);
    align-items: center;
    gap: 8px;
  }
  .site-header nav { display: none; }
  .site-header .logo-mark {
    white-space: nowrap;
    overflow: hidden;
    font-size: 11px;
    gap: 6px;
    min-width: 0;
  }
  .header-truck-live {
    justify-content: center;
    max-width: none;
    font-size: 9px;
    padding: 9px 14px;
  }
  .site-header .nav-toggle { justify-self: end; }
}

/* ---- Hero eyebrow: proportional shrink on mobile ---- */
.hero-eyebrow .mono { font-size: clamp(8px, 2.4vw, 11px); }
@media (max-width: 767px) {
  .hero-eyebrow { gap: 8px 14px; padding-bottom: 14px; }
  .hero-eyebrow .left, .hero-eyebrow .right { gap: 10px; }
}

/* ---- Hero live banner: never wraps ---- */
.hero-truck-live { flex-wrap: nowrap; }
.hero-truck-live .place,
.hero-truck-live .time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
@media (max-width: 767px) {
  .hero-truck-live { font-size: 9.5px; padding: 10px 16px; gap: 8px; width: 100%; }
  .hero-truck-live .place { max-width: 38vw; }
}

/* ---- Menu: wider gutters, images 80% of frame ---- */
@media (max-width: 1023px) {
  .menu .container { padding-left: 36px; padding-right: 36px; }
  .menu-item .img-wrap { width: 80%; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1024px) {
  .menu .container { padding-left: calc(var(--pad-x) * 1.6); padding-right: calc(var(--pad-x) * 1.6); }
  .menu-item .img-wrap { width: 80%; }
}

/* ---- Serif italic (Cormorant) overlap fixes ----
   Tight display line-heights (0.84–0.9) clip the serif's taller
   ascenders/overhanging italics. Give headings breathing room and
   stop sizing the serif above its line box. */
.section-head h2 { line-height: 1.04; } /* <1 lets Boldonse ascenders escape the box */
/* Cross-font optical calibration: Cormorant's x-height sits far below
   Boldonse's at equal size — upscale, zero the line-height so the serif
   can't inflate the line box, and nudge onto the same optical baseline. */
.section-head h2 em,
.menu-item h3 em,
.story-text p.lede em {
  /* Fraunces x-height ≈ Archivo Black's, so almost no upscale needed
     (was 1.14 for Cormorant's tiny x-height) */
  font-size: 1.02em;
  line-height: 0;
  vertical-align: -0.01em;
  padding-right: 0.06em; /* italic overhang — stop last glyph clipping */
}
.story-text p.lede { line-height: 1.2; }

/* ---- Find section: next-stop card fills, h3 never overlaps ---- */
.next-stop h3 {
  line-height: 1.04;
  white-space: nowrap;
  font-size: clamp(28px, 7.5vw, 56px);
}
.upcoming-mini { display: none; }
@media (min-width: 1024px) {
  .next-stop { gap: 28px; padding: 40px; }
  .upcoming-mini {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 18px;
    gap: 0;
  }
  .um-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 9px 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .um-row:hover { transform: translateX(3px); }
  .um-row .um-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .um-row.on { color: #fff; font-weight: 700; }
  .um-row:not(.on) { opacity: 0.75; }
}

/* ---- Section head mobile: no overlap ---- */
@media (max-width: 767px) {
  .section-head h2 { font-size: clamp(40px, 10.5vw, 72px); line-height: 0.98; }
}

/* ---- Map: frameless + control restyle + popups ---- */
.map-card { border: none; border-radius: 12px; }
.osm-map .leaflet-control-zoom {
  border: none;
  box-shadow: 0 6px 18px rgba(14,10,10,0.18);
  border-radius: 999px;
  overflow: hidden;
}
.osm-map .leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  line-height: 34px;
  background: rgba(244, 239, 230, 0.92);
  color: var(--ink);
  border: none;
  font-family: var(--font-mono);
  font-size: 15px;
  opacity: 0.85;
}
.osm-map .leaflet-control-zoom a:hover { background: var(--brand); color: #fff; opacity: 1; }
.osm-map .leaflet-popup-content-wrapper {
  background: var(--cream);
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(14,10,10,0.22);
}
.osm-map .leaflet-popup-tip { background: var(--cream); }
.osm-map .leaflet-popup-content { margin: 14px 16px; font-family: var(--font-body); }
.truck-popup .tp-place {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.truck-popup .tp-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 1px solid rgba(14,10,10,0.1);
}
.truck-popup .tp-go {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.schedule-row { cursor: pointer; }

/* ---- Schedule: closed days = half height, no hours ---- */
.schedule-row.closed { padding: 8px 0; opacity: 0.4; }
.schedule-row.closed .time { display: none; }
@media (min-width: 1024px) {
  .schedule-row.closed { padding: 10px 0; }
}

/* ---- Footer ---- */
.footer-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(218, 24, 132, 0.25);
  transition: transform 0.25s ease;
}
.footer-live-btn:hover { transform: translateY(-2px); }
.footer-live-btn .sep-bar { width: 1px; height: 11px; background: rgba(255,255,255,0.4); flex-shrink: 0; }
.footer .big {
  white-space: nowrap;
  font-size: clamp(44px, 11.5vw, 170px);
}
.footer-bottom span { white-space: nowrap; }
@media (max-width: 767px) {
  .footer-bottom { font-size: 8.5px; letter-spacing: 0.1em; }
}

/* ============================================================
   Polish pass 2 — pill behavior, header ratios, map popup
   ============================================================ */

/* ---- Status pills: shared rules ----
   Breathing dot + status label + arrow NEVER hide.
   When space runs out: hide hours first, then place. Text centered. */
.hero-truck-live { justify-content: center; }
.hero-truck-live .arrow { flex-shrink: 0; }
.hero-truck-live .live-dot { flex-shrink: 0; }
@media (max-width: 480px) {
  .hero-truck-live span:nth-child(5),  /* time */
  .hero-truck-live span:nth-child(4) { display: none; } /* its divider */
}
@media (max-width: 360px) {
  .hero-truck-live span:nth-child(3),  /* place */
  .hero-truck-live span:nth-child(2) { display: none; } /* its divider */
}

/* Header pill — same anatomy: dot · label · place · arrow */
.header-truck-live { justify-content: center; }
.header-truck-live .hl-arrow { flex-shrink: 0; }
.header-truck-live .hl-label { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 420px) {
  .header-truck-live .hl-place { display: none; }
}

/* ---- Header proportions: logo full width, slimmer pill, smaller burger ---- */
@media (max-width: 1023px) {
  .site-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .site-header .logo-mark { font-size: 11px; overflow: visible; }
  .header-truck-live { justify-self: center; padding: 8px 14px; font-size: 9px; max-width: 100%; }
  .nav-toggle { width: 30px; height: 30px; gap: 4px; padding: 5px; }
  .nav-toggle span { height: 1.5px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}

/* ---- Map popup: rows scroll, GO button stays put, slim scrollbar ---- */
.osm-map .leaflet-popup-content { max-height: none; overflow: visible; }
.truck-popup { min-width: 200px; }
.truck-popup .tp-rows {
  max-height: min(150px, 28vh);
  overflow-y: auto;
  padding-right: 10px;            /* keep the bar off the text */
  margin-right: -6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(218,24,132,0.45) transparent;
}
.truck-popup .tp-rows::-webkit-scrollbar { width: 3px; }
.truck-popup .tp-rows::-webkit-scrollbar-thumb { background: rgba(218,24,132,0.45); border-radius: 99px; }
.truck-popup .tp-rows::-webkit-scrollbar-track { background: transparent; }
.truck-popup .tp-row { white-space: nowrap; }
.truck-popup .tp-row span { white-space: nowrap; flex-shrink: 0; }
.truck-popup .tp-go {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ---- Card radii: match map and next-stop card ---- */
.next-stop { border-radius: 12px; }
.map-card { border-radius: 12px; }

/* ---- Text overlap fixes (screenshots) ---- */
/* Section head: TC mark tucks to the top so the italic serif tail
   ("truck") can't collide with the pinyin line. */
@media (min-width: 1024px) {
  .section-head .tc-mark { align-self: start; }
}
.section-head h2 em { padding-right: 0.14em; }
/* Story lede: Boldonse needs real leading at this size */
.story-text p.lede { line-height: 1.25; }

/* ---- Side popup (desktop): opens right of the pin, no tip ---- */
.osm-map .side-pop .leaflet-popup-tip-container { display: none; }
.osm-map .side-pop .leaflet-popup-content-wrapper {
  box-shadow: -6px 10px 28px rgba(14, 10, 10, 0.2);
}

/* ============================================================
   Polish pass 3 — small-width fixes, iOS safe area, footer
   ============================================================ */

/* ---- iOS: extend header colour behind the Dynamic Island ---- */
.site-header {
  padding-top: calc(14px + env(safe-area-inset-top));
  padding-left: calc(var(--pad-x) + env(safe-area-inset-left));
  padding-right: calc(var(--pad-x) + env(safe-area-inset-right));
}
.site-header.is-scrolled { padding-top: calc(10px + env(safe-area-inset-top)); }
@media (min-width: 768px) {
  .site-header { padding-top: calc(18px + env(safe-area-inset-top)); }
}

/* ---- Next-stop card: no overflow at 375px ---- */
.next-stop h3 {
  font-size: clamp(20px, 6.8vw, 56px);
  max-width: 100%;
}
@media (max-width: 430px) {
  .next-stop { padding: 20px; gap: 16px; }
  .next-stop .countdown { gap: 8px; }
  .next-stop .countdown .n { font-size: 24px; }
  .next-stop .addr { font-size: 13px; }
}

/* ---- Section head: stop tc-mark / italic collisions on phones ---- */
@media (max-width: 767px) {
  .section-head { gap: 24px 20px; }
  .section-head .tc-mark { font-size: 18px; line-height: 1.35; }
  .section-head h2 { font-size: clamp(36px, 9.6vw, 64px); }
}

/* ---- Footer: compact balanced layout ---- */
@media (max-width: 639px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}
.footer h4 { margin-bottom: 10px; }
.footer ul { min-height: 48px; font-size: 13px; }
.footer .footer-live-btn { margin-top: 2px; }
@media (max-width: 767px) {
  .footer .big { font-size: clamp(36px, 10.5vw, 90px); }
  .footer-bottom { gap: 4px; }
}

/* ---- Truck marker (today's confirmed stop) ---- */
.truck-pin-map {
  background: none;
  border: none;
  filter: drop-shadow(0 4px 7px rgba(14, 10, 10, 0.35));
}

/* Narrow screens: tile padding eats proportionally more — trim the type */
@media (max-width: 767px) {
  .hero-title .row .word { font-size: clamp(28px, 8.1vw, 190px); }
  .hero-title .hero-tc { font-size: clamp(22px, 6.4vw, 138px); }
}

/* ============================================================
   Loading ritual
   ============================================================ */
/* Editorial splash — warm paper, charcoal type, quiet restraint.
   No glow, bloom, grain, or strong shadow. Elegance from spacing + rhythm. */
#loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--cream);          /* same warm white as the homepage */
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Scroll held while the brief opening plays */
html.is-entering, html.is-entering body { overflow: hidden; height: 100%; touch-action: none; }

#loader .ld-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Brand mark — kept small and quiet; no shadow, no light emission */
#loader .ld-mark {
  width: clamp(46px, 6vw, 60px);
  opacity: 0;
}
#loader .ld-mark svg { display: block; width: 100%; height: auto; max-width: none; }

/* Wordmark — the full brand name as one unit, equally weighted.
   Intentionally typeset: single line, refined tracking, optical balance. */
#loader .ld-name {
  margin-top: clamp(20px, 3.4vh, 30px);
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(18px, 4.6vw, 32px);
  letter-spacing: 0.015em;      /* Archivo Black runs tight; open it a hair */
  line-height: 1;
  white-space: nowrap;          /* NOM NOM TAIWAN stays one wordmark */
  color: #211B19;               /* warm charcoal, not pure black */
  opacity: 0;
}

/* ============================================================
   Header pill: expands from the centre when data arrives
   ============================================================ */
.header-truck-live.ready {
  animation: pillIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: center;
}
.header-truck-live.ready > * {
  animation: pillContentIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}
@keyframes pillIn {
  from { transform: scaleX(0.12); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
@keyframes pillContentIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.header-truck-live { visibility: hidden; }
.header-truck-live.ready { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .header-truck-live.ready, .header-truck-live.ready > * { animation: none; }
}

/* ============================================================
   Mob hero photos: same scattered collage as web, scaled — no carousel
   ============================================================ */
@media (max-width: 1023px) {
  /* title owns the full wrap height; the collage lives one layer below it */
  .hero-title-wrap {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
  .hero-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
  }
  .hero-poly-mobile {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
    scroll-snap-type: none;
    margin: 0;
    padding: 0;
  }
  .hero-poly-mobile::-webkit-scrollbar { display: none; }
  /* height-driven: frame hugs the photo (whose height is capped below), so
     the collage stays locked inside the hero container and the 4/5 ratio
     never stretches. Widths derive from height instead of % of viewport. */
  .hero-poly-mobile .polaroid { flex: 0 0 auto; width: auto; }
  .hero-poly-mobile .polaroid:nth-child(1) { transform: rotate(7deg); z-index: 2; }
  .hero-poly-mobile .polaroid:nth-child(2) { transform: rotate(-9deg); margin: 16px -10px 0; z-index: 1; }
  .hero-poly-mobile .polaroid:nth-child(3) { transform: rotate(4deg); margin-top: 5px; z-index: 1; }
  .hero-poly-mobile .polaroid.p-md { padding: 6px 6px 20px; }
  .hero-poly-mobile .caption { font-size: 7px; bottom: 6px; left: 6px; right: 6px; }
}

/* ============================================================
   Footer: two balanced blocks
   ============================================================ */
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;          /* two blocks share the width */
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.f-block {
  display: grid;
  grid-template-rows: auto auto auto;       /* heading + max two content rows */
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.f-block h4 { margin-bottom: 0; }
.f-body {
  font-size: clamp(13px, 1.3vw, 15px);
  line-height: 1.55;
  max-width: 44ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;                    /* content row 1: max two lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: clamp(12px, 1.2vw, 14px);
  min-height: 0;
}
.f-links a {
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.f-links a:hover { color: var(--brand); border-color: var(--brand); }
.f-block .footer-live-btn { justify-self: start; }

@media (max-width: 767px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }  /* same rules, stacked */
}

/* ============================================================
   Fixes batch (model handoff → Opus): B loader / C pill / D poly / G footer
   ============================================================ */

/* ---- B: loader is now GSAP-animated; CSS-only overrides removed ---- */

/* ---- C: header pill expand owned solely by the pillIn keyframe (above).
   The old transition-based .ready here raced the keyframe and ate the
   animation on cached loads. Hidden until status loads via visibility only. ---- */

/* ---- D: keep desktop polaroids inside the container (no edge bleed) ---- */
@media (min-width: 1024px) {
  .hero-poly.p1 { right: clamp(0px, 1.5vw, 28px); }
  .hero-poly.p3 { right: 0; }
}
@media (min-width: 1200px) {
  .hero-poly.p1 { right: clamp(0px, 2vw, 40px); }
  .hero-poly.p3 { right: 0; }
}
/* ---- D: mob polaroids capped so the cluster stays within hero-title-wrap ---- */
@media (max-width: 1023px) {
  .hero-poly-mobile { align-items: flex-end; bottom: 0; }
  /* Height-driven 4/5 box: height is capped (fits the hero container) and the
     width derives from it, so the photo is BOTH ratio-locked (no stretch) and
     height-locked (no overflow above the nav). */
  .hero-poly-mobile .photo { aspect-ratio: 4/5; height: clamp(120px, 22vh, 210px); width: auto; }
}

/* ---- next-stop h3: fluid no-wrap scaling. Long names break into clean
   lines via place-multi (splits on & and -); each line scales with the card,
   never clipped, never the ragged 3-line word-wrap. ---- */
.next-stop h3 {
  display: flex;
  flex-direction: column;
  min-width: 0;
  white-space: nowrap;
  /* cqw = % of the card width → "South Airways" shrinks to fit one line
     inside the card at any viewport, never bleeding past the right edge */
  font-size: clamp(24px, 12cqw, 56px);
  line-height: 0.98;
}

/* ---- G: footer block ul aligned across columns; bottom row tokenised ---- */
.footer-top .f-block { display: flex; flex-direction: column; }
.footer-top .f-block .f-body { min-height: 2.9em; }   /* reserve 2 lines → ul lines up */
.footer .big { white-space: nowrap; text-align: left; }
.footer-bottom { gap: 6px; margin-top: 24px; }
.footer-bottom span { white-space: nowrap; }
