/* ============================================
   Coinlio — home page
   Depends on /assets/style.css tokens.
   Motion contract: everything animated here is either (a) triggered once by
   .viz-on / .is-visible from site.js, or (b) an ambient loop that stops under
   prefers-reduced-motion (handled globally in style.css).
   ============================================ */

/* ─────────────────────────────────────────────
   1. HERO
   ───────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 92px var(--gutter) 0;
  overflow: hidden;
  isolation: isolate;
}

/* Aurora: two slow-drifting brand blooms over a deep base */
.hero-aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 900px;
  z-index: -2;
  pointer-events: none;
}

.hero-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-aurora span:nth-child(1) {
  width: 720px;
  height: 520px;
  top: 4%;
  left: 50%;
  margin-left: -360px;
  background: radial-gradient(ellipse, rgba(255, 138, 102, 0.34), transparent 68%);
  animation: auroraA 22s var(--ease-out) infinite alternate;
}

.hero-aurora span:nth-child(2) {
  width: 520px;
  height: 420px;
  top: 26%;
  left: 12%;
  background: radial-gradient(ellipse, rgba(245, 176, 66, 0.2), transparent 70%);
  animation: auroraB 26s var(--ease-out) infinite alternate;
}

.hero-aurora span:nth-child(3) {
  width: 480px;
  height: 400px;
  top: 18%;
  right: 8%;
  background: radial-gradient(ellipse, rgba(90, 157, 245, 0.14), transparent 72%);
  animation: auroraB 30s var(--ease-out) infinite alternate-reverse;
}

@keyframes auroraA {
  to {
    transform: translate3d(-40px, 26px, 0) scale(1.1);
  }
}

@keyframes auroraB {
  to {
    transform: translate3d(48px, -30px, 0) scale(1.14);
  }
}

/* Engineering grid — signals "instrument", fades out downward */
.hero-grid {
  position: absolute;
  inset: 0 0 auto 0;
  height: 780px;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 62% at 50% 22%, #000 10%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 80% 62% at 50% 22%, #000 10%, transparent 76%);
}

.hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

/* Eyebrow: the three pillars, stated before the headline */
.hero-pillars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.hero-pillars b {
  font-weight: 600;
  color: var(--text-primary);
}

.hero-pillars i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-start);
  margin: 0 8px;
  opacity: 0.6;
}

.hero-pillars .hero-pillars-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--positive-tint);
  color: var(--positive);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.hero-pillars .hero-pillars-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(79, 168, 106, 0.6);
  animation: pulseDot 2.6s ease-out infinite;
}

@keyframes pulseDot {
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(79, 168, 106, 0);
  }
}

.hero h1 {
  font-size: clamp(38px, 6.2vw, 74px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
  color: var(--text-primary);
}

/* Each clause animates in on load — reads like a sentence being written */
.hero h1 span {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: lineUp 0.9s var(--ease-out) forwards;
}

.hero h1 span:nth-child(1) {
  animation-delay: 0.05s;
}

.hero h1 span:nth-child(2) {
  animation-delay: 0.17s;
}

.hero h1 span:nth-child(3) {
  animation-delay: 0.29s;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes lineUp {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-sub {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--text-secondary);
  max-width: 660px;
  margin: 0 auto 34px;
  line-height: 1.72;
  opacity: 0;
  animation: lineUp 0.9s var(--ease-out) 0.42s forwards;
}

.hero-sub strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
  opacity: 0;
  animation: lineUp 0.9s var(--ease-out) 0.54s forwards;
}

/* Light sweep across the primary CTA — one accent moment, not a loop on everything */
.hero-ctas .btn-primary {
  position: relative;
  overflow: hidden;
  padding: 16px 30px;
  font-size: 16px;
}

.hero-ctas .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: sweep 5.5s ease-in-out 2s infinite;
}

@keyframes sweep {
  0%,
  42% {
    left: -60%;
  }
  72%,
  100% {
    left: 130%;
  }
}

