/* RailRobin website. Plain CSS, no framework. Colours are the app's (app/lib/theme.dart). */

@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage-800.a0562a1961.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/assets/fonts/hanken-400.99e86993d9.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/assets/fonts/hanken-600.931b850226.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/assets/fonts/hanken-700.ba9198c65c.woff2") format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }

:root {
  /* Brand (same in both modes) */
  --paper: #FFF8EC;
  --ink: #161412;
  --yellow: #FFC83D;
  --red: #D9411E;
  --teal: #8FD3C8;
  --coral: #F6C9B8;
  --butter: #FFE7A3;
  --green: #237047;
  --blue: #1F4FA0;
  --dark2: #2A2622;
  --dark3: #3A352F;
  --beak: #F5A623;

  /* Metro lines */
  --blr-purple: #8B3A9C;
  --blr-green: #1E9A4C;
  --blr-yellow: #F2C200;
  --che-blue: #1F5FAD;
  --che-green: #2E8B57;
  --che-yellow: #FFDF00;

  /* Neutrals (light) */
  --bg: var(--paper);
  --bg-alt: #FBEFD9;
  --surface: #FFFFFF;
  --surface-2: #FFF3DD;
  --fg: var(--ink);
  --muted: #4A443C;
  --line: #E5DCCD;
  --edge: var(--ink);
  --accent-text: #A33512;
  --green-text: var(--green);
  --robin-outline: transparent;
  --shadow: 0 1px 0 rgba(22, 20, 18, .06), 0 18px 40px -18px rgba(22, 20, 18, .28);
  --shadow-pop: 6px 6px 0 var(--ink);

  --display: "Bricolage", "Hanken", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Hanken", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13110F;
    --bg-alt: #1A1715;
    --surface: #221F1C;
    --surface-2: #2C2825;
    --fg: #F4EFE7;
    --muted: #B9B0A3;
    --line: #3A352F;
    --edge: #5C554C;
    --accent-text: #FF9878;
    --green-text: #6FD39C;
    --robin-outline: var(--paper);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .7);
    --shadow-pop: 6px 6px 0 #000;
  }
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.04; letter-spacing: -.025em; margin: 0 0 .5em; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: clamp(2.25rem, 7.4vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.8vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: -.015em; line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--yellow); } }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--body); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 6px; border-radius: 3px; background: var(--red); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40ch; }

/* ---------- Buttons */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: .8em 1.4em; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 1rem/1.1 var(--body); text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn-yellow { --btn-bg: var(--yellow); --btn-fg: var(--ink); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--fg); border-color: var(--edge); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; background: var(--surface); }
.btn svg { width: 20px; height: 20px; flex: none; }
@media (prefers-color-scheme: dark) {
  .btn { --btn-bg: var(--paper); --btn-fg: var(--ink); border-color: var(--paper); box-shadow: 0 4px 0 #000; }
  .btn:hover { box-shadow: 0 6px 0 #000; }
  .btn-yellow { --btn-bg: var(--yellow); border-color: var(--yellow); }
  .btn-ghost { --btn-bg: transparent; --btn-fg: var(--fg); border-color: var(--edge); box-shadow: none; }
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--yellow); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 40px; height: 40px; }
.brand-word { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1; }
.brand-word span { color: var(--red); }
@media (prefers-color-scheme: dark) { .brand-word span { color: #FF7A55; } }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { min-height: 44px; padding: .6em 1.1em; font-size: .95rem; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--edge);
    background: var(--surface); color: var(--fg); cursor: pointer;
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .nav-toggle .i-close { display: none; }
  .nav-toggle[aria-expanded="true"] .i-close { display: block; }
  .nav-toggle[aria-expanded="true"] .i-open { display: none; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 22px; box-shadow: var(--shadow);
  }
  .nav-menu { display: none; }
  .nav-menu.is-open { display: block; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 14px 12px; font-size: 1.1rem; border-radius: 12px; }
  .nav-cta { margin: 12px 0 0; }
  .nav-cta .btn { width: 100%; min-height: 52px; }
}
@media (min-width: 901px) { .nav-menu { display: flex; align-items: center; } }

/* ---------- Robin mascot (inline SVG) */
.robin .r-ink { fill: var(--ink); }
.robin .r-wing { fill: var(--dark3); }
.robin .r-red { fill: var(--red); }
.robin .r-beak { fill: var(--beak); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.robin .r-white { fill: #fff; }
.robin .r-outline { fill: none; stroke: var(--robin-outline); stroke-width: 7; stroke-linejoin: round; }
.robin .r-leg { stroke: var(--ink); stroke-width: 4.4; stroke-linecap: round; }
.robin .r-dot { fill: #fff; stroke: var(--ink); stroke-width: 3.4; }
.robin.on-dark .r-outline { stroke: var(--paper); }
.robin.on-dark .r-leg { stroke: var(--paper); }
.robin.on-dark .r-perch { fill: var(--paper); }
@media (prefers-color-scheme: dark) {
  .robin .r-leg { stroke: var(--paper); }
  .robin .r-perch { fill: var(--paper); }
  .robin.on-light .r-outline { stroke: transparent; }
  .robin.on-light .r-leg { stroke: var(--ink); }
  .robin.on-light .r-perch { fill: var(--ink); }
}
.robin .r-body { animation: robin-bob 2.6s ease-in-out infinite; }
.robin .r-eye { transform-box: fill-box; transform-origin: center; animation: robin-blink 5.2s infinite; }
.robin .r-wave { transform-box: fill-box; transform-origin: 20% 80%; animation: robin-wave 1.3s ease-in-out infinite; }
@keyframes robin-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes robin-blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.12); } }
@keyframes robin-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); } }

