/* tour/tour.css
 *
 * The tour wears Spanwise. White paper, ink #111418, rule #E2E5E8, Instrument
 * Sans and the Spanwise accents (next #2F7A4F, contour #9A6A44), the values in
 * ~/Desktop/spanwise/site/assets/site.css. Keep the two in step if Spanwise's
 * colours move. One accent per screen, generous type, the office itself shown
 * dark in its screenshots so the product reads as the thing on the page.
 *
 * Each territory card takes its firm's own accent as --fa, set inline by
 * scripts/tour.mjs, so the six read as six firms on one Spanwise page.
 *
 * A single light page on purpose. The screenshots are dark, the page around
 * them is white, and a dark mode here would lose that contrast.
 *
 * No oxford commas, no em dashes.
 */

:root{--paper:#FFFFFF;--ink:#111418;--soft:#4A5561;--faint:#8792A0;--rule:#E2E5E8;--open:#F3F4F6;--next:#2F7A4F;--contour:#9A6A44;--night:#0E1412;--sans:"Instrument Sans",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;--mono:"DM Mono",ui-monospace,Menlo,monospace;--gut:clamp(16px,5vw,96px);--ease:cubic-bezier(.16,1,.3,1);color-scheme:light}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:400 17px/1.55 var(--sans);-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:100%}
a{color:inherit}
h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.035em;line-height:1.02;text-wrap:balance}
p{margin:0}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}

.t-wrap{width:100%;max-width:1440px;margin-inline:auto;padding-inline:var(--gut)}
.t-k{display:flex;align-items:center;gap:10px;font:500 11px/1.2 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:var(--faint)}
.t-k span{display:inline-grid;place-items:center;min-width:28px;height:22px;padding:0 6px;border-radius:6px;background:var(--open);color:var(--ink)}

