/* ============================================================
   Forkroads — design-v4.css   (Session 19, Part 2 — Level 4 design upgrade)

   Load order on every page:
     1. inline <style> blocks   (untouched)
     2. /css/design-v4.css      ← THIS FILE
     3. /css/mobile.css         (untouched)

   MOBILE-FIRST: default rules target mobile; min-width media queries scale up.
   No desktop-first overrides that mobile.css has to fight.
   ============================================================ */


/* ------------------------------------------------------------
   DESIGN TOKENS
   Brief structure: :root holds the LIGHT values, [data-theme="dark"] overrides.
   Every themed page (index / saved / history / visited / pricing) sets
   data-theme on <html> in its inline bootstrap, so the dark values apply by
   default and the light values surface only under data-theme="light".
   (map.html + trophies.html are always-dark with no data-theme attribute, but
   they never consume these tokens — see CHANGE 6, which is hard-coded.)
   ------------------------------------------------------------ */
:root {
  --bg-alt: #EDE5D4;
  --surface: #FFFFFF;
  --shadow-card: 0 2px 16px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.05);
  --shadow-card-hover: 0 4px 24px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07);
  --border-soft: rgba(0,0,0,.06);
}
[data-theme="dark"] {
  --bg-alt: #0e0d0b;
  --surface: #131210;
  --shadow-card: 0 2px 20px rgba(0,0,0,.4), 0 1px 4px rgba(0,0,0,.25);
  --shadow-card-hover: 0 4px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --border-soft: rgba(255,255,255,.05);
}


/* ============================================================
   CHANGE 1 — Card elevation (index + saved + history)
   Real classes: result card = .restaurant-card / photo = .card-image /
   cuisine pill = .card-cuisine / name = .card-name / location = .card-location.
   Saved card = .saved-card / photo = .saved-card-image.
   History card = .recent-card (16:9 video thumb — elevation only, no photo min-height).
   Visited is a row list (.visited-row) — not a photo card, intentionally skipped.
   ============================================================ */
.restaurant-card,
.saved-card,
.recent-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card) !important;   /* !important: inline :hover rules set box-shadow */
}
.restaurant-card:hover,
.saved-card:hover,
.recent-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
}

/* Photo area inside the photo cards (index result cards + saved cards).
   Mobile default 180px, scaling up. (History keeps its 16:9 thumbnail.) */
.card-image,
.saved-card-image {
  height: 180px;
  min-height: 180px;
}
@media (min-width: 640px) {
  .card-image,
  .saved-card-image { height: 200px; min-height: 200px; }
}
@media (min-width: 900px) {
  .card-image,
  .saved-card-image { height: 220px; min-height: 220px; }
}

/* Cuisine pill on the card FACE only — hidden.
   The restaurant detail modal uses .modal-cuisine-badge, so it stays visible. */
.restaurant-card .card-cuisine,
.card-cuisine { display: none; }

/* Restaurant name in cards — Playfair, responsive */
.restaurant-card .card-name,
.saved-card .saved-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  line-height: 1.25;
}
@media (min-width: 640px) {
  .restaurant-card .card-name,
  .saved-card .saved-card-name { font-size: 19px; }
}

/* Location line in cards — small + dim */
.restaurant-card .card-location,
.saved-card .saved-card-location {
  font-size: 11px;
  color: var(--text-dim);
}

/* Homepage extractor input box (#inputWrap — shared logged-in + logged-out).
   :focus-within (inline, higher specificity) still owns the focus glow. */
.input-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}


/* ============================================================
   CHANGE 2 — Stats strip (logged-in homepage)
   Scoped to .home-stats so the marketing .stats-strip is untouched.
   Stat order (renderHomeStats): [spots] = primary, then cities/countries/visited.
   ============================================================ */
.home-stats .stats-card {
  border: none;
  background: transparent;
  box-shadow: none;
}
.home-stats .stat-item + .stat-item { border-left: none; }

.home-stats .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 26px;          /* secondary stats — mobile */
  color: var(--amber);
  line-height: 1;
}
.home-stats .stat-item:first-child .stat-num {
  font-size: 36px;          /* primary stat (spots) — mobile */
}
.home-stats .stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
}
@media (min-width: 640px) {
  .home-stats .stat-num { font-size: 32px; }
  .home-stats .stat-item:first-child .stat-num { font-size: 42px; }
}


/* ============================================================
   CHANGE 3 — City section headers (saved.html — Scenario B)
   saved.html JS now emits:
     .city-group-header > .cgh-city / .cgh-country / .cgh-count
   ============================================================ */
/* Scoped under .city-section + !important so the saved page's body-level
   `font-family: Inter` (and any future inline rules) can't compete. */
.city-section .city-group-header {
  border-left: 3px solid var(--amber) !important;
  padding: 14px 0 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 12px;
}
.city-section .cgh-city {
  font-family: 'Playfair Display', serif !important;
  font-size: 30px !important;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 3px;
}
.city-section .cgh-country {
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.city-section .cgh-count {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  color: var(--amber);
}
@media (min-width: 640px) {
  .city-section .cgh-city { font-size: 36px !important; }
}
/* Legacy floating "N spots" badge is no longer rendered in saved headers; this
   keeps it hidden defensively if any old markup lingers. */
.city-section .city-count { display: none; }


/* ============================================================
   CHANGE 4 — Landing page section rhythm (index.html, logged-out)
   pain / timeline (#how) / features / personas are all <section class="lp-section">
   → alternating warm band (--bg-alt). hero (.lp-hero), concierge (.lp-concierge),
   passport CTA and footer keep --bg. Sections live inside the 1160px .page, so a
   full-bleed colour band is painted via a wide box-shadow clipped to the section's
   own height — edge-to-edge rhythm without DOM changes.
   ============================================================ */
.lp-section {
  background: var(--bg-alt) !important;
  box-shadow: 0 0 0 100vw var(--bg-alt);
  clip-path: inset(0 -100vw);
}


/* ============================================================
   CHANGE 5 — Typography standardization
   ============================================================ */
/* All uppercase label elements → consistent .08em tracking. (page-specific
   classes, so no cross-page bleed; pricing is intentionally excluded.) */
.lp-eyebrow,
.lp-feat-label,
.lp-persona-label,
.hero-eyebrow,
.section-label,
.fr-sb-label,
.fr-city-head,
.cat-head,
.tc-badge {
  letter-spacing: .08em;
}

/* Nav links recede on desktop (mobile.css already hides .nav-links ≤768px).
   :not(.active) preserves the amber active link on map/trophies. */
.nav-links a {
  color: var(--text-dim);
  transition: color .15s ease;
}
.nav-links a:not(.active):hover {
  color: var(--text);
}

/* Page titles (Saved spots / Trophy cabinet / Recent extractions / Visited spots) */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
}
@media (min-width: 640px) {
  .page-title { font-size: 36px; }
}


/* ============================================================
   CHANGE 6 — Map sidebar recession (map.html, always-dark)
   One notch darker than --bg (#0c0b09) so the sidebar chrome steps back and the
   map reads as the task. .fr-sidebar only exists on map.html.
   ============================================================ */
.fr-sidebar { background: #0a0908; }


/* ============================================================
   CHANGE 7 — Dream city cards (index.html logged-in)
   has-spots = active/selected, no-spots = inactive. The richer
   .dream-card.has-spots:hover (inline, higher specificity) keeps its lift.
   ============================================================ */
.dream-card.has-spots {
  border-color: var(--amber);
  box-shadow: 0 1px 10px rgba(244,162,40,.2);
}
.dream-card.no-spots {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}
.dream-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
  height: auto;
  margin-bottom: 4px;
}
