/* ==========================================================================
   Cortex Harmony — the ONE site stylesheet (assets/css/style.css)
   v2 "engineered calm": ink navy depth + one teal pulse, Sora display type,
   mono eyebrows, neural-thread motif. No external anything. Budget <= 38KB.

   TOKENS (never hard-code hex in pages)
     --ink    #0A1220  page background, dark sections
     --abyss  #12213A  cards/panels on dark
     --pulse  #3FD0C9  THE accent: CTAs, nodes, eyebrows on dark, glows
     --steel  #96A9BC  secondary text on dark
     --paper  #F5F8FA  light section background
     --carbon #16202E  headings/body on paper
     --slate  #46586B  secondary text on paper
     --signal #147BA3  links/eyebrows on light backgrounds
     --glow   rgba(63,208,201,.14)  radial glows, hover auras
   Contrast pairs are pre-checked (steel/ink 7:1, pulse/ink 9:1, carbon/paper
   13:1, slate/paper 7:1, signal/paper 4.9:1). Do not lighten/darken tokens.

   MOBILE NAV JS — inline this ONCE per page, just before </body>.
   It is the whole JS budget (plus the optional 3-line contact error snippet).

   <script>
   (function () {
     var toggle = document.querySelector(".nav-toggle");
     if (!toggle) return;
     toggle.addEventListener("click", function () {
       var open = document.body.classList.toggle("nav-open");
       toggle.setAttribute("aria-expanded", open ? "true" : "false");
     });
     document.addEventListener("keydown", function (e) {
       if (e.key === "Escape" && document.body.classList.contains("nav-open")) {
         document.body.classList.remove("nav-open");
         toggle.setAttribute("aria-expanded", "false");
         toggle.focus();
       }
     });
   })();
   </script>
   ========================================================================== */

/* ---------- Fonts (self-hosted Sora — preload both woff2 in every head) ---------- */
@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0A1220;
  --abyss: #12213A;
  --pulse: #3FD0C9;
  --steel: #96A9BC;
  --paper: #F5F8FA;
  --carbon: #16202E;
  --slate: #46586B;
  --signal: #147BA3;
  --glow: rgba(63, 208, 201, .14);
  --btn-ink: #06121F;              /* text on pulse-filled buttons */
  --line-dark: rgba(150, 169, 188, .22);  /* borders on ink/abyss */
  --line-light: rgba(70, 88, 107, .15);   /* borders on paper */
  --font-display: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem;  --s-7: 3rem;   --s-8: 4.5rem;
  --radius: 14px;
  --radius-btn: 12px;
}

/* ---------- Reset + base (dark ink is the page default context) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--steel);
  background: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: #fff;
  margin: 0 0 var(--s-4);
}
h1 {
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h2 { font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
h4 { font-weight: 600; font-size: 1rem; }
p, ul, ol { margin: 0 0 var(--s-4); }
a { color: var(--pulse); }
a:hover { text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line-dark); margin: var(--s-6) 0; }
::selection { background: var(--pulse); color: var(--btn-ink); }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 2px; }
[id] { scroll-margin-top: 5rem; } /* anchors clear the sticky header */

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: var(--s-4); }
.container-narrow { max-width: 760px; }

/* Section rhythm: alternate .section-ink / .section-paper deliberately. */
.section { padding-block: clamp(4rem, 9vw, 6.5rem); }
.section-ink {
  background:
    radial-gradient(38rem 24rem at 88% 8%, rgba(63, 208, 201, .12), transparent 64%),
    radial-gradient(30rem 20rem at 4% 92%, rgba(20, 123, 163, .16), transparent 66%),
    var(--ink);
  color: var(--steel);
}
.section-paper { background: var(--paper); color: var(--carbon); }
.section-paper h1, .section-paper h2, .section-paper h3, .section-paper h4 { color: var(--carbon); }
.section-paper a:not(.btn) { color: var(--signal); }
.section-paper :focus-visible { outline-color: var(--signal); }
.section-paper hr { border-top-color: var(--line-light); }
.section-head { max-width: 46rem; margin: 0 auto var(--s-6); text-align: center; }

