/* Gist Local brand, applied over the captured scaffold.
   Palette from docs/brand/index.html; the mark mirrors the printed band in
   templates/spotlight-12x9/base.css:57-60 — Anton, one orange offset per line,
   falling on GIST exactly as it does on the card. */

:root{
  --gl-orange:#F0541E;
  --gl-gold:#FFC91B;
  --gl-ink:#1A1714;
  --gl-ground:#17130F;
  --gl-paper:#FBFAF7;
  --gl-muted:#6B645C;
  --gl-line:#E6E1D8;
}

/* ---------------------------------------------------------------- the mark */

/* The .24em gap is load-bearing and so is the font-size next to it: .gl-mark
   declares the gap, so it must carry its own size or the em resolves against
   the inherited 16px and the words close up. Same trap as the band —
   see CLAUDE.md, "a gap declared in em needs a font-size". */
.gl-mark{
  display:inline-flex;
  align-items:baseline;
  gap:.24em;
  font-family:"Anton","Archivo",Impact,sans-serif;
  font-size:28px;
  line-height:1;
  letter-spacing:-.01em;
  color:#fff;                       /* over the hero photo */
  text-decoration:none;
  white-space:nowrap;
  transition:color .3s cubic-bezier(.4,0,.2,1);
}
.gl-mark .gl-word{ text-shadow:.085em .085em 0 var(--gl-orange); }

/* -------------------------------------------------------------- the header */

/* The original does this in React: transparent over the hero, then a
   translucent white bar with a 12px blur once scrolled. Same behaviour and the
   same 0.3s, in our palette. The captured nav carried inline color:#fff, which
   would beat any rule here — those inline colours are stripped at build time so
   both states live in CSS instead of needing !important. */
header{ transition:background-color .3s, box-shadow .3s, backdrop-filter .3s; }

header[data-gl-scrolled],
header[data-gl-solid]{
  background:rgba(251,250,247,.92);            /* --gl-paper */
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 1px 3px rgba(26,23,20,.09);
}
header[data-gl-scrolled] .gl-mark,
header[data-gl-solid] .gl-mark{ color:var(--gl-ink); }

/* nav links */
header nav a,
header nav button{
  color:#fff;
  transition:color .3s cubic-bezier(.4,0,.2,1);
}
header[data-gl-scrolled] nav a,
header[data-gl-scrolled] nav button,
header[data-gl-solid] nav a,
header[data-gl-solid] nav button{ color:var(--gl-ink); }

/* the dropdown keeps its own light ground in both states, so it stays ink */
header nav [data-locations-panel] a,
header nav [data-locations-panel] button,
header[data-gl-scrolled] nav [data-locations-panel] a,
header[data-gl-scrolled] nav [data-locations-panel] button{ color:var(--gl-ink); }
header nav [data-locations-panel] [aria-current="page"],
header[data-gl-scrolled] nav [data-locations-panel] [aria-current="page"]{
  color:var(--gl-orange);
}

/* CTA — outlined over the hero, filled orange once the bar goes solid */
.gl-cta{
  background:transparent;
  color:#fff;
  border:1.5px solid rgba(255,255,255,.5);
  transition:background-color .3s, color .3s, border-color .3s;
}
header[data-gl-scrolled] .gl-cta,
header[data-gl-solid] .gl-cta{
  background:var(--gl-orange);
  color:#fff;
  border-color:var(--gl-orange);
}

/* On the dark ground the mark goes gold, orange offset unchanged — the band's
   dark colorway, templates/spotlight-12x9/base.css:68-70. */
.gl-mark--dark{ color:var(--gl-gold); font-size:34px; }

/* ------------------------------------------------- the card ------------- */
/* Geometry is lifted straight from the built sample (samples/lutz/build), which
   build.py emits from templates/spotlight-12x9/geometry.yaml — so the slot
   rectangles here are the printed ones, expressed as % of the 864x648pt page.
   Never retype a slot dimension: see CLAUDE.md. */

.gl-card{
  position:relative; width:100%; aspect-ratio:864/648;
  background:var(--gl-paper);
  border-radius:10px; overflow:hidden;
  box-shadow:0 18px 50px -18px rgba(26,23,20,.45);
  container-type:inline-size;          /* 1cqw = 8.64pt of the real card */
}
.gl-slot{ position:absolute; overflow:hidden; border-radius:3px; }
.gl-slot img{ width:100%; height:100%; object-fit:cover; display:block; }

