/* home.css — the home page (home.html), "answer first": search + a live example answer,
   trust badges, live totals, a seasonal dates banner, audience tabs, what's new, popular
   places, professional plans and a compact footer. Builds on pages.css tokens and components
   (topbar, btn, card, checks, skip-link, theme toggle); light and dark through the tokens. */
body.home { overflow-x: hidden; }
html:has(body.home) { scroll-behavior: smooth; }
.home .wrap { max-width: 1200px; padding: 0 24px; }
.home section[id] { scroll-margin-top: 16px; }
.home .topbar .btn { white-space: nowrap; min-height: 44px; }

/* Gold focus ring on the navy bands (blue on light surfaces comes from pages.css). */
:root .hm-hero :focus-visible, :root .hm-pros :focus-visible { outline-color: var(--gold); }

/* ------------------------------------------------------------------ Header */
.hm-top .wrap { gap: 10px; }
.hm-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.hm-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: #DCE7F2; text-decoration: none; font-weight: 600; font-size: .92rem; }
.hm-nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.hm-menu { display: none; }
.hm-menu svg { stroke-width: 2.2; }

/* ------------------------------------------------------------------ Hero */
.hm-hero { background: var(--hero); color: #fff; padding: 40px 0 72px; }
.hm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 48px; align-items: center; }
.hm-hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hm-pill { align-self: flex-start; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.12); }
.hm-hero h1 { margin: 0; color: #fff; font-size: 3.2rem; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.hm-hero h1 span { display: block; }
.hm-lead { margin: 0; font-size: 1.18rem; line-height: 1.5; color: #DCE7F2; max-width: 540px; }
.hm-search { position: relative; display: flex; gap: 8px; max-width: 580px; padding: 8px; border-radius: 14px;
  background: #fff; box-shadow: var(--shadow); }
.hm-search-icon { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  fill: none; stroke: #5A6878; stroke-width: 2; pointer-events: none; }
.hm-search input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 12px 10px 40px; border: 0; background: transparent;
  font-size: 1.05rem; color: #1B2633; }
.hm-search input::placeholder { color: #5A6878; }
.hm-search input:focus, .hm-search input:focus-visible { box-shadow: none; outline: none; }
.hm-search:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.hm-search .btn { flex-shrink: 0; min-height: 48px; padding: 0 22px; font-size: 1rem; font-weight: 700; box-shadow: none; }
.hm-search-note { margin: -8px 0 0; font-size: .8rem; color: #B8C9DA; max-width: 580px; }
.hm-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.hm-try-label { color: #B8C9DA; }
.hm-chips { display: contents; list-style: none; margin: 0; padding: 0; }
.hm-chips li { display: block; }
.hm-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  color: #fff; background: rgba(255,255,255,.12); text-decoration: none; font-weight: 600; }
.hm-chip:hover { background: rgba(255,255,255,.2); }
.hm-open-map { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--gold); font-weight: 600; text-decoration: none; }
.hm-open-map:hover { text-decoration: underline; }

/* Example answer card */
.hm-example { background: var(--surface); color: var(--text); border-radius: 18px; box-shadow: 0 24px 48px rgba(0,0,0,.25);
  overflow: hidden; min-width: 0; }
.hm-ex-map { height: 140px; background: #E4ECF3; }
[data-theme="dark"] .hm-ex-map { background: #1A2B3C; }
.hm-ex-map svg { display: block; width: 100%; height: 100%; }
.hm-ex-roads { stroke: #fff; stroke-width: 6; fill: none; }
[data-theme="dark"] .hm-ex-roads { stroke: #2A3F55; }
.hm-ex-area { fill: rgba(36,104,168,.16); stroke: #2468A8; stroke-width: 2.5; stroke-dasharray: 6 4; }
[data-theme="dark"] .hm-ex-area { fill: rgba(108,176,240,.16); stroke: #6CB0F0; }
.hm-ex-pin { fill: var(--gold); stroke: #14324F; stroke-width: 3; }
.hm-ex-body { padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.hm-ex-title { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.hm-ex-kicker { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hm-ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hm-ex-school { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.hm-ex-badge { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .82rem; }
.lv-e { background: var(--good-bg); color: var(--good); }
.lv-m { background: var(--info-bg); color: var(--info-text); }
.lv-h { background: var(--warn-bg); color: var(--warn-text); }
.hm-ex-text { display: flex; flex-direction: column; min-width: 0; }
.hm-ex-name { color: var(--ink); }
.hm-ex-meta { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm-ex-src { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.45; }
.hm-ex-src > span + span:not(:empty)::before { content: " · "; }
.hm-ex-src .bnd-src { font-size: inherit; }
.hm-ex-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.hm-ex-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ Trust badges */
.hm-trust { position: relative; z-index: 2; list-style: none; margin: -30px 0 0; padding: 14px 20px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-sm); font-size: .9rem; font-weight: 600; color: var(--ink); }
.hm-trust li { display: flex; align-items: center; gap: 8px; }
.hm-trust svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-trust-more { margin-left: auto; }
.hm-trust-more a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.hm-trust-more a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ Live totals */
.hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; }
.hm-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 16px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); }
.hm-stats dd { margin: 0; font-size: 1.75rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hm-stats dt { font-size: .88rem; color: var(--muted); }
.hm-stats-note { font-size: .8rem; margin: 8px 0 0; }

/* ------------------------------------------------------------------ Seasonal banner */
.hm-season { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 20px 0 0; padding: 14px 20px; border-radius: 14px;
  background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.hm-season[hidden] { display: none; }
.hm-season > svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-season-text { flex: 1 1 300px; min-width: 0; }
.hm-season h2 { margin: 0; font-size: 1rem; color: inherit; }
.hm-season p { margin: 2px 0 0; font-size: .9rem; }
.hm-season-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: inherit; }

/* ------------------------------------------------------------------ Sections */
.hm-section { padding: 52px 0 0; }
.hm-section h2 { margin: 0 0 16px; font-size: 1.8rem; font-weight: 800; }
.hm-section-lead { margin: -10px 0 18px; color: var(--muted); }

/* Audience tabs */
.hm-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.hm-tabs [role="tab"] { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: .94rem; cursor: pointer; white-space: nowrap; }
.hm-tabs [role="tab"]:hover { border-color: var(--accent); }
.hm-tabs [role="tab"][aria-selected="true"] { background: #14324F; border-color: #14324F; color: #fff; font-weight: 700; }
[data-theme="dark"] .hm-tabs [role="tab"][aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #14324F; }
.hm-panel { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding: 26px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); }
.hm-panel[hidden] { display: none; }
.hm-panel-head { flex: 1 1 280px; min-width: 0; }
.hm-panel h3 { margin: 0 0 8px; font-size: 1.35rem; }
.hm-panel-head p { margin: 0 0 18px; color: var(--muted); line-height: 1.5; }
.hm-panel-cta { min-height: 44px; }
.hm-tiles { flex: 2 1 480px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm-tiles a { display: flex; flex-direction: column; gap: 2px; height: 100%; min-height: 44px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.hm-tiles a:hover { border-color: var(--accent); background: var(--hover); }
.hm-tiles b { color: var(--ink); }
.hm-tiles span { font-size: .88rem; color: var(--muted); }
.hm-tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* New on the map */
.hm-new { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-new a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.hm-new a:hover { border-color: var(--accent); }
.hm-new svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-new b { color: var(--ink); }
.hm-new span { font-size: .88rem; color: var(--muted); }

/* Popular places */
#places h2 { font-size: 1.35rem; }
.hm-places { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hm-places a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); color: var(--ink); font-weight: 600; text-decoration: none; }
.hm-places a:hover { border-color: var(--accent); }
.hm-places .hm-places-all a { background: transparent; border-color: transparent; color: var(--accent); padding: 0 6px; }
.hm-places .hm-places-all a:hover { text-decoration: underline; }

/* For professionals */
.hm-pros { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 24px; align-items: end; padding: 32px 36px;
  border-radius: 20px; background: #14324F; color: #fff; }
[data-theme="dark"] .hm-pros { background: #112A44; border: 1px solid var(--border); }
.hm-pros h2 { margin: 0 0 6px; color: #fff; font-size: 1.7rem; }
.hm-pros > p { margin: 0; color: #DCE7F2; }
.hm-pros-cta { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 44px; }
.hm-pro-list { grid-column: 1 / -1; list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hm-pro-list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.hm-pro-list a:hover { background: rgba(255,255,255,.14); }
.hm-pro-desc { font-size: .88rem; color: #DCE7F2; }
.hm-pro-price { margin-top: auto; padding-top: 6px; color: var(--gold); font-weight: 700; }
.hm-pro-price:empty { display: none; }

/* Privacy (compact; linked from every page as home.html#privacy) */
.hm-privacy h2 { font-size: 1.35rem; }
.hm-privacy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.hm-privacy-list li { font-size: .88rem; color: var(--muted); }

/* ------------------------------------------------------------------ Footer */
.hm-foot { margin-top: 48px; padding: 20px 0 28px; background: var(--surface); }
.hm-foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.hm-foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.hm-foot-links a:hover { color: var(--accent); text-decoration: underline; }
.hm-foot .pb-slot { margin-top: 8px; }
.hm-foot-note { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: .8rem; }

/* ------------------------------------------------------------------ Sticky address bar (phones) */
.hm-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; gap: 8px; padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -6px 18px rgba(16,32,52,.12); }
.hm-sticky[hidden] { display: none; }
.hm-sticky input { flex: 1; min-width: 0; min-height: 44px; }
.hm-sticky .btn { min-height: 44px; padding: 0 18px; }

/* ------------------------------------------------------------------ Narrower screens */
@media (max-width: 1080px) {
  .hm-hero h1 { font-size: 2.6rem; }
  .hm-hero-grid { gap: 32px; }
  .hm-new, .hm-pro-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hm-hero-grid { grid-template-columns: 1fr; }
  .hm-example { max-width: 580px; }
  .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-tiles { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .home .wrap { padding: 0 16px; }
  body.home.hm-has-sticky { padding-bottom: 72px; }
  /* Header: brand, theme, language and a menu for the four links. */
  .hm-top .wrap { gap: 6px; flex-wrap: nowrap; }
  .hm-top .brand { min-width: 0; font-size: .95rem; }
  .hm-top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hm-top .brand svg { width: 28px; height: 28px; flex-shrink: 0; }
  .hm-menu { display: inline-flex; }
  .hm-top .btn { padding: 6px 10px; font-size: .84rem; }
  .hm-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 150; flex-direction: column; align-items: stretch;
    padding: 6px 16px 12px; background: #14324F; box-shadow: var(--shadow); }
  [data-theme="dark"] .hm-nav { background: #0D1D2E; }
  .hm-nav.is-open { display: flex; }
  .hm-top { position: relative; }

  .hm-hero { padding: 20px 0 24px; }
  .hm-hero-copy { gap: 14px; }
  .hm-pill { display: none; }
  .hm-hero h1 { font-size: 2rem; line-height: 1.1; }
  .hm-lead { font-size: 1rem; line-height: 1.45; }
  .hm-search { flex-direction: column; padding: 8px; }
  .hm-search-icon { top: 32px; }
  .hm-search-note { margin-top: -6px; font-size: .76rem; }
  .hm-try { gap: 6px; font-size: .88rem; }
  .hm-try-label { display: none; }
  .hm-chip { padding: 0 13px; }
  .hm-chips li:nth-child(4) { display: none; }

  /* The example card leaves the navy band and drops the illustration. */
  .hm-hero { overflow: visible; }
  .hm-example { margin: 0 -16px -40px; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); position: relative; z-index: 3; }
  .hm-ex-map { display: none; }
  .hm-ex-body { padding: 12px 14px 4px; gap: 8px; }
  .hm-ex-title { font-size: .9rem; }
  .hm-ex-school { padding: 0; border: 0; gap: 12px; }
  .hm-ex-badge { width: 36px; height: 36px; font-size: .74rem; border-radius: 9px; }
  .hm-ex-link { min-height: 40px; }

  .hm-trust { margin: 56px 0 0; padding: 0; background: none; border: 0; box-shadow: none; gap: 2px 14px; font-size: .84rem; color: var(--good); }
  .hm-trust svg { width: 15px; height: 15px; }
  .hm-trust-more { margin-left: 0; }
  .hm-stats { gap: 8px; margin-top: 14px; }
  .hm-stat { padding: 10px 14px; }
  .hm-stats dd { font-size: 1.3rem; }
  .hm-stats dt { font-size: .8rem; }
  .hm-season { padding: 12px 14px; gap: 10px; margin-top: 14px; }
  .hm-season > svg { display: none; }
  .hm-season-text { flex-basis: 100%; }
  .hm-season-link { min-height: 40px; }

  .hm-section { padding-top: 32px; }
  .hm-section h2 { font-size: 1.4rem; margin-bottom: 12px; }
  .hm-section-lead { margin: -6px 0 12px; font-size: .92rem; }
  /* Tabs and "new" cards scroll sideways instead of wrapping. */
  .hm-tabs, .hm-new { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
  .hm-tabs::-webkit-scrollbar, .hm-new::-webkit-scrollbar { display: none; }
  .hm-tabs [role="tab"] { flex: 0 0 auto; padding: 0 14px; font-size: .88rem; }
  .hm-panel { padding: 16px; gap: 12px; }
  .hm-panel h3 { font-size: 1.1rem; }
  .hm-panel-head p { margin-bottom: 10px; font-size: .92rem; }
  .hm-panel-cta { display: none; }
  .hm-tiles { grid-template-columns: 1fr; gap: 8px; }
  .hm-tiles a { padding: 10px 12px; justify-content: center; }
  .hm-tiles span { display: none; }
  .hm-new { display: flex; gap: 12px; }
  .hm-new li { flex: 0 0 220px; }
  .hm-new a { padding: 14px 16px; }
  .hm-new svg { display: none; }
  #places h2 { font-size: 1.15rem; }
  .hm-places { gap: 8px; }
  .hm-places a { padding: 0 13px; font-size: .9rem; }
  .hm-places li:nth-child(n+6):not(.hm-places-all) { display: none; }

  .hm-pros { display: flex; flex-direction: column; align-items: stretch; padding: 20px; border-radius: 18px; }
  .hm-pros h2 { font-size: 1.3rem; }
  .hm-pros > p { font-size: .9rem; }
  .hm-pro-list { margin: 12px 0; display: flex; flex-direction: column; gap: 0; }
  .hm-pro-list a { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 10px 0;
    min-height: 44px; border-radius: 0; background: none; border-top: 1px solid rgba(255,255,255,.15); }
  .hm-pro-list a:hover { background: none; }
  .hm-pro-desc { display: none; }
  .hm-pro-price { margin: 0; padding: 0; }
  .hm-pros-cta { align-self: stretch; }

  .hm-privacy-list { grid-template-columns: 1fr; gap: 6px; }
  .hm-privacy-list li { font-size: .84rem; }
  .hm-foot { margin-top: 32px; }
  .hm-foot-links { gap: 0 16px; }
  .hm-foot-links a { font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.home) { scroll-behavior: auto; }
}