.grid { display: grid; gap: var(--s-5); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Sticky header + nav ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--pulse); color: var(--btn-ink);
  padding: .6rem 1rem; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 18, 32, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  border-bottom: 1px solid rgba(150, 169, 188, .15);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 64px; padding-block: var(--s-2);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-3);
  color: #fff; text-decoration: none;
}
.brand img { height: 40px; width: auto; display: block; }
.brand-name {
  display: none;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap;
}
@media (min-width: 420px) { .brand-name { display: inline; } }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -10px;
  background: none; border: 0; cursor: pointer; color: #fff;
}
.nav-toggle .bars { position: relative; display: block; width: 22px; height: 2px; background: currentColor; transition: background .2s; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px;
  background: currentColor; transition: transform .2s, top .2s;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
body.nav-open .nav-toggle .bars { background: transparent; }
body.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: none; }
body.nav-open .site-nav {
  display: block; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--ink); border-bottom: 1px solid var(--line-dark);
  padding: var(--s-2) var(--s-4) var(--s-5);
  box-shadow: 0 12px 24px rgba(6, 12, 22, .5);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.site-nav a:not(.btn) {
  display: block; padding: .55rem .75rem; border-radius: 8px;
  color: var(--steel); text-decoration: none; font-weight: 500;
}
.site-nav a:not(.btn):hover { color: #fff; background: var(--abyss); }
.site-nav a[aria-current="page"] { color: var(--pulse); }
.nav-cta { margin-top: var(--s-3); }

/* 960px, not 880px: the nav carries six items (Insights added) and needs the room. */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav, body.nav-open .site-nav {
    display: block; position: static; padding: 0; border: 0; box-shadow: none; background: none;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: var(--s-1); }
  .nav-cta { margin: 0 0 0 var(--s-3); }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-block; padding: .8rem 1.5rem; border-radius: var(--radius-btn);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  line-height: 1.2; text-align: center; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: filter .2s, background .2s, box-shadow .2s, border-color .2s, transform .2s;
}
/* Glass sheen: a light band across the top half, like a highlight on curved glass. */
.btn::before {
  content: ""; position: absolute; inset: 0 0 45% 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.section-paper .btn-outline::before { background: linear-gradient(to bottom, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, rgba(93, 232, 224, .88), rgba(45, 178, 174, .82));
  color: var(--btn-ink); border-color: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -1px 0 rgba(6, 18, 31, .18),
    0 8px 24px rgba(63, 208, 201, .28);
}
.btn-primary:hover {
  filter: brightness(1.05); border-color: rgba(255, 255, 255, .75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 -1px 0 rgba(6, 18, 31, .18),
    0 0 32px var(--glow), 0 10px 30px rgba(63, 208, 201, .36);
}
.btn-outline {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(160, 240, 236, .5); color: #B8F3EF;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(6, 18, 31, .3);
}
.btn-outline:hover {
  background: rgba(63, 208, 201, .22); border-color: rgba(190, 250, 246, .8); color: #E4FFFD;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 26px var(--glow), 0 8px 22px rgba(6, 18, 31, .34);
}
.section-paper .btn-outline {
  background: rgba(255, 255, 255, .6);
  border-color: rgba(20, 123, 163, .4); color: var(--signal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 14px rgba(20, 32, 46, .09);
}
.section-paper .btn-outline:hover {
  background: rgba(255, 255, 255, .85); border-color: rgba(20, 123, 163, .7); color: var(--signal);
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(20, 32, 46, .14);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn-primary { background: var(--pulse); }
  .btn-outline { background: rgba(18, 33, 58, .92); }
  .section-paper .btn-outline { background: #fff; }
}
.btn-lg { padding: .95rem 1.85rem; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.text-center .cta-row { justify-content: center; }

/* ---------- Hero (home) ---------- */
.hero {
  background:
    radial-gradient(70rem 32rem at 82% -15%, var(--glow), transparent 60%),
    radial-gradient(32rem 26rem at 6% 78%, rgba(63, 208, 201, .16), transparent 66%),
    radial-gradient(26rem 22rem at 44% 108%, rgba(20, 123, 163, .22), transparent 68%),
    radial-gradient(20rem 18rem at 30% 20%, rgba(93, 232, 224, .07), transparent 70%),
    var(--ink);
  color: var(--steel);
  padding-block: clamp(3.5rem, 9vw, 6rem) 0;
  overflow: hidden;
}
.hero h1 { max-width: 22ch; }
.hero .lead { max-width: 52ch; }
.hero-grid { display: grid; gap: var(--s-6); align-items: center; }
.hero-media { order: -1; position: relative; display: flex; justify-content: center; align-items: center; }
.hero-media::before {
  content: ""; position: absolute;
  width: min(440px, 130%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
}
.hero-media img { position: relative; width: 250px; height: auto; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 11fr 9fr; }
  .hero-media { order: 2; }
  .hero-media img { width: 380px; }
}

/* Compact ink band for inner pages (services/about/contact/booking/thanks/404) */
.hero-inner { padding-block: clamp(2.75rem, 6vw, 4rem) 0; }
.hero-inner h1 { max-width: 28ch; }
.hero-inner .lead { max-width: 56ch; }

/* ---------- Neural thread (partials/thread.svg inside a .thread wrapper) ---------- */
.thread { margin-top: clamp(2.5rem, 6vw, 4rem); }
.thread svg { display: block; width: 100%; height: auto; }
.thread-path { fill: none; stroke: rgba(150, 169, 188, .4); stroke-width: 1.5; }
.thread-node { fill: var(--pulse); }
.thread-node-hollow { fill: var(--ink); stroke: var(--pulse); stroke-width: 1.5; }
.site-footer .thread { margin-top: 0; padding-top: var(--s-5); }
/* Threads as dividers between stacked paper sections (services page):
   slate-based stroke for visibility on paper, hollow nodes stay hollow,
   and .section-joined removes the top padding of a section that follows
   a thread divider so the thread sits between the blocks, not above a gap. */
.section-paper .thread-path { stroke: rgba(70, 88, 107, .4); }
.section-paper .thread-node-hollow { fill: var(--paper); }
.section-joined { padding-top: 0; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--abyss); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 1.75rem;
  transition: transform 220ms, border-color 220ms;
}
.card::after { /* pulse node dot, revealed on hover */
  content: ""; position: absolute; top: 14px; right: 14px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pulse); opacity: 0; transition: opacity 220ms;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); border-color: rgba(63, 208, 201, .5); }
  .card:hover::after { opacity: 1; }
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card .icon { width: 28px; height: 28px; color: var(--pulse); margin-bottom: var(--s-3); display: block; }
.section-paper .card { background: #fff; border-color: var(--line-light); }
.section-paper .card .icon { color: var(--signal); }
@media (hover: hover) and (pointer: fine) {
  .section-paper .card:hover { border-color: rgba(63, 208, 201, .5); }
}

/* ---------- Duotone photo treatment (mandatory for all photos) ---------- */
.duo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(150, 169, 188, .25);
}
figure.duo { margin: 0; }
.duo img {
  filter: saturate(.35) contrast(1.06) brightness(.92);
  width: 100%; display: block;
}
.duo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg,
    rgba(10, 18, 32, .55) 0%, rgba(10, 18, 32, .15) 45%, rgba(63, 208, 201, .22) 100%);
}
.duo-dot::before { /* optional corner node */
  content: ""; position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 6px; height: 6px; border-radius: 50%; background: var(--pulse);
}
.duo-caption { font-size: .75rem; color: var(--slate); margin-top: var(--s-2); }
.section-ink .duo-caption, .hero .duo-caption { color: var(--steel); }

