/* ============================================================
   MEY — Design system
   Palette: warm ivory paper, warm ink, burnt-sienna clay
   Type:    Source Serif 4 (display) · Manrope (body) · IBM Plex Mono (system)
   ============================================================ */

:root {
  /* Color */
  --paper: #FAF9F5;
  --paper-2: #F2F0E8;
  --paper-3: #EAE7DC;
  --ink: #20201E;
  --ink-soft: #3A3934;
  --slate: #63615A;
  --line: #E5E2D6;
  --line-strong: #D6D2C2;
  --clay: #C05A32;
  --clay-deep: #9E4826;
  --clay-soft: #F4E4DB;
  --night: #21201E;
  --night-2: #2A2926;
  --night-3: #34322E;
  --night-line: #3E3C37;
  --night-text: #EDEAE1;
  --night-slate: #A3A096;
  --live: #4C8055;
  --live-soft: #E3EDE4;
  --amber: #B98A2F;

  /* Themed surfaces (overridden in dark mode) */
  --card: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.6);
  --nav-glass: rgba(250, 249, 245, 0.82);
  --hover-tint: rgba(32, 32, 30, 0.03);
  --input-focus: #FFFFFF;
  --shadow-soft: 0 24px 48px -20px rgba(32, 32, 30, 0.16);

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Manrope", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  /* Motion */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.45, 0, 0.15, 1);

  /* Layout */
  --max: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 18px;
  --radius-lg: 26px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  position: relative;
  transition: background-color 0.45s ease, color 0.45s ease;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle paper grain — gives the cream/charcoal surfaces a physical texture
   instead of reading as flat digital color. Fixed so it doesn't scroll or
   repaint, extremely low opacity, and skipped entirely for reduced-motion
   or print so it never gets in the way. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}
html[data-theme="dark"] body::before { opacity: 0.05; mix-blend-mode: overlay; }
@media (prefers-reduced-motion: reduce) { body::before { display: none; } }
@media print { body::before { display: none; } }

::selection { background: var(--clay); color: #fff; }

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

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  font-size: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
}

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Typography scale ---------- */
h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--clay);
  opacity: 0.7;
}

.section-head { max-width: 780px; margin-bottom: clamp(48px, 7vw, 84px); }
.section-head h2 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  margin: 20px 0 22px;
}
.section-head p {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--slate);
  line-height: 1.6;
  max-width: 640px;
}

section { padding-block: clamp(96px, 12vw, 168px); position: relative; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  width: 100%; height: 2px;
  background: transparent;
  pointer-events: none;
}
.progress__bar {
  height: 100%; width: 0%;
  background: var(--clay);
  transition: width 80ms linear;
}

/* ---------- Buttons: every click animates ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    transform 0.45s var(--spring),
    box-shadow 0.35s var(--ease-out),
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.96); transition-duration: 0.08s; }

.btn--primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 1px 2px rgba(158, 72, 38, 0.25), 0 8px 24px -8px rgba(192, 90, 50, 0.45);
}
.btn--primary:hover {
  background: var(--clay-deep);
  box-shadow: 0 2px 4px rgba(158, 72, 38, 0.3), 0 14px 32px -8px rgba(192, 90, 50, 0.55);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--hover-tint); }

.btn--night {
  background: var(--night-text);
  color: var(--night);
}
.btn--night:hover { background: #fff; }

.btn--sm { padding: 11px 22px; font-size: 0.92rem; }

.btn .arrow {
  display: inline-block;
  transition: transform 0.35s var(--spring);
}
.btn:hover .arrow { transform: translate(3px, -3px); }

/* Ripple (injected by JS on pointerdown) */
.ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  animation: ripple 0.65s var(--ease-out) forwards;
  z-index: -1;
}
@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* Pop feedback for chips/toggles */
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.is-popping { animation: pop 0.35s var(--spring); }

:focus-visible {
  outline: 2.5px solid var(--clay);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.is-scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 13px; }

/* Logo placeholder — swap for the real mark later */
.logo-slot {
  width: 42px; height: 42px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--clay);
  background: var(--glass);
  transition: transform 0.4s var(--spring), border-color 0.3s ease;
}
.brand:hover .logo-slot { transform: rotate(-6deg) scale(1.05); border-color: var(--clay); }
.brand__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__link { white-space: nowrap; }
.nav__links .btn { white-space: nowrap; flex-shrink: 0; }
.nav__link {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}
.nav__burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.orb--1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(192, 90, 50, 0.22), transparent 65%);
  top: -140px; right: -120px;
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb--2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(185, 138, 47, 0.14), transparent 65%);
  bottom: -160px; left: -140px;
  animation: drift2 26s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-60px, 70px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(70px, -50px) scale(1.05); } }

/* Cursor-following glow — a soft light that drifts toward the pointer.
   Desktop-only (pointer:fine), respects reduced motion, and fades in only
   after the first real mouse move so it never flashes on page load. */
.cursor-glow {
  position: absolute;
  top: 0; left: 0;
  width: 480px; height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 90, 50, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}
html[data-theme="dark"] .cursor-glow {
  background: radial-gradient(circle, rgba(210, 105, 63, 0.14), transparent 70%);
}
.cursor-glow.is-active { opacity: 1; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

.hero__inner { position: relative; z-index: 1; max-width: 980px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 18px;
  background: var(--glass);
  margin-bottom: 36px;
}
.hero__badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }

.hero h1 {
  font-size: clamp(3.1rem, 8.2vw, 6.6rem);
  font-weight: 600;
  line-height: 1.02;
  margin-bottom: 34px;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .word {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 0.9s var(--ease-out) forwards;
}
.hero h1 em {
  font-style: italic;
  color: var(--clay);
}
@keyframes rise { to { transform: translateY(0); } }

.hero__sub {
  font-size: clamp(1.18rem, 1.9vw, 1.42rem);
  color: var(--slate);
  max-width: 620px;
  line-height: 1.6;
  margin-bottom: 42px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.75s forwards;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.95s forwards;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 1.15s forwards;
}
.meta-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.95rem;
  transition: transform 0.4s var(--spring), border-color 0.3s ease;
}
.meta-chip:hover { transform: translateY(-3px); border-color: var(--clay); }
.meta-chip strong { font-weight: 800; }
.meta-chip span { color: var(--slate); font-size: 0.88rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--slate);
  opacity: 0;
  animation: fadeUp 1s ease 1.6s forwards;
}
.scroll-cue__track {
  width: 1.5px; height: 46px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.scroll-cue__track::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--clay);
  animation: cueDrop 1.8s var(--ease-smooth) infinite;
}
@keyframes cueDrop {
  0% { top: -50%; }
  70%, 100% { top: 110%; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* ---------- Marquee ---------- */
.marquee-band {
  padding-block: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
}
.marquee {
  display: flex;
  gap: 72px;
  width: max-content;
  animation: tape 32s linear infinite;
}
.marquee-band:hover .marquee { animation-play-state: paused; }
.marquee span {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--slate);
  white-space: nowrap;
  transition: color 0.25s ease;
}
.marquee span:hover { color: var(--clay); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- MEY means ---------- */
.mey-means { background: var(--paper); }
.means-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.means-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(34px, 4vw, 52px) clamp(28px, 3vw, 42px);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease, border-color 0.3s ease;
}
.means-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -20px rgba(32, 32, 30, 0.16);
  border-color: var(--line-strong);
}
.means-card .letter {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--clay);
  opacity: 0.16;
  position: absolute;
  top: 14px; right: 24px;
  transition: opacity 0.35s ease, transform 0.5s var(--spring);
}
.means-card:hover .letter { opacity: 0.32; transform: scale(1.08) rotate(3deg); }
.means-card h3 {
  font-size: 1.85rem;
  margin-bottom: 14px;
}
.means-card p { color: var(--slate); font-size: 1.06rem; }

