/* ============================================================
   Yanthric Solutions LLP — Quiet Editorial design system
   ============================================================ */

/* Fonts are loaded from index.html (preconnect + stylesheet) so they don't wait on this file. */

:root {
  --grad: linear-gradient(90deg, #56A5BE 0%, #4780BE 28%, #6E2DA5 52%, #442782 72%, #2D4C8A 100%);
  --grad-soft: linear-gradient(120deg, #56A5BE 0%, #6E2DA5 50%, #2D4C8A 100%);
  --ink: #1A1A1A;
  --muted: #575757;
  --faint: #8A8A8A;
  --rule: #ECECEC;
  --measure: 700px;
  --panel: #F2F1F8;
  --panel-soft: #EEF0F2;
  --white: #FFFFFF;

  --c1: #56A5BE;
  --c2: #4780BE;
  --c3: #6E2DA5;
  --c4: #442782;
  --c5: #2D4C8A;

  /* Brightened gradient stops — used for text/glow on the dark hero,
     where the standard --grad is too low-contrast against near-black. */
  --grad-dark: linear-gradient(90deg, #86D2E8 0%, #7AAEEC 28%, #B073E8 52%, #9163D6 72%, #7C93D6 100%);
  --hero-bg: #0A0720;
  --hero-ink: #F3F2F8;
  --hero-muted: #B7B7C7;

  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light unless the switch (or the device) says dark; keeps native controls' default colours
   in step with the page instead of the device setting. */
:root { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

.wrap-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 64px 0; }

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c3);
  margin-bottom: 14px;
  text-align: center;
}

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 16px; }
p { line-height: 1.7; color: var(--muted); margin: 0 0 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.2s ease;
}

/* ============================== Header ============================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  /* One constant bar: blends into the dark hero at the top, stays legible over the light sections. */
  background-color: rgba(12, 9, 32, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}

.header-bar {
  height: var(--header-h);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px; /* comfortable tap target */
  text-decoration: none;
  color: var(--hero-ink);
  flex-shrink: 0;
}
.brand-mark { width: 30px; height: auto; filter: brightness(1.5) saturate(1.2); }
.brand-name {
  font-family: 'Montserrat', 'Archivo', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  /* Etched coloured metal in the logo's own colours. Layers, top to bottom, clipped to the letters:
     1. a polish sweep that crosses once on load (see wordmark-sheen),
     2. fine brushing lines,
     3. metal shading as light/dark tints (never grey, so the hue survives):
        lit top, a dark reflection line just below the middle, a soft bounce at the base,
     4. the logo wordmark's colours, sampled from the logo and lifted in lightness
        (same hue, saturation boosted) so they read on the dark bar:
        #3895B0 #367BA7 #4666A1 #574393 #613587 #55337E #343F76 #194B6A. */
  background-image:
    linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.7) 50%, transparent 58%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 2px),
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.04) 42%,
      rgba(0, 0, 0, 0.26) 54%,
      rgba(0, 0, 0, 0.06) 78%,
      rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(90deg, #3EBBE0 0%, #3EA1DF 14%, #517CCD 29%, #7154CA 43%, #8A39CF 57%, #7834CA 71%, #384FBE 86%, #0E7DC2 100%);
  background-size: 300% 100%, auto, auto, auto;
  background-position: 130% 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, repeat, no-repeat, no-repeat;
  background-blend-mode: screen, normal, normal, normal;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Raised from the bar: a lit top edge, a tight shadow under the letters, a soft cast below. */
  filter:
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.4))
    drop-shadow(0 1.5px 0 rgba(10, 6, 30, 0.9))
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
  animation: wordmark-sheen 1.8s var(--ease) 1.2s both;
}
@keyframes wordmark-sheen {
  from { background-position: 130% 0, 0 0, 0 0, 0 0; }
  to   { background-position: -30% 0, 0 0, 0 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-name { animation: none; }
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.main-nav a.nav-link {
  color: rgba(243, 242, 248, 0.78);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 100px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
nav.main-nav a.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.07);
}

.nav-cta { display: none; }

/* ---------- Light / dark switch ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #E4DDF7;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.theme-toggle:focus-visible { outline: 2px solid #B996FF; outline-offset: 3px; }
.theme-toggle svg { grid-area: 1 / 1; transition: transform 0.4s var(--ease), opacity 0.25s ease; }
/* Shows the mode you'd switch to: the moon in light mode, the sun in dark mode. */
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-60deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(60deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: none; }

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 44px; height: 44px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px;
  height: 1.8px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.nav-toggle span { top: 20.5px; }
.nav-toggle span::before { left: 0; right: 0; top: -5px; }
.nav-toggle span::after { left: 0; right: 0; top: 5px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle.open span::after { transform: translateY(-5px) rotate(-45deg); }

/* Buttons used on dark surfaces */
.btn-light {
  background: #fff;
  color: var(--hero-bg);
  box-shadow: 0 10px 30px -12px rgba(150, 110, 255, 0.6);
}
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(150, 110, 255, 0.75);
}
.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: var(--hero-ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-sm { padding: 11px 22px; font-size: 14px; }

/* ---------- "Let's Talk": one button, drawn in the circuit language ----------
   A node before the label (like the dots on the Y) and a brand-gradient ring.
   On hover/focus a point of light runs around the ring and the node flares,
   the same way the Y's dots light up when a pulse reaches them. */
@property --ring-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.btn-talk {
  position: relative;
  isolation: isolate;
  gap: 11px;
  font-weight: 700;
  letter-spacing: 0.005em;
}
/* the ring */
.btn-talk::before,
.btn-talk::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn-talk::before {
  background: linear-gradient(90deg, #3EBBE0, #517CCD 30%, #8A39CF 60%, #384FBE 85%, #0E7DC2);
  opacity: 0.9;
}
/* the signal: a short bright arc that travels the ring on hover/focus */
.btn-talk::after {
  background: conic-gradient(from var(--ring-angle),
    transparent 0deg, rgba(255, 255, 255, 0) 290deg,
    rgba(255, 255, 255, 0.95) 340deg, transparent 360deg);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-talk:hover::after,
.btn-talk:focus-visible::after {
  opacity: 1;
  animation: ring-run 1.4s linear infinite;
}
@keyframes ring-run { to { --ring-angle: 360deg; } }

/* the node */
.talk-node {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3EBBE0, #8A39CF);
  box-shadow: 0 0 0 0 rgba(138, 57, 207, 0.5);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-talk:hover .talk-node,
.btn-talk:focus-visible .talk-node {
  transform: scale(1.25);
  box-shadow: 0 0 0 5px rgba(138, 57, 207, 0.18), 0 0 14px 2px rgba(62, 187, 224, 0.55);
}
.btn-talk:active .talk-node { transform: scale(0.85); }

/* On dark surfaces: white pill (btn-light). On light surfaces: the hero's indigo. */
.btn-talk-dark {
  background: #120D2E;
  color: #fff;
  box-shadow: 0 12px 28px -14px rgba(18, 13, 46, 0.7);
}
.btn-talk-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -14px rgba(68, 39, 130, 0.65);
}
.btn-talk-dark:active { transform: translateY(0); }

/* Smaller version for the services list */
.btn-talk-sm { padding: 12px 22px; font-size: 14.5px; gap: 9px; }
.btn-talk-sm .talk-node { width: 7px; height: 7px; }

@media (prefers-reduced-motion: reduce) {
  .btn-talk:hover::after,
  .btn-talk:focus-visible::after { animation: none; opacity: 0; }
}

.btn:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid #B996FF;
  outline-offset: 3px;
}

/* ============================== Hero ============================== */

.hero {
  padding: 0;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: max(100svh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Equal space above and below the copy, measured from the bottom of the fixed header (+1px border),
     so the content sits in the centre of the visible hero. */
  padding: calc(var(--header-h) + 1px + 72px) 24px 72px;
  --p: 0; /* hero scroll progress, 0 → 1, set by script.js */
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(98, 44, 180, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 12% 18%, rgba(45, 76, 138, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, #0E0B24 0%, var(--hero-bg) 55%, #120A30 100%);
  text-align: center;
}

.hero-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-fx .blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  min-width: 340px;
  min-height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  mix-blend-mode: screen;
}
.blob-1 { background: radial-gradient(circle at 30% 30%, var(--c1), transparent 70%); top: -18%; left: -14%; opacity: 0.22; }
.blob-2 { background: radial-gradient(circle at 60% 40%, var(--c3), transparent 70%); top: 0; right: -16%; opacity: 0.3; }
.blob-3 { background: radial-gradient(circle at 50% 50%, var(--c4), transparent 70%); bottom: -10%; left: 8%; opacity: 0.4; }
.blob-cursor { background: radial-gradient(circle, var(--c3), var(--c2) 55%, transparent 75%); opacity: 0.26; width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; }

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 30px;
  padding: 8px 16px 8px 12px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(243, 242, 248, 0.86);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  animation: fade-up 0.9s var(--ease) 0.05s both;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7FD8EE;
  box-shadow: 0 0 0 4px rgba(127, 216, 238, 0.16), 0 0 12px #7FD8EE;
}

.hero h1 {
  font-size: clamp(36px, 6.2vw, 84px);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--hero-ink);
  margin: 0 0 30px;
  animation: fade-up 0.9s var(--ease) 0.12s both;
}
.h1-line { display: block; }
.h1-grad {
  background: linear-gradient(92deg, #8FD7EC 0%, #B79CF5 42%, #C77DEB 70%, #8E9CF2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em; /* keep descenders inside the clip box */
}

/* Plain-language promise under the brand line. The traces on either side
   end in the same nodes as the circuit mark, as if wired into it. */
.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 26px;
  max-width: 820px;
  font-size: clamp(18px, 2.1vw, 26px);
  font-weight: 500;
  font-stretch: 100%;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #E4DDF7;
  animation: fade-up 0.9s var(--ease) 0.17s both;
}
.kicker-text { flex: 0 1 auto; }
.hero-kicker::before,
.hero-kicker::after {
  content: "";
  flex: 1 1 0;
  min-width: 28px;
  max-width: 120px;
  height: 2px;
  transform: scaleX(0);
  animation: kicker-trace 1.1s var(--ease) 0.55s forwards;
}
.hero-kicker::before {
  background:
    radial-gradient(circle at calc(100% - 4px) 50%, #B79CF5 0 3.5px, transparent 4.5px) right center / 10px 10px no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(111, 195, 219, 0.7) 100%) left center / calc(100% - 10px) 2px no-repeat;
  height: 10px;
  transform-origin: right center;
}
.hero-kicker::after {
  background:
    radial-gradient(circle at 4px 50%, #B79CF5 0 3.5px, transparent 4.5px) left center / 10px 10px no-repeat,
    linear-gradient(90deg, rgba(154, 91, 224, 0.75) 0%, transparent 100%) right center / calc(100% - 10px) 2px no-repeat;
  height: 10px;
  transform-origin: left center;
}
@keyframes kicker-trace { to { transform: scaleX(1); } }

.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--hero-muted);
  max-width: 34em;
  margin: 0 auto 38px;
  animation: fade-up 0.9s var(--ease) 0.22s both;
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fade-up 0.9s var(--ease) 0.32s both;
}
.hero-cta-row .btn { padding: 16px 30px; font-size: 15.5px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Circuit mark (full Y, behind the copy) ---------- */

.hero-circuit {
  position: absolute;
  /* Centred in the visible hero: halfway between the header's bottom edge and the hero's bottom. */
  left: 50%; top: calc(50% + (var(--header-h) + 1px) / 2);
  z-index: 0;
  height: 86%;
  width: min(1000px, 140vw);
  translate: -50% -50%;
  /* Scroll hand-off: the mark sinks, swells slightly and fades as the hero leaves. */
  transform: translateY(calc(var(--p) * 160px)) scale(calc(1 + var(--p) * 0.12));
  opacity: calc(1 - var(--p) * 0.85);
  pointer-events: none;
}
.circuit-body {
  position: absolute;
  inset: 0;
  animation: circuit-rise 1.8s var(--ease) 0.1s both;
}
.hero-circuit svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

@keyframes circuit-rise {
  from { opacity: 0; transform: translateY(70px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.circuit-glow {
  position: absolute;
  left: 50%; top: 18%;
  width: 70%; height: 55%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(154, 91, 224, 0.26) 0%, rgba(80, 60, 200, 0.1) 45%, transparent 70%);
  filter: blur(40px);
}

/* Dark pool behind the copy so text stays crisp over the traces. */
.hero-scrim {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 1;
  width: min(1100px, 120vw);
  height: 70%;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(ellipse closest-side, rgba(10, 7, 32, 0.88) 0%, rgba(10, 7, 32, 0.62) 55%, transparent 100%);
  pointer-events: none;
}

.trace {
  fill: none;
  stroke: url(#trace-grad);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: trace-draw 2.4s var(--ease) forwards;
}
.trace.t1 { animation-delay: 0.35s; }
.trace.t2 { animation-delay: 0.5s; }
.trace.t3 { animation-delay: 0.65s; }
.traces {
  opacity: 0.2;
  filter: blur(0.8px) drop-shadow(0 0 10px rgba(154, 91, 224, 0.55));
}

@keyframes trace-draw { to { stroke-dashoffset: 0; } }

.pulse {
  fill: none;
  stroke: #E9E1FF;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 0.035 0.965;
  opacity: 0;
  animation: pulse-run 12s linear infinite, pulse-in 1s ease forwards;
}
/* Outer line: two pulses. Middle line: two pulses, half a cycle apart, 11s —
   the dot flashes in index.html are timed against these (2.6s start, 11s loop). */
.pulse.p1 { animation-delay: 2.2s, 2.2s; }
.pulse.p4 { animation-delay: 8.2s, 8.2s; stroke: #F3C9FF; }
.pulse.p2 { animation-duration: 11s, 1s; animation-delay: 2.6s, 2.6s; stroke: #CFEFFF; }
.pulse.p5 { animation-duration: 11s, 1s; animation-delay: 8.1s, 8.1s; stroke: #CFEFFF; }
.pulse.p3 { animation-duration: 7.5s, 1s; animation-delay: 3s, 3s; }

@keyframes pulse-run { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pulse-in { to { opacity: 1; } }

/* Nodes sit dimmed with the traces; the core stays lit. */
.nodes { opacity: 0.35; }
.pulses { opacity: 0.36; }
.nodes circle {
  fill: #9A63E0;
  opacity: 0;
  animation: pulse-in 0.6s ease 1.9s forwards;
}
.nodes .node-core {
  fill: #C9B2FF;
  filter: drop-shadow(0 0 6px #9A5BE0);
}

/* A dot flares briefly as a pulse passes through it: once per middle-line pulse. */
.node-flash .flash {
  fill: #EFE6FF;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: node-hit 11s linear infinite;
}
@keyframes node-hit {
  0%   { opacity: 0;    transform: scale(0.7); }
  3%   { opacity: 0.6;  transform: scale(1.45); }
  8%   { opacity: 0;    transform: scale(1); }
  50%  { opacity: 0;    transform: scale(0.7); }
  53%  { opacity: 0.6;  transform: scale(1.45); }
  58%  { opacity: 0;    transform: scale(1); }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero-kicker, .hero-sub, .hero-cta-row { animation: none !important; }
  .hero-kicker::before, .hero-kicker::after { animation: none; transform: none; }
  .trace { animation: none; stroke-dashoffset: 0; }
  .pulse, .node-flash { display: none; }
  .circuit-body { animation: none; }
  .hero-circuit { transform: none; opacity: 1; }
  .nodes circle { animation: none; opacity: 1; }
  .header-bar { transition: none; }
}

/* ============================== Proof points ==============================
   The cards hang off one circuit trace, like readings taken from the same system;
   the logo's colours mark the three metrics. Light by default; in dark mode it
   continues the hero's indigo (tokens overridden under [data-theme="dark"]). */

.proof,
.practice,
.tools-band,
.principles,
.flow,
.faqx,
.library {
  --proof-bg:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(138, 57, 207, 0.07) 0%, transparent 70%),
    linear-gradient(180deg, #F4F2FB 0%, #FFFFFF 100%);
  /* Light mode is tuned for contrast: near-black ink, darker body text, deeper
     logo colours, defined card edges and fully visible circuit traces. */
  --proof-ink: #0E0B24;
  --proof-body: #36334F;
  --proof-muted: #4F4C69;
  --proof-eyebrow: #0B7396;
  --proof-card: #FFFFFF;
  --proof-card-border: rgba(24, 16, 64, 0.14);
  --proof-card-shadow: 0 1px 2px rgba(24, 16, 64, 0.06), 0 18px 36px -24px rgba(40, 20, 90, 0.4);
  --proof-thesis-bg: linear-gradient(180deg, #F1EBFF, #E9EEFF);
  --proof-thesis-quote: #1E1B38;
  --proof-code: #4A2DB8;
  --proof-trace-opacity: 1;
  --live: #0B7843;
  --dot-teal: #0E8FA6;
  --a1: #08739A; --a2: #5B38C9; --a3: #2C52CC; --a4: #7A28C2;
  position: relative;
  padding: 96px 0 112px;
  background: var(--proof-bg);
  color: var(--proof-ink);
}
[data-theme="dark"] .proof,
[data-theme="dark"] .practice,
[data-theme="dark"] .tools-band,
[data-theme="dark"] .principles,
[data-theme="dark"] .flow,
[data-theme="dark"] .faqx,
[data-theme="dark"] .library {
  --proof-bg:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(98, 44, 180, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, #120A30 0%, #0B0822 140px, #0A0720 100%);
  --proof-ink: #F3F2F8;
  --proof-body: #B7B5CC;
  --proof-muted: #8E8CA8;
  --proof-eyebrow: #5EC6E6;
  --proof-card: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  --proof-card-border: rgba(255, 255, 255, 0.07);
  --proof-card-shadow: none;
  --proof-thesis-bg: linear-gradient(180deg, rgba(34, 22, 72, 0.92), rgba(20, 14, 46, 0.92));
  --proof-thesis-quote: #D6D3E8;
  --proof-code: #C9B8FF;
  --proof-trace-opacity: 0.55;
  --live: #4ACB8A;
  --dot-teal: #3EC6D8;
  --a1: #5EC6E6; --a2: #B79CF5; --a3: #6E9CF2; --a4: #8A39CF;
}
.proof-card:nth-child(1) { --accent: var(--a1); }
.proof-card:nth-child(2) { --accent: var(--a2); }
.proof-card:nth-child(3) { --accent: var(--a3); }
.proof-card:nth-child(4) { --accent: var(--a4); }
.proof-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.proof-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.proof-eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--proof-eyebrow);
}
.proof-title {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--proof-ink);
}
.proof-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--proof-muted);
}

/* Live indicators pulse slowly: something is actually running. */
.live-dot {
  position: relative;
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: live-ping 2.4s ease-out infinite;
}
@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ---- the grid and its trace ---- */
.proof-grid {
  --bus: 22px; /* gap between the trace and the tops of the cards */
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-top: var(--bus);
}
.proof-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2%; right: 2%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--a1) 12%, var(--a4) 60%, var(--a3) 88%, transparent);
  opacity: var(--proof-trace-opacity);
}

.proof-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 28px 30px;
  border-radius: 22px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
/* the stub and node joining each card to the trace */
.proof-card::before {
  content: "";
  position: absolute;
  left: 36px;
  top: calc(-1 * var(--bus));
  width: 1px;
  height: var(--bus);
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.8;
}
.proof-card::after {
  content: "";
  position: absolute;
  left: 33px;
  top: calc(-1 * var(--bus) - 3px);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.proof-num {
  margin: 0 0 20px;
  font-size: clamp(54px, 5.2vw, 76px);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.proof-label {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--proof-ink);
}
.proof-body {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--proof-body);
}
.proof-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 0 0;
  font-size: 14px;
  color: var(--proof-muted);
}
/* the thesis card's status: same dot-and-label form as the metric cards, in lavender */
.thesis-principle { font-weight: 500; color: var(--a2); }
.foot-dot--lavender { background: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 18%, transparent); }
.foot-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.foot-dot--green { background: var(--live); }
.foot-dot--teal { background: var(--dot-teal); }

/* ---- the thesis card: the row's conclusion, so it gets a gradient edge ---- */
.proof-card--thesis {
  background:
    var(--proof-thesis-bg) padding-box,
    linear-gradient(160deg, rgba(62, 187, 224, 0.55), rgba(138, 57, 207, 0.55) 55%, rgba(56, 79, 190, 0.3)) border-box;
  border: 1px solid transparent;
}
.thesis-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.thesis-icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--a1) 14%, transparent);
  color: var(--a1);
  flex: none;
}
.thesis-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--proof-ink);
}
.thesis-quote { margin: 0 0 32px; }
.thesis-quote p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--proof-thesis-quote);
}

