/* ==========================================================================
   SEO Agency Tipperary: "The Survey"
   Type follows cartographic convention:
     .t-land  spaced condensed capitals  = landforms   (headlines)
     .t-flow  italic serif               = water, paths (queries, narrative)
     .t-data  mono                       = coordinates, data
   ========================================================================== */

/* Metric-matched fallbacks: measured advance widths so the hero does not
   reflow when web fonts arrive (Impact 88.2%, Arial 66.7%, Georgia 97.5%). */
@font-face { font-family: "Land Fallback"; src: local("Impact"); size-adjust: 88.2%; }
@font-face { font-family: "Land Fallback Arial"; src: local("Arial Bold"), local("Arial"); size-adjust: 66.7%; }
@font-face { font-family: "Flow Fallback"; src: local("Georgia"); size-adjust: 97.5%; }

:root {
  /* One hue family, two lightnesses. OKLCH keeps steps perceptually even:
     every ink shares the peat/limestone hue (~80) so tints never go grey or green. */
  --peat:        oklch(15.5% 0.008 75);
  --bog:         oklch(20% 0.012 75);
  --limestone:   oklch(91.5% 0.018 85);
  --limestone-2: oklch(85.5% 0.025 85);
  --fog:         oklch(66% 0.015 80);
  --copper:      oklch(64% 0.12 55);
  --copper-hi:   oklch(77% 0.11 60);
  --umber:       oklch(42% 0.035 65);
  --moss:        oklch(60% 0.08 120);
  --suir:        oklch(72% 0.055 185);
  --signal:      oklch(68% 0.215 38);
  --signal-hi:   oklch(78% 0.17 48);
  /* errors: rose, a clear step away from the survey-orange "act on this" signal */
  --alert:       oklch(72% 0.17 12);

  --ink: var(--limestone);
  --ink-soft: color-mix(in oklch, var(--limestone) 68%, transparent);
  --ink-faint: color-mix(in oklch, var(--limestone) 30%, transparent);
  --line: color-mix(in oklch, var(--copper) 55%, transparent);
  --ground: var(--peat);

  --f-land: "Big Shoulders Display", "Land Fallback", "Land Fallback Arial", sans-serif;
  --f-flow: "Newsreader", "Flow Fallback", Georgia, serif;
  --f-data: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  /* Leading scale: display type sets solid, reading type breathes */
  --lead-display: .82;
  --lead-head: .9;
  --lead-lede: 1.32;
  --lead-body: 1.58;

  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: max(clamp(16px, 4vw, 56px), var(--safe-l), var(--safe-r));
  --touch: 44px;
  --max: 1480px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --paper: 0;

  color-scheme: dark;
}

/* Atmospheres: sections cross between peat night and limestone day. */
.atmos-day {
  --ink: var(--peat);
  --ink-soft: color-mix(in oklch, var(--peat) 72%, transparent);
  --ink-faint: color-mix(in oklch, var(--peat) 32%, transparent);
  --line: color-mix(in oklch, var(--umber) 60%, transparent);
  --ground: var(--limestone);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(88px + var(--safe-t)); }
body {
  margin: 0;
  background: var(--peat);
  color: var(--ink);
  font-family: var(--f-flow);
  font-size: clamp(17px, 1.05vw + 10px, 20px);
  line-height: var(--lead-body);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-optical-sizing: auto;          /* Newsreader's opsz axis tightens at display sizes */
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
/* Rag and widows: balance short display lines, keep paragraphs free of orphans */
h1, h2, h3, .t-land, .lede { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
p, .lede { hanging-punctuation: first allow-end; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--signal); color: var(--peat); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--signal); color: var(--peat); padding: 10px 16px;
  font-family: var(--f-data); font-size: 13px; text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type system ---------- */
.t-land {
  font-family: var(--f-land);
  font-weight: 800;
  text-transform: uppercase;
  /* Tracking follows size: caps need air when small, and close up when huge */
  letter-spacing: clamp(-0.012em, calc(0.06em - 0.0006em * var(--px, 60)), 0.06em);
  line-height: var(--lead-head);
  font-variant-numeric: lining-nums;
}
.t-flow { font-family: var(--f-flow); font-style: italic; font-weight: 300; letter-spacing: -.005em; }
.t-data {
  font-family: var(--f-data);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.5;
  font-variant-numeric: tabular-nums slashed-zero;   /* coordinates never jitter */
}

/* Tallboy numerals: condensed, lining, tabular, so counters change without layout shift */
.tallboy {
  font-family: var(--f-land); font-weight: 300;
  font-size: clamp(72px, 9vw, 168px); line-height: .78;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums;
  display: inline-flex; align-items: flex-start; gap: .04em;
}
.tallboy sup, .tallboy .u { font-family: var(--f-data); font-size: 12px; letter-spacing: .12em; font-weight: 400; line-height: 1; margin-top: .9em; color: var(--ink-soft); text-transform: uppercase; }
.tallboy--outline { color: transparent; -webkit-text-stroke: 1px var(--signal); }
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-data); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 28px;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.eyebrow b { color: var(--signal); font-weight: 500; }

h1, h2, h3 { margin: 0; font-weight: inherit; }
.h-xl { font-size: clamp(64px, 13.5vw, 260px); --px: 200; line-height: var(--lead-display); }
.h-l { font-size: clamp(52px, 8.4vw, 150px); --px: 110; line-height: .86; }
.h-m { font-size: clamp(40px, 5vw, 84px); --px: 64; }
.h-s { font-size: clamp(28px, 2.6vw, 42px); --px: 34; line-height: .95; }
/* Leading tightens as size grows; 30–40ch keeps a lede to two or three lines */
.lede { font-size: clamp(21px, 1.7vw, 30px); line-height: var(--lead-lede); font-weight: 300; max-width: 30ch; }
.section p:not([class]) { max-width: 62ch; }
.lede em, .prose em { font-style: italic; }
.measure { max-width: 60ch; }
.soft { color: var(--ink-soft); }