/* ---------- Dark chapter: The system, alive ---------- */
.chapter-dark {
  background: var(--night);
  color: var(--night-text);
}
.chapter-dark .eyebrow { color: #E08B63; }
.chapter-dark .eyebrow::before { background: #E08B63; }
.chapter-dark .section-head p { color: var(--night-slate); }

.system-stage {
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
}
.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.stage-title {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--night-slate);
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9FCCA6;
  border: 1px solid rgba(159, 204, 166, 0.35);
  padding: 7px 14px;
  border-radius: 999px;
}
.live-pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7FBF88;
  animation: blink 1.8s ease-in-out infinite;
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr 56px 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 44px;
}
.pnode {
  background: var(--night-3);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s var(--spring);
  position: relative;
}
.pnode__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--night-line);
  margin-bottom: 16px;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.pnode h4 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; margin-bottom: 5px; }
.pnode__status {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--night-slate);
  min-height: 1.3em;
  transition: color 0.3s ease;
}
.pnode.is-active {
  border-color: rgba(224, 139, 99, 0.75);
  box-shadow: 0 0 0 1px rgba(224, 139, 99, 0.35), 0 14px 40px -14px rgba(192, 90, 50, 0.5);
  transform: translateY(-4px);
}
.pnode.is-active .pnode__icon {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}
.pnode.is-active .pnode__status { color: #E9C9B5; }
.pnode.is-done { border-color: rgba(127, 191, 136, 0.4); }
.pnode.is-done .pnode__icon { color: #9FCCA6; border-color: rgba(127, 191, 136, 0.4); }

.pconn {
  position: relative;
  align-self: center;
  height: 2px;
  background: var(--night-line);
  margin-top: 30px;
  overflow: visible;
}
.pconn__fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--clay), #E08B63);
  transition: transform 0.9s var(--ease-smooth);
}
.pconn.is-filled .pconn__fill { transform: scaleX(1); }
.pconn__pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #E08B63;
  box-shadow: 0 0 14px 4px rgba(224, 139, 99, 0.55);
  transform: translate(-6px, -50%);
  opacity: 0;
}
.pconn.is-pulsing .pconn__pulse { animation: pulseTravel 0.9s var(--ease-smooth) forwards; }
@keyframes pulseTravel {
  0% { opacity: 0; left: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; left: 100%; }
}

/* Telemetry + feed */
.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
}
.telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tcard {
  background: var(--night-3);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  padding: 22px 18px;
}
.tcard .num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.tcard .num .unit { font-size: 0.55em; color: var(--night-slate); font-family: var(--mono); margin-left: 2px; }
.tcard .lbl {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night-slate);
}
.feed {
  background: var(--night-3);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  min-height: 190px;
}
.feed__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--night-slate);
  margin-bottom: 14px;
}
.feed__list { display: flex; flex-direction: column; gap: 11px; }
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
}
.feed-item.is-in { opacity: 1; transform: translateY(0); }
.feed-item .fi-ic {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  background: rgba(224, 139, 99, 0.14);
  color: #E08B63;
  flex-shrink: 0;
}
.feed-item .fi-ic.ok { background: rgba(127, 191, 136, 0.14); color: #9FCCA6; }
.feed-item small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--night-slate);
}

/* ---------- Services ---------- */
.services { background: var(--paper); }
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.svc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 3.4vw, 46px);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease, border-color 0.3s ease;
}
.svc-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 56px -24px rgba(32, 32, 30, 0.18);
  border-color: var(--line-strong);
}
.svc-card__flag {
  position: absolute;
  top: -13px; right: 24px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  background: var(--clay-soft);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 14px -6px rgba(32, 32, 30, 0.25);
}
.svc-card__icon {
  width: 54px; height: 54px;
  border-radius: 15px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  transition: transform 0.45s var(--spring), background 0.3s ease;
}
.svc-card:hover .svc-card__icon { transform: rotate(-5deg) scale(1.06); background: var(--clay-soft); }
.svc-card__icon svg { width: 26px; height: 26px; stroke: var(--clay); }
.svc-card h3 { font-size: 1.75rem; margin-bottom: 12px; }
.svc-card > p { color: var(--slate); font-size: 1.06rem; margin-bottom: 22px; }
.svc-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.svc-card li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 1rem;
  color: var(--ink-soft);
}
.svc-card li::before {
  content: "→";
  color: var(--clay);
  font-weight: 700;
  flex-shrink: 0;
}
.svc-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Capability lab ---------- */
.lab { background: var(--paper-2); }
.lab-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.tab {
  position: relative;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--slate);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.4s var(--spring);
}
.tab:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.tab:active { transform: scale(0.95); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab__progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1;
}
.tab.is-active .tab__progress { animation: tabFill var(--tab-dur, 7s) linear forwards; }
@keyframes tabFill { to { transform: scaleX(1); } }

.lab-stage { position: relative; }
.lab-panel {
  display: none;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  animation: panelIn 0.6s var(--ease-out);
}
.lab-panel.is-active { display: grid; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.lab-copy .tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin-bottom: 16px;
}
.lab-copy h3 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 18px; }
.lab-copy > p { color: var(--slate); font-size: 1.08rem; margin-bottom: 24px; }
.lab-copy ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 22px; }
.lab-copy li { display: flex; gap: 12px; align-items: baseline; font-size: 1rem; }
.lab-copy li::before { content: "✓"; color: var(--live); font-weight: 700; }
.lab-copy .note { font-size: 0.88rem; color: var(--slate); font-style: italic; }

/* Mock device screen */
.screen {
  background: var(--night);
  border-radius: 20px;
  border: 1px solid var(--night-line);
  box-shadow: 0 34px 80px -30px rgba(32, 32, 30, 0.4);
  overflow: hidden;
  color: var(--night-text);
  font-size: 0.92rem;
}
.screen__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--night-line);
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--night-slate);
}
.screen__bar .dots { display: flex; gap: 6px; }
.screen__bar .dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--night-3);
  border: 1px solid var(--night-line);
}
.screen__bar .path { margin-left: 10px; letter-spacing: 0.08em; }
.screen__body { padding: 22px; min-height: 330px; }

/* --- Lab demo internals --- */
.frow {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  opacity: 0.45;
  transition: opacity 0.4s ease, border-color 0.4s ease;
}
.frow.is-processing { opacity: 1; border-color: rgba(224, 139, 99, 0.6); }
.frow.is-done { opacity: 1; border-color: rgba(127, 191, 136, 0.45); }
.frow .ftype {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(224, 139, 99, 0.15);
  color: #E08B63;
}
.frow .fstat {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--night-slate);
  width: 20px;
  text-align: center;
}
.frow .spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--night-line);
  border-top-color: #E08B63;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.frow.is-processing .spinner { display: block; }