@media (max-width: 1100px) {
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .proof-grid::before { display: none; }
  /* each card keeps its own stub and node */
}
@media (max-width: 640px) {
  .proof { padding: 64px 0 72px; }
  .proof-wrap { padding: 0 18px; }
  .proof-head { margin-bottom: 40px; }
  .proof-grid { grid-template-columns: 1fr; row-gap: 44px; }
  .proof-card { padding: 32px 26px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot::after { animation: none; opacity: 0; }
}

/* ============================== Domain practices ==============================
   Shares the proof section's tokens (light by default, indigo in dark mode) so the two
   read as one run: proof first, then where that proof is applied. */

.practice {
  position: relative;
  padding: 24px 0 112px;
  color: var(--proof-ink);
}
.practice { background: linear-gradient(180deg, #FFFFFF 0%, #F6F4FB 100%); }
[data-theme="dark"] .practice { background: #0A0720; }
.practice-card:nth-child(1) { --accent: var(--a1); }
.practice-card:nth-child(2) { --accent: var(--a2); }
.practice-card:nth-child(3) { --accent: var(--a3); }

.practice-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.practice-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--proof-card-border);
  background: color-mix(in srgb, var(--a1) 8%, transparent);
  font-size: 14px;
  font-weight: 600;
  color: var(--proof-eyebrow);
}
.practice-lede {
  margin: 0;
  max-width: 34em;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--proof-body);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.practice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px 30px;
  border-radius: 22px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
  overflow: hidden;
}
/* a thin accent trace along the top edge, the practice's colour */
.practice-card::before {
  content: "";
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.8;
}
.practice-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.practice-num {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.practice-title {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 30px);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--proof-ink);
}
.practice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.practice-body {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--proof-body);
}
.practice-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin: auto 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--proof-card-border);
}
.practice-meta dt {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--proof-muted);
}
.practice-meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--proof-ink);
}
.practice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--live) !important;
}
/* Pilot Ready: one stage before "Tested & Deployable", so teal rather than green */
.practice-status--pilot { color: var(--a1) !important; }

