/* ==========================================================================
   Spotless Mind — Patterns
   Home page composition, hero, and the display sections shared across pages.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   Two columns on desktop: the claim on the left, the neural portrait on the
   right, with the stat band spanning both. Collapses to one column at 900px.
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  column-gap: var(--space-8);
  align-items: center;
  position: relative;
  padding: var(--space-5) 0 var(--space-2);
}
.hero > .badge,
.hero > h1,
.hero > .lead,
.hero > .hero-by,
.hero > .hero-cta { grid-column: 1; }

.hero > h1 {
  font-size: var(--text-5xl);
  margin: var(--space-5) 0 0;
  max-width: 16ch;
}
.hero > .lead {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--text-body);
  max-width: 54ch;
}
.hero-by {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-5);
}
.hero-by b { color: var(--text); font-weight: var(--weight-semi); }
.hero-by::before {
  content: "";
  width: 1.5rem; height: 1px;
  background: var(--border-strong);
  flex: none;
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

#brainWrap {
  grid-column: 2;
  grid-row: 1 / span 5;
  justify-self: end;
  align-self: center;
  width: 100%;
  max-width: 30rem;
  aspect-ratio: 1;
  position: relative;
}
#brain { width: 100%; height: 100%; overflow: visible; }

/* --- hero artwork ------------------------------------------------------- */
.bloom-rings { animation: bloomSpin 120s linear infinite; transform-origin: 220px 204px; }
@keyframes bloomSpin { to { transform: rotate(360deg); } }

.lobe { opacity: .9; }
.lobe-edge {
  stroke: url(#synGrad);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawEdge 2.2s var(--ease-out) .15s forwards;
}
@keyframes drawEdge { to { stroke-dashoffset: 0; } }

.fissure {
  stroke: url(#synGrad);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: .45;
}

.synapse {
  stroke: url(#synGrad);
  stroke-width: .8;
  fill: none;
  opacity: .45;
}
.neuron { fill: var(--deco-green); opacity: .85; }
.signal { fill: var(--brand-contrast); filter: drop-shadow(0 0 5px var(--brand)); }

@media (prefers-reduced-motion: reduce) {
  .bloom-rings { animation: none; }
  .lobe-edge { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero > * { grid-column: 1 !important; }
  .hero > h1 { font-size: var(--text-4xl); max-width: 18ch; }
  /* Artwork sits between the calls to action and the stat band */
  #brainWrap {
    grid-row: auto;
    order: 5;
    width: min(74vw, 22rem);
    justify-self: center;
    margin-top: var(--space-6);
  }
  .hero > .stats { order: 6; }
  .hero-by { flex-wrap: wrap; row-gap: var(--space-1); }
  .hero-by::before { display: none; }
}

/* Stat band — sits under the hero as its own rule-bounded strip */
.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-4); } }

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-none);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-normal);
}

/* --------------------------------------------------------------------------
   Marquee — clipped to its own bounds, fading at both ends
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border-subtle);
  padding: var(--space-4) 0;
  margin-block: var(--section-gap);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: var(--space-9);
  width: max-content;
  animation: marq 46s linear infinite;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .sep { color: var(--brand); opacity: .6; }
@keyframes marq { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* --------------------------------------------------------------------------
   Quote scene — a layered horizon, not a flat gradient box
   -------------------------------------------------------------------------- */
.scene {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  min-height: 22rem;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: linear-gradient(180deg, var(--scene-sky-1) 0%, var(--scene-sky-2) 52%, var(--scene-sky-3) 100%);
  box-shadow: var(--shadow-3);
}
:root {
  --scene-sky-1: #A9CFE8;
  --scene-sky-2: #C9E3D6;
  --scene-sky-3: #F2E9D4;
  --scene-ink: #14302A;
}
:root[data-theme="dark"] {
  --scene-sky-1: #071129;
  --scene-sky-2: #0E3244;
  --scene-sky-3: #14525A;
  --scene-ink: #F2FAF6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scene-sky-1: #071129;
    --scene-sky-2: #0E3244;
    --scene-sky-3: #14525A;
    --scene-ink: #F2FAF6;
  }
}

/* Warm low sun by day, cool moon by night — and set off to one side so it
   never sits behind the quote. */