.frow.is-processing .fcheck { display: none; }
.frow .fcheck { color: #9FCCA6; display: none; }
.frow.is-done .fcheck { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.xtract { margin-top: 20px; }
.xtract__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--night-slate);
  margin-bottom: 12px;
}
.xtract__head .conf { color: #9FCCA6; }
.xbar { margin-bottom: 11px; }
.xbar .xlbl {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 5px;
}
.xbar .xlbl small { font-family: var(--mono); color: var(--night-slate); }
.xbar .xtrack {
  height: 5px;
  background: var(--night-3);
  border-radius: 99px;
  overflow: hidden;
}
.xbar .xfill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--clay), #E08B63);
  transition: width 1.1s var(--ease-smooth);
}
.xbar.warn .xfill { background: linear-gradient(90deg, #8A6420, #C9A24B); }
.risk-flag {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: 11px;
  background: rgba(201, 162, 75, 0.12);
  border: 1px solid rgba(201, 162, 75, 0.4);
  font-size: 0.9rem;
  color: #E4C88A;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.risk-flag.is-in { opacity: 1; transform: translateY(0); }
.risk-flag .rf-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #C9A24B;
  animation: blink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

/* Search demo */
.search-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 0.88rem;
  margin-bottom: 18px;
}
.search-line .prompt { color: #E08B63; }
.search-line .caret {
  width: 8px; height: 17px;
  background: var(--night-text);
  animation: blink 1s steps(1) infinite;
}
.result-card {
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 15px 17px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
}
.result-card.is-in { opacity: 1; transform: translateY(0); }
.result-card h5 { font-family: var(--sans); font-size: 0.98rem; font-weight: 700; margin-bottom: 5px; }
.result-card p { font-size: 0.86rem; color: var(--night-slate); margin-bottom: 9px; }
.cite {
  display: inline-flex;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #E08B63;
  background: rgba(224, 139, 99, 0.12);
  border: 1px solid rgba(224, 139, 99, 0.3);
  padding: 4px 9px;
  border-radius: 6px;
  margin-right: 6px;
}

/* Parser demo */
.doc-scan { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-sheet {
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.doc-sheet .dl {
  height: 8px;
  border-radius: 4px;
  background: var(--night-3);
  margin-bottom: 10px;
}
.doc-sheet .dl.w60 { width: 60%; } .doc-sheet .dl.w85 { width: 85%; }
.doc-sheet .dl.w45 { width: 45%; } .doc-sheet .dl.w75 { width: 75%; }
.scanbeam {
  position: absolute;
  left: 0; right: 0;
  height: 34px;
  top: -40px;
  background: linear-gradient(180deg, transparent, rgba(224, 139, 99, 0.22), transparent);
  border-top: 1px solid rgba(224, 139, 99, 0.5);
}
.is-scanning .scanbeam { animation: scan 2.2s var(--ease-smooth) infinite; }
@keyframes scan { 0% { top: -40px; } 100% { top: 105%; } }
.json-out {
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.75;
}
.json-out .row { opacity: 0; transform: translateX(8px); transition: opacity 0.45s ease, transform 0.45s ease; }
.json-out .row.is-in { opacity: 1; transform: translateX(0); }
.json-out .k { color: #E08B63; }
.json-out .v { color: #9FCCA6; }
.json-out .p { color: var(--night-slate); }

/* Vision demo */
.vision-box {
  position: relative;
  background: repeating-linear-gradient(45deg, var(--night-2), var(--night-2) 12px, var(--night-3) 12px, var(--night-3) 24px);
  border: 1px solid var(--night-line);
  border-radius: 12px;
  height: 300px;
  overflow: hidden;
}
.bbox {
  position: absolute;
  border: 2px solid #E08B63;
  border-radius: 8px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s ease, transform 0.5s var(--spring);
}
.bbox.is-in { opacity: 1; transform: scale(1); }
.bbox .blabel {
  position: absolute;
  top: -13px; left: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  background: var(--clay);
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.bbox.ok { border-color: #7FBF88; }
.bbox.ok .blabel { background: #4C8055; }

/* ---------- Industries ---------- */
.industries { background: var(--paper); }
.ind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.ind-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease, border-color 0.3s ease;
}
.ind-card:hover {
  transform: translateY(-6px);
  border-color: var(--clay);
  box-shadow: 0 22px 44px -20px rgba(192, 90, 50, 0.22);
}
.ind-card__icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--clay-soft);
  margin-bottom: 20px;
  transition: transform 0.45s var(--spring);
}
.ind-card:hover .ind-card__icon { transform: scale(1.1) rotate(-4deg); }
.ind-card__icon svg { width: 23px; height: 23px; stroke: var(--clay); }
.ind-card h3 { font-family: var(--sans); font-weight: 800; font-size: 1.22rem; margin-bottom: 9px; }
.ind-card p { color: var(--slate); font-size: 0.98rem; margin-bottom: 16px; }
.ind-card .ind-tags {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--clay);
}

/* ---------- Process (scroll-scrubbed) ---------- */
.process { background: var(--paper-2); }
.proc-flow {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 60px;
}
.proc-line {
  position: absolute;
  left: 21px;
  top: 12px; bottom: 12px;
  width: 2px;
  background: var(--line-strong);
}
.proc-line__fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: var(--clay);
}
.proc-step { position: relative; padding-bottom: clamp(52px, 7vw, 84px); }
.proc-step:last-child { padding-bottom: 0; }
.proc-step__dot {
  position: absolute;
  left: -60px;
  top: 6px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--slate);
  transition: border-color 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.4s var(--spring), box-shadow 0.4s ease;
}
.proc-step.is-active .proc-step__dot {
  border-color: var(--clay);
  background: var(--clay);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 0 7px rgba(192, 90, 50, 0.14);
}
.proc-step h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 10px; transition: color 0.4s ease; }
.proc-step p { color: var(--slate); font-size: 1.08rem; max-width: 560px; margin-bottom: 12px; }
.proc-step .proc-tag {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}
.proc-step { opacity: 0.45; transition: opacity 0.5s ease; }
.proc-step.is-active { opacity: 1; }

/* ---------- Engine room (dark stack chapter) ---------- */
.engine { background: var(--night); color: var(--night-text); }
.engine .eyebrow { color: #E08B63; }
.engine .eyebrow::before { background: #E08B63; }
.engine .section-head p { color: var(--night-slate); }
.engine-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.assure { display: flex; flex-direction: column; gap: 18px; }
.assure-item {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  transition: transform 0.45s var(--spring), border-color 0.3s ease;
}
.assure-item:hover { transform: translateX(6px); border-color: rgba(224, 139, 99, 0.5); }
.assure-item .ai-check {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: rgba(127, 191, 136, 0.14);
  color: #9FCCA6;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.assure-item h4 { font-family: var(--sans); font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }
.assure-item p { color: var(--night-slate); font-size: 0.95rem; }

.stack-tower { display: flex; flex-direction: column; gap: 12px; }
.layer {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  padding: 19px 24px;
  transition: transform 0.45s var(--spring), border-color 0.3s ease, box-shadow 0.3s ease;
}
.layer:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(224, 139, 99, 0.6);
  box-shadow: 0 16px 40px -16px rgba(192, 90, 50, 0.4);
}
.layer .l-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--night-line);
  color: var(--night-slate);
  width: 92px;
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.layer.hl .l-badge { background: var(--clay); border-color: var(--clay); color: #fff; }
.layer h4 { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; }
.layer > span:last-child { margin-left: auto; font-size: 0.88rem; color: var(--night-slate); text-align: right; }

/* ---------- Pricing ---------- */
.pricing { background: var(--paper); }
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 60px;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.5s var(--spring), box-shadow 0.4s ease, border-color 0.3s ease;
}
.price-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -24px rgba(32, 32, 30, 0.18);
}
.price-card.is-featured {
  border-color: var(--clay);
  box-shadow: 0 20px 50px -20px rgba(192, 90, 50, 0.3);
}
.price-card__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--clay);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card h3 { font-family: var(--sans); font-weight: 800; font-size: 1.18rem; margin-bottom: 14px; }
.price-card .amount {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 2.6vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
}
.price-card .amount small {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--slate);
  font-weight: 400;
  margin-left: 6px;
}
.price-card .pitch { color: var(--slate); font-size: 0.95rem; margin: 14px 0 20px; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 26px; }
.price-card li { display: flex; gap: 10px; font-size: 0.94rem; align-items: baseline; }
.price-card li::before { content: "✓"; color: var(--live); font-weight: 700; flex-shrink: 0; }
.price-card .btn { margin-top: auto; width: 100%; }
.price-card .fine {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--slate);
  text-align: center;
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.care {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.4vw, 44px);
  margin-bottom: 60px;
}
.care h3 { font-size: 1.7rem; margin-bottom: 8px; }
.care > p { color: var(--slate); margin-bottom: 26px; }
.care-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.care-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.45s var(--spring), border-color 0.3s ease;
}
.care-item:hover { transform: translateY(-4px); border-color: var(--clay); }
.care-item .cprice { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; }
.care-item .cprice small { font-family: var(--mono); font-size: 0.72rem; color: var(--slate); }
.care-item h4 { font-family: var(--sans); font-weight: 700; font-size: 1.02rem; margin-top: 6px; }
.care .fine-print { font-size: 0.85rem; color: var(--slate); }