.t-top{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--paper) 88%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid var(--rule)}
.t-top-in{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.t-wm{display:inline-flex;align-items:center;gap:10px;font-weight:600;font-size:19px;letter-spacing:-.03em;text-decoration:none}
.t-wm svg{width:34px;height:20px;fill:none;stroke:var(--ink);stroke-width:2.2;stroke-linecap:round}
.t-nav{display:flex;gap:4px}
.t-nav a{padding:8px 12px;border-radius:10px;font-size:14.5px;font-weight:500;color:var(--soft);text-decoration:none}
.t-nav a:hover{background:var(--open);color:var(--ink)}
@media (max-width:640px){.t-nav a:not(:first-child){display:none}}

.t-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 22px;border-radius:14px;background:var(--paper);box-shadow:inset 0 0 0 1px var(--rule);font-weight:600;font-size:15.5px;text-decoration:none;transition:box-shadow .2s var(--ease),transform .2s var(--ease)}
.t-btn:hover{box-shadow:inset 0 0 0 1px var(--ink)}
.t-btn:active{transform:translateY(1px)}
.t-go{background:var(--ink);color:#fff;box-shadow:none}
.t-go:hover{background:#000;box-shadow:none}
.t-acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px}

/* hero */
.t-hero{padding-top:clamp(56px,9vw,128px);overflow:hidden}
.t-hero h1{margin-top:18px;font-size:clamp(46px,8.2vw,124px);max-width:11ch}
.t-lede{margin-top:22px;max-width:44ch;font-size:clamp(18px,1.6vw,22px);color:var(--soft)}
.t-stage{position:relative;margin-top:clamp(48px,7vw,96px);padding-bottom:clamp(60px,9vw,140px)}
.t-desk{width:100%;border-radius:clamp(12px,1.6vw,22px);box-shadow:0 0 0 1px rgba(17,20,24,.08),0 40px 90px -30px rgba(17,20,24,.45)}
.t-phone{position:absolute;right:calc(var(--gut) + clamp(8px,3vw,48px));bottom:0;width:clamp(120px,17vw,250px);border-radius:clamp(18px,2.6vw,36px);box-shadow:0 0 0 6px #0b0d0f,0 0 0 7px rgba(255,255,255,.08),0 30px 60px -20px rgba(17,20,24,.55)}
@media (max-width:720px){.t-desk{display:none}.t-stage{padding-bottom:0}.t-phone{position:static;width:min(76%,300px);margin:0 auto}}

/* sections */
.t-sec{padding-top:clamp(80px,11vw,168px)}
.t-intro{display:grid;gap:18px 64px;margin-top:22px;align-items:end}
@media (min-width:980px){.t-intro{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}}
.t-intro h2{font-size:clamp(34px,4.6vw,64px);max-width:16ch}
.t-intro p{max-width:52ch;color:var(--soft);font-size:clamp(16.5px,1.3vw,18.5px)}

/* territories */
.t-terr{display:grid;gap:14px;margin-top:clamp(36px,5vw,64px)}
@media (min-width:720px){.t-terr{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1180px){.t-terr{grid-template-columns:repeat(3,minmax(0,1fr))}}
.t-card{display:grid;grid-template-rows:auto 1fr;border-radius:22px;overflow:hidden;background:var(--paper);box-shadow:inset 0 0 0 1px var(--rule);transition:box-shadow .25s var(--ease),transform .25s var(--ease)}
.t-card:hover{box-shadow:inset 0 0 0 1px var(--ink),0 18px 40px -24px rgba(17,20,24,.35);transform:translateY(-2px)}
.t-ph{position:relative;aspect-ratio:16/10;background:var(--night);overflow:hidden}
.t-ph img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--ease)}
.t-card:hover .t-ph img{transform:scale(1.03)}
.t-ph::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 45%,rgba(0,0,0,.55))}
.t-ph .t-firm{position:absolute;left:18px;right:18px;bottom:16px;z-index:1;display:flex;align-items:center;gap:10px;color:#fff;font-weight:600;font-size:20px;letter-spacing:-.025em}
.t-ph .t-firm svg{width:34px;height:auto;flex:none}
.t-ph .t-firm svg path:first-child{fill:#fff}
.t-state{position:absolute;top:14px;left:14px;z-index:1;display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.92);font:500 10.5px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--ink)}
.t-state i{width:7px;height:7px;border-radius:2px;background:var(--next)}
.t-state.held i{background:var(--contour)}
.t-state-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:clamp(40px,5vw,64px);padding-bottom:12px;border-bottom:1px solid var(--rule)}
.t-state-h h3{font-size:clamp(22px,2vw,28px)}
.t-state-h span{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.t-state-h+.t-terr{margin-top:16px}
.t-run .t-ph{background:linear-gradient(160deg,#1d2a26,#0e1412)}
.t-run .t-ph::after{display:none}
.t-state.star{background:#111418;color:#fff}
.t-state.star svg{width:12px;height:12px;fill:#E8C15A}
.t-og{aspect-ratio:1200/630}
.t-og::after{display:none}
.t-plan{background:var(--open);box-shadow:none;grid-template-rows:1fr}
.t-plan:hover{transform:none;box-shadow:none}
.t-plan .t-cover{display:grid;gap:18px 36px;align-items:center;margin-top:20px;padding:clamp(16px,2.4vw,28px);border-radius:22px;background:#F7F8F9}
@media (min-width:900px){.t-cover{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}}
.t-cover-map{position:relative;display:block;width:100%;aspect-ratio:4/3;border-radius:16px;overflow:hidden;background:#F2F3F4;box-shadow:0 0 0 1px var(--rule)}
.t-cover-map>svg{display:block;width:100%;height:100%}
.t-cover-map.is-live>svg,.m-map.is-live>svg{display:none}
.live-map{position:absolute!important;inset:0;width:100%;height:100%}
.t-cover-open{position:absolute;left:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;min-height:34px;padding:0 12px;border-radius:9px;background:var(--ink);color:#fff;font-size:13px;font-weight:600;text-decoration:none}
@media (min-width:900px){.t-cover{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
.t-cover-open{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:9px;background:var(--ink);color:#fff;font-size:13px;font-weight:600}
.t-legend{display:flex;flex-wrap:wrap;gap:6px}
.t-leg{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:0 12px;border-radius:10px;background:#fff;box-shadow:inset 0 0 0 1px var(--rule);font-size:13.5px;font-weight:500;text-decoration:none}
.t-leg:hover{box-shadow:inset 0 0 0 1px var(--ink)}
.t-leg i{width:12px;height:12px;border-radius:3px}
.t-leg svg{width:11px;height:11px;fill:#C9A23A}
.t-bt{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start}
.t-mini{display:block;width:clamp(72px,8vw,96px);padding:4px;border-radius:10px;background:#F7F8F9;box-shadow:inset 0 0 0 1px var(--rule);transition:box-shadow .2s}
a.t-mini:hover{box-shadow:inset 0 0 0 1px var(--ink)}
.t-mini-svg{display:block;width:100%;height:auto}
.t-empty{grid-template-rows:1fr;background:#FBFBFC}
.t-empty:hover{transform:none;box-shadow:inset 0 0 0 1px var(--rule)}
.t-empty .t-body{align-content:start}
.t-body{align-content:center;padding:28px}
.t-body{display:grid;gap:14px;align-content:space-between;padding:18px}
.t-body b{display:block;font-size:17px;letter-spacing:-.02em}
.t-body p{margin-top:4px;font-size:14.5px;color:var(--soft)}
.t-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.t-row a{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:11px;font-weight:600;font-size:14px;text-decoration:none;box-shadow:inset 0 0 0 1px var(--rule)}
.t-row a:hover{box-shadow:inset 0 0 0 1px var(--ink)}
.t-row a.t-open{background:var(--fa);color:#fff;box-shadow:none}
.t-row a.t-open:hover{filter:brightness(1.08)}
.t-sw{display:flex;gap:4px;margin-left:auto}
.t-sw i{width:14px;height:14px;border-radius:4px;box-shadow:inset 0 0 0 1px rgba(17,20,24,.1)}

/* the real map's popup */
.tour-pop .maplibregl-popup-content{padding:14px 16px;border-radius:14px;box-shadow:0 14px 40px rgba(17,20,24,.22);font:400 14px/1.45 var(--sans);color:var(--ink)}
.tour-pop .pop-k{margin:0;font:500 10px/1.2 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.tour-pop b{display:block;margin-top:6px;font-size:16px;letter-spacing:-.02em}
.tour-pop span{display:block;margin-top:2px;color:var(--soft)}
.tour-pop a{display:inline-flex;margin-top:10px;min-height:34px;align-items:center;padding:0 12px;border-radius:9px;background:var(--ink);color:#fff;font-weight:600;font-size:13px;text-decoration:none}
.maplibregl-ctrl-attrib{font-size:10.5px}

/* the map pages */
.m-page{padding-top:clamp(28px,4vw,48px)}
.m-back{font-size:14px;font-weight:600;color:var(--soft);text-decoration:none}
.m-back:hover{color:var(--ink)}
.m-h{margin-top:14px;font-size:clamp(36px,5vw,72px);max-width:16ch}
.m-lede{margin-top:16px;max-width:60ch;color:var(--soft)}
.m-map{position:relative;margin-top:clamp(28px,4vw,48px);height:min(78vh,760px);border-radius:18px;overflow:hidden;background:#F2F3F4;box-shadow:0 0 0 1px var(--rule),0 30px 70px -40px rgba(17,20,24,.4)}
.m-map>svg{display:block;width:100%;height:100%}
.m-map svg a path{transition:opacity .2s}
.m-map svg a:hover path{opacity:.8}
.m-list{list-style:none;margin:clamp(28px,4vw,48px) 0 0;padding:0;display:grid;gap:8px}
.m-row{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:16px;align-items:start;padding:16px 18px;border-radius:16px;box-shadow:inset 0 0 0 1px var(--rule);scroll-margin-top:90px;transition:box-shadow .3s,background .3s}
.m-row:target{background:#F7F8F9;box-shadow:inset 0 0 0 2px var(--ink)}
.m-row>i{width:16px;height:16px;border-radius:4px;margin-top:4px}
.m-row b{display:block;font-size:18px;letter-spacing:-.02em}
.m-row span:not(.t-state){display:block;font-size:14px;color:var(--soft)}
.m-row p{margin-top:6px;font-size:14px;color:var(--soft)}
.m-go{display:grid;gap:8px;justify-items:end}
.m-go .t-state{position:static}
.m-go a{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border-radius:11px;font-weight:600;font-size:14px;text-decoration:none;box-shadow:inset 0 0 0 1px var(--rule)}
.m-go a.t-open{background:var(--fa);color:#fff;box-shadow:none}
@media (max-width:640px){.m-row{grid-template-columns:16px minmax(0,1fr)}.m-go{grid-column:2;justify-items:start;grid-auto-flow:column;justify-content:start}}

/* features */
.t-feat{display:grid;gap:24px 64px;align-items:center;margin-top:clamp(56px,8vw,120px)}
@media (min-width:980px){.t-feat{grid-template-columns:minmax(0,.8fr) minmax(0,1.5fr)}.t-flip .t-ft{order:2}}
.t-ft h3{margin-top:14px;font-size:clamp(26px,2.8vw,40px);max-width:18ch}
.t-ft p:not(.t-k){margin-top:14px;max-width:46ch;color:var(--soft)}
.t-shot{margin:0;border-radius:clamp(12px,1.4vw,20px);overflow:hidden;box-shadow:0 0 0 1px rgba(17,20,24,.08),0 30px 70px -32px rgba(17,20,24,.45)}

/* phones */
.t-dark{margin-top:clamp(80px,11vw,168px);padding-bottom:clamp(80px,10vw,140px);background:var(--night);color:#F2F1EC}
.t-dark .t-k{color:rgba(242,241,236,.5)}
.t-dark .t-k span{background:rgba(255,255,255,.1);color:#fff}
.t-dark .t-intro p{color:rgba(242,241,236,.7)}
.t-phones{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(220px,1fr);gap:clamp(16px,3vw,40px);margin-top:clamp(36px,5vw,64px);overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;scrollbar-width:none}
.t-phones::-webkit-scrollbar{display:none}
.t-phones figure{margin:0;scroll-snap-align:start;display:grid;gap:14px;justify-items:center}
.t-phones img{width:100%;max-width:300px;border-radius:30px;box-shadow:0 0 0 6px #050706,0 0 0 7px rgba(255,255,255,.1)}
.t-phones figcaption{font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;color:rgba(242,241,236,.55)}

/* steps */
.t-steps{list-style:none;margin:clamp(36px,5vw,56px) 0 0;padding:0;display:grid;gap:10px;counter-reset:st}
@media (min-width:980px){.t-steps{grid-template-columns:repeat(5,minmax(0,1fr))}}
.t-steps li{display:grid;gap:8px;align-content:start;padding:20px;border-radius:18px;box-shadow:inset 0 0 0 1px var(--rule)}
.t-steps li::before{counter-increment:st;content:"0" counter(st);font:500 11px/1 var(--mono);letter-spacing:.12em;color:var(--faint)}
.t-steps li:last-child{background:var(--ink);color:#fff;box-shadow:none}
.t-steps li:last-child::before{color:rgba(255,255,255,.5)}
.t-steps li:last-child span{color:rgba(255,255,255,.72)}
.t-steps b{font-size:18px;letter-spacing:-.02em}
.t-steps span{font-size:14.5px;color:var(--soft)}

/* foot */
.t-foot{margin-top:clamp(80px,11vw,160px);padding-block:40px calc(32px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--rule)}
.t-es{font-size:clamp(18px,1.6vw,22px);max-width:40ch}
.t-fine{margin-top:18px;font:500 11px/1.4 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.t-credits{margin-top:12px;font-size:12px;line-height:1.6;color:var(--faint)}
.t-credits a{color:inherit}