.scene .sun {
  position: absolute;
  width: 7rem; height: 7rem;
  border-radius: 50%;
  background: var(--scene-orb);
  top: 13%; right: 12%; left: auto;
  animation: sunFloat 11s var(--ease-in-out) infinite alternate;
}
:root { --scene-orb: radial-gradient(circle, #FFF3D4 24%, #F7C79A 56%, transparent 72%); }
:root[data-theme="dark"] { --scene-orb: radial-gradient(circle, #EAF4FF 20%, #A9C6E8 48%, transparent 70%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --scene-orb: radial-gradient(circle, #EAF4FF 20%, #A9C6E8 48%, transparent 70%); }
}
@media (max-width: 560px) { .scene .sun { width: 5rem; height: 5rem; right: 8%; } }
@keyframes sunFloat { to { transform: translateY(12px) scale(1.04); } }

.scene .wave {
  position: absolute;
  bottom: -2px; left: 0;
  width: 200%;
  max-width: none;   /* the global svg reset would otherwise clamp this to 100% */
  height: 7rem;
  animation: waveMove 26s linear infinite;
  will-change: transform;
}
.scene .wave.w2 { opacity: .55; animation-duration: 38s; bottom: -1.5rem; height: 9rem; }
.scene .wave.w3 { opacity: .35; animation-duration: 52s; bottom: -2.5rem; height: 11rem; }
@keyframes waveMove { to { transform: translate3d(-50%, 0, 0); } }

.scene-quote {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-8) var(--space-5);
  max-width: 34rem;
}
.scene-quote p {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--scene-ink);
  text-wrap: balance;
}
.scene-quote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-style: normal;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--scene-ink);
  opacity: .62;
}
@media (prefers-reduced-motion: reduce) {
  .scene .sun, .scene .wave { animation: none; }
}

/* --------------------------------------------------------------------------
   The journey of a big feeling — a five-stage stepper
   -------------------------------------------------------------------------- */
#feelJourney { position: relative; margin: var(--block-gap) 0 0; }
#feelPin {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  padding: var(--space-9) var(--space-5) var(--space-7);
  background: var(--glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
}
/* A faint trace of the whole arc behind the orb, so a single stage still
   communicates that it is one point on a curve. */
#feelArc {
  position: absolute;
  inset: auto 0 38%;
  width: 100%;
  height: 7rem;
  opacity: .28;
  pointer-events: none;
}
#feelOrb {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  position: relative;
  transition:
    transform var(--dur-slower) var(--ease-out),
    background var(--dur-slower) var(--ease-out),
    box-shadow var(--dur-slower) var(--ease-out);
  will-change: transform;
}
#feelCap {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  text-align: center;
  max-width: 28ch;
  color: var(--text);
  min-height: 2.6em;
  text-wrap: balance;
  transition: opacity var(--dur-base) var(--ease-out);
}
#feelSub {
  color: var(--text-muted);
  text-align: center;
  max-width: 46ch;
  font-size: var(--text-base);
  min-height: 3em;
  transition: opacity var(--dur-base) var(--ease-out);
}
#feelProg { display: flex; gap: var(--space-2); }
#feelProg button {
  width: 2.25rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
}
#feelProg button::after {
  content: "";
  width: 2rem; height: 4px;
  border-radius: 4px;
  background: var(--border-strong);
  transition: background var(--dur-base) var(--ease-out);
}
#feelProg button[aria-current="step"]::after,
#feelProg button.on::after { background: var(--brand); }
.fj-ctl { display: flex; align-items: center; justify-content: center; gap: var(--space-2); flex-wrap: wrap; }
.fj-ctl button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  min-height: 2.5rem;
  font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.fj-ctl button:hover { border-color: var(--brand); background: var(--brand-tint); }
.fj-ctl button svg { width: .85rem; height: .85rem; }

/* --------------------------------------------------------------------------
   Brain explorer
   -------------------------------------------------------------------------- */
#brainX {
  position: relative;
  max-width: 46rem;
  margin: var(--block-gap) auto 0;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  background: var(--glass);
  padding: var(--space-5);
  overflow: hidden;
}
#brainXsvg {
  width: 100%;
  height: auto;
  transition: transform var(--dur-slower) var(--ease-out);
  transform-origin: center;
}
.bx-node { cursor: pointer; }
.bx-node .bx-hit { fill: transparent; }
.bx-node circle.bx-dot {
  fill: var(--deco-green);
  transition: r var(--dur-base) var(--ease-out), fill var(--dur-base) var(--ease-out);
}
.bx-node:hover circle.bx-dot,
.bx-node:focus-visible circle.bx-dot { r: 9; fill: var(--brand); }
.bx-node .ring {
  fill: none;
  stroke: var(--brand);
  opacity: .5;
  animation: bxPing 2.6s var(--ease-out) infinite;
}
@keyframes bxPing {
  0%   { r: 7; opacity: .55; }
  100% { r: 24; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .bx-node .ring { animation: none; opacity: .3; } }
.bx-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  fill: var(--text);
}
.bx-label-bg { fill: var(--surface); stroke: var(--border); stroke-width: .6; }

#bxPanel {
  position: absolute;
  inset: auto var(--space-5) var(--space-5);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-align: left;
  box-shadow: var(--shadow-4);
}
#bxPanel.on { opacity: 1; transform: none; pointer-events: auto; }
#bxPanel h3 { color: var(--brand); }
#bxPanel p { font-size: var(--text-base); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Drag strips (mind hacks, worlds)
   -------------------------------------------------------------------------- */