/* horizontal functions */
/* The bridge: a connector drops from each industry card into one horizontal bus,
   which runs along the top of the functions panel. */
.practice-bridge {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  height: 44px;
}
.practice-bridge span { position: relative; }
.practice-bridge span:nth-child(1) { --accent: var(--a1); }
.practice-bridge span:nth-child(2) { --accent: var(--a2); }
.practice-bridge span:nth-child(3) { --accent: var(--a3); }
/* the drop from each card */
.practice-bridge span::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1.5px;
  translate: -50% 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 20%, transparent), var(--accent));
}
/* where it joins the bus */
.practice-bridge span::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  width: 9px; height: 9px;
  translate: -50% 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--proof-card), 0 0 10px var(--accent);
  z-index: 2;
}
/* the horizontal bus, running the panel's width */
.practice-bridge::after {
  content: "";
  position: absolute;
  left: 32px; right: 32px; bottom: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--a1) 12%, var(--a2) 50%, var(--a3) 88%, transparent);
  opacity: var(--proof-trace-opacity);
}

.practice-functions {
  display: grid;
  grid-template-columns: minmax(220px, 350px) 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 0;
  padding: 32px 36px;
  border-radius: 22px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
.functions-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--proof-ink);
}
.functions-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--a1) 14%, transparent);
  color: var(--a1);
}
.functions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.function-chip {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 7px 16px 7px 7px;
  border-radius: 12px;
  border: 1px solid var(--proof-card-border);
  background: var(--proof-card);
  font-size: 15px;
  font-weight: 600;
  color: var(--proof-ink);
}
[data-theme="dark"] .function-chip { background: rgba(255, 255, 255, 0.03); }
.function-chip:nth-child(3n+1) { --accent: var(--a1); }
.function-chip:nth-child(3n+2) { --accent: var(--a2); }
.function-chip:nth-child(3n)   { --accent: var(--a3); }
.chip-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.chip-icon svg { width: 18px; height: 18px; }