/* sold — name on hover */
.gl-slot-hover{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:.35em; text-align:center;
  padding:6%; background:rgba(23,19,15,.82); color:#fff;
  opacity:0; transition:opacity .22s ease;
}
.gl-slot:hover .gl-slot-hover{ opacity:1; }
.gl-sold-word{
  font-weight:800; font-size:clamp(16px,3.6cqw,40px); line-height:1;
  letter-spacing:.1em; text-transform:uppercase; color:var(--gl-orange);
}
.gl-sold-size{
  font-size:clamp(8px,1.05cqw,11px); letter-spacing:.14em; text-transform:uppercase;
  color:rgba(255,255,255,.65);
}

/* open inventory */
.gl-slot-open{
  border:1.5px dashed rgba(240,84,30,.5); background:rgba(240,84,30,.05);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:.22em; text-align:center;
}
.gl-open-kicker{ font-size:clamp(9px,1.6cqw,17px); color:var(--gl-muted); line-height:1.2; }
.gl-open-price{ font-weight:800; font-size:clamp(20px,5.2cqw,54px); color:var(--gl-orange); line-height:1; margin:.12em 0 .04em; }
.gl-open-sub{ font-size:clamp(8px,1.25cqw,13px); color:var(--gl-muted); }
.gl-open-badge{
  margin-top:.3em; padding:.28em .7em; border-radius:999px;
  background:var(--gl-orange); color:#fff; font-weight:700;
  font-size:clamp(7px,.95cqw,10px); letter-spacing:.1em; text-transform:uppercase;
}

/* the band — gold colorway: #FFC91B ground, black mark, orange offset.
   templates/spotlight-12x9/base.css:77-81. Sizes are the printed points over
   8.64 (1cqw = 8.64pt on the 864pt page). */
.gl-band{
  position:absolute; display:flex; align-items:center;
  background:var(--gl-gold); color:var(--gl-ground);
  padding:0 1.4cqw; gap:1.4cqw;
}
.gl-band-lockup{ display:flex; flex-direction:column; justify-content:center; gap:.35cqw; }
/* .gl-band-main declares the gap in em, so it must carry its own font-size —
   the exact trap documented in CLAUDE.md. */
.gl-band-main{
  display:flex; align-items:baseline; gap:.24em;
  font-family:"Anton","Archivo",Impact,sans-serif;
  font-size:4.12cqw; line-height:1; letter-spacing:-.01em; text-transform:uppercase;
  color:var(--gl-ground);
}
.gl-band-word{ text-shadow:.085em .085em 0 var(--gl-orange); }
.gl-band-sub{
  display:flex; gap:1.3cqw; font-family:"Anton","Archivo",Impact,sans-serif;
  font-size:1.46cqw; letter-spacing:.07em; line-height:1; text-transform:uppercase;
  color:var(--gl-ground);
}
.gl-band-spacer{ flex:1 1 auto; }
.gl-band-ind{ flex:0 0 auto; display:flex; align-items:center; gap:1.354cqw; }
.gl-band-cust{
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif;
  font-size:1.238cqw; line-height:1.24; letter-spacing:.02em;
  text-align:right; color:#5a5248;
}
.gl-band-box{
  font-family:"Archivo","Helvetica Neue",Arial,sans-serif;
  font-size:1.088cqw; line-height:1.24; text-align:center;
  border:.127cqw solid var(--gl-ground); border-radius:.116cqw;
  padding:.579cqw .868cqw; color:var(--gl-ground);
}

