/* LB Omgevingsadvies: site styles.
   World: the Dutch topographic map (Kadaster BRT) as ground, legend cards as panels,
   one signal colour for the action. Hand-written CSS, self-hosted variable font, no framework. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.477b564b86e0.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@property --rise { syntax: "<length>"; inherits: false; initial-value: 0px; }

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f6f2;
  --ground: #ffffff;
  --ink: #16201a;
  --ink-2: #3d4a42;
  --muted: #5f6c65;
  --line: #dcdfd8;
  --line-2: #c3c9c0;
  --n2k: #2f7d4f;
  --n2k-deep: #1f5c38;
  --n2k-soft: #e3efe6;
  --water: #7fb7d8;
  --field: #e3ead0;
  --signal: #bf3a1d;
  --signal-2: #a3301a;
  --signal-soft: #fbe9e4;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --r: 4px;
  --shadow-panel: 0 24px 48px -28px rgba(22, 32, 26, 0.38), 0 3px 8px -3px rgba(22, 32, 26, 0.14);
  --shadow-label: 0 6px 14px -8px rgba(22, 32, 26, 0.4), 0 1px 2px rgba(22, 32, 26, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
  --container: 1240px;
  --atlas-h: clamp(640px, calc(100svh - var(--header-h)), 940px);
  --space-section: clamp(4rem, 8vw, 7rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line-2) var(--paper); }
body {
  margin: 0; font-family: var(--font); font-optical-sizing: auto; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; caret-color: var(--signal);
}
h1, h2, h3 { margin: 0 0 0.5em; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1, h2 { font-stretch: 100%; letter-spacing: -0.008em; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--line-2); transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: var(--signal); }
ol, ul { margin: 0; padding: 0; }
strong { font-weight: 650; }
img, svg { max-width: 100%; }
::selection { background: var(--signal-soft); color: var(--signal-2); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.eyebrow { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 0.5rem; }
.page-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 0.9rem; background: var(--ink); color: #fff; border-radius: var(--r); }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgba(246, 246, 242, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow 0.4s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 10px 24px -22px rgba(22, 32, 26, 0.5); }
.nav { display: flex; align-items: center; gap: 2rem; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; flex: none; }
.brand-mark circle { fill: var(--signal); stroke: none; }
.brand-name { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; }
.brand-name span { font-weight: 400; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-size: 0.95rem; font-weight: 500; text-decoration: none; padding: 0.3rem 0; border-bottom: 1.5px solid transparent; transition: border-color 0.25s var(--ease), color 0.25s; }
.nav-links a:hover { color: var(--ink); border-color: var(--signal); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.35rem; border: 1px solid transparent; border-radius: var(--r); font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.2s var(--ease), border-color 0.2s, color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 8px 18px -12px rgba(191, 58, 29, 0.9); }
.btn-primary:hover { background: var(--signal-2); box-shadow: 0 12px 22px -12px rgba(163, 48, 26, 0.9); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- Atlas: the map as first viewport ---------- */
.atlas { position: relative; height: var(--atlas-h); overflow: hidden; background: var(--ground); border-bottom: 1px solid var(--line); }
.atlas-view { position: absolute; inset: 0; overflow: hidden; }
.atlas-stage {
  --s: max(calc(100vw / 1440px), calc(var(--atlas-h) / 900px));
  position: absolute; left: 50%; top: 50%; width: 1440px; height: 900px;
  transform: translate(-50%, -50%) scale(var(--s)); transform-origin: 50% 50%;
}
.atlas-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.n2k-area { fill: url(#n2k-hatch); stroke: var(--n2k); stroke-width: 2; stroke-linejoin: round; transition: fill-opacity 0.4s, stroke-width 0.3s; }
.n2k-hatch-line { stroke: var(--n2k); stroke-width: 1.2; opacity: 0.42; }
.hex { fill: var(--n2k); fill-opacity: 0.1; stroke: var(--n2k); stroke-opacity: 0.55; stroke-width: 1; transition: fill-opacity 0.5s var(--ease), stroke-opacity 0.3s; }
.distance-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-dasharray: 9 7; stroke-linecap: round; }
.distance-tick { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.distance-reveal { fill: none; stroke: #fff; stroke-width: 24; stroke-linecap: square; stroke-dasharray: 1; stroke-dashoffset: 0; }
.parcel { fill: var(--signal); fill-opacity: 0.16; stroke: var(--signal); stroke-width: 2.5; stroke-linejoin: round; }
.parcel-pin { fill: var(--signal); stroke: #fff; stroke-width: 2; }

.map-label { --lift: 0px; --rise: 0px; position: absolute; transform: scale(calc(1 / var(--s))) translate(-50%, calc(-100% - var(--lift) + var(--rise))); transform-origin: 0 0; padding: 5px 9px; background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 14px; line-height: 1.25; font-weight: 500; white-space: nowrap; letter-spacing: 0.005em; }
.map-label::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: #fff; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: translateX(-50%) rotate(45deg); }
.map-label-parcel { --lift: 8px; }
.map-label-key { display: block; font-weight: 650; color: var(--signal-2); }
.map-label-note { display: block; font-size: 12px; color: var(--muted); }
.map-label-distance { --lift: 6px; font-size: 15px; }
.map-label-distance strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-right: 0.35em; }
.ml-short { display: none; }
.map-label-n2k { color: var(--n2k-deep); font-weight: 600; border-color: rgba(47, 125, 79, 0.5); }
.map-label-n2k::after { border-color: rgba(47, 125, 79, 0.5); }
.scale-bar { position: absolute; width: 132px; }
.scale-bar-rule { display: block; height: 6px; border: 2px solid var(--ink); border-top: 0; background: linear-gradient(90deg, var(--ink) 0 50%, #fff 50% 100%) top / 100% 2px no-repeat; }
.scale-bar-label { position: absolute; left: 0; top: 8px; font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink); text-shadow: 0 0 4px #fff, 0 0 8px #fff; transform: scale(calc(1 / var(--s))); transform-origin: 0 0; }

/* Legend panel: the message and the action */
.legend { position: absolute; left: clamp(1rem, 3vw, 3rem); top: clamp(1.25rem, 4vh, 3.25rem); z-index: 2; width: min(460px, 44vw); padding: clamp(1.4rem, 2.2vw, 2rem); background: #fff; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); }
.legend h1 { margin-bottom: 0.55em; }
.legend .lead { font-size: 1.02rem; margin-bottom: 1.25rem; }
.legend-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.35rem; }
.legend-list { list-style: none; border-top: 1px solid var(--line); }
.legend-row { display: grid; grid-template-columns: 22px 1fr; gap: 0.75rem; align-items: start; padding: 0.7rem 0.4rem 0.7rem 0.2rem; margin: 0 -0.4rem 0 -0.2rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); border-radius: 3px; transition: background 0.2s; }
.legend-row:hover { background: var(--paper); }
.legend-symbol, .fact-symbol { width: 22px; height: 22px; margin-top: 0.1rem; fill: none; overflow: visible; }
.ls-hex { fill: var(--n2k); fill-opacity: 0.18; stroke: var(--n2k); stroke-width: 1.4; stroke-linejoin: round; }
.ls-line { stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 3 2.4; stroke-linecap: round; }
.ls-tick { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.ls-parcel { fill: var(--signal); fill-opacity: 0.16; stroke: var(--signal); stroke-width: 1.5; }
.ls-pin { fill: var(--signal); }

/* Hover on a legend row lights its map feature */
.atlas:has(.legend-row[data-feature="hexes"]:hover) .hex { fill-opacity: 0.32; stroke-opacity: 1; }
.atlas:has(.legend-row[data-feature="hexes"]:hover) .n2k-area { stroke-width: 3; }
.atlas:has(.legend-row[data-feature="distance"]:hover) .distance-line { stroke-width: 4; }
.atlas:has(.legend-row[data-feature="distance"]:hover) .map-label-distance { border-color: var(--ink); }
.atlas:has(.legend-row[data-feature="parcel"]:hover) .parcel { fill-opacity: 0.35; stroke-width: 4; }

/* Result panel: the AERIUS document */
.result { position: absolute; right: clamp(1rem, 3vw, 3rem); bottom: clamp(1rem, 3vh, 2.5rem); z-index: 2; width: min(380px, 34vw); margin: 0; }
.doc { background: #fff; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow-panel); color: #1d2327; overflow: hidden; }
.doc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.15rem 0.7rem; border-bottom: 1px solid #e6e9ec; }
.doc-logo { color: #1f6fb2; font-weight: 700; font-size: 0.8rem; }
.doc-title { color: #1f6fb2; font-size: 1.05rem; font-weight: 500; }
.doc-body { padding: 0.7rem 1.15rem 0.9rem; display: grid; gap: 0.75rem; }
.doc-h { display: block; margin: 0 0 0.25rem; font-size: 0.74rem; font-weight: 700; color: #1d2327; }
.kv { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.6rem; font-size: 0.72rem; padding: 0.1rem 0; }
.kv > span:first-child { color: #66727a; }
.ph { display: inline-block; height: 0.55rem; border-radius: 2px; background: #e6e9ec; align-self: center; }
.ph-sm { width: 5rem; } .ph-md { width: 7.5rem; } .ph-lg { width: 10rem; }
.src { display: flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; padding: 0.15rem 0; }
.badge { display: inline-grid; place-items: center; width: 1.1rem; height: 0.9rem; border-radius: 2px; color: #fff; font-style: normal; font-size: 0.58rem; font-weight: 700; }
.b-red { background: #c0392b; } .b-orange { background: #e07b1a; } .b-blue { background: #2a6f97; }
.doc-result { border-top: 1px solid #e6e9ec; padding-top: 0.6rem; }
.res-head, .res-row { display: grid; grid-template-columns: 1fr 1.4fr 0.8fr; gap: 0.6rem; font-size: 0.72rem; padding: 0.2rem 0.4rem; }
.res-head { background: #f1f3f5; color: #55606a; }
.res-row strong { color: var(--n2k-deep); font-weight: 700; border-radius: 2px; padding: 0 0.2rem; margin-left: -0.2rem; }
.result figcaption { margin-top: 0.5rem; padding: 0.4rem 0.6rem; font-size: 0.8rem; line-height: 1.4; color: var(--ink-2); background: rgba(255, 255, 255, 0.88); border-radius: 3px; }

/* ---------- Sections ---------- */
.section { padding: var(--space-section) 0; }
.section h2 { margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }

/* Facts: a legend table, not cards */
.section-facts { background: var(--paper); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.fact { padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem) clamp(1.5rem, 3vw, 2.5rem) 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: clamp(1rem, 2.5vw, 2rem); }
.fact dt { display: flex; align-items: center; gap: 0.6rem; font-size: 1.18rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 0.7rem; }
.fact dd { margin: 0; color: var(--ink-2); font-size: 0.98rem; max-width: 30rem; }

/* Route: four stations on one line */
.section-route { background: var(--ground); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); counter-reset: station; }
.route::before { content: ""; position: absolute; left: 0.7rem; right: 0.7rem; top: 0.7rem; border-top: 2px dashed var(--line-2); }
.route::after { content: ""; position: absolute; left: 0.7rem; top: 0.65rem; height: 3px; width: calc(100% - 1.4rem); background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); }
.route.is-drawn::after { transform: scaleX(1); }
.station { position: relative; padding-top: 2.6rem; counter-increment: station; }
.station-mark { position: absolute; left: 0; top: 0; z-index: 1; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; border: 2px solid var(--ink); font-size: 0.72rem; font-weight: 700; color: var(--ink); transition: background 0.3s, color 0.3s; }
.station-mark::after { content: counter(station); }
.route.is-drawn .station-mark { background: var(--ink); color: #fff; }
.station h3 { margin-bottom: 0.4rem; }
.station p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }

/* Vision */
.section-vision { background: var(--paper); }
.vision { max-width: 46rem; }
.vision h2 { margin-bottom: 0.6em; }
.vision .lead { max-width: 42rem; }

/* Pilot: a light panel, the page's close */
.section-pilot { background: var(--paper); padding-top: 0; }
.pilot { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 2rem 3rem; align-items: center; padding: clamp(1.75rem, 4vw, 3.25rem); background: #fff; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); }
.pilot h2 { margin-bottom: 0.5em; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.pilot .lead { margin: 0; font-size: 1.05rem; }
.pilot-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.stamp { position: absolute; top: -1rem; right: clamp(1rem, 3vw, 2.5rem); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; font-size: 0.85rem; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow-label); }
.stamp-key { font-weight: 650; color: var(--signal-2); }
.stamp-sep { width: 1px; height: 0.9em; background: var(--line-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-about p { margin: 1rem 0 0; font-size: 0.95rem; color: var(--ink-2); max-width: 36rem; }
.footer-title { font-size: 0.95rem; font-weight: 650; margin: 0 0 0.6rem; }
.footer-grid p { font-size: 0.95rem; color: var(--ink-2); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.footer-attrib { flex-basis: 100%; }

/* ---------- Forms (intake, contact) ---------- */
.form-section { background: var(--paper); }
.form-head { max-width: 40rem; margin-bottom: 2rem; }
.intake-form fieldset { border: 1px solid var(--line-2); border-radius: 6px; padding: clamp(1.25rem, 3vw, 2rem); margin: 0 0 1.5rem; background: #fff; }
.intake-form legend { font-size: 1.2rem; font-weight: 650; padding: 0 0.4rem; color: var(--ink); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field input[type="url"], .field select, .field textarea { width: 100%; padding: 0.72rem 0.85rem; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 32, 26, 0.12); }
.field .help { font-size: 0.85rem; color: var(--muted); margin: 0.3rem 0 0; }
.field .error { font-size: 0.85rem; color: var(--signal-2); margin: 0.3rem 0 0; font-weight: 600; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--signal); }
.field-checkbox label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.field-checkbox input { margin-top: 0.3rem; accent-color: var(--signal); }
.optional { font-weight: 500; font-size: 0.8rem; color: var(--muted); margin-left: 0.3rem; }
.step-intro { color: var(--muted); font-size: 0.95rem; margin: -0.25rem 0 1.4rem; }
.form-actions { display: grid; gap: 0.75rem; }
.form-foot { margin-top: 2rem; }
.alert { padding: 1rem 1.25rem; border-radius: var(--r); margin-bottom: 1.5rem; border: 1px solid; }
.alert-error { background: var(--signal-soft); color: #7a2a1b; border-color: #efc6bb; }
.alert-success { background: var(--n2k-soft); color: var(--n2k-deep); border-color: #bcd9c6; }
.ref { font-weight: 700; letter-spacing: 0.03em; background: var(--n2k-soft); padding: 0.1rem 0.4rem; border-radius: 3px; }
.card { background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 1.5rem 1.75rem; margin: 1.5rem 0; }
.card ol { padding-left: 1.2rem; }
.card li { margin-bottom: 0.5rem; }

/* Intake uploads (file list behaviour in static/js/intake.js) */
.field input[type="file"] { width: 100%; padding: 0.6rem 0.85rem; font: inherit; font-size: 0.95rem; color: var(--ink); border: 1px dashed var(--line-2); border-radius: var(--r); background: #fff; }
.file-list { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: 0.9rem; color: var(--ink-2); }
.file-list li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.file-list li.is-problem { color: var(--signal-2); font-weight: 600; }

/* ---------- Motion: one authored sequence, the calculation arriving on the map ---------- */
.js-motion .atlas:not(.atlas-play) .parcel, .js-motion .atlas:not(.atlas-play) .parcel-pin { opacity: 0; }
.js-motion .atlas:not(.atlas-play) .distance-reveal { stroke-dashoffset: 1; }
.js-motion .atlas:not(.atlas-play) .distance-tick { opacity: 0; }
.js-motion .atlas:not(.atlas-play) .hex { fill-opacity: 0; stroke-opacity: 0; }
.js-motion .atlas:not(.atlas-play) .map-label { opacity: 0; --rise: 6px; }
.js-motion .atlas:not(.atlas-play) .scale-bar { opacity: 0; }
.js-motion .atlas:not(.atlas-play) .doc-section { opacity: 0; transform: translateY(6px); }
.js-motion .atlas:not(.atlas-play) .result figcaption { opacity: 0; }
.js-motion .parcel, .js-motion .parcel-pin { transition: opacity 0.5s var(--ease) 0.25s, fill-opacity 0.3s, stroke-width 0.3s; }
.js-motion .distance-reveal { transition: stroke-dashoffset 1.1s var(--ease) 0.7s; }
.js-motion .distance-tick { transition: opacity 0.3s ease; }
.js-motion .atlas-play .distance-tick:first-of-type { transition-delay: 0.7s; }
.js-motion .atlas-play .distance-tick:last-of-type { transition-delay: 1.7s; }
.js-motion .scale-bar { transition: opacity 0.6s ease 2.3s; }
.js-motion .hex { transition: fill-opacity 0.6s var(--ease), stroke-opacity 0.6s var(--ease); }
.js-motion .atlas-play .hex:nth-child(3n + 1) { transition-delay: 2.05s; }
.js-motion .atlas-play .hex:nth-child(3n + 2) { transition-delay: 2.2s; }
.js-motion .atlas-play .hex:nth-child(3n) { transition-delay: 2.35s; }
.js-motion .map-label { transition: opacity 0.6s var(--ease), --rise 0.6s var(--ease), border-color 0.2s; }
.js-motion .map-label-parcel { transition-delay: 0.35s; }
.js-motion .map-label-distance { transition-delay: 1.75s; }
.js-motion .map-label-n2k { transition-delay: 2.1s; }
.js-motion .doc-section { transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js-motion .atlas-play .doc-section:nth-child(1) { transition-delay: 2.4s; }
.js-motion .atlas-play .doc-section:nth-child(2) { transition-delay: 2.6s; }
.js-motion .atlas-play .doc-section:nth-child(3) { transition-delay: 2.8s; }
.js-motion .atlas-play .doc-section:nth-child(4) { transition-delay: 3.05s; }
.js-motion .result figcaption { transition: opacity 0.6s ease 3.4s; }
.js-motion .atlas-play .res-row strong { animation: result-in 1.6s var(--ease) 3.3s both; }
@keyframes result-in { 0% { background: transparent; } 30% { background: var(--n2k-soft); } 100% { background: transparent; } }
.js-motion .station { opacity: 0; transform: translateY(10px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js-motion .route.is-drawn .station { opacity: 1; transform: none; }
.js-motion .route.is-drawn .station:nth-child(2) { transition-delay: 0.35s; }
.js-motion .route.is-drawn .station:nth-child(3) { transition-delay: 0.7s; }
.js-motion .route.is-drawn .station:nth-child(4) { transition-delay: 1.05s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-links a, .map-label, .hex, .parcel, .distance-reveal, .distance-tick, .scale-bar, .route::after, .station-mark { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .legend { width: min(400px, 48vw); }
  .kv { grid-template-columns: 7rem 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact { padding: 1.5rem 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .route { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .route::before, .route::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
/* Tablet: the map keeps the legend, the document moves below the map so the line and labels stay readable */
@media (max-width: 1100px) and (min-width: 761px) {
  .atlas { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; padding: 0 clamp(1.25rem, 4vw, 2.5rem) 2rem; }
  .atlas-view { --atlas-h: 560px; grid-column: 1 / -1; position: relative; height: 560px; margin: 0 calc(-1 * clamp(1.25rem, 4vw, 2.5rem)); }
  .legend, .result { position: static; width: auto; margin: 0; }
  .legend { margin-top: -2.5rem; }
}
@media (max-width: 760px) {
  :root { --header-h: 62px; }
  body { font-size: 16px; }
  .nav { gap: 1rem; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .atlas { height: auto; }
  .atlas-view { position: relative; height: 440px; }
  .atlas-stage { --s: 0.6; left: 0; top: 0; transform: translate(calc(50vw - 456px), -96px) scale(var(--s)); transform-origin: 0 0; }
  .scale-bar { left: 470px !important; }
  .map-label-n2k { left: 640px !important; top: 800px !important; }
  .ml-long { display: none; }
  .ml-short { display: inline; }
  .legend, .result { position: static; width: auto; }
  .legend { margin: -1.25rem 1rem 0; }
  .result { margin: 1.25rem 1rem 1.5rem; }
  .route { grid-template-columns: 1fr; gap: 1.6rem; }
  .pilot { grid-template-columns: 1fr; padding-top: 2.75rem; }
  .stamp { right: 1rem; white-space: nowrap; }
  .stamp-more { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-about { grid-column: auto; }
  .wn-hint { display: none; }
}
