/* ==========================================================================
   Polymorra — styles.css
   Base + scene scaffold + component library + reduced-motion.
   Rules: no borders/dividers between sections; motion is presentation only;
   only transform / opacity / filter / clip-path animate.
   ========================================================================== */

/* ---------- Reset / base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-optical-sizing: auto;
  font-feature-settings: "cv05" 1, "cv08" 1, "ss03" 1;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 1.1s var(--ease-in-out);
}
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  letter-spacing: var(--tracking-tight);
}
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: var(--tracking-display); }
h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.028em; }
h3 { font-size: var(--fs-h3); line-height: 1.2;  letter-spacing: -.018em; }
h4 { font-size: var(--fs-h4); line-height: 1.32; letter-spacing: -.01em; }
p  { margin: 0; max-width: 68ch; text-wrap: pretty; }
code, pre { font-family: var(--font-mono); }
::selection { background: rgba(99,102,241,.32); color: var(--text-primary); }

/* Scrollbar — quiet, on-brand */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--text-on-accent);
  padding: var(--space-3) var(--space-5); border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Global atmosphere layers ---------------------------------- */
/* Fixed mesh wash — gives every scene depth without a single divider line. */
.page-bg {
  position: fixed; inset: -10vh -10vw; z-index: -2; pointer-events: none;
  background: var(--grad-mesh);
  opacity: .9;
  transform: translate3d(0, calc(var(--scrolly, 0) * -.04px), 0);
}
/* Film grain — barely perceptible, kills gradient banding on large washes. */
.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background-image: var(--noise);
  background-size: 160px 160px;
  opacity: .028;
  mix-blend-mode: overlay;
}
[data-theme="light"] .grain { opacity: .038; mix-blend-mode: multiply; }

/* ---------- Layout helpers -------------------------------------------- */
.container { width: 100%; max-width: var(--container-xl); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide   { max-width: var(--container-2xl); }
.container--narrow { max-width: var(--container-md); }

.section { position: relative; padding-block: var(--section-y); border: 0; }
.section + .section { border-top: 0; }              /* never a divider between scenes */
.section--opener { padding-block: var(--section-y-lg); }
.section--tight  { padding-block: calc(var(--section-y) * .62); }

.stack   > * + * { margin-top: var(--stack); }
.grid { display: grid; gap: var(--space-5); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1040px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px)  { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--reverse > *:first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); }
  .split--reverse > *:first-child { order: 0; }
}

/* Scene atmospheres — replace section dividers with light + depth */
.atmosphere {
  position: absolute; inset: -12% -6% auto -6%; height: 124%;
  background: var(--grad-aurora);
  filter: blur(14px) saturate(115%);
  opacity: .58;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, calc(var(--p, 0) * -60px), 0) scale(1.02);
  will-change: transform;
}
.section > .container, .scene__stage > .container { position: relative; z-index: 1; }

/* ---------- Typography helpers ---------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--accent); margin: 0 0 var(--space-5);
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; flex: none;
  background: linear-gradient(90deg, transparent, currentColor);
}
.lead { font-size: var(--fs-lead); color: var(--text-secondary); max-width: 62ch; line-height: 1.55; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }
.gradient-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.section-head { max-width: 70ch; margin-bottom: clamp(36px, 5.5vw, 72px); }
.section-head p { margin-top: var(--space-5); }
.text-center { text-align: center; }
.text-center .lead, .text-center p { margin-inline: auto; }
.text-center .section-head { margin-inline: auto; }

/* Kinetic type — full text lives in the DOM; only presentation animates */
.kinetic .line { display: block; overflow: hidden; padding-block: .04em; }
.kinetic .line > span {
  display: block; transform: translateY(112%) rotate(2.5deg);
  transform-origin: 0 100%;
  opacity: .001;
  transition: transform 1s var(--ease-emph), opacity .8s var(--ease-out);
}
.kinetic.in .line > span { transform: none; opacity: 1; }
.kinetic .line:nth-child(2) > span { transition-delay: 100ms; }
.kinetic .line:nth-child(3) > span { transition-delay: 200ms; }
.kinetic .line:nth-child(4) > span { transition-delay: 300ms; }

/* ---------- Reveal timeline (IntersectionObserver workhorse) ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px) scale(.988); filter: blur(6px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-emph),
              filter var(--dur-slow) var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }

/* ---------- Scroll scene scaffold ------------------------------------- */
.scene { position: relative; height: var(--track); border: 0; }
.scene--short { height: var(--track-short); }
.scene--long  { height: var(--track-long); }
.scene__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip;
  display: grid; place-items: center; padding-block: var(--space-16);
}
.scene__stage > .container { width: 100%; }