.hero-trust {
  display: flex;
  gap: 8px 22px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: lineUp 0.9s var(--ease-out) 0.66s forwards;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.hero-trust svg {
  color: var(--brand-start);
  flex-shrink: 0;
}

/* ── Hero stage: device + floating readouts ── */
.hero-stage {
  position: relative;
  max-width: 980px;
  margin: 56px auto 0;
  padding-bottom: 8px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  animation: stageIn 1.2s var(--ease-out) 0.7s forwards;
}

@keyframes stageIn {
  to {
    opacity: 1;
  }
}

.device {
  position: relative;
  width: 306px;
  flex-shrink: 0;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #2A313C, #0E1319 42%, #22283180 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--inset-ring) inset,
    0 40px 90px rgba(255, 138, 102, 0.1);
  z-index: 2;
}

.device::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #05070A;
  z-index: 3;
}

.device-screen {
  border-radius: 36px;
  overflow: hidden;
  background: #05070A;
  display: block;
}

.device-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.device-screen .shot-light {
  display: none;
}

html[data-theme='light'] .device-screen .shot-dark {
  display: none;
}

html[data-theme='light'] .device-screen .shot-light {
  display: block;
}

/* Secondary devices sit behind, angled, dimmed — depth without clutter */
.device-aside {
  position: absolute;
  bottom: 42px;
  width: 224px;
  border-radius: 34px;
  padding: 8px;
  background: linear-gradient(160deg, #222933, #0C1016);
  box-shadow: var(--shadow-md);
  opacity: 0.68;
  filter: saturate(0.8);
  z-index: 1;
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}

.device-aside .device-screen {
  border-radius: 27px;
}

.device-aside.left {
  left: 6%;
  transform: perspective(1400px) rotateY(16deg) translateX(var(--drift-x, 0)) scale(0.96);
}

.device-aside.right {
  right: 6%;
  transform: perspective(1400px) rotateY(-16deg) translateX(var(--drift-x, 0)) scale(0.96);
}

html[data-theme='light'] .device {
  background: linear-gradient(160deg, #F2EEE8, #D4CFC7 42%, #E4DFD7 100%);
}

html[data-theme='light'] .device-screen {
  background: #F4F4F6;
}

html[data-theme='light'] .device-aside {
  background: linear-gradient(160deg, #E8E3DC, #C9C4BC);
}

.hero-stage:hover .device-aside {
  opacity: 0.9;
}

/* Floating glass readouts — real metric names, clearly illustrative values */
.readout {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-glass);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow-md);
  transform: translate3d(var(--drift-x, 0), var(--drift-y, 0), 0);
}

.readout-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 3px;
}

.readout-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.readout-value small {
  font-size: 12px;
  font-weight: 600;
  color: var(--positive);
  margin-left: 6px;
}

.readout-spark {
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.readout-a {
  top: 16%;
  left: 2%;
  animation: floatA 7s ease-in-out infinite;
}

.readout-b {
  top: 44%;
  right: 0;
  animation: floatB 8.4s ease-in-out infinite;
}

.readout-c {
  bottom: 12%;
  left: 12%;
  animation: floatB 9.2s ease-in-out infinite reverse;
}

@keyframes floatA {
  50% {
    transform: translate3d(var(--drift-x, 0), calc(var(--drift-y, 0px) - 12px), 0);
  }
}

@keyframes floatB {
  50% {
    transform: translate3d(var(--drift-x, 0), calc(var(--drift-y, 0px) + 10px), 0);
  }
}

.readout-ring {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.readout-ring circle {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}

.readout-ring .ring-track {
  stroke: var(--wire);
}

.readout-ring .ring-value {
  stroke: url(#brandStroke);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: ringFill 1.6s var(--ease-out) 1.3s forwards;
}

@keyframes ringFill {
  to {
    stroke-dashoffset: 32;
  }
}

/* ─────────────────────────────────────────────
   2. MARQUEE / PROOF STRIP
   ───────────────────────────────────────────── */
.strip {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-sunken);
  padding: 22px 0;
  overflow: hidden;
  position: relative;
}

.strip::before,
.strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}

.strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface-sunken), transparent);
}

.strip::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface-sunken), transparent);
}

.strip-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  will-change: transform;
}