/* Estimator */
.estimator {
  background: var(--night);
  color: var(--night-text);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 4vw, 56px);
}
.estimator h3 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); margin-bottom: 10px; }
.estimator .est-sub { color: var(--night-slate); margin-bottom: 28px; font-size: 1rem; }
.est-opts { display: flex; flex-direction: column; gap: 12px; }
.est-opt {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--night-2);
  border: 1.5px solid var(--night-line);
  border-radius: 14px;
  padding: 16px 19px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.35s var(--spring);
  user-select: none;
}
.est-opt:hover { border-color: rgba(224, 139, 99, 0.6); transform: translateX(4px); }
.est-opt:active { transform: scale(0.98); }
.est-opt input { position: absolute; opacity: 0; pointer-events: none; }
.est-opt .box {
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 2px solid var(--night-line);
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 800;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.35s var(--spring);
  flex-shrink: 0;
}
.est-opt.is-checked { border-color: var(--clay); background: rgba(192, 90, 50, 0.1); }
.est-opt.is-checked .box {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
  transform: scale(1.1);
}
.est-result {
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}
.est-result .er-lbl {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--night-slate);
  margin-bottom: 14px;
}
.est-result .er-name {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 6px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.est-result .er-price {
  font-family: var(--mono);
  color: #E08B63;
  font-size: 1.05rem;
  margin-bottom: 22px;
}
.est-result.is-swapping .er-name,
.est-result.is-swapping .er-price { opacity: 0; transform: translateY(8px); }

/* Skeleton shimmer — a brief loading bar stands in for the name/price
   while the estimator recalculates, reinforcing the "system thinking"
   feel already used elsewhere on the site. */
.er-name, .er-price { position: relative; }
.er-name::before, .er-price::before {
  content: "";
  position: absolute;
  inset: 2px 40% 2px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 50%, var(--line) 100%);
  background-size: 200% 100%;
  opacity: 0;
}
.est-result.is-swapping .er-name::before,
.est-result.is-swapping .er-price::before {
  opacity: 1;
  animation: shimmerSweep 0.9s ease-in-out infinite;
}
.er-price::before { inset: 2px 55% 2px 0; }
@keyframes shimmerSweep {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .er-name::before, .er-price::before { display: none; }
}
.est-result .btn { align-self: flex-start; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper-2); }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 13px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item.is-open { border-color: var(--line-strong); box-shadow: 0 12px 30px -16px rgba(32,32,30,0.12); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  padding: 24px 28px;
  font-weight: 700;
  font-size: 1.12rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s ease;
}
.faq-q:hover { color: var(--clay); }
.faq-q .fx {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.45s var(--spring), background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.faq-item.is-open .fx {
  transform: rotate(45deg);
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-smooth);
}
.faq-a p {
  padding: 0 28px 26px;
  color: var(--slate);
  font-size: 1.04rem;
  max-width: 700px;
}

/* ---------- Contact ---------- */
.contact { background: var(--paper); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.contact-points { display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.cpoint {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.45s var(--spring), border-color 0.3s ease;
}
.cpoint:hover { transform: translateX(6px); border-color: var(--clay); }
.cpoint .cp-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--clay);
  padding-top: 3px;
}
.cpoint h4 { font-family: var(--sans); font-weight: 700; font-size: 1.06rem; margin-bottom: 3px; }
.cpoint p { color: var(--slate); font-size: 0.94rem; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3.4vw, 44px);
  box-shadow: 0 30px 70px -34px rgba(32, 32, 30, 0.2);
}
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-field { margin-bottom: 18px; }
.f-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.f-field input,
.f-field select,
.f-field textarea {
  width: 100%;
  padding: 15px 17px;
  border-radius: 13px;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  appearance: none;
}
.f-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2363615A' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 17px center;
}
.f-field textarea { min-height: 130px; resize: vertical; }
.f-field input:focus,
.f-field select:focus,
.f-field textarea:focus {
  outline: none;
  border-color: var(--clay);
  background: var(--input-focus);
  box-shadow: 0 0 0 4px rgba(192, 90, 50, 0.12);
}
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-note {
  font-size: 0.82rem;
  color: var(--slate);
  margin-top: 14px;
}
.form-status {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
  animation: fadeUp 0.4s var(--ease-out);
}
.form-status.ok { display: block; background: var(--live-soft); color: #2E5A36; border: 1px solid #BAD5BE; }
.form-status.err { display: block; background: #F7E3DC; color: #8A3B1E; border: 1px solid #E5BBA8; }

/* Button loading state */
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn.is-loading .btn-spin {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn .btn-spin { display: none; }
.btn.is-loading .btn-spin { display: inline-block; }
.btn.is-loading .btn-label-idle { display: none; }

/* ---------- Footer ---------- */
.footer {
  background: var(--night);
  color: var(--night-text);
  padding: clamp(72px, 9vw, 120px) 0 44px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 70px;
  position: relative;
  z-index: 1;
}
.footer .brand__name { color: var(--night-text); }
.footer .logo-slot { background: rgba(255, 255, 255, 0.04); border-color: var(--night-line); }
.footer-tag { color: var(--night-slate); margin-top: 16px; max-width: 300px; font-size: 0.98rem; }
.footer h5 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--night-slate);
  margin-bottom: 18px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer ul a {
  color: var(--night-text);
  font-size: 0.98rem;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.footer ul a:hover { opacity: 1; color: #E08B63; }
.footer-bottom {
  border-top: 1px solid var(--night-line);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--night-slate);
  position: relative;
  z-index: 1;
}
.footer-mark {
  position: absolute;
  bottom: -0.24em;
  right: -0.03em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(11rem, 24vw, 22rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.028);
  pointer-events: none;
  user-select: none;
}

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 150;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px -8px rgba(158, 72, 38, 0.55);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s var(--spring), background 0.25s ease;
}
.chat-fab:hover { transform: scale(1.08) rotate(-4deg); background: var(--clay-deep); }
.chat-fab:active { transform: scale(0.92); }
.chat-fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(192, 90, 50, 0.5);
  animation: fabPulse 2.6s var(--ease-smooth) infinite;
  z-index: -1;
}
@keyframes fabPulse {
  0% { transform: scale(0.85); opacity: 1; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}
.chat-nudge {
  position: fixed;
  right: 100px; bottom: 38px;
  z-index: 149;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 14px 34px -14px rgba(32, 32, 30, 0.28);
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--spring);
  pointer-events: none;
}
.chat-nudge.is-in { opacity: 1; transform: translateY(0) scale(1); }

.chat-panel {
  position: fixed;
  right: 26px; bottom: 102px;
  z-index: 151;
  width: min(390px, calc(100vw - 40px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(32, 32, 30, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--spring);
}
.chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  background: var(--night);
  color: var(--night-text);
}
.chat-head .avatar {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--clay);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
}
.chat-head h4 { font-family: var(--sans); font-size: 1rem; font-weight: 700; }
.chat-head .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #9FCCA6;
}
.chat-head .status i { width: 6px; height: 6px; border-radius: 50%; background: #7FBF88; }
.chat-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--night-slate);
  font-size: 1.2rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s var(--spring);
}
.chat-close:hover { background: rgba(255,255,255,0.08); color: #fff; transform: rotate(90deg); }

.chat-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 340px;
  overflow-y: auto;
  background: var(--paper);
}
.msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn 0.45s var(--ease-out) forwards;
}
@keyframes msgIn { to { opacity: 1; transform: translateY(0); } }
.msg--bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.msg--user {
  align-self: flex-end;
  background: var(--clay);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  padding: 14px 17px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 5px;
}
.typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--slate);
  animation: tybounce 1.1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tybounce { 30% { transform: translateY(-5px); opacity: 0.55; } }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 14px;
  background: var(--paper);
}
.chat-chip {
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.87rem;
  font-weight: 700;
  background: var(--card);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.35s var(--spring), background 0.2s ease;
}
.chat-chip:hover { border-color: var(--clay); color: var(--clay); transform: translateY(-2px); }
.chat-chip:active { transform: scale(0.94); }

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.chat-input input {
  flex: 1;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.chat-input input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(192, 90, 50, 0.12);
}
.chat-send {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--spring), background 0.25s ease;
}
.chat-send:hover { background: var(--clay-deep); transform: scale(1.08); }
.chat-send:active { transform: scale(0.9); }
.chat-send svg { width: 19px; height: 19px; }