/* ---------- Buttons ---------------------------------------------------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-weight: 600; font-size: .9375rem; letter-spacing: -.008em;
  padding: var(--space-3) var(--space-6); min-height: 46px;
  border-radius: var(--radius-pill); border: 1px solid transparent; cursor: pointer;
  transition: transform .28s var(--ease-spring), background-color .22s var(--ease-ref),
              box-shadow .28s var(--ease-ref), border-color .22s var(--ease-ref), color .2s var(--ease-ref);
}
.btn::after {                                    /* specular sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grad-sheen); opacity: 0;
  transform: translateX(-120%);
  transition: transform .75s var(--ease-ref), opacity .3s var(--ease-ref);
}
.btn:hover::after { opacity: .5; transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background-image: var(--grad-accent);
  background-color: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(129,140,248,.5), 0 22px 60px -16px rgba(99,102,241,.75); }
.btn-ghost {
  background: var(--surface-1); color: var(--text-primary);
  border-color: var(--border-default); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--fs-small); min-height: 38px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.text-center .btn-row { justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--accent); font-weight: 600; font-size: var(--fs-small);
  transition: gap .25s var(--ease-ref), color .2s var(--ease-ref);
}
.link-arrow::after { content: "→"; transition: transform .3s var(--ease-spring); }
.link-arrow:hover { gap: var(--space-3); color: var(--accent-hover); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Cards ------------------------------------------------------ */
.card {
  position: relative; isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045) 0%, rgba(255,255,255,.012) 42%, transparent 100%),
    var(--surface-1);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--inner-top);
  backdrop-filter: blur(10px);
  transition: transform var(--dur-base) var(--ease-ref),
              box-shadow var(--dur-base) var(--ease-ref),
              background-color var(--dur-base) var(--ease-ref);
}
/* Gradient hairline — a lit edge, never a divider */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; pointer-events: none;
  transition: background var(--dur-base) var(--ease-ref), opacity var(--dur-base) var(--ease-ref);
}
/* Cursor spotlight — coordinates come from JS as --mx/--my (percent) */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(99,102,241,.14), transparent 62%);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-ref); pointer-events: none;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md), var(--inner-top); }
.card:hover::before { background: var(--grad-border-hot); }
.card:hover::after, .card:focus-within::after { opacity: 1; }
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--text-secondary); font-size: var(--fs-body); }
.card .link-arrow { margin-top: var(--space-5); }
.card--flat { backdrop-filter: none; }
.card--flat:hover { transform: none; box-shadow: var(--inner-top); }

.icon-badge {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  display: grid; place-items: center; margin-bottom: var(--space-6);
  background: linear-gradient(150deg, var(--accent-soft), var(--accent-2-soft));
  color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  font-weight: 700; font-size: var(--fs-small); letter-spacing: .04em;
  font-family: var(--font-mono);
}
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.22);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.badge--muted { background: var(--surface-2); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.badge--success { background: var(--success-soft); color: var(--success); box-shadow: inset 0 0 0 1px rgba(52,211,153,.24); }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.pill {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-subtle);
  font-size: var(--fs-small); color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-ref), box-shadow var(--dur-fast) var(--ease-ref);
}
.pill:hover { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-strong); }

.checklist { margin-top: var(--space-6); }
.checklist li {
  position: relative; padding-left: var(--space-8); margin-top: var(--space-3);
  color: var(--text-secondary);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: var(--radius-pill);
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px var(--accent-softer);
}
.checklist li::after {
  content: ""; position: absolute; left: 5px; top: calc(.42em + 6px);
  width: 8px; height: 4px; border-left: 1.6px solid var(--text-on-accent);
  border-bottom: 1.6px solid var(--text-on-accent); transform: rotate(-45deg);
}

/* ---------- Navbar ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background-color var(--dur-base) var(--ease-ref),
              box-shadow var(--dur-base) var(--ease-ref),
              backdrop-filter var(--dur-base) var(--ease-ref);
}
.site-header::after {                 /* lit edge, appears only once scrolled */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default) 20%, var(--border-default) 80%, transparent);
  opacity: 0; transition: opacity var(--dur-base) var(--ease-ref);
}
.site-header.is-scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.site-header.is-scrolled::after { opacity: 1; }
.scroll-progress {
  position: absolute; left: 0; top: 0; height: 2px; width: 100%; z-index: 2;
  transform: scaleX(var(--progress, 0)); transform-origin: 0 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 14px rgba(99,102,241,.7);
}
.nav {
  display: flex; align-items: center; gap: var(--space-8);
  min-height: 72px; width: 100%; max-width: var(--container-2xl);
  margin-inline: auto; padding-inline: var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
  color: var(--text-primary); letter-spacing: -.03em;
}
.brand svg { width: 27px; height: 27px; transition: transform .6s var(--ease-spring); }
.brand:hover svg { transform: rotate(120deg); }
.nav__links { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.nav__item { position: relative; }
.nav__link {
  position: relative; background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--fs-small); font-weight: 500; color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-ref);
}
.nav__link::after {                    /* active/hover underline thread */
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 2px; height: 1.5px;
  background: var(--grad-accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--dur-base) var(--ease-emph);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text-primary); }