@media (max-width: 1000px) {
  .practice-head { grid-template-columns: 1fr; gap: 20px; }
  .practice-grid { grid-template-columns: 1fr; max-width: 640px; }
  .practice-functions { grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
  .practice-bridge { display: none; }
}
@media (max-width: 640px) {
  .practice { padding: 8px 0 72px; }
  .practice-head { margin-bottom: 36px; }
  .practice-card { padding: 30px 24px 26px; }
  .practice-card::before { left: 24px; right: 24px; }
  .practice-meta { grid-template-columns: 1fr; }
  .practice-functions { padding: 26px 22px; }
  .function-chip { font-size: 14px; padding: 10px 14px; }
}

/* ============================== Tools ==============================
   Two conveyor rows drift past an orchestrator hub (the Y's centre node with a
   slowly turning ring). The tool crossing the hub's line lights up: script.js adds
   .is-live via an IntersectionObserver on a 1%-wide band at each row's centre. */

.tools-band {
  --card-w: 212px;
  --card-gap: 16px;
  position: relative;
  padding: 104px 0 112px;
  background: #F6F4FB;
  color: var(--proof-ink);
  overflow: hidden;
}
[data-theme="dark"] .tools-band { background: #0D0A27; }

.tools-head { text-align: center; margin-bottom: 64px; }
.tools-head .proof-eyebrow { margin-bottom: 14px; }
.tools-lede {
  max-width: 44em;
  margin: 20px auto 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--proof-body);
}

.tools-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* lanes stay page-width; the belts overflow inside them */
  row-gap: 88px; /* room for the hub between the rows */
}
/* the bus: a faint vertical trace through the hub, visible in the gaps between cards */
.tools-bus {
  position: absolute;
  top: -24px; bottom: -24px;
  left: 50%;
  width: 1px;
  translate: -0.5px 0;
  background: linear-gradient(180deg, transparent, var(--a1) 20%, var(--a2) 50%, var(--a3) 80%, transparent);
  opacity: 0.45;
}

.tools-viewport {
  position: relative;
  overflow: hidden;
  /* soft edges so tools drift in and out rather than being clipped */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.tools-belt {
  display: flex;
  width: max-content;
  animation: belt-left 64s linear infinite;
}
.tools-lane[data-dir="right"] .tools-belt { animation-name: belt-right; animation-duration: 72s; }
@keyframes belt-left  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes belt-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
/* hover or keyboard focus pauses a row so it can be read */
.tools-lane:hover .tools-belt,
.tools-lane:focus-within .tools-belt { animation-play-state: paused; }
.tools-band.is-offscreen .tools-belt,
.tools-band.is-offscreen .hub-ring { animation-play-state: paused; }

.tools-track {
  display: flex;
  gap: var(--card-gap);
  margin: 0;
  padding: 6px var(--card-gap) 6px 0; /* trailing gap keeps the loop seamless */
  list-style: none;
}

.tool-card {
  position: relative;
  z-index: 1;
  flex: none;
  width: var(--card-w);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px 20px;
  border-radius: 18px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
  text-align: center;
  transition: border-color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
[data-theme="dark"] .tool-card { background: #151130; }
/* Logos rest in one tint so the row reads as a calm set; each takes its real
   brand colour only while it's "live" at the hub. */
.tool-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--proof-ink) 6%, transparent);
  color: color-mix(in srgb, var(--proof-ink) 72%, transparent);
  transition: color 0.45s var(--ease), background-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.tool-card--logo .tool-icon svg { width: 24px; height: 24px; }
.tool-name { font-size: 16px; font-weight: 700; color: var(--proof-ink); }
.tool-role { font-size: 13.5px; color: var(--proof-muted); }

/* the tool the hub is "routing to" right now */
.tool-card.is-live {
  border-color: color-mix(in srgb, var(--tool) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tool) 25%, transparent), 0 14px 34px -16px color-mix(in srgb, var(--tool) 60%, transparent);
  transform: translateY(-2px);
}
.tool-card.is-live .tool-icon {
  color: var(--tool);
  background: color-mix(in srgb, var(--tool) 16%, transparent);
  box-shadow: 0 0 18px -2px color-mix(in srgb, var(--tool) 55%, transparent);
}
/* dark brand colours (e.g. Make's deep purple) would vanish on the dark tile: lift them */
[data-theme="dark"] .tool-card.is-live .tool-icon { color: color-mix(in srgb, var(--tool) 75%, #fff); }

/* ---- the hub ---- */
.tools-hub {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  z-index: 2;
  width: 64px; height: 64px;
}
.tools-hub svg { display: block; overflow: visible; }
.hub-ring { stroke: var(--a2); opacity: 0.7; transform-origin: 32px 32px; animation: hub-turn 24s linear infinite; }
.hub-ring--inner { stroke: var(--a1); opacity: 0.6; animation-duration: 16s; animation-direction: reverse; }
.hub-core { fill: var(--a2); filter: drop-shadow(0 0 8px var(--a2)); }
@keyframes hub-turn { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .tools-band { --card-w: 176px; --card-gap: 12px; padding: 72px 0 80px; }
  .tools-head { margin-bottom: 44px; }
  .tools-lede { font-size: 16px; }
  .tools-stage { row-gap: 76px; }
  .tool-card { padding: 18px 12px 16px; }
  .tool-name { font-size: 15px; }
  .tool-role { font-size: 13px; }
}

/* Reduced motion: no drift, no turning; the tools become a still, centred grid. */
@media (prefers-reduced-motion: reduce) {
  /* matches the specificity of the right-hand lane's rule, so neither belt moves */
  .tools-belt,
  .tools-lane[data-dir="right"] .tools-belt { animation: none; transform: none; display: block; width: auto; }
  .tools-viewport { -webkit-mask-image: none; mask-image: none; }
  .tools-track { flex-wrap: wrap; justify-content: center; padding: 6px 16px; }
  .tools-track--dup { display: none; }
  .hub-ring { animation: none; }
  .tools-bus, .tools-hub { display: none; }
  .tools-stage { row-gap: 16px; }
}


/* Light mode only: circuit traces and nodes need more weight to read on white. */
:root:not([data-theme="dark"]) .proof-grid::before,
:root:not([data-theme="dark"]) .flow-track { height: 1.5px; }
:root:not([data-theme="dark"]) .tools-bus { width: 1.5px; opacity: 0.8; }
:root:not([data-theme="dark"]) .library-bus::before { width: 1.5px; }
:root:not([data-theme="dark"]) .library-bus::after { height: 1.5px; }
:root:not([data-theme="dark"]) .proof-card::before,
:root:not([data-theme="dark"]) .flow-card::before { width: 1.5px; opacity: 1; }
:root:not([data-theme="dark"]) .proof-card::after {
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
}
:root:not([data-theme="dark"]) .principle + .principle::before { opacity: 1; width: 1.5px; }

/* ============================== Operating principles ==============================
   One stance in three parts, so one panel rather than three cards: columns divided by
   circuit traces, each with a node in its principle's colour. */

.principles {
  padding: 104px 0 112px;
  background: #FFFFFF;
  color: var(--proof-ink);
}
[data-theme="dark"] .principles { background: #0A0720; }
.principles-heading { margin-bottom: 56px; }
.principle:nth-child(1) { --accent: var(--a2); }
.principle:nth-child(2) { --accent: var(--a1); }
.principle:nth-child(3) { --accent: var(--a3); }

.principles-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 24px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
[data-theme="dark"] .principles-panel { background: #120E2C; }

.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 40px 38px;
  transition: background-color 0.35s var(--ease);
}
.principle:first-child { border-radius: 24px 0 0 24px; }
.principle:last-child { border-radius: 0 24px 24px 0; }
.principle:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* the divider: a trace fading in and out, with a node where it meets the panel's top edge */
.principle + .principle::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent) 40%, transparent 90%);
  opacity: 0.6;
}
.principle + .principle::after {
  content: "";
  position: absolute;
  left: -4px; top: -4px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.principle-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 28px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
}
.principle-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--proof-ink);
}
.principle-body {
  margin: 0 0 36px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--proof-body);
}
.principle-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: auto 0 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent);
}
.principle-node {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (max-width: 900px) {
  .principles-panel { grid-template-columns: 1fr; }
  .principle:first-child { border-radius: 24px 24px 0 0; }
  .principle:last-child { border-radius: 0 0 24px 24px; }
  .principle + .principle::before {
    left: 0; right: 0; top: 0; bottom: auto;
    width: auto; height: 1px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent) 40%, transparent 90%);
  }
  .principle + .principle::after { left: -4px; top: -4px; }
}
@media (max-width: 640px) {
  .principles { padding: 72px 0 80px; }
  .principles-heading { margin-bottom: 36px; }
  .principle { padding: 34px 24px 30px; }
}