/* ---------- Terrain canvas ---------- */
.terrain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  view-transition-name: terrain;
}
.terrain__wrap { position: absolute; inset: 0; transform-origin: 50% 70%; will-change: transform; }
.terrain canvas { width: 100%; height: 100%; display: block; }
.no-webgl .terrain {
  background:
    radial-gradient(ellipse at 60% 40%, color-mix(in oklab, var(--copper) 18%, transparent), transparent 60%),
    repeating-radial-gradient(circle at 62% 46%, transparent 0 22px, color-mix(in oklab, var(--copper) 28%, transparent) 22px 23px),
    var(--peat);
}
.no-webgl .terrain canvas { display: none; }

main, .site-foot { position: relative; z-index: 1; }
/* ink halo: copy stays legible over the engraved ground */
main :is(p, li, dd, dt, .t-flow, .t-data, h2, h3) { text-shadow: 0 0 2px var(--ground), 0 0 14px var(--ground), 0 0 28px var(--ground); }
main .btn, main .btn *, main .promises *, main .towns *, main .stratum *, main .status * { text-shadow: none; }

/* ---------- Header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(14px + var(--safe-t)) var(--gutter) 14px;
  /* --paper is written by the terrain every frame: chrome inks follow the atmosphere */
  color: color-mix(in oklab, var(--peat) calc(var(--paper) * 100%), var(--limestone));
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  view-transition-name: brand;
}
.brand__mark { width: 38px; height: 38px; }
.brand__mark circle, .brand__mark path { fill: none; stroke: currentColor; stroke-width: 1.3; }
.brand__mark .pk { fill: currentColor; stroke: none; }
.brand__name { font-family: var(--f-land); font-weight: 700; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; line-height: .95; }
.brand__name span { display: block; font-weight: 400; letter-spacing: .3em; font-size: 12px; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 36px); }
.nav a {
  font-family: var(--f-data); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; position: relative; padding: 14px 0; min-height: var(--touch); display: inline-flex; align-items: center;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a sup { font-size: 9px; opacity: .6; margin-right: 6px; }

.menu-btn {
  display: none; align-items: center; gap: 10px; min-height: var(--touch);
  background: none; border: 1px solid currentColor; color: inherit; border-radius: 99px;
  padding: 0 18px; font-family: var(--f-data); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.menu-btn i { width: 14px; height: 6px; border-block: 1px solid currentColor; display: block; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--signal);
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 26px; border-radius: 999px;
  background: var(--b); color: var(--peat);
  font-family: var(--f-data); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; border: 0; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease-out);
}
/* Origin-aware fill: the ink floods in from where the pointer entered and drains
   out where it left (--x/--y set by JS). A transition, so it reverses mid-flight. */
.btn::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--x, 50%); top: var(--y, 120%);
  width: 260%; aspect-ratio: 1; border-radius: 50%;
  background: var(--limestone);
  transform: translate(-50%, -50%) scale(0); transition: transform .7s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translate(-50%, -50%) scale(1); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .12s; }
/* arrow is optically nudged: a right-pointing glyph looks left-heavy when centred */
.btn svg { width: 18px; height: 18px; margin-right: -3px; transition: transform .5s var(--ease-out); }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] svg { animation: spin 1s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.btn:hover svg { transform: translateX(4px) rotate(-45deg); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--ground); }
.nav .btn { padding: 11px 18px; font-size: 11.5px; mix-blend-mode: normal; }
.nav .btn::after { display: none; }