.nav__link:hover::after, .nav__link[aria-expanded="true"]::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--text-primary); }
.nav__link .chev { transition: transform var(--dur-base) var(--ease-ref); font-size: 9px; opacity: .7; }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0;
  min-width: 580px; padding: var(--space-4);
  background: var(--surface-glass); backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(.98);
  transition: opacity var(--dur-base) var(--ease-ref), transform var(--dur-base) var(--ease-emph), visibility var(--dur-base);
}
.mega::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; pointer-events: none;
}
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega a {
  display: block; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease-ref), transform var(--dur-fast) var(--ease-ref);
}
.mega a:hover { background: var(--surface-2); transform: translateX(2px); }
.mega strong { display: block; color: var(--text-primary); font-size: var(--fs-small); font-weight: 600; }
.mega span { display: block; color: var(--text-muted); font-size: var(--fs-micro); margin-top: 3px; line-height: 1.45; }

.nav__actions { display: flex; align-items: center; gap: var(--space-3); }
.nav__toggle {
  display: none; width: 44px; height: 44px; background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--border-default);
  border: 0; border-radius: var(--radius-md); cursor: pointer;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.5px; background: currentColor; margin: 4px auto;
  border-radius: 2px; transition: transform var(--dur-base) var(--ease-ref), opacity var(--dur-fast) var(--ease-ref);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg-base); background-image: var(--grad-mesh);
  padding: 96px var(--gutter) var(--space-16); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity var(--dur-base) var(--ease-ref), transform var(--dur-base) var(--ease-emph), visibility var(--dur-base);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a { display: block; padding: var(--space-4) 0; color: var(--text-primary); font-size: var(--fs-h4); font-weight: 600; }
.mobile-menu .m-group { margin-bottom: var(--space-8); }
.mobile-menu .m-group > p {
  color: var(--accent); font-size: var(--fs-micro); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; font-weight: 600; margin-bottom: var(--space-2);
}
.mobile-menu .m-group a { font-size: var(--fs-body-lg); font-weight: 500; color: var(--text-secondary); padding: var(--space-3) 0; }
.mobile-menu .btn { width: 100%; }

@media (max-width: 1120px) {
  .nav__links, .nav__actions .btn-ghost { display: none; }
  .nav__toggle { display: block; margin-left: auto; }
}

/* ---------- Breadcrumbs ------------------------------------------------ */
.breadcrumbs { padding-top: var(--space-8); position: relative; z-index: 2; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--text-faint); }
.breadcrumbs a { transition: color var(--dur-fast) var(--ease-ref); }
.breadcrumbs a:hover { color: var(--text-primary); }

/* ---------- Hero ------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(72px, 11vw, 152px) var(--section-y); overflow: clip; }
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 980px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 {
  font-size: var(--fs-display); line-height: .98; letter-spacing: var(--tracking-display);
  font-weight: 800;
}
.hero h1 .line:last-child > span { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.hero .lead { margin-top: var(--space-6); }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px); margin-top: var(--space-12); }
.hero__stats div strong {
  display: block; color: var(--text-primary); font-family: var(--font-display);
  font-size: var(--fs-h3); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.hero__stats div span { font-size: var(--fs-small); color: var(--text-muted); }

/* ---------- Crystal lattice visual (SVG, scrub-driven) ---------------- */
.lattice { width: 100%; height: auto; overflow: visible; }
.lattice g.frame {
  transform-origin: 50% 50%;
  transform: rotate(calc(var(--p, 1) * 8deg - 4deg));
  transition: transform .1s linear;
}
.lattice .edge {
  stroke: var(--accent); stroke-width: 1.3; fill: none; opacity: .6;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: calc(var(--len, 400) * (1 - var(--p, 1)));
  filter: drop-shadow(0 0 6px rgba(99,102,241,.55));
}
.lattice .edge--2 { stroke: var(--accent-2); opacity: .45; filter: drop-shadow(0 0 6px rgba(34,211,238,.5)); }
.lattice .node {
  fill: var(--accent-2); opacity: calc(.2 + var(--p, 1) * .8);
  transform: scale(calc(.5 + var(--p, 1) * .5)); transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 8px rgba(34,211,238,.7));
}
.lattice .node--hot { fill: var(--accent-3); filter: drop-shadow(0 0 12px rgba(244,114,182,.8)); }
.lattice .halo { opacity: calc(.35 + var(--p, 1) * .45); }
.lattice-wrap {
  position: relative; border-radius: var(--radius-2xl); padding: var(--space-8);
  background: radial-gradient(68% 68% at 50% 42%, rgba(99,102,241,.14), transparent 72%);
}
.lattice-wrap::before {          /* orbital ring for depth */
  content: ""; position: absolute; inset: 12%; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  opacity: .8; pointer-events: none;
}

/* ---------- Stats / count-up ------------------------------------------ */
.stat strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem); font-weight: 700;
  background: var(--grad-num); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1;
}
.stat span { display: block; margin-top: var(--space-4); color: var(--text-muted); font-size: var(--fs-small); max-width: 26ch; }

/* ---------- Logos ------------------------------------------------------ */
.logos { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 56px); align-items: center; justify-content: center; }
.logos li {
  color: var(--text-faint); font-weight: 600; letter-spacing: .1em; font-size: var(--fs-small);
  text-transform: uppercase;
  transition: color var(--dur-base) var(--ease-ref);
}
.logos li:hover { color: var(--text-secondary); }

/* ---------- Testimonials ---------------------------------------------- */
.quote {
  position: relative; margin: 0; padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 60%), var(--surface-1);
  box-shadow: var(--inner-top);
}
.quote::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad-border);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; pointer-events: none;
}
.quote::after {
  content: "\201C"; position: absolute; top: -.08em; right: .22em;
  font-family: var(--font-display); font-size: 7rem; line-height: 1;
  color: var(--accent); opacity: .13; pointer-events: none;
}
.quote blockquote { margin: 0; color: var(--text-primary); font-size: var(--fs-body-lg); line-height: 1.6; letter-spacing: -.005em; }
.quote figcaption { margin-top: var(--space-6); font-size: var(--fs-small); color: var(--text-muted); }
.quote cite { display: block; font-style: normal; color: var(--text-primary); font-weight: 600; margin-bottom: 2px; }

/* ---------- Bento ------------------------------------------------------ */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-5); }
.bento > * { grid-column: span 2; }
.bento > .span-2, .bento > .tile--wide { grid-column: span 4; }
.bento > .span-3, .bento > .tile--full { grid-column: span 6; }
.bento > .span-2 h3 { font-size: var(--fs-h3); }
@media (max-width: 1040px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento > *, .bento > .span-2, .bento > .span-3 { grid-column: span 2; }
}
@media (max-width: 700px) { .bento { grid-template-columns: minmax(0, 1fr); } .bento > * { grid-column: auto !important; } }

/* ---------- Steps / pinned narrative ---------------------------------- */
.steps { display: grid; gap: var(--space-3); }
.step {
  position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: var(--space-5);
  padding: var(--space-5) var(--space-6); border-radius: var(--radius-lg);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-subtle);
  opacity: .38; filter: saturate(.5);
  transition: opacity var(--dur-slow) var(--ease-ref), transform var(--dur-slow) var(--ease-emph),
              box-shadow var(--dur-slow) var(--ease-ref), filter var(--dur-slow) var(--ease-ref),
              background-color var(--dur-slow) var(--ease-ref);
}
.step.is-active {
  opacity: 1; filter: none; transform: translateX(8px);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.42), var(--glow-soft);
}
.step__num {
  width: 46px; height: 46px; border-radius: var(--radius-pill); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono);
  font-weight: 700; font-size: var(--fs-small);
  transition: background-color var(--dur-slow) var(--ease-ref), color var(--dur-slow) var(--ease-ref);
}
.step.is-active .step__num { background-image: var(--grad-accent); color: var(--text-on-accent); }
.step h3 { font-size: var(--fs-h4); margin-bottom: var(--space-1); }
.step p { color: var(--text-muted); font-size: var(--fs-small); }
.progress-thread {
  position: relative; height: 3px; border-radius: 2px;
  background: var(--surface-2); margin-bottom: var(--space-8); overflow: hidden;
}
.progress-thread::after {
  content: ""; position: absolute; inset: 0; background: var(--grad-accent);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  box-shadow: 0 0 16px rgba(99,102,241,.8);
}

/* ---------- Horizontal scene ------------------------------------------ */
.hscene__track {
  display: flex; gap: var(--space-5); will-change: transform;
  transform: translate3d(calc(var(--p, 0) * -1 * (var(--track-w, 2400px) - 88vw)), 0, 0);
}
.hscene__track > * { flex: 0 0 clamp(268px, 30vw, 390px); }
@media (max-width: 900px) {
  .hscene__track { flex-wrap: wrap; transform: none; }
  .hscene__track > * { flex: 1 1 100%; }
}

/* ---------- Dashboard / product preview ------------------------------- */
.app-shell {
  position: relative; border-radius: var(--radius-2xl); overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow-xl), inset 0 0 0 1px var(--border-subtle);
}
.app-shell__bar {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-5); background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}
.app-shell__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-default); display: block; }
.app-shell__bar i:first-child { background: rgba(251,113,133,.55); }
.app-shell__bar i:nth-child(2) { background: rgba(251,191,36,.55); }
.app-shell__bar i:nth-child(3) { background: rgba(52,211,153,.55); }
.app-shell__bar p { margin-left: var(--space-4); font-size: var(--fs-micro); color: var(--text-muted); font-family: var(--font-mono); }
.app-shell__body { display: grid; grid-template-columns: 208px minmax(0, 1fr); }
@media (max-width: 760px) { .app-shell__body { grid-template-columns: minmax(0, 1fr); } .app-nav { display: none !important; } }
.app-nav {
  padding: var(--space-5); background: var(--surface-inset); display: grid; gap: var(--space-1); align-content: start;
  box-shadow: inset -1px 0 0 var(--border-subtle);
}
.app-nav span { font-size: var(--fs-small); color: var(--text-muted); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.app-nav span.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-main { padding: var(--space-6); display: grid; gap: var(--space-4); }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--space-3); }
.metric {
  background: var(--surface-1); border-radius: var(--radius-md); padding: var(--space-4);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.metric b {
  display: block; color: var(--text-primary); font-family: var(--font-display);
  font-size: var(--fs-h4); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.metric span { font-size: var(--fs-micro); color: var(--text-muted); }
.spark {
  display: flex; align-items: flex-end; gap: 5px; height: 132px; padding: var(--space-4);
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, var(--border-subtle) 24px 24.5px),
    var(--surface-1);
  border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.spark i {
  flex: 1; background: var(--grad-accent); border-radius: 3px 3px 1px 1px; display: block;
  opacity: .9; box-shadow: 0 0 12px rgba(99,102,241,.35);
}
.spark i:last-child { background: linear-gradient(180deg, var(--accent-3), var(--accent)); }

/* ---------- Code / terminal ------------------------------------------- */
.window {
  border-radius: var(--radius-xl); overflow: hidden; background: #07080f;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border-subtle);
}
[data-theme="light"] .window { background: #0c0e15; }
.window__bar { display: flex; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: rgba(255,255,255,.04); }
.window__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.16); display: block; }
.window pre {
  margin: 0; padding: var(--space-6); overflow-x: auto;
  font-size: var(--fs-small); line-height: 1.75; color: #c8d0e0;
  tab-size: 2;
}
.window code { font-family: var(--font-mono); }
.terminal pre { color: #9debc4; }
.window .k { color: #a5b4fc; }
.window .s { color: #67e8f9; }
.window .c { color: #5b6478; font-style: italic; }
.window .n { color: #fbbf24; }
.terminal .prompt { color: var(--accent-2); }

/* ---------- Pricing ---------------------------------------------------- */
.price-card { display: flex; flex-direction: column; height: 100%; }
.price-card.is-featured {
  background: linear-gradient(180deg, rgba(99,102,241,.10), rgba(99,102,241,.02) 46%), var(--surface-2);
  box-shadow: var(--shadow-lg), var(--glow-soft);
  transform: translateY(-6px);
}
.price-card.is-featured::before { background: var(--grad-border-hot); opacity: 1; }
.price-amount {
  font-family: var(--font-display); font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 700; color: var(--text-primary); letter-spacing: -.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-amount small { font-size: var(--fs-small); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.price-card .btn { margin-top: auto; }
.price-card ul { margin: var(--space-6) 0 var(--space-8); }
.toggle-row {
  display: inline-flex; gap: var(--space-1); padding: 4px; border-radius: var(--radius-pill);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-subtle);
  margin-bottom: var(--space-10);
}
.toggle-row button {
  border: 0; background: transparent; padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill); font-size: var(--fs-small); font-weight: 600;
  color: var(--text-muted); cursor: pointer; min-height: 40px;
  transition: color var(--dur-fast) var(--ease-ref), background-color var(--dur-base) var(--ease-emph),
              box-shadow var(--dur-base) var(--ease-ref);
}
.toggle-row button[aria-pressed="true"] {
  background-image: var(--grad-accent); color: var(--text-on-accent); box-shadow: var(--glow-soft);
}

/* ---------- FAQ accordion ---------------------------------------------- */
.faq-item {
  border-radius: var(--radius-lg); background: var(--surface-1); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  transition: background-color var(--dur-base) var(--ease-ref), box-shadow var(--dur-base) var(--ease-ref);
}
.faq-item:hover { background: var(--surface-2); }
.faq-item:has(button[aria-expanded="true"]) { box-shadow: inset 0 0 0 1px rgba(99,102,241,.34); }
.faq-item + .faq-item { margin-top: var(--space-3); }
.faq-item button {
  width: 100%; text-align: left; display: flex; justify-content: space-between; gap: var(--space-6);
  align-items: center; padding: var(--space-5) var(--space-6); background: transparent; border: 0;
  cursor: pointer; font-weight: 600; color: var(--text-primary); font-size: var(--fs-body-lg);
  min-height: 60px; letter-spacing: -.01em;
}
.faq-item button .plus {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 15px; line-height: 1;
  transition: transform var(--dur-base) var(--ease-spring), background-color var(--dur-base) var(--ease-ref);
}
.faq-item button[aria-expanded="true"] .plus { transform: rotate(135deg); background: var(--accent); color: var(--text-on-accent); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-emph); }
.faq-item button[aria-expanded="true"] + .faq-answer { grid-template-rows: 1fr; }
.faq-answer > div { overflow: hidden; }
.faq-answer p { padding: 0 var(--space-6) var(--space-6); color: var(--text-secondary); max-width: 68ch; }

/* ---------- Tables ----------------------------------------------------- */
.table-wrap {
  position: relative; overflow-x: auto; border-radius: var(--radius-xl);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-subtle);
}
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
th, td { text-align: left; padding: var(--space-4) var(--space-5); }
th {
  color: var(--text-primary); font-weight: 600; background: var(--surface-2);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; font-size: var(--fs-micro);
  white-space: nowrap;
}
td { color: var(--text-secondary); box-shadow: inset 0 1px 0 var(--border-subtle); }
tbody tr { transition: background-color var(--dur-fast) var(--ease-ref); }
tbody tr:hover { background: rgba(255,255,255,.025); }
[data-theme="light"] tbody tr:hover { background: rgba(15,23,42,.03); }

/* ---------- Timeline --------------------------------------------------- */
.timeline { display: grid; gap: var(--space-8); }
.timeline li { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: var(--space-8); }
.timeline li > div:first-child {
  color: var(--accent); font-weight: 600; font-size: var(--fs-small);
  font-family: var(--font-mono); letter-spacing: var(--tracking-wide);
}
.timeline li > div:last-child { position: relative; padding-left: var(--space-8); }
.timeline li > div:last-child::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline li > div:last-child::after {
  content: ""; position: absolute; left: 4px; top: 1.4em; bottom: calc(var(--space-8) * -1);
  width: 1px; background: linear-gradient(180deg, var(--border-default), transparent);
}
.timeline li:last-child > div:last-child::after { display: none; }
.timeline h3 { font-size: var(--fs-h4); margin-bottom: var(--space-2); }
@media (max-width: 700px) {
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .timeline li > div:last-child::after { display: none; }
}

/* ---------- Finale ----------------------------------------------------- */
.finale { position: relative; text-align: center; overflow: clip; }
.finale::before {
  content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: min(1100px, 130%); aspect-ratio: 2 / 1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(99,102,241,.24), transparent 70%);
  filter: blur(28px);
}
.finale > * { position: relative; }
.finale h2 { font-size: var(--fs-h1); letter-spacing: var(--tracking-display); }
.finale .lead { margin-inline: auto; margin-top: var(--space-6); }
.finale .btn-row { justify-content: center; }

/* ---------- Footer ----------------------------------------------------- */
.site-footer { position: relative; padding-block: var(--section-y) var(--space-12); }
.site-footer::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-default) 15%, var(--border-default) 85%, transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: var(--space-10); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid h4 {
  font-size: var(--fs-micro); letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--space-4); font-family: var(--font-body); font-weight: 600;
}
.footer-grid li + li { margin-top: var(--space-3); }
.footer-grid a { font-size: var(--fs-small); color: var(--text-secondary); transition: color var(--dur-fast) var(--ease-ref); }
.footer-grid a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center;
  margin-top: var(--space-16); padding-top: var(--space-8); font-size: var(--fs-small); color: var(--text-faint);
  box-shadow: inset 0 1px 0 var(--border-subtle);
}
.footer-tools { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-tools button {
  background: var(--surface-1); border: 0; box-shadow: inset 0 0 0 1px var(--border-default);
  color: var(--text-secondary); border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4); font-size: var(--fs-small); cursor: pointer; min-height: 40px;
  transition: color var(--dur-fast) var(--ease-ref), box-shadow var(--dur-fast) var(--ease-ref), background-color var(--dur-fast) var(--ease-ref);
}
.footer-tools button:hover { box-shadow: inset 0 0 0 1px var(--accent); color: var(--text-primary); background: var(--surface-2); }

/* ---------- Blog / resource lists -------------------------------------- */
.post { display: grid; gap: var(--space-3); }
.post .meta {
  font-size: var(--fs-micro); color: var(--accent); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; font-weight: 600;
}
.post h3 { font-size: var(--fs-h4); letter-spacing: -.02em; }
.post a { color: inherit; }

/* ---------- Forms ------------------------------------------------------ */
.form { display: grid; gap: var(--space-5); max-width: 560px; }
.field { display: grid; gap: var(--space-2); }
.field label { font-size: var(--fs-small); color: var(--text-primary); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--surface-inset); border: 0; box-shadow: inset 0 0 0 1px var(--border-default);
  color: var(--text-primary); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); font: inherit; font-size: var(--fs-body); min-height: 46px;
  transition: box-shadow var(--dur-fast) var(--ease-ref), background-color var(--dur-fast) var(--ease-ref);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-softer);
}
.field textarea { min-height: 132px; resize: vertical; }

/* ---------- Performance ------------------------------------------------ */
.section, .scene { content-visibility: auto; contain-intrinsic-size: 1px 900px; }

/* ==========================================================================
   Reduced motion (CRITICAL) — content is complete and readable, unpinned.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .scene { height: auto !important; }
  .scene__stage { position: static !important; height: auto !important; overflow: visible; padding-block: var(--section-y); }
  [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .kinetic .line > span { transform: none !important; filter: none !important; opacity: 1 !important; }
  .step { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hscene__track { flex-wrap: wrap; transform: none !important; }
  .hscene__track > * { flex: 1 1 320px; }
  .atmosphere, .page-bg { transform: none !important; }
  .grain { display: none !important; }
  .lattice g.frame { transform: none !important; }
  .lattice .edge { stroke-dashoffset: 0 !important; }
  .lattice .node { transform: none !important; opacity: 1 !important; }
  .btn::after, .card::after { display: none !important; }
  .progress-thread::after { transform: none !important; }
}

html[data-motion="off"] .scene { height: auto !important; }
html[data-motion="off"] .scene__stage { position: static !important; height: auto !important; overflow: visible; padding-block: var(--section-y); }
html[data-motion="off"] [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
html[data-motion="off"] .kinetic .line > span { transform: none !important; filter: none !important; opacity: 1 !important; }
html[data-motion="off"] .step { opacity: 1 !important; transform: none !important; filter: none !important; }
html[data-motion="off"] .hscene__track { flex-wrap: wrap; transform: none !important; }
html[data-motion="off"] .hscene__track > * { flex: 1 1 320px; }
html[data-motion="off"] .atmosphere, html[data-motion="off"] .page-bg { transform: none !important; }
html[data-motion="off"] .grain { display: none !important; }
html[data-motion="off"] .lattice g.frame { transform: none !important; }
html[data-motion="off"] .lattice .edge { stroke-dashoffset: 0 !important; }
html[data-motion="off"] .lattice .node { transform: none !important; opacity: 1 !important; }
html[data-motion="off"] .btn::after, html[data-motion="off"] .card::after { display: none !important; }
html[data-motion="off"] .progress-thread::after { transform: none !important; }
html[data-motion="off"] * { transition-duration: .001ms !important; animation-duration: .001ms !important; }

/* ========================================================================
   Precision refinement — typography, hierarchy, and restrained depth
   ======================================================================== */
body {
  line-height: 1.62;
  font-kerning: normal;
}

h1, h2, h3, h4 {
  font-weight: 650;
}
h1 { line-height: 1.01; }
h2 { line-height: 1.08; max-width: 19ch; }
h3 { line-height: 1.2; }
.lead { line-height: 1.58; max-width: 58ch; }
.small { line-height: 1.55; }
.section-head { max-width: 64ch; }
.section-head h2 { max-width: 18ch; }
.text-center .section-head h2,
.section-head.text-center h2 { margin-inline: auto; }

/* Ambient color supports the content instead of competing with it. */
.page-bg { opacity: .62; }
.grain { opacity: .018; }
.atmosphere {
  filter: blur(24px);
  opacity: .32;
}

/* Labels become precise navigational cues, not decorative flourishes. */
.eyebrow {
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--accent);
  font-weight: 650;
}
.eyebrow::before {
  width: 16px;
  background: currentColor;
  opacity: .7;
}

/* One strong action treatment; no sheen or glow. */
.btn {
  min-height: 44px;
  padding: 10px var(--space-5);
  border-radius: var(--radius-md);
  letter-spacing: -.01em;
  box-shadow: none;
}
.btn::after { display: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  background-image: none;
  color: var(--text-on-accent);
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-default);
  backdrop-filter: none;
}
.btn-ghost:hover { background: var(--surface-1); }
.btn-sm { min-height: 38px; padding: 8px var(--space-4); }

/* Cards use surface, border, and spacing—not effects—to establish hierarchy. */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  padding: clamp(22px, 2.2vw, 30px);
  box-shadow: none;
  backdrop-filter: none;
  transition: transform var(--dur-base) var(--ease-ref),
              border-color var(--dur-base) var(--ease-ref),
              background-color var(--dur-base) var(--ease-ref);
}
.card::before,
.card::after { display: none; }
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  background: var(--surface-2);
  box-shadow: none;
}
.card--flat:hover { transform: none; box-shadow: none; }
.card h3 { font-size: var(--fs-h4); }
.card p { line-height: 1.62; }
.icon-badge {
  width: 42px;
  height: 42px;
  margin-bottom: var(--space-5);
  background: var(--accent-soft);
  border: 1px solid rgba(139,147,255,.18);
  box-shadow: none;
}
.badge,
.badge--muted,
.badge--success,
.pill {
  box-shadow: none;
  border: 1px solid var(--border-subtle);
}
.checklist li { margin-top: var(--space-4); }
.checklist li::before {
  width: 17px;
  height: 17px;
  background: var(--accent);
  box-shadow: none;
}
.checklist li::after { top: calc(.42em + 5px); }