.strip-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.strip-head > div:first-child { max-width: var(--measure); }
.strip-nav { display: flex; gap: var(--space-2); }
.strip-nav button {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.strip-nav button:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-tint); }
.strip-nav button:disabled { opacity: .35; cursor: default; }
.strip-nav svg { width: 1rem; height: 1rem; }

.dragstrip {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: var(--space-2) var(--space-1) var(--space-5);
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--space-1);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2.5rem, #000 calc(100% - 4rem), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 2.5rem, #000 calc(100% - 4rem), transparent 100%);
}
.dragstrip::-webkit-scrollbar { display: none; }
.dragstrip > * { scroll-snap-align: start; }
.dragstrip.dragging { cursor: grabbing; scroll-snap-type: none; }
.dragstrip.at-start { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent 100%); mask-image: linear-gradient(to right, #000 calc(100% - 4rem), transparent 100%); }
.dragstrip.at-end   { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 2.5rem); mask-image: linear-gradient(to right, transparent 0, #000 2.5rem); }
.dragstrip.at-start.at-end { -webkit-mask-image: none; mask-image: none; }

.hack {
  flex: 0 0 15rem;
  background: var(--glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.hack:hover { transform: translateY(-5px); border-color: var(--border-brand); box-shadow: var(--shadow-3); }
.hack b { font-family: var(--font-display); font-size: var(--text-lg); display: block; margin: var(--space-3) 0 var(--space-2); color: var(--text); }
.hack p { font-size: var(--text-base); color: var(--text-muted); line-height: var(--leading-normal); }

.world { flex: 0 0 19rem; }
@media (max-width: 560px) {
  .world { flex-basis: 80vw; }
  .hack { flex-basis: 72vw; }
}

/* --------------------------------------------------------------------------
   Article / feature cards
   -------------------------------------------------------------------------- */
.art-card .cat {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-rose);
  font-weight: var(--weight-medium);
}
.art-card h3 { margin-top: var(--space-2); font-size: var(--text-xl); }
.art-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.art-card .meta .go { color: var(--brand); font-weight: var(--weight-semi); display: inline-flex; align-items: center; gap: var(--space-1); }
.art-card .meta .go svg { width: .85em; height: .85em; transition: transform var(--dur-base) var(--ease-out); }
.art-card:hover .meta .go svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Newsletter / conversion panel
   -------------------------------------------------------------------------- */
.newsletter {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(34rem 20rem at 18% -20%, var(--brand-tint-2), transparent 70%),
    radial-gradient(30rem 18rem at 88% 120%, color-mix(in oklab, var(--deco-cool) 16%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
  text-align: center;
  box-shadow: var(--shadow-3);
}
.newsletter .eyebrow { justify-content: center; }
.newsletter .lead { margin-inline: auto; }

/* PWA install panel */
.pwa {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  background:
    radial-gradient(30rem 20rem at 10% -30%, var(--brand-tint-2), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-3);
}
.pwa-art {
  flex: 0 0 9rem;
  width: 9rem; height: 9rem;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-4);
}
.pwa-art svg { width: 100%; height: 100%; }
.pwa-t { flex: 1; min-width: 0; }
.pwa-btns { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }
.pwa-note { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-4); }
@media (max-width: 760px) {
  .pwa { flex-direction: column; text-align: center; }
  .pwa-btns { justify-content: center; }
  .pwa-t .eyebrow { justify-content: center; }
  .pwa-t .lead { margin-inline: auto; }
}
.pwa-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: var(--space-4) 0; }
@media (max-width: 480px) { .pwa-cols { grid-template-columns: 1fr; } }
.pwa-cols > div { background: var(--glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4); }
.pwa-cols b { display: block; font-family: var(--font-display); font-size: var(--text-md); color: var(--brand); margin-bottom: var(--space-2); }
.pwa-cols ul { margin: 0; padding-left: var(--space-5); }
.pwa-cols li { margin-bottom: var(--space-1); font-size: var(--text-base); }
.pwa-card ol { padding-left: var(--space-5); margin-bottom: var(--space-3); }
.pwa-card li { margin-bottom: var(--space-2); }
.pwa-card li b, .pwa-card p b { color: var(--text); }

/* --------------------------------------------------------------------------
   Instagram grid — real designed tiles, not grey boxes
   -------------------------------------------------------------------------- */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: var(--space-3);
  margin-top: var(--block-gap);
}
.ig-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-1);
  padding: var(--space-4);
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.ig-tile:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-4); border-color: var(--border-brand); }
.ig-tile svg.ig-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.ig-tile b, .ig-tile span { position: relative; z-index: 1; }
.ig-tile b { font-family: var(--font-display); font-size: var(--text-md); }
.ig-tile span { font-size: var(--text-xs); color: var(--text-muted); line-height: var(--leading-normal); }