/* ---------- Survey HUD: cursor coordinates ---------- */
.hud {
  position: fixed; left: var(--gutter); bottom: calc(18px + var(--safe-b)); z-index: 30; pointer-events: none;
  display: flex; gap: 22px; color: color-mix(in oklab, var(--peat) calc(var(--paper) * 100%), var(--limestone));
  font-family: var(--f-data); font-size: 11px; letter-spacing: .1em;
}
.hud span { opacity: .55; margin-right: 6px; }
.reticle {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  color: var(--signal); opacity: 0; transition: opacity .3s, width .4s var(--ease-out), height .4s var(--ease-out), margin .4s var(--ease-out);
}
.reticle svg { width: 100%; height: 100%; overflow: visible; }
.reticle circle, .reticle line { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.reticle.is-on { opacity: 1; }
.reticle.is-link { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.reticle__label {
  position: absolute; left: 100%; top: 50%; translate: 10px -50%; white-space: nowrap;
  font-family: var(--f-data); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  background: var(--signal); color: var(--peat); padding: 4px 8px; border-radius: 2px;
  opacity: 0; scale: .8; transform-origin: left center; transition: opacity .25s, scale .35s var(--ease-out);
}
.reticle.has-label .reticle__label { opacity: 1; scale: 1; }
@media (pointer: fine) { html.has-reticle, html.has-reticle a, html.has-reticle button { cursor: none; } html.has-reticle input, html.has-reticle select, html.has-reticle textarea { cursor: text; } }
@media (pointer: coarse) { .reticle, .hud { display: none; } }

/* ---------- Atlas menu (full-screen) ---------- */
.atlas-menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--peat); color: var(--limestone);
  display: grid; grid-template-rows: auto 1fr auto;
  height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(14px + var(--safe-t)) var(--gutter) calc(28px + var(--safe-b));
  /* the lens opens from the button that summoned it (--ox/--oy set by JS) */
  clip-path: circle(0% at var(--ox, 100%) var(--oy, 0%));
  transition: clip-path .9s var(--ease-io), visibility 0s .9s;
  visibility: hidden;
}
.atlas-menu.is-open { clip-path: circle(150% at var(--ox, 100%) var(--oy, 0%)); visibility: visible; transition: clip-path .9s var(--ease-io), visibility 0s; }
.atlas-menu li { opacity: 0; translate: 0 30px; transition: opacity .5s, translate .8s var(--ease-out); }
.atlas-menu.is-open li { opacity: 1; translate: 0 0; transition-delay: calc(180ms + var(--i, 0) * 60ms); }
.atlas-menu__top { display: flex; justify-content: space-between; align-items: center; }
.atlas-menu ol { list-style: none; margin: 0; padding: 0; align-self: center; }
.atlas-menu li { border-top: 1px solid var(--ink-faint); }
.atlas-menu li:last-child { border-bottom: 1px solid var(--ink-faint); }
.atlas-menu li a {
  display: grid; grid-template-columns: 70px minmax(0, 1fr) 64px; align-items: center; gap: 12px;
  padding: 14px 0; text-decoration: none;
}
.atlas-menu .t-land { font-size: clamp(42px, 11vw, 92px); }
.atlas-menu .sigil-slot { width: 64px; height: 64px; }
.atlas-menu li a:hover .t-land, .atlas-menu li a:focus-visible .t-land { color: var(--signal); }
/* you are here: marked in words and ink, not colour alone */
.atlas-menu a[aria-current="page"] .t-land { color: var(--copper-hi); }
.atlas-menu a[aria-current="page"] .t-data::after { content: "You are here"; display: block; color: var(--signal); margin-top: 4px; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(110px, 16vh, 200px) var(--gutter); color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Label with a leader line, like a map annotation */
.anno { position: absolute; display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); }
.anno::before { content: ""; width: 1px; height: 46px; background: currentColor; opacity: .6; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh; padding: 0 var(--gutter);
  display: grid; grid-template-rows: 1fr auto; position: relative;
}
.hero__title { align-self: center; padding-top: 110px; position: relative; max-width: var(--max); width: 100%; margin: 0 auto; }
.hero__title .row { display: flex; align-items: flex-end; gap: clamp(12px, 2vw, 34px); flex-wrap: wrap; }
.hero__title .row--b { justify-content: flex-end; }
.hero__title .t-flow.small { font-size: clamp(30px, 4.6vw, 86px); line-height: 1; padding-bottom: .12em; color: var(--copper-hi); }
.hero__title .t-land { color: var(--limestone); }
.hero .signal-dot { color: var(--signal); }
.hero__foot {
  max-width: var(--max); width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.2fr) auto; align-items: end; gap: 32px;
  padding-bottom: clamp(56px, 9vh, 96px);
}
.hero__foot .lede { max-width: 36ch; color: var(--ink-soft); }
.hero__foot .lede strong { color: var(--ink); font-weight: 400; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero__aside { text-align: right; color: var(--ink-soft); }
.hero__aside .t-data { display: block; }
.descend { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; text-decoration: none; }
.descend i { width: 1px; height: 56px; background: linear-gradient(var(--ink-soft), transparent); position: relative; overflow: hidden; }
.descend i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--signal); animation: descend 2.4s var(--ease-io) infinite; }
@keyframes descend { to { top: 100%; } }

.hero .anno--1 { top: 16vh; right: var(--gutter); max-width: 210px; text-align: left; }
@media (max-width: 1180px) { .hero .anno--1 { display: none; } }
.hero .anno--2 { left: 44%; top: 66vh; }

/* letter rise */
.split .ch { display: inline-block; transform: translateY(105%); opacity: 0; }
/* a word never breaks between its letters: the inherited text-wrap: balance would otherwise re-balance inside it */
.split-mask { display: inline-block; white-space: nowrap; text-wrap: nowrap; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; vertical-align: bottom; }
.is-ready .split .ch { animation: rise 1.3s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes rise { to { transform: none; opacity: 1; } }

/* ---------- LEGEND ---------- */
.legend { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); }
.legend__intro { position: sticky; top: 18vh; align-self: start; }
.legend__intro p { margin-top: 28px; }
.legend__items { list-style: none; margin: 0; padding: 0; }
.key {
  min-height: 62vh; display: grid; grid-template-columns: 76px 1fr; gap: 26px; align-content: center;
  border-top: 1px solid var(--line); padding: 40px 0;
  opacity: .32; transition: opacity .8s var(--ease-out);
}
.key.is-active { opacity: 1; }
.key__sym { width: 76px; height: 76px; }
.key__sym * { fill: none; stroke: var(--copper-hi); stroke-width: 1.4; }
.key__sym .fill { fill: var(--signal); stroke: none; }
.key h3 { font-size: clamp(44px, 5.6vw, 96px); }
.key .t-flow { font-size: clamp(22px, 1.8vw, 30px); color: var(--copper-hi); margin: 10px 0 14px; display: block; }
.key p { margin: 0; max-width: 46ch; color: var(--ink-soft); }