/* ---------- Diagram figures (the 640x400 SVG art — see ILLUSTRATION-SPEC.md)
   Centres the art in the text column and matches the section rhythm. The art
   carries its own palette, so there is no ink/paper variant here — pick the
   LIGHT file for .section-paper and the DARK file for .section-ink.
   width/height attrs on the img reserve the 8:5 box, so nothing shifts while
   the SVG loads; max-width keeps it inside the column at every viewport. */
.figure { margin: var(--s-6) auto; max-width: 640px; }
.figure img { display: block; width: 100%; max-width: 100%; height: auto; }

/* ---------- Tech-stack marquee ---------- */
.section-tight { padding-block: clamp(2.25rem, 5vw, 3.25rem); }
.marquee {
  margin-top: var(--s-5); display: flex; gap: var(--s-6);
  overflow: hidden; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--s-6);
  margin: 0; padding: 0 0 0 var(--s-6); list-style: none;
  animation: marquee-scroll 65s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-item {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .6rem;
  color: var(--steel); opacity: .72;
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  transition: opacity .25s, color .25s;
}
.marquee-item:hover { opacity: 1; color: var(--pulse); }
.marquee-logo { width: 26px; height: 26px; flex: 0 0 auto; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; justify-content: center; gap: var(--s-3); }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; gap: var(--s-4); padding-left: 0; }
  .marquee-track[aria-hidden="true"] { display: none; }
}

/* ---------- Numbered steps (how-we-work lists) ---------- */
.steps { list-style: none; counter-reset: step; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-5); }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--ink); color: var(--pulse);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600;
}

