/* ==========================================================================
   X way — Premium Dental Growth Partner
   Design system: dark-first, cinematic, x-ray cues, restrained motion
   ========================================================================== */

:root {
  --black: #0A0A0F;
  --ink: #101018;
  --dark: #1A1A24;
  --line: rgba(196, 181, 253, 0.12);
  --line-strong: rgba(196, 181, 253, 0.28);
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-dark: #5B21B6;
  --accent: #C4B5FD;
  --white: #FFFFFF;
  --grey: #A0A0BB;
  --grey-dim: #6B6B85;

  --serif: "Cormorant Garamond", "Crimson Pro", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --container: 1320px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--purple); color: var(--white); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }

/* --------------------------------------------------------------------------
   Ambient layers: grain + x-ray grid
   -------------------------------------------------------------------------- */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 3%); }
  40% { transform: translate(3%, -6%); }
  60% { transform: translate(-7%, 2%); }
  80% { transform: translate(5%, 5%); }
}

.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  opacity: 0.55;
}

.orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(90px); opacity: 0.45;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  animation: drift 18s var(--ease-in-out) infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, -40px) scale(1.15); }
}

/* --------------------------------------------------------------------------
   Preloader — "scanning"
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--black);
  display: grid; place-items: center;
  transition: clip-path 1.1s var(--ease-in-out);
  clip-path: inset(0 0 0 0);
}
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader__inner { text-align: center; width: min(320px, 70vw); }
.preloader__mark { width: 64px; height: 64px; margin: 0 auto 28px; }
.preloader__mark path {
  stroke-dasharray: 120; stroke-dashoffset: 120;
  animation: draw 1.2s var(--ease) forwards;
}
.preloader__mark path:nth-child(2) { animation-delay: 0.25s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.preloader__label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em;
  color: var(--grey); text-transform: uppercase;
  display: flex; justify-content: space-between;
}
.preloader__bar { height: 1px; background: var(--line); margin-top: 14px; overflow: hidden; }
.preloader__bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--purple-dark), var(--accent));
  box-shadow: 0 0 12px var(--purple-light);
  transition: width 0.25s linear;
}

/* --------------------------------------------------------------------------
   Cursor (desktop only)
   -------------------------------------------------------------------------- */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor {
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.cursor-dot { width: 5px; height: 5px; background: var(--white); }
.cursor.is-hover { width: 72px; height: 72px; background: rgba(255,255,255,0.95); border-color: transparent; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 26px 0;
  transition: padding 0.45s var(--ease), background 0.45s, border-color 0.45s, transform 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 14px 0;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__mark { width: 34px; height: 34px; }
.logo__word { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: 0.01em; line-height: 1; }
.logo__word em { font-style: italic; color: var(--accent); font-weight: 400; }

.nav__links { display: flex; gap: 38px; list-style: none; }
.nav__links a {
  position: relative; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey); transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 100%;
  background: var(--purple-light); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--white); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 60; }
.nav__toggle span {
  position: absolute; left: 10px; right: 10px; height: 1px; background: var(--white);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 26px; }
.nav-open .nav__toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-open .nav__toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--black);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad);
  clip-path: circle(0% at calc(100% - 44px) 44px);
  transition: clip-path 0.8s var(--ease-in-out);
}
.nav-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 44px); }
.mobile-menu a {
  font-family: var(--serif); font-size: clamp(40px, 11vw, 64px); line-height: 1.2;
  display: block; opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.nav-open .mobile-menu a { opacity: 1; transform: none; }
.nav-open .mobile-menu a:nth-child(2) { transition-delay: 0.08s; }
.nav-open .mobile-menu a:nth-child(3) { transition-delay: 0.16s; }
.nav-open .mobile-menu a:nth-child(4) { transition-delay: 0.24s; }
.mobile-menu small { margin-top: 40px; font-family: var(--mono); color: var(--grey); letter-spacing: 0.2em; font-size: 12px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --bx: 50%; --by: 50%;
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 30px; border-radius: 100px;
  font-size: 14px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  transition: border-color 0.4s, color 0.4s, transform 0.4s var(--ease);
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--bx); top: var(--by);
  width: 0; height: 0; border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease), height 0.6s var(--ease);
}
.btn:hover::before { width: 320%; height: 320%; }
.btn:hover { color: var(--black); border-color: var(--white); }
.btn svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-color: transparent;
  box-shadow: 0 10px 40px -10px rgba(124, 58, 237, 0.7), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn--sm { padding: 12px 22px; font-size: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.link-arrow svg { width: 14px; transition: transform 0.4s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--purple-light);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--purple-light); box-shadow: 0 0 12px var(--purple-light);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 8.4vw, 132px);
  line-height: 0.98; letter-spacing: -0.02em;
}
.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 1.04; letter-spacing: -0.015em;
}
.h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; }
.italic { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--grey); max-width: 620px; }
.muted { color: var(--grey); }
.mono { font-family: var(--mono); letter-spacing: 0.12em; }

.gradient-text {
  background: linear-gradient(110deg, var(--white) 20%, var(--accent) 45%, var(--purple-light) 55%, var(--white) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 7s linear infinite;
}
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Split-line reveal */
.split .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.split .line > span {
  display: block; transform: translateY(110%);
  transition: transform 1.2s var(--ease);
}
.split.is-in .line > span { transform: none; }
.split.is-in .line:nth-child(2) > span { transition-delay: 0.1s; }
.split.is-in .line:nth-child(3) > span { transition-delay: 0.2s; }
.split.is-in .line:nth-child(4) > span { transition-delay: 0.3s; }

/* Generic reveal */
[data-reveal] {
  opacity: 0; transform: translateY(40px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
section { position: relative; }
.section { padding: clamp(100px, 14vw, 180px) 0; }
.section__head { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: clamp(60px, 7vw, 100px); }
.section__head .eyebrow { margin-bottom: 26px; }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 140px 0 80px; overflow: hidden;
}
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 60px; align-items: center; }
.hero__content .eyebrow { margin-bottom: 34px; }
.hero__title { margin-bottom: 36px; }
.hero__lead { margin-bottom: 48px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__meta {
  margin-top: 70px; display: flex; gap: 48px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--grey-dim); text-transform: uppercase;
}
.hero__meta b { display: block; color: var(--white); font-family: var(--serif); font-size: 26px; letter-spacing: 0; font-weight: 400; text-transform: none; margin-bottom: 4px; }

/* Scan frame — Dr. X */
.scan {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: 24px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1d1530 0%, var(--ink) 60%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px -30px rgba(124, 58, 237, 0.45);
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}
.scan__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(0.95); }
.scan__fallback { position: absolute; inset: 0; display: none; place-items: center; }
.scan.no-img .scan__fallback { display: grid; }
.scan.no-img .scan__img { display: none; }
.scan__fallback svg { width: 56%; filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.55)); }
.scan__fallback .x-stroke { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s var(--ease) 1.4s forwards; }

.scan::before { /* x-ray tint */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,15,0) 55%, rgba(10,10,15,0.85) 100%);
}
.scan__line {
  position: absolute; left: 0; right: 0; height: 120px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(167, 139, 250, 0.22) 85%, rgba(196, 181, 253, 0.9) 100%);
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 6px 30px rgba(167, 139, 250, 0.7);
  animation: scan 4.5s var(--ease-in-out) infinite;
  mix-blend-mode: screen;
}
@keyframes scan { 0% { top: -120px; } 100% { top: 100%; } }

.scan__corner { position: absolute; width: 26px; height: 26px; z-index: 4; border-color: var(--accent); border-style: solid; opacity: 0.8; }
.scan__corner--tl { top: 18px; left: 18px; border-width: 1px 0 0 1px; }
.scan__corner--tr { top: 18px; right: 18px; border-width: 1px 1px 0 0; }
.scan__corner--bl { bottom: 18px; left: 18px; border-width: 0 0 1px 1px; }
.scan__corner--br { bottom: 18px; right: 18px; border-width: 0 1px 1px 0; }

.scan__hud {
  position: absolute; left: 28px; right: 28px; bottom: 28px; z-index: 4;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase;
}
.scan__hud strong { display: block; font-family: var(--serif); font-size: 28px; letter-spacing: 0; color: var(--white); font-weight: 500; text-transform: none; }
.scan__tag {
  position: absolute; z-index: 4; top: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.25em; color: var(--accent);
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 100px;
  background: rgba(10,10,15,0.6); backdrop-filter: blur(8px); white-space: nowrap;
}
.scan__tag i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; margin-right: 8px; animation: pulse 1.2s infinite; vertical-align: middle; }