/* query paths overlay: search terms as rivers */
.queries { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.queries.is-on { opacity: 1; }
.queries path.trail { fill: none; stroke: var(--suir); stroke-width: 1.1; stroke-dasharray: 2 7; opacity: .75; animation: trail 30s linear infinite; }
.queries text { font-family: var(--f-flow); font-style: italic; font-size: 17px; fill: var(--suir); letter-spacing: .02em; }
@keyframes trail { to { stroke-dashoffset: -400; } }

/* ---------- FIELD GUIDE (services) ---------- */
.guide-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 32px; margin-bottom: clamp(50px, 8vh, 90px); }
.guide-head p { max-width: 42ch; margin: 0; }
.guide { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.guide li { border-top: 1px solid var(--line); }
.guide li:last-child { border-bottom: 1px solid var(--line); }
.guide a {
  display: grid; grid-template-columns: 90px minmax(0, 1.15fr) minmax(0, 1fr) 110px; gap: 24px; align-items: center;
  padding: 26px 0; text-decoration: none; position: relative;
}
.guide .num { color: var(--ink-soft); }
.guide .name { font-size: clamp(40px, 5.4vw, 96px); transition: transform .7s var(--ease-out), color .4s; }
.guide .name small { display: block; font-family: var(--f-flow); font-style: italic; font-weight: 300; text-transform: none; font-size: clamp(16px, 1.2vw, 20px); letter-spacing: 0; color: var(--ink-soft); margin-bottom: 8px; line-height: 1; }
.guide .desc { color: var(--ink-soft); margin: 0; font-size: 17px; max-width: 40ch; }
.guide .sigil-slot { width: 110px; height: 110px; justify-self: end; opacity: .55; transition: opacity .5s, transform .9s var(--ease-out); }
.guide a:hover .name, .guide a:focus-visible .name { transform: translateX(18px); color: var(--signal); }
.guide a:hover .sigil-slot { opacity: 1; transform: rotate(-12deg) scale(1.12); }

/* sigils */
.sigil { width: 100%; height: 100%; overflow: visible; }
.sigil .sg-l { fill: none; stroke: currentColor; stroke-width: .8; stroke-linecap: round; opacity: .7; }
.sigil .sg-i { stroke-width: 1.6; opacity: 1; }
.sigil .sg-summit path { fill: var(--signal); }
.sigil-slot { color: var(--ink); }
.draw .sigil .sg-l { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.6s var(--ease-out) forwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- STRATA ---------- */
.strata { min-height: 300vh; padding-top: 0; padding-bottom: 0; }
.strata__stick { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 90px); align-items: center; max-width: var(--max); margin: 0 auto; }
.strata__copy p { color: var(--ink-soft); max-width: 40ch; margin-top: 24px; }
.strata__fig { position: relative; height: min(74vh, 720px); }
.stratum {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--h) * 1%);
  transform: translateY(calc((1 - var(--on, 0)) * 120%));
  opacity: var(--on, 0);
  transition: transform 1.2s var(--ease-out), opacity 1s;
}
.stratum svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stratum__label {
  position: absolute; left: 4%; top: 26px; z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.stratum__label .t-land { font-size: clamp(24px, 2.4vw, 40px); }
.stratum__label .t-flow { font-size: 17px; opacity: .85; }
.stratum__label .t-data { opacity: .75; }
.stratum--bedrock { --h: 22; color: var(--limestone); }
.stratum--subsoil { --h: 40; color: var(--limestone); }
.stratum--topsoil { --h: 58; color: var(--peat); }
.stratum--cover   { --h: 76; color: var(--peat); }
.stratum--summit  { --h: 100; color: var(--limestone); }
.strata__depth { position: absolute; right: -6px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: var(--ink-soft); transform: translateX(100%); padding-left: 12px; }
.strata__progress { display: flex; gap: 6px; margin-top: 34px; }
.strata__progress i { flex: 1; height: 2px; background: var(--ink-faint); max-width: 60px; }
.strata__progress i.on { background: var(--signal); }

/* ---------- ATLAS ---------- */
.atlas { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 90px); align-items: center; }
.atlas__map { position: relative; aspect-ratio: 1 / 1.02; }
.atlas__map svg { width: 100%; height: 100%; overflow: visible; }
.atlas__map .relief path { fill: none; stroke: var(--copper); stroke-width: .7; opacity: .45; }
.atlas__map .relief path.sg-i { stroke-width: 1.3; opacity: .7; }
.atlas__map .river { fill: none; stroke: var(--suir); stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in oklab, var(--suir) 60%, transparent)); }
.atlas__map .river-label { font-family: var(--f-flow); font-style: italic; font-size: 19px; fill: var(--suir); letter-spacing: .08em; }
.atlas__map .mtn-label { font-family: var(--f-land); font-weight: 600; letter-spacing: .5em; font-size: 15px; fill: var(--copper-hi); text-transform: uppercase; }
.atlas__map .grid line { stroke: var(--ink-faint); stroke-width: .5; stroke-dasharray: 2 6; }
.atlas__map .grid text { font-family: var(--f-data); font-size: 10px; fill: var(--ink-soft); letter-spacing: .1em; }
.town { cursor: pointer; outline: none; }
.town .pin { fill: var(--peat); stroke: var(--limestone); stroke-width: 1.5; transition: r .4s var(--ease-out), fill .3s; }
.town .pulse { fill: none; stroke: var(--signal); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.town text { font-family: var(--f-land); font-size: 17px; font-weight: 600; letter-spacing: .16em; fill: var(--limestone); text-transform: uppercase; transition: fill .3s; }
.town:hover .pin, .town:focus-visible .pin, .town.is-active .pin { fill: var(--signal); stroke: var(--signal); }
.town:hover text, .town:focus-visible text, .town.is-active text { fill: var(--signal); }
.town.is-active .pulse { animation: pulse 2s var(--ease-out) infinite; }
.town:focus-visible .pin { stroke-width: 3; }
@keyframes pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(4); } }
.atlas__panel { border-top: 1px solid var(--line); padding-top: 26px; min-height: 380px; }
.atlas__panel .grid-ref { color: var(--ink-soft); }
.atlas__panel h3 { font-size: clamp(54px, 6vw, 104px); margin: 10px 0 6px; }
.atlas__panel .t-flow { color: var(--copper-hi); font-size: 22px; }
.atlas__panel p { color: var(--ink-soft); }
.atlas__panel .queries-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; padding: 0; list-style: none; }
.atlas__panel .queries-list li { font-family: var(--f-flow); font-style: italic; border: 1px solid var(--ink-faint); border-radius: 99px; padding: 5px 14px; font-size: 16px; }
.atlas__panel .queries-list li::before { content: "\201C"; color: var(--signal); }
.atlas__panel .queries-list li::after { content: "\201D"; color: var(--signal); }
.atlas__swap { animation: swap .7s var(--ease-out); }
@keyframes swap { from { opacity: 0; transform: translateY(14px); } }