.strip-track.is-js {
  animation: none;
}

.strip-set {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  flex: none;
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.strip-item b {
  color: var(--text-secondary);
  font-weight: 600;
}

.strip-item svg {
  color: var(--brand-start);
  opacity: 0.8;
}

/* ─────────────────────────────────────────────
   3. PILLAR CARDS
   ───────────────────────────────────────────── */
.pillar-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 54px;
}

.pillar-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-secondary), var(--surface-sunken));
  border: 1px solid var(--hairline);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.pillar-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.pillar-card:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pillar-card:hover::after {
  transform: scaleX(1);
}

.pillar-card-viz {
  height: 104px;
  margin-bottom: 22px;
}

.pillar-card-viz svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pillar-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 18px;
}

.pillar-card-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-start);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: gap 0.25s var(--ease-out);
}

.pillar-card:hover .pillar-card-more {
  gap: 12px;
}

/* Mini-viz primitives shared by the three cards */
.viz-stroke {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html.js .viz-draw {
  stroke-dasharray: var(--len, 320);
  stroke-dashoffset: var(--len, 320);
  transition: stroke-dashoffset 1.5s var(--ease-out);
}

html.js .viz-on .viz-draw {
  stroke-dashoffset: 0;
}

html.js .viz-bar {
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.75s var(--ease-spring);
}

html.js .viz-on .viz-bar {
  transform: scaleY(1);
}

html.js .viz-fade {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out) 0.5s;
}

html.js .viz-on .viz-fade {
  opacity: 1;
}

/* Segmented arcs cannot be dash-animated without losing their offsets,
   so they arrive with a rotation instead. */
html.js .viz-pop {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-26deg) scale(0.88);
  transition: opacity 0.7s var(--ease-out), transform 0.95s var(--ease-spring);
}

html.js .viz-on .viz-pop {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────────────────────────
   4. PILLAR BLOCKS (alternating)
   ───────────────────────────────────────────── */
.block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.block.reverse .block-media {
  order: 2;
}

.block-copy h2 {
  font-size: clamp(27px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 18px;
}

.block-copy > p {
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 26px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
}

.feature-list li {
  list-style: none;
  display: flex;
  gap: 14px;
}

.feature-list .fl-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-tint);
  border: 1px solid var(--border-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-start);
}

.feature-list h4 {
  font-size: 15.5px;
  font-weight: 650;
  margin-bottom: 4px;
}

.feature-list p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.68;
}

.note-line {
  font-size: 13.5px;
  color: var(--text-tertiary);
  line-height: 1.7;
  padding-left: 14px;
  border-left: 1px solid var(--border-brand);
}

/* Media frame used for real screenshots */
.shot {
  position: relative;
  display: flex;
  justify-content: center;
}

.shot-device {
  width: 292px;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2A313C, #0E1319 46%, #1E242D 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--inset-ring) inset;
}

html[data-theme='light'] .shot-device {
  background: linear-gradient(160deg, #F2EEE8, #D4CFC7 46%, #E4DFD7 100%);
}

.shot-device .device-screen {
  border-radius: 35px;
}

.shot-glow {
  position: absolute;
  inset: 12% -6% 8% -6%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 138, 102, 0.16), transparent 70%);
  filter: blur(46px);
  z-index: -1;
}

.shot-caption {
  position: absolute;
  bottom: -14px;
  right: 2%;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--hairline-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
}

.shot-caption b {
  color: var(--text-primary);
}

/* ─────────────────────────────────────────────
   5. METRIC LAB (analytics pillar)
   ───────────────────────────────────────────── */
.lab {
  margin-top: 56px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface-raised), var(--surface-sunken));
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.lab-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  background: var(--wash);
  overflow-x: auto;
  scrollbar-width: none;
}

.lab-tabs::-webkit-scrollbar {
  display: none;
}

.lab-tab {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: none;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.22s, background 0.22s, border-color 0.22s;
}

.lab-tab:hover {
  color: var(--text-primary);
}

.lab-tab.is-active {
  color: var(--brand-start);
  background: var(--brand-tint);
  border-color: var(--border-brand);
}