/* --------------------------------------------------------------------------
   Decision-tree flow (Behaviour Centre)
   -------------------------------------------------------------------------- */
.flow { display: flex; flex-direction: column; max-width: 44rem; margin: var(--block-gap) auto 0; }
.flow-step {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.flow-step:hover { transform: translateX(6px); box-shadow: var(--shadow-3); }
.flow-step b { font-family: var(--font-display); font-size: var(--text-lg); color: var(--text); }
.flow-step p { font-size: var(--text-base); color: var(--text-muted); margin-top: var(--space-2); }
.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--brand);
  padding: var(--space-2) 0;
}
.flow-arrow svg { width: 1.1rem; height: 1.1rem; }

/* --------------------------------------------------------------------------
   Stories
   -------------------------------------------------------------------------- */
.story { cursor: pointer; text-align: left; width: 100%; }
.story-age {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--accent-warm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: var(--weight-medium);
}
.story-body {
  display: none;
  margin-top: var(--space-4);
  color: var(--text-body);
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  white-space: pre-line;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  max-width: var(--measure);
}
.story.open .story-body { display: block; animation: pageIn var(--dur-slow) var(--ease-out); }

/* --------------------------------------------------------------------------
   The personality test panel on the landing page
   -------------------------------------------------------------------------- */
.kyb {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(36rem 22rem at 8% -25%, var(--brand-tint-2), transparent 70%),
    radial-gradient(30rem 20rem at 95% 110%, color-mix(in oklab, var(--deco-plum) 14%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-3);
}
.kyb-head { max-width: var(--measure); margin-bottom: var(--space-5); }
.kyb .pf-wrap, .kyb .npt-wrap { max-width: none; }

.thrive-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .thrive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .thrive-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Strengths constellation
   -------------------------------------------------------------------------- */
#constWrap {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #0F2019 0%, #061410 100%);
  margin-top: var(--block-gap);
  box-shadow: var(--shadow-3);
}
#constel { display: block; width: 100%; height: 26rem; cursor: crosshair; }
#constLabel {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 24, 18, .88);
  border: 1px solid rgba(174, 216, 195, .22);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  max-width: 16rem;
  color: #E4EDE7;
  box-shadow: var(--shadow-4);
}
#constLabel b { font-family: var(--font-display); color: var(--green-bright); display: block; margin-bottom: 2px; }

/* --------------------------------------------------------------------------
   Preloader — a brief brand beat, not a gate. Removed as soon as fonts settle.
   -------------------------------------------------------------------------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: var(--bg);
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-5);
  transition: opacity var(--dur-slow) var(--ease-out), visibility var(--dur-slow);
}
#loader.done { opacity: 0; visibility: hidden; }
#loader svg { width: 4.5rem; height: 4.5rem; }
#loader .ldraw {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: ldraw 900ms var(--ease-out) forwards;
}
@keyframes ldraw { to { stroke-dashoffset: 0; } }
#loader p {
  font-family: var(--font-mono);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-size: var(--text-2xs);
  color: var(--text-muted);
}
@media (prefers-reduced-motion: reduce) {
  #loader .ldraw { animation: none; stroke-dashoffset: 0; }
}

/* --------------------------------------------------------------------------
   Read-aloud bar
   -------------------------------------------------------------------------- */
.ra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  background: var(--brand-tint);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0 var(--space-3);
}
.ra-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--brand);
  color: var(--text-on-brand);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  min-height: 2.5rem;
  font-weight: var(--weight-semi);
  font-size: var(--text-base);
}
.ra-stop {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
}
.ra-stop svg, .ra-play svg { width: .85rem; height: .85rem; }
.ra-lab { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.ra-lab select { max-width: 11rem; min-height: 2.25rem; padding: var(--space-1) var(--space-2); font-size: var(--text-sm); border-radius: var(--radius-sm); }
.ra-lab input[type=range] { width: 6rem; accent-color: var(--brand); }
.ra-lab output { font-family: var(--font-mono); font-size: var(--text-xs); min-width: 2.4em; }
.reader-card .ra-now {
  background: color-mix(in oklab, var(--deco-warm) 22%, transparent);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--deco-warm) 22%, transparent);
  transition: background var(--dur-base) var(--ease-out);
}

/* --------------------------------------------------------------------------
   Confetti (quiz completion)
   -------------------------------------------------------------------------- */
.confetti {
  position: fixed;
  width: 9px; height: 9px;
  z-index: var(--z-toast);
  pointer-events: none;
  border-radius: 2px;
  animation: confFall 1.7s var(--ease-in-out) forwards;
}
@keyframes confFall {
  to { transform: translateY(104svh) rotate(680deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }