/* AHS website, Phase B (V2-S13B, app/web2b.py). Linked only while one of the S13B switches is on; web2.css stays the Phase A sheet.
   Dark theme (WEB_V2_THEMES): the S0 surfaces (base #14171B, raised #1C2026, panel #242931), text #E6E9EE / #B1B8C3, the one action
   in safety orange with black text, brass for rules and labels. Every text pair is 7:1 or better (tests/test_web2b.py checks them).
   Motion: one hero sequence (web2-hero.js); nothing loops; prefers-reduced-motion gets the end state. */

/* ------------------------------------------------------------ dark tokens: the device setting, or the Light / Dark button */
html[data-themes][data-theme=dark]{
  --paper:#14171B; --card:#1C2026; --soft:#242931; --line:#2E3540; --edge:#6B737F;
  --ink:#E6E9EE; --muted:#B1B8C3; --navy:#0D1013; --brand:#FD9B6A;
  --brass:#C8A24A; --brass-soft:#2B2719; --brass-ink:#D5AF57; --brass-lite:#E0B45C; --brass-btn:#D8A84A; --on-navy:#B1B8C3;
  --alert:#FB9B89; --alert-bg:#3A1D18; --alert-fill:#F76851; --accent:#F2762E; --accent-hover:#FD9B6A; --on-accent:#000000;
  color-scheme:dark;
}
@media (prefers-color-scheme:dark){
  html[data-themes]:not([data-theme=light]){
    --paper:#14171B; --card:#1C2026; --soft:#242931; --line:#2E3540; --edge:#6B737F;
    --ink:#E6E9EE; --muted:#B1B8C3; --navy:#0D1013; --brand:#FD9B6A;
    --brass:#C8A24A; --brass-soft:#2B2719; --brass-ink:#D5AF57; --brass-lite:#E0B45C; --brass-btn:#D8A84A; --on-navy:#B1B8C3;
    --alert:#FB9B89; --alert-bg:#3A1D18; --alert-fill:#F76851; --accent:#F2762E; --accent-hover:#FD9B6A; --on-accent:#000000;
    color-scheme:dark;
  }
}
/* where the light sheet uses navy as text, dark uses the text colour; the primary action becomes the S0 orange with black text */
html[data-themes][data-theme=dark] :is(h1,h2,h3,.brand,nav a:hover,nav a[aria-current=page],a:hover,.btn.ghost,.btn.ghost:hover,.people .who b,dl.creds dt,.case-card .result,.split a,.menu,.chip){color:var(--ink)}
html[data-themes][data-theme=dark] :is(.split a,.menu,.chip,.btn.ghost){border-color:var(--edge)}
html[data-themes][data-theme=dark] .checks li::after{border-color:var(--ink)}
html[data-themes][data-theme=dark] :is(.btn:not(.ghost):not(.alert):not(.brass),.chip[aria-pressed=true]){background:var(--accent);border-color:var(--accent);color:var(--on-accent);box-shadow:none}
html[data-themes][data-theme=dark] .btn:not(.ghost):not(.alert):not(.brass):hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}
html[data-themes][data-theme=dark] .btn.alert{background:var(--alert-fill);border-color:var(--alert-fill);color:#000}
html[data-themes][data-theme=dark] .brand img{filter:invert(1) hue-rotate(180deg)}
html[data-themes][data-theme=dark] :focus-visible{outline-color:var(--brass-lite)}
@media (prefers-color-scheme:dark){
  html[data-themes]:not([data-theme=light]) :is(h1,h2,h3,.brand,nav a:hover,nav a[aria-current=page],a:hover,.btn.ghost,.btn.ghost:hover,.people .who b,dl.creds dt,.case-card .result,.split a,.menu,.chip){color:var(--ink)}
  html[data-themes]:not([data-theme=light]) :is(.split a,.menu,.chip,.btn.ghost){border-color:var(--edge)}
  html[data-themes]:not([data-theme=light]) .checks li::after{border-color:var(--ink)}
  html[data-themes]:not([data-theme=light]) :is(.btn:not(.ghost):not(.alert):not(.brass),.chip[aria-pressed=true]){background:var(--accent);border-color:var(--accent);color:var(--on-accent);box-shadow:none}
  html[data-themes]:not([data-theme=light]) .btn:not(.ghost):not(.alert):not(.brass):hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}
  html[data-themes]:not([data-theme=light]) .btn.alert{background:var(--alert-fill);border-color:var(--alert-fill);color:#000}
  html[data-themes]:not([data-theme=light]) .brand img{filter:invert(1) hue-rotate(180deg)}
  html[data-themes]:not([data-theme=light]) :focus-visible{outline-color:var(--brass-lite)}
}
html[data-themes]{background:var(--paper)}
.theme-btn{margin-left:auto;min-height:var(--tap);padding:0 14px;border:2px solid rgba(207,213,227,.45);border-radius:999px;background:transparent;color:#fff;font:600 15px var(--font-body);cursor:pointer}
.theme-btn:hover{border-color:#fff}
@media (max-width:599px){.util .wrap{justify-content:space-between}}

/* ------------------------------------------------------------ the forms */
.req-form .grid{display:grid;grid-template-columns:1fr;gap:16px;margin:20px 0 8px}
@media (min-width:600px){.req-form .grid{grid-template-columns:1fr 1fr}.req-form .fld.wide{grid-column:1/-1}}
.fld{display:flex;flex-direction:column;gap:6px}
.fld label{font-weight:700;color:var(--ink);font-size:17px}
.fld .req{font:700 13px/1 var(--font-head);letter-spacing:.08em;text-transform:uppercase;color:var(--brass-ink);margin-left:6px}
.fld :is(input,select,textarea){min-height:var(--tap);padding:10px 12px;border:2px solid var(--edge);border-radius:var(--r);background:var(--card);color:var(--ink);font:500 18px/1.4 var(--font-body);width:100%}
.fld textarea{min-height:120px;resize:vertical}
.fld :is(input,select,textarea):focus-visible{outline:3px solid var(--brass-ink);outline-offset:2px;border-color:var(--brass-ink)}
.fld [aria-invalid=true]{border-color:var(--alert)}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.req-form .note{font-size:16px;color:var(--muted);margin:4px 0 0}
.req-form .alertbox{margin:12px 0 4px}
.w2status{margin:14px 0 0;font-weight:700;color:var(--ink);min-height:1.6em}
.w2status.bad{color:var(--alert)}
.w2status .sync{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:2px 10px;border-radius:999px;background:var(--soft);color:var(--muted);font:600 14px var(--font-body)}

/* ------------------------------------------------------------ the hero: the drawing, then the crew photo */
.hero-art{position:relative;margin:0;aspect-ratio:4/3;border-radius:var(--r);background:var(--soft);overflow:hidden}
.hero-art svg.rtu{position:absolute;inset:0;width:100%;height:100%;padding:6%}
.hero-art .draw{stroke:var(--navy);stroke-width:3}
.hero-art .draw .roof{stroke:var(--brass);stroke-width:5}
html[data-themes][data-theme=dark] .hero-art .draw{stroke:var(--brass)}
@media (prefers-color-scheme:dark){html[data-themes]:not([data-theme=light]) .hero-art .draw{stroke:var(--brass)}}
.hero-art img.crew{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero-art.has-photo svg.rtu{opacity:.22}
.hero-art.has-photo::after{content:"";position:absolute;inset:auto 0 0 0;height:6px;background:var(--brass)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ------------------------------------------------------------ where we work */
.svc .two{align-items:center}
.svc-map{margin:0}
.svc-canvas{position:relative;aspect-ratio:10/7;border-radius:var(--r);background:var(--soft);overflow:hidden}
.svc-canvas .gmap{position:absolute;inset:0}
.svc-svg{display:block;width:100%;height:100%}
.svc-svg .area{fill:var(--brass);fill-opacity:.22;stroke:var(--brass-ink);stroke-width:2.5;stroke-linejoin:round}
.svc-svg .town circle{fill:var(--muted)}
.svc-svg .town text{fill:var(--ink);font:600 18px var(--font-body)}
.svc-svg .shop path{fill:#F2762E;stroke:#000;stroke-width:2}
.svc-svg .shop text{fill:var(--ink);font:700 19px var(--font-body)}
.svc-map figcaption{font-size:16px;color:var(--muted);margin-top:10px}

/* ------------------------------------------------------------ crew photos in case studies */
.crew-photo{margin:0 0 24px;border-radius:var(--r);overflow:hidden;background:var(--soft)}
.crew-photo img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.case-card .crew-photo{margin:0;border-radius:0}

@media (prefers-reduced-motion:no-preference){.fld :is(input,select,textarea){transition:border-color .15s var(--ease)}}
@media print{.req-form,.theme-btn{display:none}}