/* ---------- METHOD trail ---------- */
.trail-head { display: grid; grid-template-columns: 1fr minmax(0, 40ch); gap: 32px; align-items: end; }
.trail { position: relative; margin-top: clamp(60px, 10vh, 110px); }
.trail__profile { position: absolute; inset: 0 0 auto; height: 100%; pointer-events: none; }
.trail__profile path { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-dasharray: 3000; stroke-dashoffset: calc(3000 - var(--trail, 0) * 3000); }
.trail__profile path.ghost { stroke: var(--line); stroke-dasharray: 3 6; stroke-dashoffset: 0; }
.stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); position: relative; }
.stage { padding-top: var(--lift); }
.stage .alt { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.stage .alt::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--signal); background: var(--ground); }
.stage h3 { font-size: clamp(34px, 3.4vw, 58px); margin: 16px 0 8px; }
.stage .t-flow { font-size: 19px; color: var(--copper-hi); display: block; margin-bottom: 14px; }
.atmos-day .stage .t-flow, .atmos-day .key .t-flow, .atmos-day .atlas__panel .t-flow { color: var(--umber); }
.stage p { color: var(--ink-soft); font-size: 17px; margin: 0; }
.stage ul { margin: 16px 0 0; padding: 0; list-style: none; font-family: var(--f-data); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.stage li { padding: 7px 0; border-top: 1px dashed var(--ink-faint); }

/* ---------- HONEST GROUND ---------- */
.honest { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.promises li { background: var(--ground); padding: clamp(22px, 2.6vw, 40px); min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.promises .t-data { color: var(--signal); }
.promises h3 { font-size: clamp(26px, 2.2vw, 36px); line-height: 1; }
.promises p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.promises li.never h3 { text-decoration: line-through; text-decoration-color: var(--signal); text-decoration-thickness: 3px; }

/* draft notes: unverified content, visible until confirmed */
.draft-note {
  border: 1px dashed var(--signal); color: var(--ink); border-radius: 4px;
  padding: 14px 18px; font-family: var(--f-data); font-size: 12px; letter-spacing: .04em; line-height: 1.6;
  background: color-mix(in oklab, var(--signal) 7%, transparent);
}
.draft-note::before { content: "Proposed \00B7  "; color: var(--signal); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; }

/* ---------- YOUR TERRAIN (generator) ---------- */
.yours { min-height: 100svh; display: grid; place-items: center; text-align: center; }
.yours__inner { max-width: 1100px; width: 100%; }
.yours h2 { font-size: clamp(56px, 10vw, 190px); }
.yours h2 .t-flow { text-transform: none; font-size: .5em; display: block; color: var(--copper-hi); letter-spacing: 0; margin-bottom: .1em; }
.gen { margin: clamp(36px, 6vh, 64px) auto 0; display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 10px; max-width: 900px; text-align: left; }
.field { position: relative; }
/* z-index: the input's backdrop-filter makes a stacking context that would paint over the label */
.field label { z-index: 1; position: absolute; left: 20px; top: 10px; font-family: var(--f-data); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); pointer-events: none; }
.field input, .field select, .field textarea {
  width: 100%; background: color-mix(in oklab, var(--ground) 72%, transparent); color: var(--ink);
  border: 1px solid var(--ink-faint); border-radius: 14px;
  padding: 30px 20px 12px; font-family: var(--f-flow); font-size: 20px; font-style: italic;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .3s;
}
.field select { appearance: none; -webkit-appearance: none; }
.field select option { color: #111; font-style: normal; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--signal); }
.gen .btn { height: 100%; border-radius: 14px; }
.yours__result { margin-top: 50px; display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: center; text-align: left; }
.yours__result.is-shown { display: grid; animation: swap 1s var(--ease-out); }
.cartouche { position: relative; aspect-ratio: 1; color: var(--limestone); }
.cartouche .sigil-slot { color: var(--copper-hi); position: absolute; inset: 0; }
.cartouche__frame { position: absolute; inset: -14px; border: 1px solid var(--ink-faint); }
.cartouche__frame::before, .cartouche__frame::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--signal); }
.cartouche__frame::before { left: -4px; top: -4px; border-right: 0; border-bottom: 0; }
.cartouche__frame::after { right: -4px; bottom: -4px; border-left: 0; border-top: 0; }
.survey-card h3 { font-size: clamp(40px, 4.6vw, 76px); margin: 10px 0; overflow-wrap: anywhere; }
.survey-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 22px 0 30px; font-family: var(--f-data); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.survey-card dt { color: var(--ink-soft); }
.survey-card dd { margin: 0; }
.survey-card dd.sig { color: var(--signal); }
.survey-card .t-flow { color: var(--copper-hi); font-size: 20px; }

/* ---------- FOOTER ---------- */
.site-foot { padding: clamp(80px, 12vh, 140px) var(--gutter) 70px; color: var(--limestone); background: linear-gradient(transparent, var(--peat) 22%); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: var(--max); margin: 0 auto; }
.foot-grid h2 { font-size: 12px; font-family: var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; font-weight: 400; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--signal); }
.foot-grid .t-flow { font-size: 24px; line-height: 1.3; max-width: 22ch; }
.wordmark { max-width: var(--max); margin: clamp(60px, 10vh, 110px) auto 0; font-family: var(--f-land); font-weight: 900; text-transform: uppercase; font-size: clamp(64px, 17.6vw, 330px); line-height: .78; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1px var(--copper); text-align: center; user-select: none; }
.foot-base { max-width: var(--max); margin: 40px auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; color: var(--ink-soft); }