/* ============================== How we work (pipeline) ==============================
   The phases are a real sequence, so they sit on one pipeline. When the section scrolls
   into view a pulse runs along it once and each node lights in turn; after that
   everything stays lit. */

.flow {
  --bus: 30px;
  --run: 2.8s;
  padding: 104px 0 112px;
  background: #F6F4FB;
  color: var(--proof-ink);
}
[data-theme="dark"] .flow { background: #0D0A27; }
.flow-card:nth-child(1) { --accent: var(--a1); --i: 0; }
.flow-card:nth-child(2) { --accent: var(--a3); --i: 1; }
.flow-card:nth-child(3) { --accent: var(--a2); --i: 2; }
.flow-card:nth-child(4) { --accent: var(--a4); --i: 3; }

.flow-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22em);
  align-items: end;
  gap: 32px;
  margin-bottom: 52px;
}
.flow-note {
  max-width: 24em;
  margin: 0 0 6px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--proof-muted);
  text-align: right;
}

.flow-pipeline { position: relative; padding-top: var(--bus); }
.flow-track {
  position: absolute;
  top: 0; left: 2%; right: 2%;
  height: 1px;
  background: linear-gradient(90deg, var(--a1), var(--a3) 35%, var(--a2) 65%, var(--a4));
  opacity: var(--proof-trace-opacity);
}
.flow-pulse {
  position: absolute;
  top: -1px; left: 0;
  width: 90px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #fff 70%, transparent);
  filter: drop-shadow(0 0 6px var(--a2));
  opacity: 0;
}
.flow.is-running .flow-pulse { animation: flow-run var(--run) cubic-bezier(0.45, 0, 0.35, 1) 0.3s both; }
@keyframes flow-run {
  0%   { left: -90px; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 28px;
  border-radius: 22px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
[data-theme="dark"] .flow-card { background: #151130; }
/* stub + node joining each phase to the pipeline; nodes light in order during the run */
.flow-card::before {
  content: "";
  position: absolute;
  left: 40px;
  top: calc(-1 * var(--bus));
  width: 1px; height: var(--bus);
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.7;
}
.flow-card::after {
  content: "";
  position: absolute;
  left: 36px;
  top: calc(-1 * var(--bus) - 4px);
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--proof-card-border);
  box-shadow: 0 0 0 3px var(--flow-ring, transparent);
}
.flow.is-running .flow-card::after {
  animation: node-lit 0.6s var(--ease) both;
  animation-delay: calc(0.3s + var(--run) * (0.1 + var(--i) * 0.25));
}
@keyframes node-lit {
  0%   { background: var(--proof-card-border); box-shadow: 0 0 0 0 transparent; transform: scale(1); }
  45%  { background: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent), 0 0 16px var(--accent); transform: scale(1.5); }
  100% { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 10px var(--accent); transform: scale(1); }
}

.flow-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.flow-phase {
  padding: 5px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
}
.flow-icon { display: grid; color: var(--accent); opacity: 0.85; }
.flow-title {
  margin: 0 0 14px;
  font-size: clamp(21px, 1.8vw, 24px);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--proof-ink);
}
.flow-body {
  margin: 0 0 32px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--proof-body);
}
.flow-foot {
  margin: auto 0 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--proof-muted);
}
.flow-card:nth-child(3) .flow-foot { color: var(--live); }
.flow-card:nth-child(4) .flow-foot { color: var(--a2); }

.flow-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 26px;
  border-radius: 18px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
[data-theme="dark"] .flow-bar { background: #1A1538; }
.flow-bar-icon { display: grid; flex: none; color: var(--a1); }
.flow-bar-text { flex: 1; margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--proof-body); }
.flow-bar-link {
  flex: none;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--a2);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-underline-offset 0.25s var(--ease), color 0.2s ease;
}
.flow-bar-link:hover { text-underline-offset: 6px; }
.flow-bar-link:focus-visible { outline: 2px solid var(--a2); outline-offset: 4px; border-radius: 4px; }

@media (max-width: 1100px) {
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  /* the pipeline only reads as one line across a single row; without it, drop the connectors */
  .flow-track, .flow-pulse, .flow-card::before, .flow-card::after { display: none; }
  .flow-pipeline { padding-top: 0; }
  .flow-head { grid-template-columns: 1fr; gap: 16px; }
  .flow-note { text-align: left; }
}
@media (max-width: 640px) {
  .flow { padding: 72px 0 80px; }
  .flow-head { margin-bottom: 36px; }
  .flow-note { text-align: left; }
  .flow-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .flow-card { padding: 26px 22px 24px; }
  .flow-bar { flex-direction: column; align-items: flex-start; padding: 20px; }
}
/* Reduced motion: no run; every node shows lit. */
@media (prefers-reduced-motion: reduce) {
  .flow.is-running .flow-pulse { animation: none; }
  .flow .flow-card::after,
  .flow.is-running .flow-card::after {
    animation: none;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  }
}

/* ============================== FAQ ==============================
   Native <details> for the questions (keyboard + screen reader behaviour for free).
   The open item gets a thin accent trace with a node down its left edge. */

.faqx {
  padding: 104px 0 112px;
  background: #F6F4FB;
  color: var(--proof-ink);
}
[data-theme="dark"] .faqx { background: #0D0A27; }

.faqx-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: 56px;
  align-items: start;
}
.faqx-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.faqx-lede {
  margin: 20px 0 32px;
  max-width: 26em;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--proof-body);
}
.faqx-edge {
  padding: 24px 24px 22px;
  border-radius: 18px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
[data-theme="dark"] .faqx-edge { background: #151130; }
.faqx-edge-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--proof-ink); }
.faqx-edge-body { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--proof-muted); }
.faqx-edge-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--a1);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-underline-offset 0.25s var(--ease);
}
.faqx-edge-link:hover { text-underline-offset: 6px; }
.faqx-edge-link:focus-visible { outline: 2px solid var(--a1); outline-offset: 4px; border-radius: 4px; }

.faqx-list { display: grid; gap: 14px; }
.faqx-item {
  position: relative;
  border-radius: 18px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
  transition: border-color 0.3s ease;
}
[data-theme="dark"] .faqx-item { background: #151130; }
.faqx-item[open] { border-color: color-mix(in srgb, var(--a2) 35%, var(--proof-card-border)); }
/* the trace + node on the open answer */
.faqx-item::before {
  content: "";
  position: absolute;
  left: -1px; top: 26px; bottom: 26px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--a1), var(--a2) 60%, transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.faqx-item::after {
  content: "";
  position: absolute;
  left: -4px; top: 29px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--a1);
  box-shadow: 0 0 10px var(--a1);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.faqx-item[open]::before,
.faqx-item[open]::after { opacity: 1; }

.faqx-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  list-style: none;
  cursor: pointer;
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--proof-ink);
  border-radius: 18px;
}
.faqx-q::-webkit-details-marker { display: none; }
.faqx-q:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; }
.faqx-chev { flex: none; color: var(--a1); transition: transform 0.35s var(--ease); }
.faqx-item[open] .faqx-chev { transform: rotate(180deg); }
.faqx-a { padding: 0 26px 24px; }
.faqx-a p { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.65; color: var(--proof-body); }

/* Smooth open/close where the browser can animate <details>; elsewhere it opens instantly. */
@supports (interpolate-size: allow-keywords) {
  .faqx { interpolate-size: allow-keywords; }
  .faqx-item::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.4s var(--ease), content-visibility 0.4s allow-discrete;
  }
  .faqx-item[open]::details-content { height: auto; }
}

@media (max-width: 900px) {
  .faqx-grid { grid-template-columns: 1fr; gap: 36px; }
  .faqx-intro { position: static; }
}
@media (max-width: 640px) {
  .faqx { padding: 72px 0 80px; }
  .faqx-q { padding: 18px 20px; }
  .faqx-a { padding: 0 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .faqx-item::details-content { transition: none !important; }
  .faqx-chev { transition: none; }
}

/* ============================== Modular solutions library ==============================
   Four modules wired to one core: a thin circuit cross runs through the grid's gaps
   and meets at a node in the centre. */

.library {
  padding: 104px 0 112px;
  background: #FFFFFF;
  color: var(--proof-ink);
}
[data-theme="dark"] .library { background: #0A0720; }
.lib-card:nth-of-type(1) { --accent: var(--a1); }
.lib-card:nth-of-type(2) { --accent: var(--a2); }
.lib-card:nth-of-type(3) { --accent: var(--a1); }
.lib-card:nth-of-type(4) { --accent: var(--a2); }

.library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.library-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--proof-card-border);
  background: var(--proof-card);
  font-size: 14.5px;
  color: var(--proof-muted);
}
[data-theme="dark"] .library-status { background: #151130; }
.status-dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E3A33B; /* amber: in development */
}