/* ---------- FAQ (native <details class="faq">, on paper sections) ---------- */
.faq { background: #fff; border: 1px solid var(--line-light); border-radius: var(--radius); padding: 0 var(--s-5); }
.faq + .faq { margin-top: var(--s-3); }
.faq summary {
  font-family: var(--font-display); font-weight: 600; color: var(--carbon);
  cursor: pointer; list-style: none;
  padding: var(--s-4) 2rem var(--s-4) 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .1rem; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--signal);
}
.faq[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 var(--s-4); }

/* ---------- Breadcrumbs (inside inner-page ink heroes) ---------- */
.breadcrumbs { font-size: .85rem; color: var(--steel); margin-bottom: var(--s-4); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--line-dark); }
.breadcrumbs a { color: var(--steel); }
.breadcrumbs a:hover { color: var(--pulse); }

/* ---------- Article byline (inside inner-page ink heroes) ---------- */
.post-meta { font-size: .85rem; color: var(--steel); margin-top: var(--s-3); }
.section-paper .post-meta { color: var(--slate); }

/* ---------- Forms (contact form lives on a paper section) ---------- */
.field { margin-bottom: var(--s-4); }
label { display: block; font-weight: 600; margin-bottom: var(--s-1); }
input, textarea, select {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--carbon);
  background: #fff; border: 1px solid rgba(70, 88, 107, .4); border-radius: 8px;
}
input:focus, textarea:focus, select:focus { border-color: var(--signal); }
textarea { min-height: 8.5rem; resize: vertical; }
.form-note { font-size: .85rem; color: var(--slate); }
.form-alert {
  background: #FDECEC; border: 1px solid #E8B4B4; color: #8A2323;
  padding: var(--s-3) var(--s-4); border-radius: 8px; margin-bottom: var(--s-4);
}
.honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--steel); font-size: .95rem; }
.site-footer a { color: #DEE7F1; }
.site-footer a:hover { color: var(--pulse); }
.site-footer .brand { margin-bottom: var(--s-3); }
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-grid { display: grid; gap: var(--s-6); padding-block: var(--s-7); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1.2fr; } }
.footer-heading {
  font-family: var(--font-mono); font-size: .8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--pulse); margin: 0 0 var(--s-3);
}
.footer-bottom { border-top: 1px solid rgba(150, 169, 188, .15); padding-block: var(--s-4); }
.footer-bottom .container {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  justify-content: space-between; font-size: .85rem; color: var(--steel);
}
.footer-bottom p { margin: 0; }

/* ---------- Embeds (Calendly on /book-a-session/ only) ---------- */
.calendly-wrap {
  min-height: 720px;
  background: var(--abyss);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: var(--s-3);
  overflow: hidden;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.muted { color: var(--steel); }
.section-paper .muted { color: var(--slate); }
.lead { font-size: 1.15rem; line-height: 1.6; }
.eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: .8125rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--pulse); margin-bottom: var(--s-3);
}
.section-paper .eyebrow { color: var(--signal); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Motion — EVERY animation lives inside this no-preference guard.
   Outside it, .rise/.float/.thread-draw elements are simply static + visible.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* Hero load stagger: .rise on eyebrow, .rise.rise-2 on h1,
     .rise.rise-3 on the sub, .rise.rise-4 on the .cta-row. */
  .rise { animation: riseIn .5s ease-out both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
  .rise-4 { animation-delay: .24s; }
  @keyframes riseIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }

  /* Hero logo-mark float */
  .float { animation: floatY 7s ease-in-out infinite alternate; }
  @keyframes floatY {
    from { transform: translateY(-8px); }
    to   { transform: translateY(8px); }
  }

  /* Thread draw-in: add .thread-draw to the hero's .thread wrapper only.
     Path draws over 1200ms, then nodes fade in staggered. */
  .thread-draw .thread-path {
    stroke-dasharray: 1400; stroke-dashoffset: 1400;
    animation: threadDraw 1.2s ease-out forwards;
  }
  @keyframes threadDraw { to { stroke-dashoffset: 0; } }
  .thread-draw circle { opacity: 0; animation: nodeIn .45s ease-out forwards; }
  .thread-draw circle:nth-of-type(1) { animation-delay: 1.05s; }
  .thread-draw circle:nth-of-type(2) { animation-delay: 1.15s; }
  .thread-draw circle:nth-of-type(3) { animation-delay: 1.25s; }
  .thread-draw circle:nth-of-type(4) { animation-delay: 1.35s; }
  .thread-draw circle:nth-of-type(5) { animation-delay: 1.45s; }
  .thread-draw circle:nth-of-type(6) { animation-delay: 1.55s; }
  .thread-draw circle:nth-of-type(7) { animation-delay: 1.65s; }
  @keyframes nodeIn { to { opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