/* Navigation is crisp and architectural. */
.site-header.is-scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header::after {
  background: var(--border-subtle);
}
.scroll-progress {
  height: 1px;
  background: var(--accent);
  box-shadow: none;
}
.nav { min-height: 68px; }
.brand { font-size: 1rem; letter-spacing: -.025em; }
.brand svg { width: 25px; height: 25px; }
.nav__link::after { background: var(--accent); height: 1px; }
.mega {
  background: var(--surface-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.mega::before { display: none; }
.mobile-menu { background: var(--bg-base); background-image: none; }

/* The hero remains memorable without overwhelming the page. */
.hero { padding-block: clamp(64px, 9vw, 120px) var(--section-y); }
.hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); }
.hero h1 {
  max-width: 10.5ch;
  font-weight: 700;
  line-height: .98;
}
.hero h1 .line:last-child > span {
  background: none;
  color: var(--accent-2);
  -webkit-text-fill-color: currentColor;
}
.hero .lead { margin-top: var(--space-5); max-width: 56ch; }
.hero__stats {
  gap: clamp(24px, 3vw, 44px);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.hero__stats div strong { font-size: var(--fs-h4); font-weight: 650; }
.hero__stats div span { margin-top: 2px; display: block; }

/* Technical illustration: crisp line work, almost no glow. */
.lattice .edge,
.lattice .edge--2,
.lattice .node,
.lattice .node--hot { filter: none; }
.lattice .edge { opacity: .7; }
.lattice .edge--2 { opacity: .52; }
.lattice-wrap {
  padding: clamp(16px, 3vw, 32px);
  background: radial-gradient(62% 62% at 50% 45%, rgba(139,147,255,.075), transparent 74%);
}
.lattice-wrap::before { opacity: .5; }

/* Data and proof points stay typographic rather than effect-led. */
.stat strong {
  color: var(--text-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);
  font-weight: 650;
}
.logos { gap: clamp(18px, 3vw, 40px); }
.logos li { letter-spacing: .075em; font-size: .8125rem; }
.quote {
  padding: clamp(22px, 2.2vw, 30px);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}
.quote::before { display: none; }
.quote::after { font-size: 5rem; opacity: .09; }
.quote blockquote { line-height: 1.58; }

/* Process steps gain emphasis through contrast and alignment only. */
.step {
  border: 1px solid var(--border-subtle);
  background: transparent;
  box-shadow: none;
}
.step.is-active {
  transform: translateX(4px);
  background: var(--surface-1);
  border-color: rgba(139,147,255,.32);
  box-shadow: none;
}
.step__num { background: transparent; border: 1px solid var(--border-default); }
.step.is-active .step__num {
  background: var(--accent);
  background-image: none;
  border-color: var(--accent);
}
.progress-thread { height: 2px; }
.progress-thread::after { background: var(--accent); box-shadow: none; }

/* Product UI is the one intentionally elevated object. */
.app-shell {
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
}
.app-shell__bar,
.app-nav,
.metric,
.spark { box-shadow: none; border-color: var(--border-subtle); }
.app-shell__bar { border-bottom: 1px solid var(--border-subtle); }
.app-nav { border-right: 1px solid var(--border-subtle); }
.metric { border: 1px solid var(--border-subtle); }
.spark { border: 1px solid var(--border-subtle); }
.spark i { background: var(--accent); box-shadow: none; }
.spark i:last-child { background: var(--accent-2); }

.window { border: 1px solid var(--border-default); box-shadow: var(--shadow-lg); }
.price-card.is-featured {
  background: var(--surface-2);
  border-color: rgba(139,147,255,.36);
  box-shadow: none;
  transform: translateY(-3px);
}
.price-card.is-featured::before { display: none; }
.toggle-row { border: 1px solid var(--border-subtle); box-shadow: none; }
.toggle-row button[aria-pressed="true"] {
  background: var(--accent);
  background-image: none;
  box-shadow: none;
}
.faq-item,
.faq-item:has(button[aria-expanded="true"]),
.table-wrap { border: 1px solid var(--border-subtle); box-shadow: none; }
.faq-item:has(button[aria-expanded="true"]) { border-color: rgba(139,147,255,.3); }
.timeline li > div:last-child::before { box-shadow: none; }

/* Gradients are retained only as a quiet closing spotlight. */
.gradient-text {
  background: none;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
}
.finale::before {
  background: radial-gradient(50% 50% at 50% 50%, rgba(139,147,255,.1), transparent 72%);
  filter: blur(36px);
}
.site-footer::before { background: var(--border-subtle); }
.footer-grid h4 { font-family: var(--font-sans); }
.footer-bottom { box-shadow: none; border-top: 1px solid var(--border-subtle); }
.footer-tools button,
.field input,
.field select,
.field textarea { box-shadow: none; border: 1px solid var(--border-default); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-softer);
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 11.5ch; }
  .hero .lattice-wrap { width: min(620px, 86vw); margin-inline: auto; }
}

@media (max-width: 700px) {
  :root {
    --gutter: 20px;
    --section-y: 68px;
  }
  .hero { padding-top: 52px; }
  .hero h1 { max-width: 12ch; font-size: clamp(2.75rem, 12.5vw, 4rem); }
  .hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
  .hero__stats div span { line-height: 1.35; }
  .section-head { margin-bottom: var(--space-10); }
  .card, .quote { border-radius: var(--radius-lg); }
  .step { grid-template-columns: 38px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); }
  .step__num { width: 38px; height: 38px; }
  .scene__stage { padding-block: var(--space-10); }
  .app-main { padding: var(--space-4); }
}

@media (max-width: 480px) {
  .nav__actions .btn-primary { display: none; }
  .hero__stats { grid-template-columns: 1fr; }
  .hero__stats div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: var(--space-3); }
  .btn-row { display: grid; grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
