/* Clearline Systems · motion layer. Loaded after site.css. Brand tokens for the scroll-craft engine,
   plus the bespoke route line and hero depth. No layout, colour, font or copy changes. */
:root {
  --sc-canvas: var(--cl-ink); --sc-surface: var(--cl-graphite);
  --sc-ink: var(--cl-paper); --sc-ink-soft: var(--cl-hairline);
  --sc-accent: var(--cl-jade); --sc-accent-ink: var(--cl-ink);
  --sc-font-display: var(--cl-font-display); --sc-font-text: var(--cl-font-text); --sc-font-mono: var(--cl-font-mono);
}
/* The engine stylesheet themes the scrollbar; keep the browser's own. */
html { scrollbar-color: auto; scrollbar-width: auto; }
/* Restrained reveals: 420ms, 12px rise, fires once. */
[data-sc-in], [data-sc-stagger] > * { transform: translate3d(0, 12px, 0); transition-duration: 420ms; }
[data-sc-in].sc-in, [data-sc-stagger] > .sc-in { transform: none; }
a.card[data-sc-in], [data-sc-stagger] > a.card { transition: opacity 420ms var(--sc-ease-out), transform 420ms var(--sc-ease-out), box-shadow .25s ease; }

/* ---------- Hero depth: grid plane behind, route plane in front ---------- */
.hero { background-image: none; }
.hero-grid {
  position: absolute; inset: -12% 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(to right, rgba(245,245,242,0.055) 1px, transparent 1px), linear-gradient(to bottom, rgba(245,245,242,0.055) 1px, transparent 1px);
  background-size: var(--cl-grid) var(--cl-grid); background-position: center top;
  will-change: transform;
}
.hero > .container { position: relative; z-index: 1; }
.hero-map { will-change: transform; }
.hero-map-inner { transform-style: preserve-3d; }

/* ---------- Hero headline assembles line by line (load, not scroll) ---------- */
.h-line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.h-line__i { display: block; }
.has-motion .h-line__i { transform: translate3d(0, 110%, 0); opacity: 0; animation: h-line-in 460ms var(--sc-ease-out) forwards; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
@keyframes h-line-in { to { transform: none; opacity: 1; } }

/* ---------- The route: one Jade line drawn by scroll ---------- */
.route-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.route-layer .route-path { fill: none; stroke: var(--cl-jade); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.route-layer .route-node { fill: var(--cl-ink); stroke: var(--cl-jade); stroke-width: 4; transition: fill .3s ease; }
.route-layer .route-node.is-lit { fill: var(--cl-jade); }
@media (max-width: 767px) { .route-layer .route-path { stroke-width: 3; } .route-layer .route-node { stroke-width: 3; r: 5; } }
main { position: relative; }
/* When the route arrives, the closing button gets one quiet ring. */
.band .btn { transition: box-shadow .5s ease; }
.band.is-reached .btn { box-shadow: 0 0 0 4px var(--cl-ink), 0 0 0 7px var(--cl-jade); }

@media (prefers-reduced-motion: reduce) {
  .has-motion .h-line__i { animation: none; transform: none; opacity: 1; }
  .hero-grid, .hero-map { transform: none !important; }
  .route-layer .route-node { transition: none; }
  .band .btn { transition: none; }
}