/* ---------- Sub-pages ---------- */
.page-hero { min-height: 82svh; display: grid; align-content: end; padding: 140px var(--gutter) clamp(60px, 10vh, 110px); }
.page-hero .wrap { width: 100%; }
.page-hero h1 { font-size: clamp(60px, 12vw, 220px); }
.page-hero .lede { margin-top: 30px; color: var(--ink-soft); max-width: 40ch; }
.crumbs { display: flex; gap: 10px; color: var(--ink-soft); margin-bottom: 26px; list-style: none; padding: 0; }
.crumbs a { text-decoration: none; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }

.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 6vw, 120px); padding-block: clamp(70px, 11vh, 130px); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.chapter:first-child { border-top: 0; }
.chapter__side { position: sticky; top: 110px; align-self: start; }
.chapter__side .sigil-slot { width: min(220px, 60%); aspect-ratio: 1; margin-top: 26px; color: var(--copper); }
.atmos-day .chapter__side .sigil-slot { color: var(--umber); }
.chapter__side .t-flow { display: block; font-size: 22px; color: var(--copper-hi); margin-top: 10px; }
.atmos-day .chapter__side .t-flow { color: var(--umber); }
.prose { max-width: 66ch; }
.prose h2 { font-family: var(--f-land); text-transform: uppercase; font-weight: 800; font-size: clamp(40px, 4.6vw, 76px); line-height: .9; margin-bottom: 28px; }
.prose h3 { font-family: var(--f-land); text-transform: uppercase; font-weight: 700; font-size: 26px; letter-spacing: .04em; margin: 40px 0 10px; }
.prose p { margin: 0 0 1.1em; }
.prose p.big { font-size: clamp(22px, 1.7vw, 28px); line-height: 1.4; font-weight: 300; }
.ticks { list-style: none; padding: 0; margin: 20px 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.ticks li { padding: 12px 0 12px 28px; border-top: 1px solid var(--line); position: relative; font-size: 17px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 9px; height: 9px; border: 1.5px solid var(--signal); transform: rotate(45deg); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { font-family: var(--f-data); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--ink-faint); border-radius: 99px; padding: 6px 12px; text-decoration: none; }
a.pill:hover { border-color: var(--signal); color: var(--signal); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 30px; gap: 20px; padding: 26px 0; font-family: var(--f-land); text-transform: uppercase; font-weight: 700; font-size: clamp(22px, 2vw, 32px); letter-spacing: .02em; line-height: 1; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-data); font-weight: 300; color: var(--signal); font-size: 28px; transition: transform .4s var(--ease-out); text-align: right; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 26px; max-width: 62ch; color: var(--ink-soft); }

.cta-band { text-align: center; padding-block: clamp(120px, 20vh, 220px); }
.cta-band h2 { font-size: clamp(54px, 9vw, 160px); }
.cta-band .t-flow { display: block; text-transform: none; font-size: .42em; color: var(--copper-hi); letter-spacing: 0; }
.cta-band .cta-row { justify-content: center; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 100px); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .full { grid-column: 1 / -1; }
.form textarea { min-height: 170px; resize: vertical; }
.form fieldset { border: 0; padding: 0; margin: 12px 0 6px; }
.form legend { font-family: var(--f-data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-block; border: 1px solid var(--ink-faint); border-radius: 99px; padding: 9px 16px; font-size: 16px; font-style: italic; cursor: pointer; transition: all .3s; }
.chips input:checked + span { background: var(--signal); border-color: var(--signal); color: var(--peat); }
.chips input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 3px; }
.form .status { grid-column: 1 / -1; font-family: var(--f-data); font-size: 12.5px; letter-spacing: .04em; min-height: 1.5em; }
.form__send { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.form__send a, .prose a { text-underline-offset: 3px; }
.form__send a:hover, .prose a:hover { color: var(--signal); }
/* spam trap: off-screen, not display:none (some bots skip hidden fields) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Field validation: message under the field, ink + icon, never colour alone */
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid .combo input { border-color: var(--alert); box-shadow: inset 0 0 0 1px var(--alert); }
.field__err {
  display: flex; gap: 8px; align-items: baseline; margin: 8px 4px 0;
  font-family: var(--f-data); font-size: 12px; letter-spacing: .03em; line-height: 1.45; color: var(--alert);
}
.field__err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--alert); color: var(--peat); font-weight: 600; font-size: 11px; translate: 0 2px; }
.field__err[hidden] { display: none; }