.scroll-cue {
  position: absolute; bottom: 34px; right: var(--pad);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--grey-dim);
}
.scroll-cue span { width: 1px; height: 50px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue span::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%;
  background: var(--accent); animation: cue 2s var(--ease-in-out) infinite;
}
@keyframes cue { to { top: 100%; } }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee { border-block: 1px solid var(--line); padding: 26px 0; overflow: hidden; background: var(--ink); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex; align-items: center; gap: 40px; padding-right: 40px;
  font-family: var(--serif); font-size: clamp(26px, 3vw, 42px); font-style: italic; color: var(--grey); white-space: nowrap;
}
.marquee__item svg { width: 18px; color: var(--purple-light); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Statement (word-by-word light-up)
   -------------------------------------------------------------------------- */
.statement__text {
  font-family: var(--serif); font-size: clamp(32px, 4.6vw, 64px); line-height: 1.18; letter-spacing: -0.01em;
  max-width: 1100px;
}
.statement__text .w { color: rgba(255, 255, 255, 0.14); transition: color 0.5s var(--ease); }
.statement__text .w.is-lit { color: var(--white); }
.statement__text .w.em.is-lit { color: var(--accent); font-style: italic; }

/* --------------------------------------------------------------------------
   Findings / problem cards
   -------------------------------------------------------------------------- */
.findings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.finding {
  --mx: 50%; --my: 50%;
  position: relative; background: var(--black); padding: clamp(32px, 4vw, 56px);
  overflow: hidden; transition: background 0.5s;
}
.finding::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(124, 58, 237, 0.18), transparent 45%);
  transition: opacity 0.5s;
}
.finding:hover::before { opacity: 1; }
.finding__code { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--purple-light); margin-bottom: 40px; display: flex; justify-content: space-between; }
.finding__code span:last-child { color: var(--grey-dim); }
.finding h3 { margin-bottom: 16px; }
.finding p { color: var(--grey); max-width: 460px; }
.finding__meter { margin-top: 36px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.finding__meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple-dark), var(--accent)); transition: width 1.8s var(--ease) 0.3s; }
.finding.is-in .finding__meter span { width: var(--w, 70%); }

/* --------------------------------------------------------------------------
   Method — Diagnose / Plan / Grow (sticky)
   -------------------------------------------------------------------------- */
.method { background: linear-gradient(180deg, var(--black), var(--ink) 30%, var(--ink) 70%, var(--black)); }
.method__wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 120px); }
.method__sticky { position: sticky; top: 140px; align-self: start; }
.method__counter {
  font-family: var(--serif); font-size: clamp(120px, 16vw, 240px); line-height: 0.85; font-weight: 300;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
  margin: 30px 0 20px; position: relative; height: 0.85em; overflow: hidden;
}
.method__counter span { display: block; transition: transform 0.9s var(--ease); }
.method__steps { display: flex; flex-direction: column; gap: 22vh; padding: 10vh 0 20vh; }
.step { opacity: 0.25; transition: opacity 0.7s var(--ease); }
.step.is-active { opacity: 1; }
.step__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.25em; color: var(--purple-light); margin-bottom: 18px; }
.step h3 { font-family: var(--serif); font-size: clamp(48px, 6vw, 88px); font-weight: 400; line-height: 1; margin-bottom: 24px; }
.step p { color: var(--grey); font-size: 18px; max-width: 520px; }
.step ul { margin-top: 26px; list-style: none; display: grid; gap: 12px; }
.step li { display: flex; gap: 14px; align-items: baseline; color: var(--white); font-size: 16px; }
.step li::before { content: "+"; font-family: var(--mono); color: var(--purple-light); }

/* --------------------------------------------------------------------------
   Services (cards)
   -------------------------------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc {
  --mx: 50%; --my: 50%;
  position: relative; border-radius: var(--radius); padding: 34px 28px 30px;
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.8), rgba(16, 16, 24, 0.8));
  border: 1px solid var(--line);
  min-height: 300px; display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform 0.6s var(--ease), border-color 0.5s;
}
.svc::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(167, 139, 250, 0.16), transparent 45%);
  transition: opacity 0.4s;
}
.svc:hover { border-color: var(--line-strong); transform: translateY(-6px); }
.svc:hover::before { opacity: 1; }
.svc__num { font-family: var(--mono); font-size: 12px; color: var(--grey-dim); letter-spacing: 0.2em; }
.svc__icon { width: 46px; height: 46px; margin: 34px 0 auto; color: var(--purple-light); }
.svc__icon svg { width: 100%; height: 100%; }
.svc h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.15; margin: 40px 0 12px; }
.svc p { font-size: 15px; color: var(--grey); }

/* --------------------------------------------------------------------------
   Contrast: Others vs X way
   -------------------------------------------------------------------------- */