.library-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
/* the bus: a cross through the gaps, meeting at the core */
.library-bus { position: absolute; inset: 0; pointer-events: none; }
.library-bus::before,
.library-bus::after {
  content: "";
  position: absolute;
  opacity: var(--proof-trace-opacity);
}
.library-bus::before {
  left: 50%; top: -18px; bottom: -18px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--a1) 20%, var(--a2) 80%, transparent);
}
.library-bus::after {
  top: 50%; left: -18px; right: -18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--a1) 20%, var(--a2) 80%, transparent);
}
.library-core {
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--a2);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--a2) 16%, transparent), 0 0 14px var(--a2);
}

.lib-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 36px 36px 30px;
  border-radius: 22px;
  background: var(--proof-card);
  border: 1px solid var(--proof-card-border);
  box-shadow: var(--proof-card-shadow);
}
[data-theme="dark"] .lib-card { background: #151130; }
.lib-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.lib-num { margin: 0; font-size: 14px; font-weight: 600; color: var(--proof-muted); }
.lib-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--accent);
}
.lib-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--proof-ink);
}
.lib-body {
  margin: 0 0 32px;
  max-width: 58ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--proof-body);
}
.lib-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
}
.lib-tag { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--accent); }

@media (max-width: 900px) {
  .library-grid { grid-template-columns: 1fr; gap: 24px; }
  .library-bus { display: none; }
}
@media (max-width: 640px) {
  .library { padding: 72px 0 80px; }
  .library-head { margin-bottom: 36px; }
  .lib-card { padding: 28px 22px 24px; }
}

/* ============================== Closing call to action ==============================
   A return to the hero at the decision point: the hero's indigo in both themes, with two
   traces carrying a signal in from the edges. When they meet at the button, its ring
   flashes once. */

