/* Homepage — flat signage design (2026-10 redesign).
   Loads with chrome.css (shared header/footer). Light, flat: borders and tints separate regions,
   no shadows, no gradients; line colour is the only saturated hue.
   Rules: .claude/skills/bengalurumetro-design/SKILL.md */

:root {
  --l-purple: #7b3a92; --l-green: #00874a; --l-yellow: #f2c200;
  --l-pink: #c2185b; --l-blue: #1f5fbf; --l-red: #c62828; --l-orange: #b54d00;
  --ink: #16141a; --ink-2: #4b4752; --ink-3: #6f6a76;
  --bg: #fbfaf8; --panel: #f1efec; --rule: #dcd8d2; --card: #ffffff;
  --link: #1f5fa8; --focus: #1f6fb5; --ad: #eeece8;
  --brand: var(--l-purple);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;

  /* legacy tokens still read by the lazily-loaded journey results (enhanced-results.css) */
  --garden-green: #00874a; --tech-purple: #7b3a92; --heritage-terracotta: #b54d00;
  --purple-line: #7b3a92; --green-line: #00874a; --yellow-line: #c79f00;
  --white: #ffffff; --light-gray: #f1efec; --text-dark: #16141a; --text-light: #6f6a76;
  --border-light: #dcd8d2; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 8px; --radius-xl: 8px;
  --space-xs: .25rem; --space-sm: .5rem; --space-md: 1rem; --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem;
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none; --shadow-xl: none;
  --transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body.hm { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--font-ui); }
.hm a { color: var(--link); text-underline-offset: 3px; }
.hm a, .hm button, .hm summary, .hm select { touch-action: manipulation; }
.hm :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hm h1, .hm h2, .hm h3 { margin: 0; text-wrap: balance; }
.hm p { margin: 0; }
.hm ul, .hm ol { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }
.hm-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.hm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- section labels: one quiet style for every section (consistent rhythm) ---------- */
.hm .hm-h2 { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 40px 0 12px; scroll-margin-top: 72px; }
.hm-lead { color: var(--ink-2); max-width: 65ch; margin-bottom: 12px !important; }
.hm-note { color: var(--ink-3); font-size: .875rem; margin-top: 10px !important; max-width: 65ch; }

/* ---------- 1. hero: name + planner, answer first ---------- */
.hm-hero { background: var(--card); border-bottom: 1px solid var(--rule); }
.hm-hero .hm-wrap { display: grid; gap: 20px; padding-block: 20px 24px; }
@media (min-width: 900px) { .hm-hero .hm-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: start; padding-block: 40px 44px; } }
.hm-eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.hm .hm-hero h1 { margin-top: 6px; font-weight: 800; font-size: clamp(2rem, 7vw, 3.25rem); line-height: 1.05; letter-spacing: -.03em; }
.hm-hero h1 .kn { display: block; margin-top: 6px; font-size: clamp(1.15rem, 3.6vw, 1.6rem); font-weight: 600; letter-spacing: 0; color: var(--ink-3); line-height: 1.3; }
.hm .hm-hero h2 { margin-top: 14px; font-size: 1.125rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.hm-sub { color: var(--ink-2); margin-top: 4px !important; max-width: 52ch; }
.hm-facts { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 16px !important; font-size: .875rem; color: var(--ink-3); }
.hm-facts li { display: inline-flex; align-items: center; }
.hm-facts li + li::before { content: "·"; margin: 0 8px; color: var(--rule); }
.hm-facts b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.hm-strip { display: flex; height: 6px; margin-top: 20px; border-radius: 3px; overflow: hidden; max-width: 320px; }
.hm-strip i { flex: 1; }

/* top tasks: three, not eight (Hick's law) */
.hm-tasks { display: grid; gap: 8px; margin-top: 20px; }
@media (min-width: 560px) and (max-width: 899px) { .hm-tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hm-task { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 8px; color: var(--ink) !important; text-decoration: none; font-weight: 600; transition: background-color 120ms var(--ease-out); }
.hm-task small { display: block; font-weight: 400; color: var(--ink-3); font-size: .8125rem; }
.hm-task::after { content: "\2192"; margin-left: auto; color: var(--ink-3); }
.hm-task:active { background: var(--panel); }
@media (hover: hover) and (pointer: fine) { .hm-task:hover { background: var(--panel); } }

/* planner card */
.hm-planner { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--brand); border-radius: 8px; padding: 16px; scroll-margin-top: 72px; }
.hm-planner-title { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.hm-planner p.hm-planner-sub { color: var(--ink-2); font-size: .875rem; margin-top: 2px; }
.hm-form { margin-top: 12px; display: grid; gap: 12px; }
.hm-field label { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.hm-field select { width: 100%; min-height: 48px; font: 16px/1.2 var(--font-ui); color: var(--ink); background: var(--card); border: 1px solid #bdb7ae; border-radius: 8px; padding: 10px 36px 10px 12px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b4752' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.hm-field select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.hm-ft { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: end; }
.hm-ft .hm-field + .hm-field { grid-column: 1; }
.hm-swap { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 48px; height: 48px; border: 1px solid var(--rule); border-radius: 8px; background: var(--bg); color: var(--ink-2); font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; }
.hm-swap:active { background: var(--panel); }
.hm-go { width: 100%; min-height: 52px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: 700 1rem/1 var(--font-ui); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform 120ms var(--ease-out); }
.hm-go:active { transform: scale(.98); }
.hm-go:disabled { opacity: .7; }
.hm-go i, .hm-swap i { font-size: .95em; }

/* returning-visitor greeting keeps its inline styles; just give it room */
#nm-welcome:not([hidden]) { margin-top: 16px; }

/* ---------- results (rendered by app.js / enhanced-results.js) ---------- */
.results-section { display: none; margin-top: 24px; scroll-margin-top: 72px; }
.results-section.show { display: block; }
.hm .result-card { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--brand); border-radius: 8px; padding: 16px; }
.hm #journey-header, .hm #journey-header h3 { font-size: 1.05rem; font-weight: 700; }
.hm #results [class] { box-shadow: none !important; }
.hm #results [class*="segment"], .hm #results .total-journey { background-image: none !important; }

/* ---------- link lists (tools, stations) ---------- */
.hm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; border-top: 1px solid var(--rule); }
@media (min-width: 700px) { .hm-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hm-list a { display: flex; align-items: center; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--rule); color: var(--ink) !important; text-decoration: none; font-weight: 500; font-size: .9375rem; line-height: 1.3; }
.hm-list a::after { content: "\2192"; margin-left: auto; padding-left: 10px; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) { .hm-list a:hover { color: var(--link) !important; } }

/* popular routes */
.hm-routes { display: grid; gap: 8px; }
@media (min-width: 700px) { .hm-routes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-route { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 60px; padding: 10px 14px 10px 0; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; color: var(--ink) !important; text-decoration: none; overflow: hidden; }
.hm-route > i { align-self: stretch; background: var(--c); }
.hm-route b { font-weight: 700; display: block; }
.hm-route small { color: var(--ink-3); font-size: .8125rem; }
.hm-route .num { font-weight: 700; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .hm-route:hover { border-color: #bdb7ae; } }

/* lines */
.hm-lines { border-top: 1px solid var(--rule); }
.hm-line { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 0 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.hm-line > i { grid-row: 1 / span 3; background: var(--c); border-radius: 3px; }
.hm-line-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.hm-line-top a { font-weight: 700; font-size: 1.05rem; color: var(--ink) !important; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.hm-line-top a::after { content: "\2192"; margin-left: 6px; color: var(--ink-3); font-weight: 400; }
.hm-status { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 8px; padding: 2px 7px; background: var(--panel); color: var(--ink-2); white-space: nowrap; }
.hm-status.live { background: #e3f3ea; color: #0b5d36; }
.hm-line-route { color: var(--ink-2); font-size: .9375rem; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.hm-tags li { font-size: .8125rem; }
.hm-tags a, .hm-tags span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink-2) !important; text-decoration: none; }
.hm-tags a { min-height: 44px; }

/* fare table */
.hm-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.hm-table th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 8px 10px 8px 0; border-bottom: 2px solid var(--rule); }
.hm-table td { padding: 11px 10px 11px 0; border-bottom: 1px solid var(--rule); }
.hm-table td:first-child { font-weight: 600; }
.hm-table .r { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* map */
.hm-map img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.hm-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hm-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink) !important; text-decoration: none; font-weight: 600; font-size: .9375rem; }
.hm-btn:active { background: var(--panel); }
@media (hover: hover) and (pointer: fine) { .hm-btn:hover { border-color: #bdb7ae; } }

/* station chips filled by app.js */
.station-links { display: flex; flex-wrap: wrap; gap: 8px; }
.station-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 1px solid var(--rule); border-left: 4px solid var(--l-purple); border-radius: 8px; background: var(--card); color: var(--ink) !important; text-decoration: none; font-weight: 600; font-size: .9375rem; }
.station-link.green { border-left-color: var(--l-green); }
.station-link.yellow { border-left-color: var(--l-yellow); }
.station-link i { color: var(--ink-3); font-size: .85em; }

/* FAQ */
.hm-faq { border-top: 1px solid var(--rule); }
.hm-faq details { border-bottom: 1px solid var(--rule); }
.hm-faq summary { cursor: pointer; list-style: none; position: relative; padding: 14px 32px 14px 0; min-height: 44px; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: "+"; position: absolute; right: 4px; top: 11px; font-size: 1.25rem; color: var(--ink-3); }
.hm-faq details[open] summary::after { content: "\2013"; }
.hm-faq summary h3 { display: inline; font-size: 1rem; font-weight: 600; }
.hm-faq details p { color: var(--ink-2); padding-bottom: 14px; max-width: 70ch; }

/* ads: framed as ads, fixed space, never next to the planner */
.hm-ad { margin-block: 40px; background: var(--ad); border: 1px dashed var(--rule); border-radius: 8px; padding: 8px; min-height: 280px; }
.hm-ad .ad-unit__label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-align: center; margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) { .hm-go, .hm-task { transition: none; } .hm-go:active { transform: none; } }

/* hero order: phones = name → planner → facts/tasks (answer first); desktop = text left, planner right */
@media (min-width: 900px) {
  .hm-hero .hm-wrap { grid-template-areas: "intro plan" "more plan"; grid-template-rows: auto 1fr; row-gap: 0; }
  .hm-intro { grid-area: intro; } .hm-plan { grid-area: plan; } .hm-more { grid-area: more; }
}
@media (max-width: 899px) {
  .hm-hero .hm-wrap { gap: 16px; }
  .hm-hero h2 { margin-top: 10px; font-size: 1rem; }
  .hm-sub { font-size: .9375rem; }
  .hm-facts { margin-top: 0 !important; }
}

/* legacy first-visit "fares verified… View details" pop-in from app.js: it shifts the layout and its
   link only opens a "coming soon" alert, so it stays hidden on the redesigned homepage */
.fare-notification { display: none !important; }
.hm-hero .hm-wrap > * { min-width: 0; }
.hm .hm-facts { gap: 4px 16px; }
.hm .hm-facts li + li::before { content: none; }
.hm #results * { background-image: none !important; }
.hm :is(i.fas, i.fa, i.fab, i.far) { display: none !important; }

/* ---------- part 3: station search combobox + "Use my location" ---------- */
.hm-field { position: relative; }
.ps-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.ps-input { width: 100%; min-height: 48px; font: 16px/1.2 var(--font-ui); color: var(--ink); background: var(--card); border: 1px solid #bdb7ae; border-radius: 8px; padding: 10px 12px; -webkit-appearance: none; appearance: none; }
.ps-input::placeholder { color: var(--ink-3); }
.ps-input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.ps-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: min(320px, 55vh); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 4px 0; list-style: none; background: var(--card); border: 1px solid #bdb7ae; border-radius: 8px; }
.ps-list[hidden] { display: none; }
.ps-opt { display: grid; grid-template-columns: 4px minmax(0, 1fr); column-gap: 10px; align-items: center; min-height: 44px; padding: 6px 12px; cursor: pointer; }
.ps-opt i { grid-row: 1 / span 2; align-self: stretch; background: var(--c); border-radius: 2px; }
.ps-opt span { font-weight: 600; line-height: 1.25; }
.ps-opt small { color: var(--ink-3); font-size: .75rem; line-height: 1.2; }
.ps-opt.is-active, .ps-opt:active { background: var(--panel); }
@media (hover: hover) and (pointer: fine) { .ps-opt:hover { background: var(--panel); } }
.ps-empty { padding: 12px; color: var(--ink-3); font-size: .875rem; }
.ps-locate { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; }
.ps-locate-btn { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--link); font: 600 .9375rem/1 var(--font-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ps-locate-btn:disabled { color: var(--ink-3); }
.ps-locate-msg { font-size: .8125rem; color: var(--ink-2); }

/* ---------- part 3: results use the full width on desktop ---------- */
.hm-plan { display: contents; }
#nm-welcome { grid-area: auto; }
@media (min-width: 900px) {
  .hm-hero .hm-wrap { grid-template-areas: "intro welcome" "intro plan" "more plan" "res res"; grid-template-rows: auto auto 1fr auto; }
  #nm-welcome { grid-area: welcome; margin: 0 0 16px !important; }
  .hm-planner { grid-area: plan; }
  #results { grid-area: res; margin-top: 8px; }
  #results .jr { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 8px 40px; align-items: start; }
  #results .jr-sum, #results .jr-book, #results .jr-tips, #results .jr-note { grid-column: 1; }
  #results .jr-trip { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; }
  #results .jr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #results .jr-book { grid-template-columns: 1fr; }
}
.ps-locate { min-height: 44px; }
/* legacy theme toast ("Stations swapped!"): flat — hairline border, no shadow */
.hm .bangalore-toast { box-shadow: none !important; border: 1px solid var(--rule) !important; border-left: 4px solid var(--brand) !important; border-radius: 8px !important; background: var(--card) !important; color: var(--ink) !important; font-family: var(--font-ui) !important; }

/* craft pass (independent review) */
.hm .hm-h2 { font-size: 1.125rem; letter-spacing: -.01em; text-transform: none; color: var(--ink); font-weight: 700; margin: 40px 0 12px; }
.hm-task { border-left-width: 1px; }
.hm-task, .station-link { border-left-color: var(--rule) !important; border-left-width: 1px !important; }
.station-link { padding-left: 14px; }
.hm-line-top a::after { content: none; }
.hm-planner { border-top-width: 1px; border-top-color: var(--rule); }
.hm .result-card { border-top-width: 1px; border-top-color: var(--rule); }
.hm-ad { background: #f3f1ec; border: 1px solid var(--rule); }
.hm-ad .ad-unit__label { text-align: left; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.hm-strip { display: none; }
@media (min-width: 900px) {
  .hm-hero .hm-wrap { grid-template-areas: "welcome welcome" "intro plan" "res res"; grid-template-rows: auto auto auto; }
}