.contrast { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contrast__col { padding: clamp(32px, 4vw, 60px); }
.contrast__col--them { background: var(--ink); }
.contrast__col--us { background: linear-gradient(160deg, rgba(91, 33, 182, 0.35), rgba(10,10,15,0.9) 60%); border-left: 1px solid var(--line-strong); position: relative; }
.contrast__col h3 { font-family: var(--mono); font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 36px; }
.contrast__col--them h3 { color: var(--grey-dim); }
.contrast__col--us h3 { color: var(--accent); }
.contrast__row { padding: 20px 0; border-top: 1px solid var(--line); font-size: 18px; display: flex; gap: 16px; align-items: baseline; }
.contrast__col--them .contrast__row { color: var(--grey-dim); text-decoration: line-through; text-decoration-color: rgba(160,160,187,0.35); }
.contrast__row i { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--grey-dim); }
.contrast__col--us .contrast__row i { color: var(--purple-light); }

/* --------------------------------------------------------------------------
   Process timeline
   -------------------------------------------------------------------------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.timeline::before {
  content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 1px; background: var(--line);
}
.timeline__progress {
  position: absolute; top: 22px; left: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--purple), var(--accent));
  box-shadow: 0 0 14px var(--purple-light);
  transition: width 2.4s var(--ease);
}
.timeline.is-in .timeline__progress { width: 100%; }
.tl { position: relative; padding-top: 70px; }
.tl__dot {
  position: absolute; top: 14px; left: 0; width: 17px; height: 17px; border-radius: 50%;
  background: var(--black); border: 1px solid var(--line-strong);
  transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
  transition-delay: var(--d, 0s);
}
.timeline.is-in .tl__dot { background: var(--purple); border-color: var(--accent); box-shadow: 0 0 18px var(--purple-light); }
.tl__week { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--purple-light); margin-bottom: 14px; }
.tl h4 { font-family: var(--serif); font-size: 26px; font-weight: 500; margin-bottom: 10px; line-height: 1.1; }
.tl p { font-size: 15px; color: var(--grey); }

/* --------------------------------------------------------------------------
   Dr. X feature split
   -------------------------------------------------------------------------- */
.drx { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.drx__visual { position: relative; }
.drx__visual .scan { aspect-ratio: 1 / 1.1; }
.drx__quote { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 48px); line-height: 1.2; font-style: italic; margin: 30px 0; }
.drx__sig { font-family: var(--mono); font-size: 12px; letter-spacing: 0.25em; color: var(--grey); }
.drx__traits { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.drx__traits div { background: var(--black); padding: 22px; }
.drx__traits b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 4px; }
.drx__traits span { font-size: 13px; color: var(--grey); }

/* --------------------------------------------------------------------------
   Fit checklist
   -------------------------------------------------------------------------- */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fit__card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(30px, 4vw, 50px); background: var(--ink); }
.fit__card h3 { margin-bottom: 28px; }
.fit__card ul { list-style: none; display: grid; gap: 16px; }
.fit__card li { display: flex; gap: 16px; color: var(--grey); }
.fit__card li svg { flex: none; width: 20px; height: 20px; margin-top: 4px; }
.fit__card--yes { border-color: var(--line-strong); background: linear-gradient(170deg, rgba(124, 58, 237, 0.16), var(--ink) 55%); }
.fit__card--yes li { color: var(--white); }
.fit__card--yes svg { color: var(--purple-light); }
.fit__card--no svg { color: var(--grey-dim); }

/* --------------------------------------------------------------------------
   CTA
   -------------------------------------------------------------------------- */
.cta {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(120px, 16vw, 220px) 0;
}
.cta__glow {
  position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; max-width: 140vw;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 60%);
  animation: breathe 6s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.65; } }
.cta__rings { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.cta__rings span {
  position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid var(--line);
  transform: translate(-50%, -50%);
  animation: ring 6s var(--ease) infinite;
}
.cta__rings span:nth-child(2) { animation-delay: 2s; }
.cta__rings span:nth-child(3) { animation-delay: 4s; }
@keyframes ring { from { width: 100px; height: 100px; opacity: 1; } to { width: 1100px; height: 1100px; opacity: 0; } }
.cta .container { position: relative; }
.cta .eyebrow { margin-bottom: 30px; }
.cta .h2 { max-width: 900px; margin: 0 auto 30px; }
.cta .lead { margin: 0 auto 50px; }
.cta__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero { padding: clamp(170px, 20vw, 240px) 0 clamp(70px, 9vw, 120px); overflow: hidden; }
.page-hero .eyebrow { margin-bottom: 30px; }
.page-hero .display { font-size: clamp(46px, 7.4vw, 116px); margin-bottom: 34px; max-width: 1100px; }
.breadcrumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--grey-dim); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--white); }