.cta-band {
  --run: 1.5s;
  padding: 24px 0 104px;
  background: #FFFFFF;
}
[data-theme="dark"] .cta-band { background: #0A0720; }
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 72px);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 80% at 50% 110%, rgba(98, 44, 180, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 8% 0%, rgba(45, 76, 138, 0.45) 0%, transparent 70%),
    linear-gradient(180deg, #120D30 0%, var(--hero-bg) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 60px -40px rgba(40, 20, 90, 0.6);
}
[data-theme="dark"] .cta-panel {
  background:
    radial-gradient(ellipse 55% 80% at 50% 110%, rgba(98, 44, 180, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 8% 0%, rgba(45, 76, 138, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, #1A1438 0%, #120D2C 100%);
  box-shadow: none;
}
.cta-title {
  max-width: 18em;
  margin: 0 auto 44px;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--hero-ink);
}

.cta-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  /* traces reach out to the panel's edges */
  margin: 0 calc(-1 * clamp(24px, 5vw, 72px));
}
.cta-btn { padding: 17px 34px; font-size: 16px; }
.cta-trace {
  position: relative;
  height: 1px;
}
.cta-trace--l { background: linear-gradient(90deg, transparent, #3EBBE0 60%, #8A39CF); }
.cta-trace--r { background: linear-gradient(270deg, transparent, #384FBE 60%, #8A39CF); }
/* a node where each trace meets the button */
.cta-trace::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px; height: 7px;
  translate: 0 -50%;
  border-radius: 50%;
  background: #B79CF5;
  box-shadow: 0 0 10px #8A39CF;
  opacity: 0; /* only shown while the signal arrives (see cta-node-blip) */
}
.cta-band.is-running .cta-trace::after {
  animation: cta-node-blip 2s ease calc(0.4s + var(--run) * 0.8) both;
}
@keyframes cta-node-blip {
  0%   { opacity: 0; transform: scale(0.4); }
  15%  { opacity: 1; transform: scale(1.4); }
  30%  { opacity: 1; transform: scale(1); }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}
.cta-trace--l::after { right: -3px; }
.cta-trace--r::after { left: -3px; }

.cta-spark {
  position: absolute;
  top: -1px;
  width: 70px; height: 3px;
  border-radius: 3px;
  opacity: 0;
  filter: drop-shadow(0 0 6px #B79CF5);
}
.cta-trace--l .cta-spark { background: linear-gradient(90deg, transparent, #fff); left: 0; }
.cta-trace--r .cta-spark { background: linear-gradient(270deg, transparent, #fff); right: 0; }
.cta-band.is-running .cta-trace--l .cta-spark { animation: spark-in-l var(--run) cubic-bezier(0.5, 0, 0.3, 1) 0.4s both; }
.cta-band.is-running .cta-trace--r .cta-spark { animation: spark-in-r var(--run) cubic-bezier(0.5, 0, 0.3, 1) 0.4s both; }
@keyframes spark-in-l {
  0% { left: 0; opacity: 0; } 15% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 70px); opacity: 0; }
}
@keyframes spark-in-r {
  0% { right: 0; opacity: 0; } 15% { opacity: 1; } 90% { opacity: 1; } 100% { right: calc(100% - 70px); opacity: 0; }
}
/* the meeting: the button's ring runs once */
.cta-band.is-running .cta-btn::after {
  animation: ring-run 1.2s linear calc(0.4s + var(--run)) 1 both, ring-flash 1.2s ease calc(0.4s + var(--run)) 1 both;
}
@keyframes ring-flash { 0% { opacity: 0; } 20% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
/* hover still runs the ring as everywhere else */
.cta-band .cta-btn:hover::after,
.cta-band .cta-btn:focus-visible::after { animation: ring-run 1.4s linear infinite; opacity: 1; }

/* Light mode: the strip runs edge to edge as a full-width dark band. Dark mode keeps the inset panel. */
:root:not([data-theme="dark"]) .cta-band { padding: 0; background: var(--hero-bg); }
:root:not([data-theme="dark"]) .cta-band > .proof-wrap { max-width: none; padding: 0; }
:root:not([data-theme="dark"]) .cta-panel {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  padding-left: max(24px, calc((100vw - 1240px) / 2 + 32px));
  padding-right: max(24px, calc((100vw - 1240px) / 2 + 32px));
}
/* traces still reach the band's edges */
:root:not([data-theme="dark"]) .cta-row { margin: 0 calc(-1 * max(24px, calc((100vw - 1240px) / 2 + 32px))); }

@media (max-width: 640px) {
  [data-theme="dark"] .cta-band { padding: 8px 0 72px; }
  [data-theme="dark"] .cta-panel { border-radius: 22px; }
  .cta-title { margin-bottom: 34px; }
  .cta-row { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-band.is-running .cta-spark,
  .cta-band.is-running .cta-btn::after,
  .cta-band.is-running .cta-trace::after { animation: none; }
}

/* ============================== Contact ==============================
   Dark in both themes: with the footer it closes the page the way the hero opens it.
   The Y wakes as the form is filled (script.js sets data-* on the section): each field
   lights one node, and sending surges a pulse around every loop. */

.contactx {
  --cx-ink: #F3F2F8;
  --cx-body: #B7B5CC;
  --cx-muted: #8E8CA8;
  --cx-line: rgba(255, 255, 255, 0.09);
  position: relative;
  overflow: hidden;
  padding: 112px 0 120px;
  color: var(--cx-ink);
  background:
    radial-gradient(ellipse 45% 55% at 22% 58%, rgba(98, 44, 180, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 95% 100%, rgba(45, 76, 138, 0.3) 0%, transparent 70%),
    linear-gradient(180deg, #0E0B24 0%, var(--hero-bg) 100%);
}

.contactx-head { margin-bottom: 56px; }
.contactx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
}
/* heading on one line on wide screens; it wraps only when it has to */
.contactx-title {
  margin: 0 0 16px;
  font-size: clamp(26px, 2.55vw, 32px);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--cx-ink);
}
.contactx-lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cx-body);
}

/* ---- the orbit ---- */
.contactx-visual {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  margin: 0; /* left-aligned under the text */
}
.cx-orbit { width: 100%; height: 100%; display: block; overflow: visible; }
.cx-ring { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; }
.cx-ring--dash { stroke: rgba(126, 150, 240, 0.35); stroke-dasharray: 3 7; }
.cx-ring--thin { stroke: rgba(183, 156, 245, 0.2); }
.cx-sat--teal { fill: #6FD0EC; filter: drop-shadow(0 0 6px #3EBBE0); }
.cx-sat--violet { fill: #9C83F0; filter: drop-shadow(0 0 5px #8A39CF); }
.cx-spin { transform-origin: 260px 260px; animation: hub-turn 60s linear infinite; }
.cx-spin--rev { animation-duration: 44s; animation-direction: reverse; }

.cx-traces { filter: drop-shadow(0 0 7px rgba(154, 91, 224, 0.6)); }
.cx-dot { fill: #8A63E0; opacity: 0.8; }
.cx-node {
  fill: #2A2152;
  stroke: #8A63E0;
  stroke-width: 1.5;
  transition: fill 0.45s var(--ease), stroke 0.45s var(--ease), filter 0.45s var(--ease);
}
.cx-core { fill: #D9C8FF; filter: drop-shadow(0 0 8px #9A5BE0); transition: filter 0.45s var(--ease); }
/* each field that has something in it lights its node */
.contactx[data-name] .cx-node[data-field="name"],
.contactx[data-email] .cx-node[data-field="email"],
.contactx[data-company] .cx-node[data-field="company"],
.contactx[data-message] .cx-node[data-field="message"] {
  fill: #F1EAFF;
  stroke: #F1EAFF;
  filter: drop-shadow(0 0 6px #B79CF5) drop-shadow(0 0 12px #8A39CF);
}
.contactx[data-name][data-email][data-message] .cx-core { filter: drop-shadow(0 0 14px #B79CF5) drop-shadow(0 0 26px #8A39CF); }

/* the send surge: one bright pulse around every loop */
.cx-surge path { stroke: #F4EEFF; stroke-dasharray: 0.12 0.88; stroke-dashoffset: 1; opacity: 0; }
.contactx.is-sent .cx-surge path { animation: cx-surge 1.3s cubic-bezier(0.4, 0, 0.2, 1) both; }
.contactx.is-sent .cx-surge path:nth-child(2) { animation-delay: 0.08s; }
.contactx.is-sent .cx-surge path:nth-child(3) { animation-delay: 0.16s; }
@keyframes cx-surge {
  0% { stroke-dashoffset: 1; opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}


/* ---- the form ---- */
.contactx-card {
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--cx-line);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.7);
}
.cx-form { display: grid; gap: 22px; }
.cx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cx-field label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #D8D4EC;
}
.cx-field input,
.cx-field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--cx-line);
  background: rgba(6, 4, 20, 0.55);
  font: inherit;
  font-size: 16px; /* 16px+ stops iOS zooming on focus */
  color: var(--cx-ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.cx-field textarea { min-height: 128px; resize: vertical; line-height: 1.55; }
.cx-field input::placeholder,
.cx-field textarea::placeholder { color: #75728F; }
.cx-field input:focus,
.cx-field textarea:focus {
  outline: none;
  border-color: #B79CF5;
  background: rgba(6, 4, 20, 0.75);
  box-shadow: 0 0 0 3px rgba(183, 156, 245, 0.2);
}
.cx-submit { width: 100%; margin-top: 4px; padding: 17px 24px; font-size: 16px; }
.cx-note { margin: 0; text-align: center; font-size: 13.5px; font-style: italic; color: var(--cx-muted); }
.cx-thanks { padding: 48px 12px; }
.cx-thanks p { color: var(--cx-ink); }

@media (max-width: 1000px) {
  /* stack as: heading, subline, form, then the mark */
  .contactx-head { margin-bottom: 32px; }
  .contactx-grid { grid-template-columns: 1fr; gap: 48px; }
  .contactx-card { order: 1; }
  .contactx-side { order: 2; }
  .contactx-visual { width: min(100%, 380px); margin: 0 auto; }
}
@media (max-width: 640px) {
  .contactx { padding: 72px 0 80px; }
  .contactx-card { padding: 26px 20px; }
  .cx-row { grid-template-columns: 1fr; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-spin { animation: none; }
  .contactx.is-sent .cx-surge path { animation: none; }
  .cx-node, .cx-core { transition: none; }
}

/* ============================== Showcase card pattern ============================== */

.showcase {
  background: var(--panel);
  border-radius: 24px;
  padding: 64px 40px;
  max-width: 1000px;
  margin: 0 auto;
}
.showcase .eyebrow { color: var(--c3); }
.showcase h2 {
  text-align: center;
  font-size: clamp(26px, 3.6vw, 36px);
  max-width: 640px;
  margin: 0 auto 48px;
}

/* How We Work timeline */

.timeline {
  display: flex;
  flex-direction: column;
}

.tl-row {
  display: flex;
  gap: 24px;
}

.tl-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 56px;
  flex-shrink: 0;
}

.tl-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--phase-color, var(--c3));
  z-index: 1;
  box-shadow: 0 6px 16px -10px rgba(20,20,40,0.3);
}
.tl-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--phase-color, var(--c3));
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tl-line {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: var(--phase-color, var(--c3));
  opacity: 0.4;
}
.tl-row:last-child .tl-line { display: none; }

.tl-content { padding-bottom: 40px; }
.tl-row:last-child .tl-content { padding-bottom: 0; }

.tl-phase {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--phase-color, var(--c3));
  margin-bottom: 8px;
  margin-top: 6px;
}
.tl-content h3 { font-size: 19px; margin-bottom: 8px; }
.tl-content p { font-size: 14.5px; margin-bottom: 8px; }
.tl-best {
  font-size: 12.5px;
  color: var(--faint);
  font-style: italic;
  margin-top: 4px;
}

@media (max-width: 700px) {
  .tl-row { gap: 16px; }
  .tl-track, .tl-icon { width: 44px; }
  .tl-icon { height: 44px; }
  .tl-icon svg { width: 18px; height: 18px; }
}

.pricing-note {
  text-align: center;
  font-style: italic;
  color: var(--faint);
  font-size: 14px;
  margin-top: 40px;
}

/* Contact: thank-you state after sending */

.thank-you {
  text-align: center;
  padding: 30px 10px;
}
.thank-you .check {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  animation: pop-in 0.5s var(--ease) both;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.thank-you p { font-size: 16px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }

/* ============================== Footer ==============================
   Brand (the header's metal wordmark + Y icon) with a short blurb, then Navigation and
   Network & presence columns, and a base row. Dark in both themes. */

footer.site-footer {
  padding: 80px 0 36px;
  color: #B7B5CC;
  text-align: left;
  background:
    radial-gradient(ellipse 50% 70% at 10% 0%, rgba(45, 76, 138, 0.22) 0%, transparent 70%),
    #0B0822;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 48px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  border-radius: 8px;
}
.footer-brand:focus-visible { outline: 2px solid #B996FF; outline-offset: 6px; }
.footer-brand-mark { width: 40px; height: auto; filter: brightness(1.5) saturate(1.2); }
/* .site-footer prefix outranks the phone header rule that sizes .brand-name */
.site-footer .brand-name { font-size: 30px; animation: none; }
.footer-blurb {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.65;
  color: #A9A6C2;
}
.footer-col-title {
  margin: 8px 0 20px;
  font-size: 14px;
  font-weight: 700;
  color: #8E8CA8;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.footer-col li { font-size: 16px; line-height: 1.45; color: #E4E1F2; }
.footer-col a {
  color: #E4E1F2;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease), color 0.2s ease;
}
.footer-col a:hover { color: #fff; background-size: 100% 1px; }
.footer-col a:focus-visible { outline: 2px solid #B996FF; outline-offset: 3px; border-radius: 3px; }

.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  margin-top: 64px;
  padding-top: 26px;
}
/* divider aligned to the content edges (not the wrapper's padding) */
.footer-base::before {
  content: "";
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}
.footer-base p { margin: 0; font-size: 14px; color: #8E8CA8; }
.footer-legal-links { display: flex; gap: 28px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  footer.site-footer { padding: 56px 0 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer .brand-name { font-size: 26px; }
  .footer-base { margin-top: 44px; }
  .footer-base::before { left: 18px; right: 18px; }
  .footer-legal-links { gap: 20px; }
}

/* ============================== Reveal-on-scroll ============================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================== Responsive ============================== */

@media (max-width: 720px) {
  /* ---- Header + menu ---- */
  .header-bar { height: 56px; padding: 0 6px 0 14px; }
  .brand { gap: 8px; }
  .brand-mark { width: 24px; }
  .brand-name { font-size: 18px; }

  nav.main-nav {
    position: fixed;
    top: calc(var(--bar, 57px) + 8px);
    left: 8px; right: 8px;
    background: rgba(18, 14, 38, 0.96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
  }
  nav.main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  nav.main-nav a.nav-link { padding: 14px 16px; font-size: 16px; }
  nav.main-nav .nav-cta { display: flex; margin-top: 8px; padding: 15px 24px; }
  .nav-right .desktop-only { display: none; }
  .nav-toggle { display: block; }

  /* ---- Hero ---- */
  .hero-panel { min-height: 100svh; padding: calc(var(--header-h) + 40px) 18px 64px; }
  .hero-badge { font-size: 12.5px; margin-bottom: 24px; }
  .hero h1 { letter-spacing: -0.03em; }
  .hero-kicker::before, .hero-kicker::after { display: none; }
  .kicker-line { display: block; }
  .hero-cta-row .btn { flex: 1 1 200px; }

  /* ---- Rhythm: tighter section spacing, more width for content ---- */
  section { padding: 44px 0; }
  
  .wrap-wide { padding: 0 10px; }
  .showcase { padding: 36px 18px; border-radius: 20px; }
  .showcase h2 { margin-bottom: 32px; }
  

  /* ---- How we work: narrower rail, wider text ---- */
  .tl-row { gap: 12px; }
  .tl-track, .tl-icon { width: 36px; }
  .tl-icon { height: 36px; }
  .tl-icon svg { width: 16px; height: 16px; }
  .tl-content { padding-bottom: 32px; }
  .tl-phase { margin-top: 2px; }
  .tl-content h3 { font-size: 18px; }

  /* ---- CTA, FAQ, contact ---- */
  
  
  
  
}

/* ============================== Performance ============================== */

/* script.js adds .is-offscreen once the hero scrolls out of view. Pausing every
   animation together keeps the dot flashes in step with the pulses on return. */
.hero-panel.is-offscreen *,
.hero-panel.is-offscreen *::before,
.hero-panel.is-offscreen *::after {
  animation-play-state: paused !important;
}

/* Touch devices have no cursor to follow, and the blurs cost more on phone GPUs. */
@media (hover: none), (max-width: 720px) {
  .blob-cursor { display: none; }
  .hero-fx .blob { filter: blur(64px); }
  .traces { filter: none; }
}

/* ============================== Mobile lockup hero ==============================
   On phones the hero opens as the brand lockup: wordmark centred in the bar,
   the animated Y beneath it, then the copy. On scroll the bar condenses and
   the small Y moves into it. */
@media (max-width: 720px) {
  :root {
    /* Wordmark and Y both span this share of the screen width. */
    --lockup: 0.7;
    --wm-ink: 5.755; /* measured: the wordmark's ink is 5.755em wide */
    --wm: calc(var(--sq) * var(--lockup) / var(--wm-ink));
    /* The bar and the Y together fill a screen-wide square; the Y is centred in the space under the bar. */
    --sq: 100vw;
    --bar: 93px; /* 92px bar + 1px border: ~30px above and below the wordmark */
    --bar-compact: 61px;
    --yw: calc(var(--sq) * var(--lockup) / 0.9); /* the Y's ink is 90% of its box */
    --yh: calc(var(--yw) * 370 / 403.5);
  }

  .header-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    height: calc(var(--bar) - 1px);
    gap: 0; /* a column gap would unbalance the side columns and push the wordmark off centre */
    padding: 0 6px;
    transition: height 0.45s var(--ease);
  }
  .brand { grid-column: 2; justify-self: center; gap: 0; }
  .brand-mark {
    width: 0;
    opacity: 0;
    margin-right: 0;
    transition: width 0.45s var(--ease), opacity 0.3s ease, margin-right 0.45s var(--ease);
  }
  .brand-name { font-size: var(--wm); transition: font-size 0.45s var(--ease); }

  /* Once the page scrolls (script.js adds .compact), the bar condenses:
     smaller wordmark, and the Y icon moves into the bar beside it. */
  .site-header.compact .header-bar { height: calc(var(--bar-compact) - 1px); }
  .site-header.compact .brand-name { font-size: 22px; }
  .site-header.compact .brand-mark { width: 26px; opacity: 1; margin-right: 10px; }
  .site-header.compact nav.main-nav { top: calc(var(--bar-compact) + 8px); }
  /* The switch takes the empty left column, mirroring the menu button on the right. */
  .nav-right { display: contents; }
  .brand { grid-row: 1; }
  .theme-toggle { grid-column: 1; grid-row: 1; justify-self: start; width: 44px; height: 44px; }
  .nav-toggle { grid-column: 3; grid-row: 1; justify-self: end; }

  .hero-panel {
    justify-content: flex-start;
    padding: 0 18px 40px;
  }

  /* The Y leaves the backdrop and sits in the flow, above the copy. */
  .hero-circuit {
    position: relative;
    left: auto; top: auto;
    translate: none;
    width: var(--yw);
    height: auto;
    aspect-ratio: 403.5 / 370;
    margin: calc((var(--bar) + var(--sq)) / 2 - var(--yh) / 2) auto
            calc(var(--sq) - (var(--bar) + var(--sq)) / 2 - var(--yh) / 2);
  }
  /* Scroll hand-off on phones: the Y rises and fades under the bar, handing over to
     the small icon, instead of sinking into the copy as it does on desktop. */
  .hero-circuit {
    transform: translateY(calc(var(--p) * -90px)) scale(calc(1 - var(--p) * 0.15));
    opacity: calc(1 - var(--p) * 1.6);
  }
  .circuit-glow { top: 10%; height: 90%; width: 120%; }
  .hero-scrim { display: none; }

  /* Nothing sits on top of it now, so it can be seen properly. */
  .traces { opacity: 0.6; }
  .pulses { opacity: 0.75; }
  .nodes { opacity: 0.8; }

  .hero-badge { margin-bottom: 18px; }
  .hero h1 { font-size: clamp(32px, 9vw, 38px); margin-bottom: 16px; }
  .hero-kicker { margin-bottom: 14px; font-size: 17px; }
  .hero-sub { font-size: 15.5px; margin-bottom: 22px; }
  .hero-cta-row { flex-wrap: nowrap; gap: 10px; }
  .hero-cta-row .btn { flex: 1 1 0; padding: 15px 12px; font-size: 15px; white-space: nowrap; }
}

/* Shorter phones (e.g. iPhone SE): tighten the lockup so the buttons stay on the first screen. */
@media (max-width: 720px) and (max-height: 740px) {
  .hero-badge { margin-bottom: 14px; }
  .hero h1 { font-size: 34px; margin-bottom: 14px; }
  .hero-kicker { margin-bottom: 14px; }
  .hero-sub { margin-bottom: 20px; }
}

/* ============================== Dark mode ==============================
   [data-theme="dark"] on <html>, set before first paint by the inline script in
   index.html. Hero, header and footer are dark in both themes; this layer turns
   the light sections to the brand's indigo. */
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F1EFF9;
  --muted: #B4B2C9;
  --faint: #8D8BA7;
  --rule: rgba(255, 255, 255, 0.09);
  --panel: #171233;
  --panel-soft: #110D2A;
}
[data-theme="dark"] body { background: #0A0720; }

[data-theme="dark"] .eyebrow,
[data-theme="dark"] .showcase .eyebrow { color: #B79CF5; }

/* How we work: lift the timeline colours so they read on indigo */
[data-theme="dark"] .tl-icon { background: #0F0B26; box-shadow: none; }
[data-theme="dark"] .tl-row:nth-child(1) { --phase-color: #4CC3DB !important; }
[data-theme="dark"] .tl-row:nth-child(2) { --phase-color: #6FA2E0 !important; }
[data-theme="dark"] .tl-row:nth-child(3) { --phase-color: #9483E8 !important; }
[data-theme="dark"] .tl-row:nth-child(4) { --phase-color: #B377E6 !important; }

/* "Let's Talk" on light sections is indigo; on dark sections it becomes the white pill */
[data-theme="dark"] .btn-talk-dark { background: #fff; color: var(--hero-bg); box-shadow: 0 10px 30px -12px rgba(150, 110, 255, 0.6); }

/* Colours fade only while switching (script.js adds .theme-anim for ~0.4s) */
.theme-anim,
.theme-anim *,
.theme-anim *::before,
.theme-anim *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, fill 0.35s ease, stroke 0.35s ease !important;
}