/* Submission status: pending, success and error each look and read differently */
.form .status:empty { display: none; }
.status { --tint: transparent; border-radius: 14px; padding: 18px 20px;
  /* near-solid ground so contour lines never run through the message */
  background: linear-gradient(var(--tint), var(--tint)), color-mix(in oklch, var(--ground) 90%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-shadow: none; font-family: var(--f-data); font-size: 13px; letter-spacing: .03em; line-height: 1.55; outline: none; }
.status strong { display: block; font-family: var(--f-land); font-size: 26px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.status.is-pending { border: 1px solid var(--ink-faint); color: var(--ink-soft); }
.status.is-success { border: 1px solid var(--signal); --tint: color-mix(in oklch, var(--signal) 12%, transparent); color: var(--ink); }
.status.is-success strong { color: var(--signal); }
.status.is-error { border: 1px solid var(--alert); --tint: color-mix(in oklch, var(--alert) 10%, transparent); color: var(--ink); }
.status.is-error strong { color: var(--alert); }
.status ul { margin: 8px 0 0; padding-left: 18px; }
.status a { color: inherit; text-underline-offset: 3px; }
.form.is-sent > :not(.status) { opacity: .4; pointer-events: none; transition: opacity .6s; }

/* Contact details: live links once confirmed, clearly marked until then */
.tbc { color: var(--ink-soft); border-bottom: 1px dashed color-mix(in oklch, var(--signal) 70%, transparent); font-style: italic; }
a[data-contact] { text-decoration: none; border-bottom: 1px solid var(--ink-faint); transition: color .3s, border-color .3s; }
a[data-contact]:hover { color: var(--signal); border-color: var(--signal); }

/* 404: routes back to known ground */
.lost-routes { list-style: none; padding: 0; margin: 44px auto 0; max-width: 640px; text-align: left; border-top: 1px solid var(--ink-faint); }
.lost-routes li { border-bottom: 1px solid var(--ink-faint); }
.lost-routes a { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 14px 0; min-height: var(--touch); text-decoration: none; }
.lost-routes .t-land { font-size: clamp(26px, 4vw, 38px); --px: 34; transition: color .3s, translate .5s var(--ease-out); }
.lost-routes a:hover .t-land, .lost-routes a:focus-visible .t-land { color: var(--signal); translate: 8px 0; }

.contact-aside dl { display: grid; gap: 22px; margin: 0; }
.contact-aside dt { font-family: var(--f-data); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.contact-aside dd { margin: 6px 0 0; font-size: 22px; }

/* town index (areas page) */
.towns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.towns article { background: var(--ground); padding: clamp(24px, 2.6vw, 40px); scroll-margin-top: 90px; display: flex; flex-direction: column; gap: 10px; }
.towns article:target { box-shadow: inset 0 0 0 2px var(--signal); }
.towns .head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.towns h2 { font-size: clamp(38px, 3.6vw, 60px); }
.towns .sigil-slot { width: 84px; height: 84px; flex: none; color: var(--umber); }
.towns p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: calc(var(--rd, 0) * 1ms); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@supports (animation-timeline: view()) {
  .parallax { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes drift { from { transform: translateY(8vh); } to { transform: translateY(-8vh); } }
}

/* ---------- Page transitions (cross-document View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .55s var(--ease-io) both; }
::view-transition-new(root) { animation: vt-in .9s var(--ease-out) both; }
::view-transition-group(terrain) { animation-duration: .9s; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4vh); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; clip-path: inset(100% 0 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }

/* ---------- Tracking hints for display sizes (feeds the .t-land formula) ---------- */
.guide .name, .key h3, .atlas__panel h3 { --px: 84; }
.page-hero h1, .yours h2, .atlas-menu .t-land { --px: 170; line-height: var(--lead-display); }
.cta-band h2 { --px: 130; }
.stage h3, .towns h2, .survey-card h3 { --px: 50; }

/* ---------- Optical corrections ---------- */
/* The full stop hangs past the measure, so SHAPE's E sits on the gutter, not the dot */
.hero .signal-dot { margin-right: -.26em; }
.hero__title .row--b { padding-right: .1em; }
/* Optical centre sits a touch above the geometric one */
.hero__title { margin-bottom: 4vh; }
.yours { padding-bottom: calc(clamp(110px, 16vh, 200px) + 5vh); }
/* opening quotes hang so the words align, not the punctuation */
.atlas__panel .queries-list li { text-indent: -.32em; padding-left: calc(14px + .32em); }
/* centred eyebrows: the leader line makes the label look off-centre, so balance it */
.eyebrow[style*="center"]::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: 0; }

/* ---------- Windows: content revealed through a rising aperture ---------- */
.window { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease-io); }
.window.is-in { clip-path: inset(0 0 0 0); }
.no-js .window { clip-path: none; }

/* ---------- Tallboy placements ---------- */
.guide-head .tally { display: flex; align-items: flex-end; gap: 18px; }
.guide-head .tally p { max-width: 30ch; margin: 0 0 .4em; }
.guide-head .tally .tallboy { font-size: clamp(120px, 13vw, 240px); -webkit-text-stroke-width: 1.5px; margin-bottom: -.06em; }
.stage .alt { margin-bottom: 4px; }
.stage .tallboy { font-size: clamp(64px, 6.2vw, 112px); color: var(--ink); }

/* ---------- Combo box ---------- */
.combo { position: relative; }
.combo input { padding-right: 56px; text-overflow: ellipsis; }
.combo__toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  width: var(--touch); height: var(--touch); border: 0; background: none; color: var(--ink-soft); cursor: pointer; border-radius: 10px;
}
.combo__toggle svg { width: 18px; height: 18px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.6; transition: rotate .4s var(--ease-out); }
.combo.is-open .combo__toggle svg { rotate: 180deg; }
.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; max-height: min(340px, 46vh); overflow-y: auto; overscroll-behavior: contain;
  background: color-mix(in oklch, var(--bog) 94%, transparent); color: var(--limestone);
  border: 1px solid color-mix(in oklch, var(--limestone) 18%, transparent); border-radius: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -20px oklch(0% 0 0 / .6);
  opacity: 0; translate: 0 -8px; scale: .98; transform-origin: top center; pointer-events: none;
  transition: opacity .2s, translate .35s var(--ease-out), scale .35s var(--ease-out);
}
.combo.is-open .combo__list { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }
.combo__group { font-family: var(--f-data); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in oklch, var(--limestone) 55%, transparent); padding: 12px 12px 6px; }
.combo__opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: var(--touch); padding: 0 12px; border-radius: 8px; cursor: pointer;
  font-family: var(--f-flow); font-style: italic; font-size: 18px; text-shadow: none;
}
.combo__opt span { font-family: var(--f-data); font-style: normal; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in oklch, var(--limestone) 50%, transparent); }
.combo__opt mark { background: none; color: var(--signal-hi); text-decoration: underline; text-underline-offset: 3px; }
.combo__opt.is-active { background: color-mix(in oklch, var(--signal) 22%, transparent); }
.combo__opt[aria-selected="true"]::after { content: "●"; color: var(--signal); font-size: 9px; font-style: normal; }
.combo__empty { padding: 12px; font-size: 16px; color: color-mix(in oklch, var(--limestone) 70%, transparent); }