/* Services detail rows */
.svc-row {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: 50px;
  padding: clamp(40px, 5vw, 70px) 0; border-top: 1px solid var(--line);
  position: relative;
}
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row::after {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--purple-light), transparent);
  transition: width 1.4s var(--ease);
}
.svc-row.is-in::after { width: 60%; }
.svc-row__num { font-family: var(--mono); font-size: 13px; color: var(--purple-light); letter-spacing: 0.2em; padding-top: 10px; }
.svc-row h3 { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 52px); font-weight: 400; line-height: 1.05; }
.svc-row h3 small { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--grey-dim); margin-top: 16px; text-transform: uppercase; }
.svc-row p { color: var(--grey); margin-bottom: 22px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 13px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 100px; color: var(--accent); }

/* Layers (system diagram) */
.layers { display: grid; gap: 14px; }
.layer {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 30px; align-items: center;
  padding: 30px 36px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink); transition: border-color 0.4s, transform 0.6s var(--ease);
}
.layer:hover { border-color: var(--line-strong); transform: translateX(8px); }
.layer__name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; color: var(--purple-light); text-transform: uppercase; }
.layer__body h4 { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.layer__body p { color: var(--grey); font-size: 15px; }
.layer__bars { display: flex; gap: 4px; }
.layer__bars i { width: 4px; height: 28px; background: var(--line-strong); border-radius: 2px; }
.layer__bars i.on { background: var(--purple-light); box-shadow: 0 0 10px var(--purple-light); }

/* About values */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value { padding: 40px 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); }
.value__k { font-family: var(--serif); font-style: italic; font-size: 64px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--purple-light); margin-bottom: 30px; }
.value h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; margin-bottom: 12px; }
.value p { color: var(--grey); font-size: 15px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); }
.prose p { color: var(--grey); margin-bottom: 22px; font-size: 18px; }
.prose p strong { color: var(--white); font-weight: 400; }

/* --------------------------------------------------------------------------
   Diagnostic form
   -------------------------------------------------------------------------- */
.diag { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(40px, 6vw, 100px); align-items: start; }
.diag__aside { position: sticky; top: 130px; }
.diag__steps { list-style: none; margin-top: 40px; display: grid; gap: 4px; }
.diag__steps li {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
  font-size: 15px; color: var(--grey-dim); transition: color 0.4s;
  border-bottom: 1px solid var(--line);
}
.diag__steps li b { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.15em; width: 28px; }
.diag__steps li.is-current { color: var(--white); }
.diag__steps li.is-current b { color: var(--purple-light); }
.diag__steps li.is-done { color: var(--grey); }
.diag__steps li.is-done b { color: var(--accent); }
.diag__note { margin-top: 36px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; color: var(--grey); }
.diag__note b { color: var(--white); font-weight: 400; }

.form-card {
  border: 1px solid var(--line-strong); border-radius: 24px;
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.7), rgba(16, 16, 24, 0.85));
  backdrop-filter: blur(10px);
  padding: clamp(28px, 4vw, 56px); position: relative; overflow: hidden;
}
.form-progress { height: 2px; background: var(--line); border-radius: 2px; margin-bottom: 40px; overflow: hidden; }
.form-progress span { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--purple), var(--accent)); transition: width 0.7s var(--ease); }

