/* Trail Relief storefront theme "Alpenglow" (brand book, phase 02): granite greys
   and the ember of first light. Scoped to body.storefront-alpenglow, so the other
   storefronts and the console never pick it up (C9/C13). Contrast checked in the
   brand book: every text pair passes WCAG AA in both themes. */
@layer base, components, pages;

@font-face { font-family: "Archivo"; src: url("archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

@layer base {
  body.storefront-alpenglow {
    --bg: #F3F4F2; --surface: #FFFFFF; --fg: #1E2226; --muted: #565D63; --line: #D9DCD8;
    --accent: #B4431F; --on-accent: #FFFFFF; --highlight: #E4E6E2; --on-highlight: #1E2226;
    --route: #B4431F; --terrain: #E4E6E2; --contour: #A3A8AA;
    --font-display: "Archivo", "Inter", system-ui, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.storefront-alpenglow {
      --bg: #15181B; --surface: #1E2226; --fg: #ECE8E1; --muted: #A8AEB3; --line: #2E3338;
      --accent: #FF9A66; --on-accent: #15181B; --highlight: #262B30; --on-highlight: #ECE8E1;
      --route: #FF8A55; --terrain: #262B30; --contour: #5D656C;
    }
  }
  :root[data-theme="dark"] body.storefront-alpenglow {
    --bg: #15181B; --surface: #1E2226; --fg: #ECE8E1; --muted: #A8AEB3; --line: #2E3338;
    --accent: #FF9A66; --on-accent: #15181B; --highlight: #262B30; --on-highlight: #ECE8E1;
    --route: #FF8A55; --terrain: #262B30; --contour: #5D656C;
  }
  body.storefront-alpenglow :is(h1, h2) { font-stretch: 108%; font-weight: 800; letter-spacing: -0.015em; }
}

@layer pages {
  .route-drop { display: grid; gap: var(--space-3); }
  .route-preview { position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; border-radius: var(--radius-lg);
                   background: var(--terrain, #E4E6E2); border: 1px solid var(--line, #D9DCD8); overflow: hidden; }
  .route-preview svg { display: block; width: 100%; height: 100%; }
  .route-preview .rp-line { fill: none; stroke: var(--route, #B4431F); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
  .route-preview .rp-hidden { fill: none; stroke: var(--muted); stroke-width: .8; stroke-dasharray: 1.5 1.5; opacity: .7; }
  .route-preview .rp-grid { stroke: var(--contour, #A3A8AA); stroke-width: .2; opacity: .5; }
  .route-preview .rp-empty[hidden] { display: none; }
  .route-preview .rp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--space-6); text-align: center; color: var(--muted); font-size: var(--text-sm); }
  .route-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); }
  .route-facts b { color: var(--fg); font-weight: 500; }
  .route-help { font-size: var(--text-sm); border-left: 3px solid var(--accent); padding: var(--space-2) var(--space-3); background: var(--surface, transparent); }
  .route-help[hidden] { display: none; }
  .route-trim { display: grid; gap: var(--space-2); }
  .terrain-facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
  .map-credit { font-size: var(--text-xs); color: var(--muted); }
}