/* front / back toggle */
.gl-side-toggle{
  display:flex; justify-content:center; gap:6px; margin-top:18px;
  background:rgba(26,23,20,.05); border-radius:999px; padding:6px; width:max-content;
  margin-left:auto; margin-right:auto;
}
.gl-side-btn{
  appearance:none; border:0; cursor:pointer; border-radius:999px;
  padding:12px 38px; font-size:17px; font-weight:700; letter-spacing:.02em;
  background:transparent; color:var(--gl-muted);
  transition:background-color .22s, color .22s;
}
.gl-side-btn[aria-selected="true"]{ background:var(--gl-orange); color:#fff; }
.gl-side-btn:hover:not([aria-selected="true"]){ color:var(--gl-ink); }
.gl-card[hidden]{ display:none; }

.gl-card-cap{
  margin-top:14px; text-align:center; font-size:12px; letter-spacing:.15em;
  text-transform:uppercase; color:var(--gl-muted);
}

/* town chooser — the point of the lineup section is to pick a town */
.gl-town-btns{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.gl-town-btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:14px 26px; border-radius:999px; text-decoration:none;
  font-size:17px; font-weight:700; line-height:1;
  background:var(--gl-orange); color:#fff;
  border:1.5px solid var(--gl-orange);
  transition:background-color .2s, color .2s, transform .2s;
}
.gl-town-btn:hover{ background:#d2440f; border-color:#d2440f; transform:translateY(-1px); }
.gl-town-btn .gl-town-arrow{ opacity:.8; }

/* header phone — follows the nav's scroll flip */
.gl-phone{
  display:inline-flex; align-items:center; gap:7px; white-space:nowrap;
  font-size:15px; font-weight:700; text-decoration:none; color:#fff;
  transition:color .3s cubic-bezier(.4,0,.2,1);
}
header[data-gl-scrolled] .gl-phone,
header[data-gl-solid] .gl-phone{ color:var(--gl-ink); }
.gl-phone:hover{ color:var(--gl-orange); }

/* header phone — follows the nav's scroll flip */
.gl-phone{
  display:inline-flex; align-items:center; gap:7px; white-space:nowrap;
  font-size:15px; font-weight:700; text-decoration:none; color:#fff;
  transition:color .3s cubic-bezier(.4,0,.2,1);
}
header[data-gl-scrolled] .gl-phone,
header[data-gl-solid] .gl-phone{ color:var(--gl-ink); }
.gl-phone:hover{ color:var(--gl-orange); }

/* town pills on the dark stats panel — the whole pill is the target */
.gl-town-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:999px;
  font-size:14px; font-weight:600; line-height:1;
  text-decoration:none;
  background:rgba(240,84,30,.16); color:#fff;
  border:1.5px solid rgba(240,84,30,.55);
  transition:background-color .2s, border-color .2s, color .2s, transform .2s;
}
a.gl-town-pill:hover,
a.gl-town-pill:focus-visible{
  background:var(--gl-orange); border-color:var(--gl-orange); color:#fff;
  transform:translateY(-1px);
}
span.gl-town-pill{ cursor:default; }

/* --------------------------------------------------------- mobile nav
   Added after capture. The original renders this in React; that bundle is
   stripped, so the panel is BUILT AT RUNTIME by cloning the desktop nav --
   one source of links, so index, lewes and any town page added later all get
   the same menu with no duplicated markup to keep in sync. */

[data-mobile-nav]{
  display:none;
  position:absolute; left:0; right:0; top:100%;
  padding:12px 24px 22px;
  background:var(--gl-paper);
  border-top:1px solid var(--gl-line);
  box-shadow:0 14px 28px rgba(26,23,20,.13);
  max-height:calc(100vh - 100%);
  overflow-y:auto;
}
[data-mobile-nav][data-open]{ display:block }
@media (min-width:768px){ [data-mobile-nav]{ display:none !important } }

[data-mobile-nav] .gl-mn-group{
  margin:14px 0 2px;
  font-size:11px; letter-spacing:.15em; text-transform:uppercase;
  color:var(--gl-muted);
}
[data-mobile-nav] a,
[data-mobile-nav] button{
  display:block; width:100%; text-align:left;
  padding:12px 0; font-size:16px; font-weight:500; line-height:1.2;
  color:var(--gl-ink); text-decoration:none;
  background:none; border:0; border-bottom:1px solid var(--gl-line);
}
[data-mobile-nav] button[disabled]{ opacity:.4; cursor:not-allowed }
[data-mobile-nav] .gl-mn-phone{
  border-bottom:0; color:var(--gl-orange); font-weight:600;
}
[data-mobile-nav] .gl-mn-cta{
  margin-top:10px; padding:14px 0; border-bottom:0; text-align:center;
  background:var(--gl-orange); color:#fff; border-radius:999px; font-weight:600;
}

/* With the panel open the bar must be solid even at scroll 0, or the menu
   hangs off a transparent header over the hero. A separate attribute rather
   than reusing data-gl-scrolled, so the scroll script keeps sole ownership of
   its own state. */
header[data-gl-menu]{
  background:rgba(251,250,247,.98);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 1px 3px rgba(26,23,20,.09);
}
header[data-gl-menu] .gl-mark,
header[data-gl-menu] nav a,
header[data-gl-menu] nav button,
header[data-gl-menu] .gl-phone,
header[data-gl-menu] button[aria-label]{ color:var(--gl-ink) }
header[data-gl-menu] .gl-cta{
  background:var(--gl-orange); color:#fff; border-color:var(--gl-orange);
}

/* light-ground town pill (coverage panel) — whole pill is the target */
.gl-town-pill--light{
  background:rgba(240,84,30,.07); color:var(--gl-orange);
  border:1.5px solid rgba(240,84,30,.19);
}
a.gl-town-pill--light:hover,
a.gl-town-pill--light:focus-visible{
  background:var(--gl-orange); border-color:var(--gl-orange); color:#fff;
}

/* town bar — sits inside the fixed header so it never drifts from it */
.gl-townbar{
  background:var(--gl-orange); color:#fff;
  font-size:15px; font-weight:600; letter-spacing:.01em;
  text-align:center; padding:9px 18px; line-height:1.3;
}