.fstep { display: none; }
.fstep.is-current { display: block; animation: stepIn 0.7s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.fstep__head { margin-bottom: 34px; }
.fstep__head .mono { font-size: 12px; color: var(--purple-light); display: block; margin-bottom: 12px; letter-spacing: 0.25em; }
.fstep__head h2 { font-family: var(--serif); font-size: clamp(30px, 3vw, 42px); font-weight: 400; line-height: 1.1; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-size: 13px; letter-spacing: 0.06em; color: var(--grey); }
.field label i, .field legend i { color: var(--purple-light); font-style: normal; }
.input, .select, .textarea {
  width: 100%; padding: 16px 18px; border-radius: 12px;
  background: rgba(10, 10, 15, 0.6); border: 1px solid var(--line);
  color: var(--white); font: inherit; font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23A78BFA' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.select option { background: var(--dark); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--purple-light); box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18); background: rgba(10,10,15,0.85); }
.input::placeholder, .textarea::placeholder { color: var(--grey-dim); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea, .field.has-error .chips { border-color: #f87171; }
.field__err { font-size: 12px; color: #f87171; display: none; }
.field.has-error .field__err { display: block; }

fieldset.field { border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; border: 1px solid transparent; border-radius: 12px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 11px 18px; border-radius: 100px; font-size: 14px;
  border: 1px solid var(--line); color: var(--grey); cursor: pointer;
  transition: all 0.3s var(--ease);
}
.chip span:hover { border-color: var(--line-strong); color: var(--white); }
.chip input:checked + span { background: var(--purple); border-color: var(--purple-light); color: var(--white); box-shadow: 0 6px 24px -6px rgba(124, 58, 237, 0.8); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; gap: 16px; }
.form-nav .btn[hidden] { display: none; }
.hp { position: absolute; left: -9999px; }

.form-success { display: none; text-align: center; padding: 40px 0; }
.form-success.is-shown { display: block; animation: stepIn 0.8s var(--ease); }
.form-success svg { width: 84px; margin: 0 auto 30px; color: var(--purple-light); }
.form-success svg path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.2s var(--ease) 0.3s forwards; }
.form-success h2 { font-family: var(--serif); font-size: 44px; font-weight: 400; margin-bottom: 16px; }
.form-success p { color: var(--grey); max-width: 460px; margin: 0 auto 30px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 90px 0 40px; position: relative; overflow: hidden; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 90px; }
.footer__brand p { color: var(--grey); margin-top: 22px; max-width: 320px; font-size: 15px; }
.footer h5 { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.24em; color: var(--grey-dim); text-transform: uppercase; margin-bottom: 22px; }
.footer ul { list-style: none; display: grid; gap: 12px; }
.footer ul a { color: var(--grey); font-size: 15px; transition: color 0.3s; }
.footer ul a:hover { color: var(--white); }
.footer__giant {
  font-family: var(--serif); font-weight: 400; font-size: clamp(90px, 22vw, 340px); line-height: 0.8; letter-spacing: -0.04em;
  text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, rgba(196, 181, 253, 0.22), rgba(196, 181, 253, 0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; margin-bottom: 40px;
}
.footer__giant em { font-style: italic; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; font-size: 13px; color: var(--grey-dim); }
.footer__bottom .mono { font-size: 11px; letter-spacing: 0.2em; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px 0; overflow: hidden; }
.notfound__code { font-family: var(--serif); font-size: clamp(120px, 26vw, 360px); line-height: 0.85; color: transparent; -webkit-text-stroke: 1px var(--line-strong); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before, .timeline__progress { top: 0; bottom: 0; left: 8px; width: 1px; height: auto; right: auto; }
  .timeline__progress { height: 0; transition: height 2.4s var(--ease); }
  .timeline.is-in .timeline__progress { width: 1px; height: 100%; }
  .tl { padding: 0 0 46px 50px; }
  .tl__dot { top: 4px; left: 0; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 968px) {
  .nav__links, .nav .btn { display: none; }
  .nav__toggle { display: block; }
  .hero__grid, .section__head, .method__wrap, .drx, .two-col, .diag, .fit { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; width: 100%; margin: 0 auto; }
  .method__sticky, .diag__aside { position: static; }
  .method__steps { gap: 80px; padding: 20px 0; }
  .step { opacity: 1; }
  .contrast { grid-template-columns: 1fr; }
  .contrast__col--us { border-left: 0; border-top: 1px solid var(--line-strong); }
  .svc-row { grid-template-columns: 1fr; gap: 20px; }
  .layer { grid-template-columns: 1fr; gap: 12px; }
  .values { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .services-grid, .findings, .fgrid { grid-template-columns: 1fr; }
  .drx__traits { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__meta { gap: 22px; margin-top: 50px; flex-wrap: nowrap; font-size: 10px; letter-spacing: 0.12em; }
  .hero__meta b { font-size: 22px; }
  .btn { padding: 15px 24px; }
  .form-nav { flex-direction: column-reverse; align-items: stretch; }
  .form-nav .btn { justify-content: center; }
  .scroll-cue { display: none; }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal], .split .line > span { opacity: 1 !important; transform: none !important; }
  .statement__text .w { color: var(--white); }
  .scan__line { display: none; }
}