.lab-panel {
  display: none;
  grid-template-columns: 1.25fr 1fr;
  min-height: 372px;
}

.lab-panel.is-active {
  display: grid;
  animation: panelIn 0.5s var(--ease-out);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.lab-viz {
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--hairline);
  background: radial-gradient(120% 100% at 0% 0%, rgba(255, 138, 102, 0.05), transparent 60%);
}

.lab-viz-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.lab-viz-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.lab-figure {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
}

.lab-figure small {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0;
  font-family: var(--font-sans);
}

.lab-chart {
  flex: 1;
  min-height: 190px;
}

.lab-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lab-axis {
  stroke: var(--axis);
  stroke-width: 1;
}

.lab-axis-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text-tertiary);
}

.lab-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-tertiary);
}

.lab-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lab-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.lab-meta {
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.lab-meta h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.24;
}

.lab-meta p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.74;
}

.lab-formula {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--brand-start);
  background: rgba(255, 138, 102, 0.07);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  line-height: 1.6;
  overflow-x: auto;
}

.lab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-start);
  text-decoration: none;
  transition: gap 0.25s var(--ease-out);
}

.lab-link:hover {
  gap: 13px;
  text-decoration: underline;
}

.lab-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-top: 1px solid var(--hairline);
  background: var(--surface-sunken);
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.lab-foot-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lab-foot-links a {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.lab-foot-links a:hover {
  border-color: var(--border-brand);
  color: var(--brand-start);
  background: var(--brand-tint);
}

/* ─────────────────────────────────────────────
   6. LEDGER FLOW (tax-grade pillar)
   ───────────────────────────────────────────── */
.flow {
  position: relative;
  padding: 34px 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--hairline);
  background: linear-gradient(150deg, var(--surface-raised), var(--surface-sunken));
  box-shadow: var(--shadow-md);
}

.flow svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.flow-hint {
  display: none;
}

/* Dashes travel along the pipeline — the only looping motion in this section */
.flow-wire {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.5;
}

.flow-pulse {
  fill: none;
  stroke: url(#brandStroke);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 10 118;
  animation: wireFlow 3.4s linear infinite;
}

@keyframes wireFlow {
  to {
    stroke-dashoffset: -128;
  }
}

.flow-node {
  fill: var(--bg-secondary);
  stroke: var(--hairline-strong);
  stroke-width: 1;
}

.flow-node-live {
  stroke: rgba(79, 168, 106, 0.45);
}

.flow-node-wip {
  stroke: var(--border-brand);
}

.flow-label {
  font-size: 11.5px;
  font-weight: 650;
  fill: var(--text-primary);
}

.flow-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  fill: var(--text-tertiary);
}

.flow-status {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────────
   7. ARCHITECTURE / TRUST
   ───────────────────────────────────────────── */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.boundary {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
}

.boundary-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--hairline);
}

.boundary-head span {
  padding: 13px 18px;
}

.boundary-head span:first-child {
  border-right: 1px solid var(--hairline);
  color: var(--positive);
}

.boundary-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.boundary-col {
  padding: 8px 0;
}

.boundary-col:first-child {
  border-right: 1px solid var(--hairline);
  background: rgba(79, 168, 106, 0.04);
}

.boundary-col li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.boundary-col svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.boundary-col:first-child svg {
  color: var(--positive);
}

.boundary-col:last-child svg {
  color: var(--text-tertiary);
}

.spec-list {
  display: grid;
  gap: 1px;
  margin-top: 26px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 18px;
  background: var(--bg-secondary);
  font-size: 13.5px;
}

.spec-list dt {
  color: var(--text-tertiary);
}

.spec-list dd {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-align: right;
}

/* ─────────────────────────────────────────────
   10. FAQ  (accordion primitives live in style.css)
   ───────────────────────────────────────────── */

.faq-more {
  text-align: center;
  margin-top: 30px;
}

/* ─────────────────────────────────────────────
   11. FINAL CTA
   ───────────────────────────────────────────── */
.final {
  position: relative;
  text-align: center;
  padding: 118px var(--gutter);
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(255, 138, 102, 0.14), transparent 70%),
    var(--bg-deep);
}