/* ---------- Legal / utility pages ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.footer--slim { padding-top: 40px; }
.footer--slim .footer-bottom { border-top: 0; margin-top: 0; padding-top: 0; }
.footer--slim + .footer-mark, .footer--slim .footer-mark { display: none; }

.legal-page { padding-top: 160px; padding-bottom: 100px; min-height: 70vh; }
.legal-page .eyebrow { display: block; margin-bottom: 16px; }
.legal-page a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px; }
.legal-page h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); margin-bottom: 14px; }
.legal-page .updated { font-family: var(--mono); font-size: 0.82rem; color: var(--slate); margin-bottom: 44px; }
.legal-page h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: 1.06rem; max-width: 720px; }
.legal-page ul { padding-left: 22px; margin-top: 10px; }
.err-page { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--pad); }
.err-page .code { font-family: var(--serif); font-weight: 700; font-size: clamp(6rem, 18vw, 12rem); line-height: 1; color: var(--clay); }
.err-page p { color: var(--slate); font-size: 1.15rem; margin: 14px 0 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr 40px 1fr; row-gap: 34px; }
  .pipeline .pconn:nth-of-type(4) { display: none; }
  .stage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav__links { 
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px var(--pad) 34px;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -20px rgba(32,32,30,0.15);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out), transform 0.4s var(--ease-out);
  }
  .nav__links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__burger { display: flex; }
  .means-grid, .ind-grid, .care-row { grid-template-columns: 1fr 1fr; }
  .svc-grid, .lab-panel, .engine-grid, .contact-grid, .estimator { grid-template-columns: 1fr; }
  .lab-panel.is-active { gap: 30px; }
  .telemetry { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  section { padding-block: 84px; }
  .means-grid, .ind-grid, .care-row, .price-grid, .f-row { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .pconn { display: none; }
  .pnode { display: flex; align-items: center; gap: 16px; }
  .pnode__icon { margin-bottom: 0; flex-shrink: 0; }
  .telemetry { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .doc-scan { grid-template-columns: 1fr; }
  .chat-panel { right: 12px; bottom: 92px; }
  .chat-fab { right: 16px; bottom: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .scroll-cue { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero h1 .word { transform: none; }
  .hero__sub, .hero__cta, .hero__meta { opacity: 1; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
  .msg { opacity: 1; transform: none; }
}

/* ============================================================
   DARK MODE — premium MEY night edition
   Same warmth, inverted paper. Charcoal chapters keep their
   layering by going one shade deeper than the page.
   ============================================================ */
html[data-theme="dark"] {
  --paper: #1B1A17;
  --paper-2: #21201C;
  --paper-3: #292722;
  --ink: #EDEAE1;
  --ink-soft: #D8D4C8;
  --slate: #A6A296;
  --line: #33312B;
  --line-strong: #454237;
  --clay: #D2693F;
  --clay-deep: #E07B4F;
  --clay-soft: rgba(210, 105, 63, 0.14);
  --night: #141311;
  --night-2: #1C1B18;
  --night-3: #26241F;
  --night-line: #34322C;
  --night-text: #EDEAE1;
  --night-slate: #A3A096;
  --live: #7FBF88;
  --live-soft: rgba(127, 191, 136, 0.14);
  --amber: #D2A64E;

  --card: #232220;
  --glass: rgba(41, 39, 34, 0.55);
  --glass-strong: rgba(41, 39, 34, 0.6);
  --nav-glass: rgba(27, 26, 23, 0.82);
  --hover-tint: rgba(255, 255, 255, 0.05);
  --input-focus: #1E1D1A;
}