/* ---------- Progressive disclosure (grid-rows trick: animates height, reversible) ---------- */
.disclose { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .6s var(--ease-out), opacity .4s; }
.disclose > * { overflow: hidden; min-height: 0; }
.disclose.is-open { grid-template-rows: 1fr; opacity: 1; }
.form .disclose:not(.is-open) { margin-top: -10px; }   /* absorb the grid gap while closed */
.form .disclose > div { padding: 2px; margin: -2px; }   /* room for focus rings inside the clip */
.plan-preview { border-left: 2px solid var(--signal); padding: 4px 0 4px 18px; margin-top: 4px; }
.plan-preview ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 17px; }
.plan-preview li { padding: 4px 0; }
.plan-preview li::before { content: "→ "; color: var(--signal); font-family: var(--f-data); }

/* ---------- Atlas: touch alternatives to small pins ---------- */
.town .hit { fill: transparent; }
.town-chips { display: none; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.town-chips button {
  min-height: var(--touch); padding: 0 16px; border-radius: 99px; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--ink-faint);
  font-family: var(--f-data); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
}
.town-chips button[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: var(--peat); }
@media (pointer: coarse), (max-width: 720px) { .town-chips { display: flex; } }

/* ---------- Touch targets on coarse pointers ---------- */
@media (pointer: coarse) {
  .foot-grid a, .crumbs a, a.pill { display: inline-flex; align-items: center; min-height: var(--touch); }
  .foot-grid ul { gap: 0; }
}

/* ---------- Shared elements & direction-aware page transitions ---------- */
::view-transition-group(*) { animation-duration: .8s; animation-timing-function: var(--ease-io); }
html:active-view-transition-type(deeper)::view-transition-old(root) { animation: vt-sink .6s var(--ease-io) both; }
html:active-view-transition-type(deeper)::view-transition-new(root) { animation: vt-rise .9s var(--ease-out) both; }
html:active-view-transition-type(back)::view-transition-old(root) { animation: vt-lift .6s var(--ease-io) both; }
html:active-view-transition-type(back)::view-transition-new(root) { animation: vt-drop .9s var(--ease-out) both; }
@keyframes vt-sink { to { opacity: 0; translate: 0 -6vh; scale: .97; filter: blur(4px); } }
@keyframes vt-rise { from { clip-path: inset(100% 0 0 0); translate: 0 8vh; } to { clip-path: inset(0 0 0 0); translate: 0 0; } }
@keyframes vt-lift { to { opacity: 0; translate: 0 6vh; scale: .97; filter: blur(4px); } }
@keyframes vt-drop { from { clip-path: inset(0 0 100% 0); translate: 0 -8vh; } to { clip-path: inset(0 0 0 0); translate: 0 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a:not(.btn) { display: none; }
  .menu-btn { display: inline-flex; }
  .legend, .atlas, .honest, .strata__stick, .contact-grid, .chapter { grid-template-columns: 1fr; }
  .legend__intro, .chapter__side { position: static; }
  /* minmax(0, …): a bare 1fr grows to its longest word ("Measurement") and pushed the sigil off-screen */
  .guide a { grid-template-columns: 54px minmax(0, 1fr) 84px; }
  .guide .desc { grid-column: 2 / 3; grid-row: 2; }
  .guide .sigil-slot { width: 84px; height: 84px; grid-row: 1 / 3; grid-column: 3; opacity: .8; }
  .stages { grid-template-columns: 1fr 1fr; row-gap: 56px; }
  .stage { padding-top: 0; }
  .trail__profile { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .strata__stick { align-content: center; gap: 28px; }
  .strata__fig { height: 56vh; }
  .strata__stick { padding-top: 70px; }
  .stratum__label { top: 18px; flex-direction: row; align-items: baseline; gap: 12px; }
  .stratum__label .t-flow { display: none; }
  .stratum__label .t-land { font-size: 22px; }
  .strata__depth { display: none; }
  .strata__copy .h-m { font-size: clamp(36px, 8vw, 60px); }
  .strata__copy p { margin-top: 12px; }
}
@media (max-width: 720px) {
  .nav .btn { display: none; }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__aside { text-align: left; }
  .hero .anno { display: none; }
  .hero__title .row--b { justify-content: flex-start; }
  .key { grid-template-columns: 1fr; min-height: 0; padding: 56px 0; }
  .key__sym { width: 56px; height: 56px; }
  .guide-head, .trail-head { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .promises { grid-template-columns: 1fr; }
  .promises li { min-height: 0; }
  .gen { grid-template-columns: 1fr; }
  .gen .btn { justify-content: center; padding: 20px; }
  .yours__result { grid-template-columns: 1fr; }
  .cartouche { max-width: 320px; margin: 0 auto; width: 100%; }
  .ticks { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .queries text { font-size: 13px; }
  .atlas__panel { min-height: 0; }
  .guide a { grid-template-columns: 34px minmax(0, 1fr) 60px; gap: 8px 14px; padding: 22px 0; }
  .guide .name { font-size: clamp(30px, 9.4vw, 40px); overflow-wrap: break-word; hyphens: auto; }
  .guide .sigil-slot { width: 60px; height: 60px; }
  .guide .desc { font-size: 16px; }
  .atlas-menu li a { grid-template-columns: 46px minmax(0, 1fr) 44px; gap: 10px; }
  .atlas-menu .t-land { font-size: clamp(30px, 10vw, 54px); }
  .atlas-menu .sigil-slot { width: 44px; height: 44px; }
  .contact-aside dd { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .split .ch { transform: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .window { clip-path: none; }
  .atlas-menu li { opacity: 1; translate: none; }
}