/* ---------- Hero */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(56px, 8vw, 110px); overflow: hidden; isolation: isolate; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--red); position: relative; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .hero h1 em { color: #FF7A55; } }
.hero h1 em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .02em; height: .14em; z-index: -1;
  background: var(--yellow); border-radius: 99px; transform-origin: left; animation: underline 1s .4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; font-size: .92rem; margin-bottom: 22px; color: var(--fg);
}
.pill .live { width: 10px; height: 10px; border-radius: 50%; background: var(--blr-green); box-shadow: 0 0 0 0 rgba(30, 154, 76, .6); animation: pulse 2s infinite; margin-left: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30, 154, 76, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(30, 154, 76, 0); } }
.greet { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 18px; padding: 0; list-style: none; font-weight: 700; font-size: 1.05rem; }
.greet li { padding: 4px 12px; border-radius: 10px; background: var(--butter); color: var(--ink); animation: greet-in .6s cubic-bezier(.2, .8, .2, 1) both; }
.greet li:nth-child(2) { background: var(--teal); animation-delay: .12s; }
.greet li:nth-child(3) { background: var(--coral); animation-delay: .24s; }
.greet li:nth-child(4) { background: var(--surface); border: 1.5px solid var(--line); color: var(--fg); animation-delay: .36s; }
@keyframes greet-in { from { opacity: 0; transform: translateY(10px) rotate(-2deg); } to { opacity: 1; transform: none; } }
.hero .lede { margin-bottom: 28px; max-width: 34ch; }
.hero-note { margin-top: 18px; font-size: .95rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note svg { width: 18px; height: 18px; flex: none; }

.hero-lines { position: absolute; inset: auto 0 0 0; width: 100%; height: 62%; z-index: -1; pointer-events: none; opacity: .9; }
.hero-lines path { fill: none; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.4s .2s cubic-bezier(.3, .7, .2, 1) forwards; }
.hero-lines path:nth-child(2) { animation-delay: .45s; }
.hero-lines path:nth-child(3) { animation-delay: .7s; }
.hero-lines circle { fill: var(--bg); stroke: var(--fg); stroke-width: 4; opacity: 0; animation: fade 1s 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 600px; padding-top: 70px; }
.phone-wrap { position: relative; }
.hero-robin { position: absolute; width: 138px; top: -96px; right: -54px; z-index: 3; filter: drop-shadow(0 10px 18px rgba(22, 20, 18, .18)); }
.float-chip {
  position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 16px; background: var(--surface); color: var(--fg); border: 2px solid var(--ink);
  font-weight: 700; font-size: .92rem; box-shadow: 4px 4px 0 var(--ink); animation: floaty 5s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) { .float-chip { border-color: var(--edge); box-shadow: 4px 4px 0 #000; } }
.float-chip .coin { width: 22px; height: 22px; }
.chip-coins { left: -128px; top: 61%; }

.chip-alert .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Phone frame */
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 19.2;
  border-radius: 46px; background: #0E0D0C; padding: 11px;
  box-shadow: 0 0 0 2px #2b2724, 0 40px 80px -30px rgba(22, 20, 18, .55), inset 0 0 0 2px #2b2724;
  transform: rotate(2.5deg);
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 20px; background: #0E0D0C; z-index: 3; }
.phone-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.phone.tilt-left { transform: rotate(-2deg); }
.status-bar { display: flex; justify-content: space-between; padding: 14px 24px 6px; font-weight: 700; font-size: 12px; }
.status-bar .sb-icons { display: flex; gap: 5px; align-items: center; }
.status-bar .sb-icons i { display: block; width: 14px; height: 9px; border-radius: 2px; background: currentColor; opacity: .85; }
.status-bar .sb-icons i:first-child { width: 10px; }

/* Metro Mode board mock */
.mm { padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.mm .stops { margin-top: 2px; }
.mm-top { display: flex; align-items: center; justify-content: space-between; }
.mm-badge { font-weight: 800; font-size: 10.5px; letter-spacing: .12em; padding: 5px 9px; border-radius: 99px; background: var(--ink); color: var(--yellow); display: inline-flex; gap: 6px; align-items: center; }
.mm-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3BD16F; }
.mm-coins { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px; background: var(--butter); padding: 4px 9px 4px 5px; border-radius: 99px; }
.mm-coins .coin { width: 18px; height: 18px; }
.board { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 14px 14px 16px; position: relative; overflow: hidden; }
.board-line { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 11px; padding: 4px 9px; border-radius: 99px; background: var(--blr-green); color: #fff; }
.board-line.purple { background: var(--blr-purple); }
.board-label { margin-top: 12px; font-size: 10.5px; letter-spacing: .14em; font-weight: 700; color: #CFC6B8; text-transform: uppercase; }
.board-next { font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.02; letter-spacing: -.02em; margin-top: 2px; color: var(--yellow); }
.board-sub { color: #E8E4DC; font-size: 12px; margin-top: 4px; }
.board-eta { position: absolute; right: 14px; top: 14px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; }
.board-eta small { display: block; font-family: var(--body); font-size: 9.5px; letter-spacing: .12em; color: #CFC6B8; font-weight: 700; margin-top: 3px; }
.led { margin-top: 12px; border-radius: 10px; background: #000; padding: 7px 10px; overflow: hidden; white-space: nowrap; font: 700 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #FFB224; letter-spacing: .08em; text-shadow: 0 0 6px rgba(255, 178, 36, .8); }
.led span { display: inline-block; padding-left: 100%; animation: ticker 13s linear infinite; }
@keyframes ticker { to { transform: translateX(-100%); } }
.stops { list-style: none; margin: 0; padding: 4px 4px 0 6px; position: relative; display: grid; gap: 9px; }
.stops::before { content: ""; position: absolute; left: 12px; top: 10px; bottom: 10px; width: 5px; border-radius: 3px; background: var(--blr-green); }
.stops li { position: relative; display: flex; align-items: center; gap: 12px; padding-left: 0; font-weight: 600; font-size: 12.5px; }
.stops .sd { width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3.5px solid var(--ink); flex: none; position: relative; z-index: 1; }
.stops .done { color: #8a8278; }
.stops .done .sd { background: var(--blr-green); border-color: var(--blr-green); }
.stops .now .sd { background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 200, 61, .45); animation: pulse-y 1.8s infinite; }
@keyframes pulse-y { 50% { box-shadow: 0 0 0 7px rgba(255, 200, 61, 0); } }
.stops .now { font-weight: 800; }
.stops .tag { margin-left: auto; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--blr-purple); color: #fff; }
.mm-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.mm-card { border-radius: 14px; padding: 9px 10px; background: #fff; border: 1.5px solid var(--sand, #E5DCCD); font-size: 11px; font-weight: 600; }
.mm-card b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: -.01em; }
.mm-card.y { background: var(--butter); border-color: transparent; }
.mm-card.t { background: var(--teal); border-color: transparent; }

/* Train-front card: the app's Home card head-on (app/lib/screens/home.dart, _CoachPainter._paintFront;
   the board is widgets/destination_board.dart). Bengaluru cab: a silver body with an even rim on all
   sides; inside it the lighter front in a slim line-colour frame whose corners are concentric with the
   body (inner radius = outer radius - rim); a dark windscreen with round top corners; the red marker
   light centred on the roof; two headlights each side on a line-colour band; bogies underneath.
   Flat colours only. */
.tf { --tf-line: var(--blr-green); --tf-side: #D9DDE3; --tf-face: #EDEFF2; --tf-rim: 7px; --tf-r: 40px; --tf-rb: 12px;
  position: relative; margin: 0 4px; padding-bottom: 12px; }
@media (prefers-color-scheme: dark) { .tf { --tf-side: #B4BAC3; --tf-face: #C9CED5; } }
.tf-body {
  position: relative; padding: var(--tf-rim); background: var(--tf-side);
  border-radius: var(--tf-r) var(--tf-r) var(--tf-rb) var(--tf-rb);
  box-shadow: 0 0 0 1px rgba(22, 20, 18, .18), 0 14px 22px -14px rgba(22, 20, 18, .55);
}
.tf-front {
  position: relative; background: var(--tf-face); border: 4px solid var(--tf-line);
  border-radius: calc(var(--tf-r) - var(--tf-rim)) calc(var(--tf-r) - var(--tf-rim)) calc(var(--tf-rb) - var(--tf-rim)) calc(var(--tf-rb) - var(--tf-rim));
  padding: 12px 4px 0;
}
.tf-marker { position: absolute; left: 50%; top: 3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #E5322B; box-shadow: 0 0 0 2px rgba(229, 50, 43, .25); }
.tf-glass {
  position: relative; border-radius: 26px 26px 7px 7px; overflow: hidden; padding: 9px 11px 12px;
  background: #1D2635; color: var(--paper);
  box-shadow: 0 0 0 3px #07090D, inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.tf-glass::before, .tf-glass::after { /* the glare: a wide soft band and a thin one beside it */
  content: ""; position: absolute; top: 0; bottom: 0; left: 6%; width: 46px; pointer-events: none;
  background: rgba(255, 255, 255, .06); transform: skewX(-24deg); transform-origin: top left;
}
.tf-glass::after { left: calc(6% + 56px); width: 8px; }
.tf-board {
  position: relative; z-index: 1; height: 26px; margin: 0 6px; border-radius: 5px; background: #050608; border: 1px solid #2A2F38;
  display: grid; place-items: center; overflow: hidden;
}
.tf-board::after { /* a fine dark grid over the letters, so they read as rows of lamps */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(5, 6, 8, .32) 0 .6px, transparent .6px 2.2px), repeating-linear-gradient(0deg, rgba(5, 6, 8, .32) 0 .6px, transparent .6px 2.2px);
}
.tf-frame {
  grid-area: 1 / 1; white-space: nowrap; font: 800 12.5px/1.1 var(--body); letter-spacing: .1em; color: #FFB020;
  text-shadow: 0 0 4px rgba(255, 176, 32, .7), 0 0 1px #FFB020; opacity: 0; transform: translateY(25%); transition: opacity .45s ease, transform .45s ease;
}
.tf-frame[lang] { letter-spacing: 0; }
.tf-frame.is-on { opacity: 1; transform: none; }
.tf-words { position: relative; z-index: 1; padding: 10px 2px 0; }
.tf-words .mm-badge { font-size: 9.5px; padding: 4px 8px; }
.tf-eta { position: absolute; right: 2px; top: 10px; text-align: right; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; }
.tf-eta small { display: block; font-family: var(--body); font-size: 9.5px; letter-spacing: .12em; color: #CFC6B8; font-weight: 700; margin-top: 3px; }
.tf-words .board-label { margin-top: 10px; }
.tf-words .led { margin-top: 10px; }
/* The lamp band: a line-colour band across the front, two lamps each side, the same inset both sides. */
.tf-lamps { position: relative; height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.tf-lamps::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; background: var(--tf-line); }
.tf-lamps span { position: relative; display: flex; gap: 5px; }
.tf-lamps i { width: 11px; height: 11px; border-radius: 50%; background: #FFF4D6; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 4px rgba(255, 244, 214, .35); }
.tf-under { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; }
.tf-under::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 5px; border-radius: 0 0 3px 3px; background: #3B4250; }
.tf-under i { position: absolute; top: 4px; width: 52px; height: 7px; border-radius: 3.5px; background: #3B4250; }
.tf-under i:first-child { left: 28px; }
.tf-under i:last-child { right: 28px; }
@media (prefers-color-scheme: dark) { .tf-under::before, .tf-under i { background: #5A6270; } }
/* In-app alert, pinned under the train card's edge. */
.mm-alert { position: relative; z-index: 2; align-self: center; margin-top: -16px; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 99px; background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-weight: 800; font-size: 11.5px; animation: alert-pop 4s ease-in-out infinite; }
.mm-alert .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@keyframes alert-pop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
/* Arriving progress, between the station list and the cards. */
.mm-arrive { border-radius: 14px; background: #fff; border: 1.5px solid #E5DCCD; padding: 9px 11px; font-size: 11px; font-weight: 600; }
.mm-arrive .row { display: flex; justify-content: space-between; align-items: baseline; }
.mm-arrive b { font-family: var(--display); font-size: 14px; }
.mm-arrive .bar { margin-top: 7px; height: 6px; border-radius: 3px; background: #E5DCCD; overflow: hidden; }
.mm-arrive .bar i { display: block; width: 62%; height: 100%; background: var(--blr-green); border-radius: 3px; }
.mm-top .board-line { font-size: 10.5px; }

/* Robin chat mock */
.chat { display: flex; flex-direction: column; flex: 1; background: var(--paper); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px 10px; border-bottom: 1px solid #E5DCCD; }
.chat-head .av { width: 38px; height: 38px; border-radius: 12px; background: var(--yellow); display: grid; place-items: center; flex: none; }
.chat-head .av svg { width: 34px; }
.chat-head b { display: block; font-family: var(--display); font-size: 15px; }
.chat-head small { color: #4A443C; font-size: 11px; }
.chat-body { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: 12.5px; line-height: 1.42; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: #fff; border: 1.5px solid #E5DCCD; border-bottom-left-radius: 5px; }
.src { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed #E5DCCD; font-size: 10.5px; font-weight: 700; color: #1F4FA0; }
.src svg { width: 13px; height: 13px; flex: none; }
.chat-input { margin: 0 12px 14px; border-radius: 99px; border: 1.5px solid #E5DCCD; background: #fff; padding: 9px 14px; color: #8a8278; font-size: 12px; display: flex; justify-content: space-between; align-items: center; }
.chat-input i { width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); display: block; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8a8278; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Ticker strip */
.strip { background: var(--ink); color: var(--paper); padding: 18px 0; overflow: hidden; border-block: 4px solid var(--yellow); }
.strip-track { display: flex; gap: 0; width: max-content; animation: marquee 38s linear infinite; }
.strip ul { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.strip li { display: flex; align-items: center; gap: 18px; padding-right: 18px; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -.01em; white-space: nowrap; }
.strip li::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 4px solid var(--yellow); }
.strip li:nth-child(3n+2)::after { border-color: var(--teal); }
.strip li:nth-child(3n)::after { border-color: var(--coral); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections */
.section { padding-block: clamp(64px, 10vw, 128px); position: relative; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--ink); color: var(--paper); --fg: var(--paper); --muted: #CFC6B8; --line: #3A352F; --surface: #221F1C; --surface-2: #2C2825; --accent-text: #FF9878; --robin-outline: var(--paper); }
.section.dark .eyebrow::before { background: var(--yellow); }
@media (prefers-color-scheme: dark) { .section.dark { background: #0B0A09; border-block: 1px solid #2C2825; } }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head p { color: var(--muted); font-size: 1.15rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip > :first-child { order: 2; }

/* How it works: stations on a line */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; counter-reset: step; }
.journey::before { content: ""; position: absolute; left: 8%; right: 8%; top: 31px; height: 10px; border-radius: 5px; background: var(--blr-green); }
.journey li { position: relative; text-align: center; padding: 0 8px; }
.journey .stn {
  counter-increment: step; position: relative; z-index: 1; width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%;
  background: var(--bg); border: 6px solid var(--fg); display: grid; place-items: center;
  font-family: var(--display); font-size: 1.6rem;
}
.section.alt .journey .stn { background: var(--bg-alt); }
.journey .stn::before { content: counter(step); }
.journey h3 { margin-bottom: .35em; }
.journey p { color: var(--muted); max-width: 30ch; margin-inline: auto; }

/* Feature list */
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.ticks .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--butter); color: var(--ink); }
.ticks li:nth-child(4n+2) .ic { background: var(--teal); }
.ticks li:nth-child(4n+3) .ic { background: var(--coral); }
.ticks li:nth-child(4n) .ic { background: var(--surface-2); color: var(--fg); }
.ticks .ic svg { width: 18px; height: 18px; }
.ticks b { display: block; font-size: 1.06rem; }
.ticks span { color: var(--muted); }

/* Robin section */
.lang-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 18px; }
.lang-tabs button {
  font: 700 1rem/1 var(--body); padding: 12px 18px; min-height: 46px; border-radius: 999px; cursor: pointer;
  border: 2px solid #5C554C; background: transparent; color: var(--paper);
}
.lang-tabs button[aria-selected="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.robin-stage { position: relative; display: grid; place-items: center; }
.robin-stage .phone { transform: rotate(-2deg); }

.qa-panel[hidden] { display: none; }
.no-js-note { font-size: .9rem; color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); margin-top: 18px; }

/* Play & earn */
.games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game {
  position: relative; border-radius: var(--radius); padding: 22px 20px 20px; min-height: 178px;
  background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 6px; transition: transform .2s ease, box-shadow .2s ease;
}
@media (prefers-color-scheme: dark) { .game { border-color: var(--edge); } }
.game:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.game .gi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 8px; background: var(--butter); color: var(--ink); font-family: var(--display); font-size: 1.3rem; }
.game:nth-child(4n+2) .gi { background: var(--teal); }
.game:nth-child(4n+3) .gi { background: var(--coral); }
.game:nth-child(4n) .gi { background: var(--yellow); }
.game h3 { margin: 0; font-size: 1.15rem; }
.game p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.coin-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.stat { border-radius: var(--radius); padding: 22px; background: var(--yellow); color: var(--ink); }
.stat:nth-child(2) { background: var(--teal); }
.stat:nth-child(3) { background: var(--coral); }
.stat:nth-child(4) { background: var(--butter); }
.stat b { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; letter-spacing: -.03em; }
.stat span { font-weight: 600; font-size: .98rem; }
.coin { display: inline-block; }

/* Stories */
.stories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.story { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.story figcaption { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.story .kind { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent-text); }
.story b { font-family: var(--display); font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.15; }
.story small { color: var(--muted); font-size: .78rem; margin-top: auto; padding-top: 8px; line-height: 1.4; }
.story small a { color: inherit; }
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.extra { border-radius: var(--radius); padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.extra h3 { font-size: 1.2rem; }
.extra p { margin: 0; color: var(--muted); }
.extra.dyk { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.extra.dyk p { color: #E8E4DC; }
.extra.dyk .eyebrow { color: var(--yellow); }
.extra.dyk .eyebrow::before { background: var(--yellow); }
.poll { display: grid; gap: 8px; margin-top: 12px; }
.poll div { position: relative; border-radius: 12px; padding: 9px 12px; background: var(--surface-2); font-weight: 600; font-size: .95rem; overflow: hidden; display: flex; justify-content: space-between; }
.poll div::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: var(--butter); z-index: 0; border-radius: 12px; }
.poll div > * { position: relative; z-index: 1; }
.poll .p1 { --w: 58%; }
.poll .p2 { --w: 27%; }
.poll .p3 { --w: 15%; }
@media (prefers-color-scheme: dark) { .poll div::before { background: #5A4A1E; } }

/* Accessibility */
.station-map { border-radius: var(--radius); background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-pop); padding: 22px; }
@media (prefers-color-scheme: dark) { .station-map { border-color: var(--edge); } }
.station-map h3 { display: flex; align-items: center; gap: 10px; }
.station-map h3 .ln { width: 14px; height: 14px; border-radius: 50%; background: var(--blr-purple); }
.exits { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.exits li { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.exits .ex { width: 46px; height: 46px; border-radius: 12px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-family: var(--display); font-size: 1.3rem; }
@media (prefers-color-scheme: dark) { .exits .ex { background: var(--paper); color: var(--ink); } }
.exits b { display: block; }
.exits small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.badge svg { width: 15px; height: 15px; }
.badge.ok { background: #D7F0DF; color: #155E33; }
.badge.no { background: var(--line); color: var(--fg); }
@media (prefers-color-scheme: dark) { .badge.ok { background: #1E3B2A; color: #8FE3B0; } }
.map-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }

/* Cities */
.cities { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.city { position: relative; border-radius: 28px; padding: clamp(24px, 4vw, 40px); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.city h3 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: .1em; }
.city .op { color: var(--muted); font-weight: 600; margin-bottom: 22px; }
.city .lang { position: absolute; right: clamp(20px, 3vw, 36px); top: clamp(20px, 3vw, 36px); font-weight: 700; font-size: 1.5rem; color: var(--muted); opacity: .55; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lines li { display: grid; grid-template-columns: 1fr; gap: 6px; }
.lines .bar { height: 12px; border-radius: 6px; position: relative; background: var(--c); }
.lines .bar::before, .lines .bar::after { content: ""; position: absolute; top: -5px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }
.lines .bar::before { left: -2px; }
.lines .bar::after { right: -2px; }
.lines .lname { display: flex; justify-content: space-between; font-weight: 700; }
.lines .lname small { font-weight: 600; color: var(--muted); }
.c-blr-purple { --c: var(--blr-purple); }
.c-blr-green { --c: var(--blr-green); }
.c-blr-yellow { --c: var(--blr-yellow); }
.c-che-blue { --c: var(--che-blue); }
.c-che-green { --c: var(--che-green); }
.c-che-yellow { --c: var(--che-yellow); }
.next-city { margin-top: 22px; text-align: center; color: var(--muted); }

/* Next stops: the cities as a metro map line. Flat colours only: Bengaluru's segment is Namma Metro
   purple and Chennai's is CMRL blue, meeting at an interchange dot; the coming-soon track is a plain
   dashed grey; running stations are solid, coming-soon ones hollow with a neutral outline. */
.next-stops { margin-top: clamp(48px, 7vw, 80px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.next-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-bottom: 34px; }
.next-head h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
.announce {
  position: relative; display: flex; align-items: center; gap: 12px; max-width: 560px; padding: 12px 16px; border-radius: 12px;
  background: #050608; border: 1px solid #2A2F38; color: #FFB020; overflow: hidden;
}
.announce svg { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 0 4px rgba(255, 176, 32, .6)); }
.announce p { margin: 0; font: 800 .82rem/1.45 var(--body); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 4px rgba(255, 176, 32, .7); }
.announce::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(90deg, rgba(5, 6, 8, .3) 0 .6px, transparent .6px 2.4px), repeating-linear-gradient(0deg, rgba(5, 6, 8, .3) 0 .6px, transparent .6px 2.4px); }

.route { --track: #8A8278; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 30px; }
@media (prefers-color-scheme: dark) { .route { --track: #8F877C; } }
.route li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 4px; min-width: 0; }
.route b { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.route small { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.route .live small { color: var(--green-text); }
.route .dot { position: relative; z-index: 2; width: 28px; height: 28px; border-radius: 50%; margin-bottom: 10px; background: var(--surface); border: 5px solid var(--track); }
/* Track from this station to the next one: plain dashes, solid grey. */
.route li::before {
  content: ""; position: absolute; z-index: 0; top: 10px; left: 50%; width: 100%; height: 8px;
  background: repeating-linear-gradient(90deg, var(--track) 0 12px, transparent 12px 22px);
}
.route li.more::before { display: none; }
/* Running: solid stations in their line colours; Bengaluru to Chennai is two solid segments. */
.route .blr .dot { background: var(--blr-purple); border-color: var(--blr-purple); }
.route .che .dot { background: var(--che-blue); border-color: var(--che-blue); }
.route .blr::before { width: 50%; background: var(--blr-purple); }
.route .seg-che { position: absolute; z-index: 0; top: 10px; left: 100%; width: 50%; height: 8px; background: var(--che-blue); }
.route .xchg { position: absolute; z-index: 1; top: 4px; left: 100%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }
@media (prefers-color-scheme: dark) { .route .xchg { border-color: var(--paper); background: var(--surface); } }
.route .soon .dot { animation: stop-pulse 2.6s ease-out infinite; }
.route .soon:nth-child(4) .dot { animation-delay: .3s; }
.route .soon:nth-child(5) .dot { animation-delay: .6s; }
.route .soon:nth-child(6) .dot { animation-delay: .9s; }
.route .soon:nth-child(7) .dot { animation-delay: 1.2s; }
@keyframes stop-pulse { 0% { box-shadow: 0 0 0 0 rgba(138, 130, 120, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(138, 130, 120, 0); } }
.route .more .arrow { width: 28px; height: 28px; margin-bottom: 10px; display: grid; place-items: center; color: var(--track); }
.route .more .arrow svg { width: 28px; height: 28px; }
.route .more b { color: var(--muted); font-family: var(--body); font-weight: 600; font-size: .95rem; }

.request { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 38px; padding-top: 26px; border-top: 1px dashed var(--line); }
.request label { font-weight: 700; font-size: 1.05rem; margin-right: 4px; }
.request select {
  font: 600 1rem/1.2 var(--body); min-height: 52px; padding: 0 40px 0 16px; border-radius: 14px; border: 2px solid var(--edge);
  color: var(--fg); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.next-stops .next-city { margin-top: 18px; text-align: left; font-size: .92rem; }

/* Medium widths: two rows of four, the track breaking at the end of the first row. */
@media (max-width: 1200px) {
  .route { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .route li:nth-child(4)::before { display: none; }
}
/* Phones: the line runs down the page. */
@media (max-width: 640px) {
  .route { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .route li { flex-direction: row; text-align: left; gap: 14px; padding: 0 0 22px; align-items: center; }
  .route li:nth-child(4)::before { display: block; }
  .route li.more::before { display: none; }
  .route li::before { top: 14px; left: 10px; width: 8px; height: 100%; background: repeating-linear-gradient(180deg, var(--track) 0 10px, transparent 10px 18px); }
  .route .blr::before { width: 8px; height: 50%; background: var(--blr-purple); }
  .route li.blr { padding-bottom: 40px; }
  .route .seg-che { top: calc(14px + 50%); left: 10px; width: 8px; height: 50%; }
  .route .xchg { top: calc(14px + 50% - 10px); left: 14px; }
  .route .dot, .route .more .arrow { margin: 0; flex: none; }
  .route .more .arrow svg { transform: rotate(90deg); }
  .route li small { margin-left: auto; }
  .request select, .request .btn { width: 100%; }
}

/* Trust */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trust-card { border-radius: var(--radius); padding: 26px; background: var(--surface); border: 1px solid var(--line); }
.trust-card .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--yellow); color: var(--ink); margin-bottom: 16px; }
.trust-card:nth-child(3n+2) .ic { background: var(--teal); }
.trust-card:nth-child(3n) .ic { background: var(--coral); }
.trust-card .ic svg { width: 24px; height: 24px; }
.trust-card h3 { font-size: 1.2rem; }
.trust-card p { margin: 0; color: var(--muted); }
.where { margin-top: 28px; border-radius: var(--radius); border: 1px dashed var(--edge); padding: 22px 24px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.where p { margin: 0; color: var(--muted); }
.where .flag { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); font-family: var(--display); font-size: 1.1rem; }

/* Glance */
.glance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--ink); background: var(--surface); }
@media (prefers-color-scheme: dark) { .glance { border-color: var(--edge); } }
.glance div { padding: 26px 22px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.glance div:nth-child(2n) { border-right: 0; }
.glance div:nth-child(n+3) { border-bottom: 0; }
@media (prefers-color-scheme: dark) { .glance div { border-color: var(--edge); } }
.glance b { display: block; font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.04em; }
.glance span { color: var(--muted); font-weight: 600; }

/* CTA band */
.cta-band { position: relative; border-radius: 36px; background: var(--yellow); color: var(--ink); padding: clamp(32px, 6vw, 72px); overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: center; isolation: isolate; }
.cta-band h2 { margin-bottom: .3em; }
.cta-band p { font-size: 1.15rem; max-width: 46ch; color: #2A2622; }
.cta-band .btn { --btn-bg: var(--ink); --btn-fg: var(--paper); border-color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.cta-band .btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .35); }
.cta-band .robin { width: 100%; max-width: 260px; justify-self: center; }
.cta-band::before { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .28); z-index: -1; }
.play-soon { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 14px; background: var(--ink); color: var(--paper); text-decoration: none; min-height: 56px; }
.play-soon svg { width: 26px; height: 26px; }
.play-soon small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.play-soon b { display: block; font-size: 1.1rem; line-height: 1.1; }

/* ---------- Page (inner pages) */
.page-hero { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 44px); position: relative; overflow: hidden; }
.page-hero .lede { max-width: 56ch; }
.page-hero::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 8px; border-radius: 4px; max-width: calc(var(--wrap) - 2 * var(--gutter)); margin-inline: auto; background: var(--yellow); opacity: .9; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .95rem; margin-top: 8px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }

.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); padding-block: clamp(32px, 5vw, 56px) clamp(64px, 8vw, 110px); align-items: start; }
.toc { position: sticky; top: 92px; font-size: .95rem; }
.toc b { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--line); display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 8px; color: var(--fg); text-decoration: none; border-radius: 8px; line-height: 1.35; }
.toc a:hover { background: var(--surface-2); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent-text); }
.prose .table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 700; }
.callout { border-radius: 18px; padding: 18px 20px; background: var(--surface-2); border-left: 6px solid var(--yellow); margin: 1.4em 0; }
.callout.info { border-left-color: var(--blue); }
.callout.red { border-left-color: var(--red); }
.callout p:last-child { margin-bottom: 0; }
.tbd { background: var(--butter); color: var(--ink); padding: .05em .35em; border-radius: 6px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .tbd { background: #5A4A1E; color: var(--paper); } }
.steps { counter-reset: s; list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 58px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin: 0 !important; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--display); display: grid; place-items: center; font-size: .95rem; }
@media (prefers-color-scheme: dark) { .steps li::before { background: var(--yellow); color: var(--ink); } }
.path { font-weight: 700; background: var(--surface-2); padding: .1em .45em; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Legal hub & support cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--edge); }
.card h2, .card h3 { font-size: 1.25rem; margin: 0; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); }
.card .go { margin-top: auto; padding-top: 12px; font-weight: 700; color: var(--accent-text); }
.card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--butter); color: var(--ink); margin-bottom: 8px; }
.card:nth-child(3n+2) .ic { background: var(--teal); }
.card:nth-child(3n) .ic { background: var(--coral); }
.card .ic svg { width: 22px; height: 22px; }

.cards + .callout, .callout + .cta-band { margin-top: 32px; }

/* FAQ */
.faq-wrap { padding-block: clamp(32px, 5vw, 56px) clamp(64px, 8vw, 110px); display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.faq-group { margin-bottom: 44px; scroll-margin-top: 96px; }
.faq-group > h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.faq-group > h2::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 5px solid var(--c, var(--blr-purple)); flex: none; }
.faq-group:nth-of-type(2) { --c: var(--blr-green); }
.faq-group:nth-of-type(3) { --c: var(--blr-yellow); }
.faq-group:nth-of-type(4) { --c: var(--che-blue); }
.faq-group:nth-of-type(5) { --c: var(--red); }
.faq { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 10px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq[open] { border-color: var(--edge); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 700; font-size: 1.06rem; position: relative; border-radius: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161412' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat; transition: transform .25s ease; }
.faq[open] summary::after { transform: rotate(45deg); background-color: var(--yellow); }
.faq .ans { padding: 0 20px 20px; color: var(--muted); }
.faq .ans p:last-child { margin-bottom: 0; }

/* ---------- Footer */
.site-footer { background: var(--ink); color: #E8E4DC; padding: clamp(48px, 7vw, 80px) 0 28px; margin-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--yellow); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .brand { color: var(--paper); display: inline-flex; padding: 0; }
.site-footer .brand:hover { text-decoration: none; color: var(--paper); }
.site-footer .brand-word span { color: #FF7A55; }
.site-footer p { color: #CFC6B8; max-width: 34ch; margin-top: 14px; }
.site-footer h2 { font-family: var(--body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #CFC6B8; margin: 6px 0 14px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--paper); text-decoration: none; display: inline-block; padding: 5px 0; }
.site-footer a:hover { text-decoration: underline; color: var(--yellow); }
.site-footer :focus-visible { outline-color: var(--yellow); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid #3A352F; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .88rem; color: #B9B0A3; }
.foot-bottom p { margin: 0; max-width: none; color: inherit; }
.foot-greet span { margin-right: 10px; }

/* ---------- 404 */
.lost { padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 100px); }
.lost-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.pis {
  border-radius: 22px; background: #0B0A09; border: 6px solid #2A2622; padding: 16px 18px; color: #FFB224;
  font: 700 clamp(.95rem, 2.4vw, 1.25rem)/1.35 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .08em; text-transform: uppercase; box-shadow: var(--shadow); text-shadow: 0 0 8px rgba(255, 178, 36, .75); position: relative;
}
.pis-row { display: flex; justify-content: space-between; gap: 12px; }
.pis-row + .pis-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #3A352F; }
.pis .muted { color: #8FD3C8; text-shadow: 0 0 8px rgba(143, 211, 200, .6); }
.pis-msg { min-height: 1.35em; display: block; transition: opacity .35s ease; }
.pis-msg.is-fading { opacity: 0; }
.lost h1 { margin-top: 26px; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.lost-code { display: inline-block; font-family: var(--display); font-size: .95rem; padding: 6px 12px; border-radius: 10px; background: var(--red); color: #fff; letter-spacing: .02em; }
.platform { position: relative; height: 330px; border-radius: 28px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--ink); box-shadow: var(--shadow-pop); }
@media (prefers-color-scheme: dark) { .platform { border-color: var(--edge); } }
.platform .sign { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); background: var(--blue); color: #fff; font-weight: 800; padding: 8px 16px; border-radius: 10px; font-size: .95rem; white-space: nowrap; box-shadow: 0 3px 0 #0E2B5C; }
.platform .sign::before, .platform .sign::after { content: ""; position: absolute; top: -18px; width: 3px; height: 18px; background: var(--muted); }
.platform .sign::before { left: 22px; }
.platform .sign::after { right: 22px; }
.platform::before { content: ""; position: absolute; left: 0; right: 0; top: 62%; bottom: 0; background: var(--bg-alt); }
.platform .edge { position: absolute; left: 0; right: 0; top: 62%; height: 10px; background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, var(--ink) 22px 30px); }
.platform .track { position: absolute; left: 0; right: 0; bottom: 30px; height: 6px; background: #8a8278; box-shadow: 0 22px 0 #8a8278; }
.platform .robin { position: absolute; width: 150px; left: 50%; margin-left: -75px; top: 62px; }
.platform .q { position: absolute; left: calc(50% + 50px); top: 44px; font-family: var(--display); font-size: 2.4rem; color: var(--red); animation: floaty 2.4s ease-in-out infinite; }
.train { position: absolute; bottom: 36px; left: 100%; display: flex; gap: 6px; transition: none; }
.train .car { width: 180px; height: 70px; border-radius: 16px 16px 8px 8px; background: var(--blr-purple); position: relative; box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .18); }
.train .car:first-child { border-radius: 40px 16px 8px 8px; }
.train .car::before { content: ""; position: absolute; left: 16px; right: 16px; top: 12px; height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, #CFE7F5 0 34px, transparent 34px 44px); }
.train .car::after { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 6px; background: var(--yellow); }
.platform.arriving .train { animation: train-in 1.6s cubic-bezier(.2, .7, .3, 1) forwards; }
.platform.departing .train { animation: train-out 1.3s cubic-bezier(.6, 0, .8, .4) forwards; }
.platform.departing .robin { animation: hop 1s ease-in forwards; }
@keyframes train-in { from { left: 100%; } to { left: 4%; } }
@keyframes train-out { from { left: 4%; } to { left: -140%; } }
@keyframes hop { 40% { transform: translateY(-30px); } 100% { transform: translate(-300px, 40px); opacity: 0; } }
.lost-actions { margin-top: 26px; }
.quiz { position: relative; margin-top: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.quiz-head h2 { font-size: 1.25rem; margin: 0; letter-spacing: -.01em; }
.quiz-coins { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; padding: 5px 12px 5px 6px; border-radius: 99px; background: var(--butter); color: var(--ink); position: relative; }
.quiz-coins .coin { width: 22px; height: 22px; }
.quiz-coins.bump { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }
.quiz-q { font-weight: 700; margin: 6px 0 12px; }
.quiz-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quiz-opts button { font: 700 1rem/1.2 var(--body); min-height: 48px; padding: 10px; border-radius: 14px; border: 2px solid var(--edge); background: var(--bg); color: var(--fg); cursor: pointer; transition: transform .15s ease, background-color .2s ease; }
.quiz-opts button:hover:not(:disabled) { transform: translateY(-2px); }
.quiz-opts button.right { background: #D7F0DF; border-color: #1E9A4C; color: #155E33; }
.quiz-opts button.wrong { background: #FBDCD3; border-color: var(--red); color: #8A2A10; }
.quiz-opts button:disabled { cursor: default; }
.quiz-fb { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; color: var(--muted); }
.quiz-note { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.sparkle { position: absolute; pointer-events: none; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--ink); animation: spark .8s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* ---------- Reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }

/* ---------- Responsive */
@media (max-width: 1080px) {
  .games, .stories, .coin-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .chip-coins { left: -6px; top: -58px; }
}
@media (max-width: 900px) {
  .hero-grid, .split, .cities, .cta-band, .lost-grid { grid-template-columns: minmax(0, 1fr); }
  .split.flip > :first-child { order: 0; }
  .hero-visual { min-height: 0; padding-top: 84px; }
  .hero-robin { width: 112px; right: -18px; top: -84px; }
  .trust, .cards, .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .lost-grid > .platform { order: -1; }
  .toc { position: static; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 16px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .cta-band .robin { max-width: 180px; order: -1; justify-self: start; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .journey { grid-template-columns: 1fr; gap: 8px; }
  .journey::before { left: 35px; right: auto; top: 20px; bottom: 20px; width: 10px; height: auto; background: var(--blr-green); }
  .journey li { display: grid; grid-template-columns: 72px 1fr; gap: 0 18px; text-align: left; padding: 0 0 20px; }
  .journey .stn { margin: 0; grid-row: span 2; }
  .journey p { margin-inline: 0; }
  .games, .stories, .trust, .cards, .extras, .coin-row { grid-template-columns: minmax(0, 1fr); }
  .games { gap: 14px; }
  .game { min-height: 0; }
  .float-chip { font-size: .82rem; padding: 8px 11px; }
  .chip-coins { left: -6px; top: -58px; }
  .quiz-opts { grid-template-columns: 1fr; }
  .platform { height: 250px; }
  .platform .sign { font-size: .85rem; }
  .platform .robin { top: 52px; }
  .platform .robin { width: 120px; margin-left: -60px; }
  .where { grid-template-columns: 1fr; }
  .lang-tabs button { flex: 1 1 40%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .exits li { grid-template-columns: 40px 1fr; }
  .exits .badge { grid-column: 2; justify-self: start; }
  .exits .ex { width: 40px; height: 40px; }
}

/* Phones: tables become one card per row, each cell labelled, so nothing is cut off at the edge. */
@media (max-width: 640px) {
  .prose .table-wrap { overflow: visible; border: 0; background: none; border-radius: 0; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; min-width: 0; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 6px 0; margin-bottom: 12px; }
  .prose td { border: 0; padding: 6px 14px; }
  .prose td::before { content: attr(data-label); display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
  .prose td:first-child { font-family: var(--display); font-size: 1.05rem; }
  .prose td:first-child::before { display: none; }
  .lines .lname { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ---------- Motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .robin .r-body, .robin .r-eye, .robin .r-wave, .float-chip, .strip-track, .led span, .platform .q { animation: none !important; }
  .led span { padding-left: 0; }
  .hero-lines path { stroke-dashoffset: 0; animation: none !important; }
  .hero-lines circle { opacity: 1; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tf-frame { transition: none !important; }
  .route .soon .dot, .mm-alert { animation: none !important; }
}

@media print {
  .site-header, .site-footer, .toc, .nav-toggle, .hero-lines { display: none !important; }
  body { background: #fff; color: #000; }
  .doc-layout { display: block; }
}
