/* ───────── Tokens ───────── */
:root {
  --bg: #07080f;
  --bg-2: #0c0e1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0fa;
  --muted: #9aa0bc;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --error: #ff7a8a;
  --grad: linear-gradient(120deg, #9c84ff 0%, #7c5cff 35%, #22d3ee 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
  color-scheme: dark;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 1rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 60ch; }
.link { color: var(--cyan); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 0.98rem/1 var(--font); color: #fff;
  background: linear-gradient(120deg, #7c5cff, #4f8bff 55%, #22d3ee);
  background-size: 160% 100%; background-position: 0 0;
  box-shadow: 0 8px 30px -10px rgba(124, 92, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: background-position .4s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(34, 211, 238, 0.6), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3); }
.btn-small { padding: 10px 18px; font-size: 0.9rem; }
.btn-full { width: 100%; }

/* ───────── Header ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, .site-header.nav-open {
  background: rgba(7, 8, 15, 0.75);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color .2s, background .2s; }
.site-nav a:not(.btn):hover, .site-nav a.active:not(.btn) { color: var(--text); background: var(--surface-2); }
.site-nav .btn { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ───────── Logo parts ───────── */
.logo g { transition: opacity .4s ease, transform .4s ease; }
.logo .dim { opacity: 0.16; }
.logo .lg-ticks { transform-box: view-box; transform-origin: 60px 70px; }
.logo .lg-left, .logo .lg-right { transition: transform .4s ease; }
.logo .split .lg-left { transform: translateX(-4px); }
.logo .split .lg-right { transform: translateX(4px); }

/* ───────── Hero ───────── */
.hero { padding-top: clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 40% at 70% 35%, rgba(124, 92, 255, 0.28), transparent 70%),
    radial-gradient(30% 35% at 85% 55%, rgba(34, 211, 238, 0.18), transparent 70%),
    radial-gradient(35% 30% at 15% 20%, rgba(91, 61, 245, 0.14), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.35;
  mask-image: radial-gradient(60% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; min-height: min(72vh, 680px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-mark { width: 72%; filter: drop-shadow(0 30px 60px rgba(124, 92, 255, 0.45)); animation: rise 6s ease-in-out infinite; }
.hero-mark .lg-ticks { animation: spin 22s linear infinite; }
.orbit { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed rgba(255,255,255,0.12); animation: spin 60s linear infinite; }
.orbit::before { content: ""; position: absolute; top: 12%; left: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.orbit-2 { inset: 16%; border-style: solid; border-color: rgba(124, 92, 255, 0.18); animation-duration: 40s; animation-direction: reverse; }
.orbit-2::before { top: auto; left: auto; bottom: 8%; right: 18%; width: 7px; height: 7px; background: var(--violet); box-shadow: 0 0 18px var(--violet); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ───────── Section heads ───────── */
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.section-head .lede { margin: 0 auto; }

/* ───────── Words ───────── */
.words { background: linear-gradient(180deg, transparent, var(--bg-2) 40%, transparent); }
.word-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.word-card, .service-card, .anatomy-card, .step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .3s ease, transform .3s ease, background .3s ease;
}
.word-card:hover, .service-card:hover, .anatomy-card:hover, .step:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-4px); }
.word-card h3 { font-size: 2.2rem; margin-bottom: 0.1em; }
.word-lang { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.word-def { font-family: var(--display); font-size: 1.15rem; margin-bottom: 1em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.word-card p:last-child, .service-card p, .anatomy-card p, .step p { color: var(--muted); margin: 0; }

/* ───────── Flywheel steps ───────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; position: relative; }
.step { position: relative; overflow: hidden; }
.step::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px; border-radius: 50%;
  border: 2px dashed rgba(124, 92, 255, 0.25);
}
.step-num { display: block; font-family: var(--display); font-size: 3rem; font-weight: 700; line-height: 1; margin-bottom: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ───────── Services ───────── */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 20px;
  font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(34, 211, 238, 0.25));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

/* ───────── CTA ───────── */
.cta { padding-top: 0; }
.cta-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px; position: relative; overflow: hidden;
  background:
    radial-gradient(60% 120% at 0% 0%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(50% 120% at 100% 100%, rgba(34, 211, 238, 0.2), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--border-strong);
}
.cta-card h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.cta-card .lede { margin: 0; }
.cta-mark { width: 96px; height: 96px; }

/* ───────── Page hero (inner pages) ───────── */
.page-hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(32px, 5vw, 56px); overflow: hidden; }
.page-hero .lede { margin-top: 0.5rem; }

/* ───────── Story ───────── */
.prose { padding-top: 0; }
.story-block { padding: 32px 0; border-top: 1px solid var(--border); }
.story-block:first-child { border-top: 0; padding-top: 0; }
.story-block h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.story-block p { font-size: 1.15rem; color: var(--muted); }
.story-block em, .anatomy-card em { color: var(--text); font-style: italic; }
.word-tag { font-size: 0.8rem; font-family: var(--font); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--cyan); }
.pull { margin: 40px 0 0; padding: 36px 40px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--violet); }
.pull p { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.4; margin: 0; }
.anatomy { padding-top: 40px; }
.anatomy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.anatomy-card { text-align: center; }
.anatomy-mark { width: 140px; height: 140px; margin: 0 auto 20px; }

/* ───────── Contact ───────── */
.contact-hero { padding-bottom: clamp(72px, 10vw, 120px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-copy h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.contact-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 14px; }
.contact-points li { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); flex: none; box-shadow: 0 0 14px rgba(124, 92, 255, 0.7); }
.form-card { background: rgba(12, 14, 26, 0.8); border: 1px solid var(--border-strong); border-radius: 24px; padding: clamp(24px, 4vw, 40px); backdrop-filter: blur(10px); box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 8px; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); color: var(--text);
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.2); }
.has-error input, .has-error textarea { border-color: var(--error); }
.error { color: var(--error); font-size: 0.85rem; margin: 6px 0 0; }
.form-error { background: rgba(255, 122, 138, 0.1); border: 1px solid rgba(255, 122, 138, 0.35); color: var(--error); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.92rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sent { text-align: center; padding: 24px 0; }
.sent-mark { width: 96px; height: 96px; margin: 0 auto 20px; animation: rise 6s ease-in-out infinite; }
.sent p { color: var(--muted); }

/* ───────── 404 ───────── */
.notfound { min-height: 70vh; display: grid; place-items: center; }
.nf-mark { width: 120px; margin: 0 auto 24px; animation: rise 6s ease-in-out infinite; }
.notfound .lede { margin: 0 auto 2rem; }

/* ───────── Footer ───────── */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; background: var(--bg-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-grid .muted { margin-top: 14px; max-width: 34ch; font-size: 0.95rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 48px; align-content: start; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.88rem; color: var(--muted); }

/* ───────── Reveal ───────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; min-height: 0; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { max-width: 380px; margin: 0 auto; grid-row: 1; }
  .word-grid, .steps, .anatomy-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .cta-card .lede { margin: 0 auto; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px;
    background: rgba(7, 8, 15, 0.96); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav a:not(.btn) { padding: 12px 14px; }
  .site-nav .btn { margin: 8px 0 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  body { font-size: 16px; }
  .service-grid, .field-row { grid-template-columns: 1fr; }
  .word-card, .service-card, .anatomy-card, .step { padding: 24px; }
  .pull { padding: 24px; }
  .hero-cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