.final-rings {
  position: absolute;
  inset: auto 50% 0 auto;
  transform: translateX(50%);
  width: 1100px;
  max-width: 200%;
  pointer-events: none;
  opacity: 0.5;
}

.final h2 {
  font-size: clamp(31px, 4.8vw, 54px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  position: relative;
}

.final > p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 38px;
  line-height: 1.7;
  position: relative;
}

.final-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
}

.final-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.qr {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  box-shadow: var(--shadow-md);
}

.qr img {
  width: 104px;
  height: 104px;
  display: block;
}

.qr span {
  font-size: 10.5px;
  color: #4A4A4A;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   12. RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .device-aside {
    display: none;
  }

  .readout-a {
    left: 0;
    top: 6%;
  }

  .readout-c {
    left: 0;
    bottom: 6%;
  }
}

@media (max-width: 960px) {
  .block,
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .block.reverse .block-media {
    order: 0;
  }

  .pillar-cards {
    grid-template-columns: 1fr;
  }

  .lab-panel.is-active {
    grid-template-columns: 1fr;
  }

  .lab-viz {
    border-right: none;
    border-bottom: 1px solid var(--hairline);
  }

}

@media (max-width: 720px) {
  .hero {
    padding-top: 64px;
  }

  .hero-pillars {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 14px;
    row-gap: 6px;
  }

  .hero-pillars i {
    margin: 0 4px;
  }

  .hero-stage {
    margin-top: 42px;
  }

  .device {
    width: 258px;
  }

  .readout {
    padding: 10px 13px;
    gap: 9px;
  }

  .readout-value {
    font-size: 15px;
  }

  .readout-b {
    right: -2%;
  }

  .readout-c {
    display: none;
  }

  .boundary-head,
  .boundary-body {
    grid-template-columns: 1fr;
  }

  .boundary-head span:first-child,
  .boundary-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--hairline);
  }

  .lab-viz,
  .lab-meta {
    padding: 24px 22px;
  }

  .qr {
    display: none;
  }

  .shot-device {
    width: 250px;
  }

  /* The pipeline stays legible by scrolling rather than shrinking to nothing */
  .flow {
    padding: 26px 0 20px;
  }

  .flow-scroll {
    overflow-x: auto;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .flow-scroll::-webkit-scrollbar {
    display: none;
  }

  .flow-scroll svg {
    width: 700px;
    max-width: none;
  }

  .flow-hint {
    display: block;
    margin: 14px 20px 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }
}

/* Inline SVG fills/strokes that were authored for dark paper */
html[data-theme='light'] svg [fill='rgba(255,255,255,0.04)'] { fill: rgba(17, 24, 39, 0.04); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.07)'] { fill: rgba(17, 24, 39, 0.06); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.09)'] { fill: rgba(17, 24, 39, 0.08); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.1)'] { fill: rgba(17, 24, 39, 0.09); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.12)'] { fill: rgba(17, 24, 39, 0.1); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.14)'] { fill: rgba(17, 24, 39, 0.12); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.16)'] { fill: rgba(17, 24, 39, 0.14); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.22)'] { fill: rgba(17, 24, 39, 0.18); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.26)'] { fill: rgba(17, 24, 39, 0.22); }
html[data-theme='light'] svg [fill='rgba(255,255,255,0.3)'] { fill: rgba(17, 24, 39, 0.28); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.06)'] { stroke: rgba(17, 24, 39, 0.08); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.08)'] { stroke: rgba(17, 24, 39, 0.1); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.09)'] { stroke: rgba(17, 24, 39, 0.12); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.12)'] { stroke: rgba(17, 24, 39, 0.14); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.16)'] { stroke: rgba(17, 24, 39, 0.16); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.22)'] { stroke: rgba(17, 24, 39, 0.2); }
html[data-theme='light'] svg [stroke='rgba(255,255,255,0.4)'] { stroke: rgba(17, 24, 39, 0.28); }
html[data-theme='light'] svg [fill='#0D1117'],
html[data-theme='light'] svg [fill='#151C25'] {
  fill: var(--bg-primary);
}