/* Component adjustments that variables alone can't express */
html[data-theme="dark"] ::selection { background: var(--clay); color: #1B1A17; }
html[data-theme="dark"] .orb { opacity: 0.34; }
html[data-theme="dark"] .orb--1 { background: radial-gradient(circle, rgba(210, 105, 63, 0.3), transparent 65%); }
html[data-theme="dark"] .orb--2 { background: radial-gradient(circle, rgba(200, 164, 107, 0.18), transparent 65%); }
html[data-theme="dark"] .btn--primary { color: #FFF8F1; }
html[data-theme="dark"] .btn--night { background: var(--night-text); color: #1B1A17; }
html[data-theme="dark"] .btn--night:hover { background: #fff; }
html[data-theme="dark"] .tab.is-active { background: var(--ink); border-color: var(--ink); color: #1B1A17; }
html[data-theme="dark"] .means-card:hover,
html[data-theme="dark"] .svc-card:hover,
html[data-theme="dark"] .ind-card:hover,
html[data-theme="dark"] .price-card:hover {
  box-shadow: 0 26px 52px -22px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .screen { box-shadow: 0 34px 80px -30px rgba(0, 0, 0, 0.6); border-color: var(--night-line); }
html[data-theme="dark"] .chapter-dark,
html[data-theme="dark"] .engine { box-shadow: inset 0 1px 0 var(--night-line), inset 0 -1px 0 var(--night-line); }
html[data-theme="dark"] .form-status.ok { background: rgba(127, 191, 136, 0.12); color: #9FCCA6; border-color: rgba(127, 191, 136, 0.35); }
html[data-theme="dark"] .form-status.err { background: rgba(210, 105, 63, 0.12); color: #E9A184; border-color: rgba(210, 105, 63, 0.4); }
html[data-theme="dark"] .f-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A6A296' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .nav__links { box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .chat-nudge { box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .chat-panel { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7); }
html[data-theme="dark"] .price-card.is-featured { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .faq-item.is-open { box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .form-card { box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .doc-sheet { background: #F4F1E8; } /* the scanned "paper" stays paper */

/* ============================================================
   NAV TOOLS — theme + language toggles
   ============================================================ */
.nav__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
@media (min-width: 921px) { .nav__inner .nav__tools { margin-left: 0; } }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lang-opt {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--slate);
  padding: 6px 11px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.35s var(--spring);
}
.lang-opt:hover { color: var(--ink); }
.lang-opt:active { transform: scale(0.92); }
.lang-opt.is-active { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .lang-opt.is-active { color: #1B1A17; }

.theme-toggle {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  overflow: hidden;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.4s var(--spring), background 0.25s ease;
}
.theme-toggle:hover { border-color: var(--clay); color: var(--clay); transform: rotate(-12deg); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg {
  width: 18px; height: 18px;
  position: absolute;
  transition: transform 0.5s var(--spring), opacity 0.3s ease;
}
.theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0.4); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.4); }

/* ============================================================
   MEY LOGO — animated mark
   Storyboard: Origin (seed) → Emergence → Unfold → Resolve
   Brand colors are fixed and identical in both themes.
   ============================================================ */
.mey-logo {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
}
.mey-logo .mey-mark { width: 100%; height: 100%; overflow: visible; }
.mey-mark .mm-seed { opacity: 0; }
.mey-mark .mm-blade {
  transform-origin: 50px 90px;
  transform-box: view-box;
}

/* One-shot entrance (nav / footer on load) */
.mey-logo.is-animate .mm-seed { animation: seedIn 0.5s var(--ease-out) forwards; }
.mey-logo.is-animate .mm-blade { transform: scale(0); }
.mey-logo.is-animate .mm-blade--c { animation: bladeGrow 1s var(--spring) 0.35s forwards; }
.mey-logo.is-animate .mm-blade--l { animation: bladeGrow 1s var(--spring) 0.5s forwards; }
.mey-logo.is-animate .mm-blade--r { animation: bladeGrow 1s var(--spring) 0.62s forwards; }
@keyframes seedIn {
  0% { opacity: 0; transform: scale(0); transform-origin: 50px 88px; }
  60% { opacity: 1; transform: scale(1.4); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes bladeGrow {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* Gentle living sway (chat FAB, hover states) */
.mey-logo--idle .mm-seed { opacity: 1; }
.mey-logo--idle .mm-blade--l { animation: swayL 4.6s ease-in-out infinite; }
.mey-logo--idle .mm-blade--c { animation: swayC 4.6s ease-in-out 0.3s infinite; }
.mey-logo--idle .mm-blade--r { animation: swayR 4.6s ease-in-out 0.6s infinite; }
@keyframes swayL { 50% { transform: rotate(-3.5deg); } }
@keyframes swayC { 50% { transform: rotate(2deg); } }
@keyframes swayR { 50% { transform: rotate(3.5deg); } }

.brand:hover .mey-logo .mm-blade--l { animation: swayL 1.6s ease-in-out infinite; }
.brand:hover .mey-logo .mm-blade--c { animation: swayC 1.6s ease-in-out 0.1s infinite; }
.brand:hover .mey-logo .mm-blade--r { animation: swayR 1.6s ease-in-out 0.2s infinite; }

/* Logo slot carrying the mark loses the dashed placeholder frame */
.logo-slot--mark {
  border: none;
  background: transparent;
  padding: 0;
}
.brand:hover .logo-slot--mark { transform: none; }

/* Chat FAB & avatar carrying the mark */
.chat-fab .mey-logo { width: 34px; height: 34px; }
.chat-fab { background: var(--card); border: 1px solid var(--line); }
.chat-fab:hover { background: var(--card); }

/* "New message" dot — a quiet nudge that appears once the visitor has
   scrolled past the hero, distinct from the timed text bubble. Dismissed
   permanently for the session once the chat is opened or the dot is seen. */
.chat-fab__dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--live);
  border: 2px solid var(--paper);
  transform: scale(0);
  transition: transform 0.4s var(--spring);
  z-index: 1;
}
.chat-fab__dot.is-shown { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .chat-fab__dot { transition: none; } }
.chat-head .avatar { background: var(--night-2); border: 1px solid var(--night-line); }
.chat-head .avatar .mey-logo { width: 26px; height: 26px; }

/* ============================================================
   STACK BAND — replaces the plain text marquee
   ============================================================ */
.stack-band {
  padding-block: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
  position: relative;
}
.stack-band::before,
.stack-band::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.stack-band::before { left: 0; background: linear-gradient(to right, var(--paper-2), transparent); }
.stack-band::after { right: 0; background: linear-gradient(to left, var(--paper-2), transparent); }
.stack-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: tape 46s linear infinite;
}
.stack-band:hover .stack-track { animation-play-state: paused; }
.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
  transition: border-color 0.25s ease, transform 0.35s var(--spring);
}
.stack-chip:hover { border-color: var(--clay); transform: translateY(-2px); }
.stack-chip svg {
  width: 17px; height: 17px;
  color: var(--clay);
  flex-shrink: 0;
}
.stack-chip .sc-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}
.stack-chip .sc-role {
  font-size: 0.78rem;
  color: var(--slate);
  border-left: 1px solid var(--line);
  padding-left: 11px;
}

/* ============================================================
   SERVICE VISUALS — mini animated demos on each service card
   Loops run only while the card is on screen (.is-live).
   ============================================================ */
.svc-visual {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
  height: 150px;
}
.sv-bar {
  display: flex;
  gap: 5px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.sv-bar i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}
.sv-body { position: relative; padding: 14px 16px; height: calc(100% - 26px); }

/* All service-visual animations idle until the card enters view */
.svc-visual [class*="sv-"] { animation-play-state: paused !important; }
.svc-card.is-live .svc-visual [class*="sv-"] { animation-play-state: running !important; }

/* --- 1 · Conversion website: page assembles, CTA gets clicked --- */
.sv-line {
  height: 8px;
  border-radius: 4px;
  background: var(--line-strong);
  opacity: 0.55;
  margin-bottom: 9px;
  transform-origin: left;
  animation: svBuild 7s var(--ease-out) infinite;
}
.sv-line.h { height: 14px; width: 62%; background: var(--slate); opacity: 0.8; }
.sv-line.w70 { width: 70%; }
.sv-line.w45 { width: 45%; }
.sv-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  position: relative;
  animation: svBuild 7s var(--ease-out) infinite, svCtaPress 7s var(--ease-smooth) infinite;
}
.sv-cta::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 2px solid var(--clay);
  opacity: 0;
  animation: svCtaRing 7s var(--ease-smooth) infinite;
}
.sv-lead {
  position: absolute;
  right: 14px; bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--live);
  background: var(--live-soft);
  border-radius: 999px;
  padding: 5px 11px;
  opacity: 0;
  animation: svLeadIn 7s var(--ease-out) infinite;
}
@keyframes svBuild {
  0% { transform: scaleX(0); opacity: 0; }
  6%, 100% { transform: scaleX(1); }
  10%, 92% { opacity: 0.85; }
  98%, 100% { opacity: 0; }
}
@keyframes svCtaPress {
  0%, 54% { scale: 1; }
  57% { scale: 0.88; }
  61%, 100% { scale: 1; }
}
@keyframes svCtaRing {
  0%, 55% { opacity: 0; transform: scale(0.7); }
  60% { opacity: 0.9; transform: scale(1); }
  75%, 100% { opacity: 0; transform: scale(1.5); }
}
@keyframes svLeadIn {
  0%, 62% { opacity: 0; transform: translateY(8px); }
  68%, 90% { opacity: 1; transform: translateY(0); }
  97%, 100% { opacity: 0; }
}

/* --- 2 · Chatbot: conversation plays out --- */
.sv-msg {
  max-width: 78%;
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 0.74rem;
  line-height: 1.45;
  margin-bottom: 8px;
  opacity: 0;
  width: fit-content;
}
.sv-msg--bot { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.sv-msg--user { background: var(--clay); color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.sv-msg:nth-child(1) { animation: svMsg 6s var(--ease-out) infinite; }
.sv-msg:nth-child(2) { animation: svMsg2 6s var(--ease-out) infinite; }
.sv-dots { display: inline-flex; gap: 3px; }
.sv-dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  animation: tybounce 1.1s ease-in-out infinite;
}
.sv-dots i:nth-child(2) { animation-delay: 0.15s; }
.sv-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes svMsg {
  0% { opacity: 0; transform: translateY(8px); }
  8%, 90% { opacity: 1; transform: translateY(0); }
  98%, 100% { opacity: 0; }
}
@keyframes svMsg2 {
  0%, 26% { opacity: 0; transform: translateY(8px); }
  34%, 90% { opacity: 1; transform: translateY(0); }
  98%, 100% { opacity: 0; }
}

/* --- 3 · Automation: pulse travels across nodes --- */
.sv-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 6px;
}
.sv-node {
  width: 52px; height: 52px;
  border-radius: 13px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--slate);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.sv-node--1 { animation: svNodeGlow 6s ease infinite; }
.sv-node--2 { animation: svNodeGlow 6s ease 1.5s infinite; }
.sv-node--3 { animation: svNodeGlow 6s ease 3s infinite; }
@keyframes svNodeGlow {
  0%, 100% { border-color: var(--line-strong); color: var(--slate); box-shadow: none; }
  12%, 30% { border-color: var(--clay); color: var(--clay); box-shadow: 0 0 0 4px var(--clay-soft); }
  45% { border-color: var(--line-strong); color: var(--slate); }
}
.sv-wire {
  flex: 1;
  height: 1.5px;
  background: var(--line-strong);
  position: relative;
  overflow: visible;
}
.sv-wire::after {
  content: "";
  position: absolute;
  top: 50%; left: 0;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 10px var(--clay);
  opacity: 0;
}
.sv-wire--1::after { animation: svPulse 6s var(--ease-smooth) infinite; }
.sv-wire--2::after { animation: svPulse 6s var(--ease-smooth) 1.5s infinite; }
@keyframes svPulse {
  0%, 10% { left: 0; opacity: 0; }
  14% { opacity: 1; }
  32% { left: calc(100% - 9px); opacity: 1; }
  36%, 100% { left: calc(100% - 9px); opacity: 0; }
}
.sv-flow-note {
  position: absolute;
  left: 16px; bottom: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--slate);
}

/* --- 4 · Custom AI: document scanned into structured fields --- */
.sv-ai {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 14px;
  height: 100%;
  align-items: center;
}
.sv-doc {
  height: 88px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 9px 8px;
  position: relative;
  overflow: hidden;
}
.sv-doc i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin-bottom: 6px;
}
.sv-doc i:nth-child(2) { width: 80%; }
.sv-doc i:nth-child(3) { width: 60%; }
.sv-doc i:nth-child(4) { width: 88%; }
.sv-doc i:nth-child(5) { width: 45%; }
.sv-beam {
  position: absolute;
  left: 0; right: 0;
  height: 15px;
  top: -20px;
  background: linear-gradient(to bottom, transparent, var(--clay-soft) 45%, var(--clay) 50%, var(--clay-soft) 55%, transparent);
  animation: svScan 6.5s var(--ease-smooth) infinite;
}
@keyframes svScan {
  0%, 8% { top: -20px; opacity: 0; }
  12% { opacity: 1; }
  42% { top: 100%; opacity: 1; }
  46%, 100% { top: 100%; opacity: 0; }
}
.sv-fields { display: flex; flex-direction: column; gap: 7px; }
.sv-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--slate);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 7px;
  padding: 6px 10px;
  opacity: 0;
}
.sv-field b { color: var(--ink); font-weight: 600; }
.sv-field .ok { color: var(--live); }
.sv-field:nth-child(1) { animation: svField 6.5s var(--ease-out) infinite; }
.sv-field:nth-child(2) { animation: svField2 6.5s var(--ease-out) infinite; }
.sv-field:nth-child(3) { animation: svField3 6.5s var(--ease-out) infinite; }
@keyframes svField {
  0%, 40% { opacity: 0; transform: translateX(-8px); }
  46%, 90% { opacity: 1; transform: translateX(0); }
  97%, 100% { opacity: 0; }
}
@keyframes svField2 {
  0%, 48% { opacity: 0; transform: translateX(-8px); }
  54%, 90% { opacity: 1; transform: translateX(0); }
  97%, 100% { opacity: 0; }
}
@keyframes svField3 {
  0%, 56% { opacity: 0; transform: translateX(-8px); }
  62%, 90% { opacity: 1; transform: translateX(0); }
  97%, 100% { opacity: 0; }
}

/* ============================================================
   RESPONSIVE REFINEMENTS
   ============================================================ */
@media (max-width: 960px) {
  .nav__inner { gap: 12px; }
  .nav__tools { gap: 8px; }
  .lang-opt { padding: 5px 9px; font-size: 0.68rem; }
  .theme-toggle { width: 37px; height: 37px; }
  .stack-band::before, .stack-band::after { width: 48px; }
  .lab-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .lab-tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .screen__body { min-height: 280px; }
}
@media (max-width: 640px) {
  .brand__name { font-size: 1.3rem; }
  .mey-logo, .logo-slot { width: 36px; height: 36px; }
  .nav__inner { height: 68px; }
  .nav__links { top: 68px; }
  .hero { padding-top: 104px; }
  .hero h1 { font-size: clamp(2.55rem, 11.5vw, 3.4rem); }
  .hero__badge { font-size: 0.72rem; padding: 8px 14px; letter-spacing: 0.1em; }
  .section-head h2 { font-size: clamp(2.05rem, 8vw, 2.6rem); }
  .section-head p { font-size: 1.05rem; }
  .meta-chip { padding: 10px 14px; flex: 1 1 100%; justify-content: flex-start; }
  .svc-card h3 { font-size: 1.5rem; }
  .means-card h3 { font-size: 1.6rem; }
  .price-card .amount { font-size: 2.3rem; }
  .est-result { padding: 26px 22px; }
  .system-stage { padding: 20px 16px; }
  .stage-top { flex-wrap: wrap; gap: 8px; }
  .screen__body { padding: 16px; min-height: 250px; }
  .lab-copy h3 { font-size: 1.65rem; }
  .contact-grid { gap: 40px; }
  .form-card { padding: 26px 20px; }
  .chat-panel {
    right: 12px; left: 12px; bottom: 92px;
    width: auto;
    max-height: min(560px, calc(100dvh - 120px));
  }
  .chat-body { height: min(320px, calc(100dvh - 320px)); }
  .footer-mark { font-size: clamp(4rem, 22vw, 7rem); }
  .sv-node { width: 44px; height: 44px; }
  .stack-chip .sc-role { display: none; }
  .nav__tools .lang-toggle { padding: 2px; }
}
@media (max-width: 390px) {
  .wrap { padding-inline: 16px; }
  .hero h1 { font-size: 2.35rem; }
  .btn { padding: 15px 24px; font-size: 0.98rem; }
  .lang-opt { padding: 5px 7px; }
}

/* Reduced motion: new modules collapse to their end states */
@media (prefers-reduced-motion: reduce) {
  .stack-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
  .svc-visual [class*="sv-"], .sv-line, .sv-cta, .sv-msg, .sv-field, .sv-lead { animation: none !important; opacity: 1 !important; transform: none !important; }
  .sv-beam, .sv-wire::after { display: none; }
  .mey-logo.is-animate .mm-blade { transform: scale(1); animation: none; }
  .mey-logo.is-animate .mm-seed, .mey-logo--idle .mm-seed { opacity: 1; animation: none; }
  .mey-logo--idle .mm-blade { animation: none; }
}
/* ============================================================
   Documentation page — added for documentation.html
   Keeps the existing MEY editorial system and zero-build setup.
   ============================================================ */
.nav__link.is-current { color: var(--clay); }
.nav__link.is-current::after { transform: scaleX(1); transform-origin: left; }

.docs-page { background: var(--paper); }
.docs-hero {
  min-height: auto;
  padding-top: clamp(132px, 15vw, 176px);
  padding-bottom: clamp(70px, 10vw, 118px);
  overflow: hidden;
  background: var(--paper);
}
.docs-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(42px, 7vw, 96px);
  align-items: end;
}
.docs-hero h1 {
  font-size: clamp(3rem, 7.2vw, 6.4rem);
  max-width: 900px;
  margin: 28px 0 26px;
}
.docs-hero p {
  color: var(--slate);
  font-size: clamp(1.1rem, 1.8vw, 1.32rem);
  line-height: 1.62;
  max-width: 690px;
  margin-bottom: 38px;
}
.doc-summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--spring), border-color 0.3s ease, box-shadow 0.3s ease;
}
.doc-summary:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.doc-summary__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin-bottom: 16px;
}
.doc-summary strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.doc-summary p { font-size: 1rem; color: var(--slate); margin-bottom: 24px; }
.doc-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.doc-summary__grid span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.docs-body { padding-block: 0 clamp(92px, 12vw, 160px); background: var(--paper); }
.docs-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 108px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.doc-toc p {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 12px;
}
.doc-toc a, .doc-mobile-toc a {
  display: block;
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0;
  transition: color 0.25s ease, transform 0.35s var(--spring);
}
.doc-toc a:hover, .doc-mobile-toc a:hover { color: var(--clay); transform: translateX(4px); }
.doc-mobile-toc { display: none; }
.docs-content { min-width: 0; }
.docs-content a:not(.btn) { color: var(--clay); text-decoration: underline; text-underline-offset: 4px; }
.docs-content > .doc-section {
  padding-block: clamp(56px, 7vw, 86px);
  border-top: 1px solid var(--line);
}
.docs-content > .doc-section:first-of-type { border-top: 0; padding-top: 0; }
.doc-section h2 {
  font-size: clamp(2.35rem, 5vw, 4.2rem);
  margin: 18px 0 24px;
}
.doc-section h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  margin-bottom: 10px;
}
.doc-section p {
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.72;
  max-width: 820px;
}
.doc-muted { color: var(--slate) !important; }
.doc-note {
  margin-top: 30px;
  padding: clamp(24px, 3vw, 34px);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.doc-note h3 { font-family: var(--sans); font-weight: 800; font-size: 1.2rem; }
.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}
.doc-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3vw, 36px);
  transition: transform 0.5s var(--spring), box-shadow 0.35s ease, border-color 0.3s ease;
}
.doc-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 60px -28px rgba(32, 32, 30, 0.22);
}
.doc-card__n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--clay);
  display: inline-block;
  margin-bottom: 24px;
}
.doc-card h3 { font-family: var(--serif); font-size: 2rem; }
.doc-card p { font-size: 1rem; color: var(--slate); }
.doc-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 22px;
}
.doc-card li {
  color: var(--ink-soft);
  font-size: 0.98rem;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.doc-card li::before { content: "→"; color: var(--clay); flex-shrink: 0; }
.doc-table-wrap {
  margin-top: 30px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}
.doc-table th, .doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
  line-height: 1.58;
}
.doc-table thead th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  background: var(--paper-2);
}
.doc-table tbody th {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--ink);
  min-width: 180px;
}
.doc-table td { color: var(--ink-soft); }
.doc-table td strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
}
.doc-table tr:last-child th, .doc-table tr:last-child td { border-bottom: 0; }
.doc-table tr.is-best { background: var(--clay-soft); }
.doc-table tr.is-best th:first-child { border-left: 3px solid var(--clay); }
.doc-table th span {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--clay);
  color: #fff;
  border-radius: 999px;
  padding: 5px 9px;
}
.doc-care-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}
.doc-care-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.45s var(--spring), border-color 0.3s ease;
}
.doc-care-grid article:hover { transform: translateY(-5px); border-color: var(--clay); }
.doc-care-grid strong { display: block; font-family: var(--serif); font-size: 1.65rem; line-height: 1; }
.doc-care-grid strong span { font-family: var(--mono); font-size: 0.7rem; color: var(--slate); }
.doc-care-grid h3 { font-family: var(--sans); font-size: 1rem; font-weight: 800; margin-top: 10px; margin-bottom: 0; }
.doc-cost-callout {
  margin-top: 28px;
  border: 1.5px solid var(--clay);
  border-left-width: 5px;
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.2vw, 40px);
  background: var(--card);
}
.doc-cost-callout h3 { font-family: var(--sans); font-weight: 800; font-size: 1.28rem; }
.doc-cost-callout ul { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.doc-cost-callout li { color: var(--ink-soft); line-height: 1.7; display: flex; gap: 12px; }
.doc-cost-callout li::before { content: "✓"; color: var(--live); font-weight: 800; flex-shrink: 0; }
.doc-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 34px 0 26px;
}
.doc-steps article {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.45s var(--spring), border-color 0.3s ease, background-color 0.3s ease;
}
.doc-steps article:hover { transform: translateY(-5px); border-color: var(--clay); background: var(--card); }
.doc-steps span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-bottom: 18px;
}
.doc-steps h3 { font-size: 1.7rem; }
.doc-steps p { font-size: 0.96rem; color: var(--slate); }
.doc-stack-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}
.doc-stack-list article {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: transform 0.45s var(--spring), border-color 0.3s ease;
}
.doc-stack-list article:hover { transform: translateX(6px); border-color: var(--line-strong); }
.doc-stack-list span {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
}
.doc-stack-list p { font-size: 1rem; color: var(--ink-soft); }
.docs-content .faq { background: transparent; }
.docs-faq-list { margin: 30px 0 0; max-width: 900px; }
.doc-support {
  background: var(--night);
  color: var(--night-text);
  border: 0 !important;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 58px) !important;
  margin-top: clamp(34px, 5vw, 64px);
}
.doc-support .eyebrow, .doc-support h2 { color: var(--night-text); }
.doc-support p { color: var(--night-slate); }
.doc-support .btn--ghost { color: var(--night-text); border-color: var(--night-line); }
.doc-support .btn--ghost:hover { border-color: var(--night-text); background: rgba(255,255,255,0.05); }
.doc-support__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }

@media (max-width: 1100px) {
  .docs-hero__inner { grid-template-columns: 1fr; }
  .doc-summary { max-width: 560px; }
  .docs-layout { grid-template-columns: 1fr; }
  .doc-toc { display: none; }
  .doc-mobile-toc {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    padding: 0;
    margin-bottom: 32px;
    overflow: hidden;
  }
  .doc-mobile-toc summary {
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    padding: 18px 22px;
  }
  .doc-mobile-toc summary::-webkit-details-marker { display: none; }
  .doc-mobile-toc div { border-top: 1px solid var(--line); padding: 10px 22px 14px; }
  .doc-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .docs-hero { padding-top: 116px; }
  .docs-hero h1 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .doc-card-grid, .doc-care-grid, .doc-steps { grid-template-columns: 1fr; }
  .doc-stack-list article { grid-template-columns: 1fr; gap: 6px; }
  .doc-section h2 { font-size: clamp(2.05rem, 9vw, 2.8rem); }
  .doc-table th, .doc-table td { padding: 16px 18px; }
  .doc-support { border-radius: 22px; }
  .doc-support__actions .btn { width: 100%; }
}

html[data-theme="dark"] .doc-summary,
html[data-theme="dark"] .doc-card,
html[data-theme="dark"] .doc-table-wrap,
html[data-theme="dark"] .doc-care-grid article,
html[data-theme="dark"] .doc-cost-callout,
html[data-theme="dark"] .doc-stack-list article,
html[data-theme="dark"] .doc-mobile-toc,
html[data-theme="dark"] .doc-toc { box-shadow: none; }
html[data-theme="dark"] .doc-table thead th { background: var(--paper-2); }
html[data-theme="dark"] .doc-table tr.is-best { background: var(--clay-soft); }
html[data-theme="dark"] .doc-card:hover { box-shadow: 0 28px 60px -28px rgba(0,0,0,0.62); }

/* Documentation link made the desktop nav slightly denser. Keep it tidy on mid-width laptops. */
@media (max-width: 1360px) and (min-width: 921px) {
  .nav__links { gap: 18px; }
  .nav__link { font-size: 0.9rem; }
  .btn--sm { padding-inline: 16px; }
}
@media (max-width: 1030px) and (min-width: 961px) {
  .nav__inner { gap: 14px; }
  .nav__links { gap: 13px; }
  .nav__link { font-size: 0.85rem; }
  .btn--sm { padding-inline: 14px; font-size: 0.86rem; }
  .nav__tools { gap: 6px; }
}
