:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --alt: #f2f4f8;
  --text: #121620;
  --muted: #5a6273;
  --border: #e3e6ec;
  --accent: #2557d6;
  --accent-2: #12a77a;
  --accent-text: #ffffff;
  --hl: linear-gradient(90deg, #2557d6, #12a77a);
  --ok: #12804f;
  --ok-bg: #e3f6ec;
  --warn: #8a5a00;
  --warn-bg: #fdf1d8;
  --dash-bg: #0f1420;
  --dash-text: #d9e0ee;
  --contact-bg: #12204a;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f15;
    --surface: #141922;
    --alt: #10141c;
    --text: #e8ebf1;
    --muted: #98a1b3;
    --border: #252c39;
    --accent: #6d95ff;
    --accent-2: #3fd6a3;
    --accent-text: #0c0f15;
    --hl: linear-gradient(90deg, #6d95ff, #3fd6a3);
    --ok: #5fdc9b;
    --ok-bg: #11301f;
    --warn: #f3c56b;
    --warn-bg: #3a2c0f;
    --dash-bg: #0a0d14;
    --contact-bg: #15224d;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3, h4 { letter-spacing: -0.02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo { width: 26px; height: 26px; border-radius: 7px; background: var(--hl); }
.nav nav { display: flex; gap: 24px; align-items: center; }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  font-weight: 600; text-decoration: none; border: 1px solid var(--accent);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-small { padding: 7px 16px; font-size: 14px; }
.btn-light { background: #fff; color: #12204a; border-color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }

/* Hero */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 400px at 85% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(700px 400px at 0% 100%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; margin: 18px 0; font-weight: 800; }
.hl { background: var(--hl); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 600px; }

.badge {
  display: inline-block; margin: 0;
  padding: 5px 14px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok);
  font-size: 14px; font-weight: 600;
}
.badge::before { content: "● "; animation: pulse 2s infinite; }
.badge.later { background: var(--warn-bg); color: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; }
.facts li::before { content: "✓ "; color: var(--accent-2); font-weight: 700; }

/* Dashboard illustration */
.dash {
  margin: 0; position: relative;
  background: var(--dash-bg); color: var(--dash-text);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(18, 32, 74, .45);
  border: 1px solid rgba(255,255,255,.06);
}
.dash-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(255,255,255,.04); color: #8d97ab; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a4255; }
.dots i:nth-child(1) { background: #ff6159; }
.dots i:nth-child(2) { background: #ffbd2e; }
.dots i:nth-child(3) { background: #28c941; }
.dash-body { padding: 18px 18px 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis div { background: rgba(255,255,255,.04); border-radius: 10px; padding: 10px 12px; }
.kpis .k { display: block; font-size: 12px; color: #8d97ab; }
.kpis .v { font-size: 20px; font-weight: 700; }
.kpis .v.ok { color: #5fdc9b; }
.chart { width: 100%; height: auto; margin-top: 14px; color: #6d95ff; }
.chart .lat { fill: none; stroke: #6d95ff; stroke-width: 2.5; }
.chart .load { fill: none; stroke: #3fd6a3; stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .8; }
.chart .sla { stroke: #ff8a7a; stroke-width: 1; stroke-dasharray: 3 4; }
.chart .sla-label { fill: #ff8a7a; font: 500 10px "JetBrains Mono", monospace; }
.legend { display: flex; gap: 16px; font-size: 12px; color: #8d97ab; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; }
.l-lat::before { background: #6d95ff; }
.l-load::before { background: #3fd6a3; }
.pass { color: #5fdc9b; margin: 12px 0 0; }
.dash figcaption { position: absolute; top: 12px; right: 16px; font-size: 11px; color: #5d6679; }

/* Trust strip */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); padding: 22px 0; }
.trust .wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.trust-label { margin: 0; color: var(--muted); font-size: 14px; }
.trust-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 36px; }
.trust-list li { font-weight: 800; font-size: 19px; color: var(--muted); opacity: .85; letter-spacing: -0.01em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 48px; padding-bottom: 8px; }
.stats div { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
.num { font-size: 38px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; line-height: 1.1; }

/* Sections */
.section { padding: 80px 16px; }
.section.alt { background: var(--alt); padding-left: 0; padding-right: 0; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.section h2 { font-size: clamp(26px, 3.5vw, 36px); margin: 0 0 12px; line-height: 1.2; }
.section-lead { color: var(--muted); font-size: 17px; margin: 0 0 32px; max-width: 640px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 28px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card h3 { margin: 8px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: var(--alt); }

/* Case studies */
.cases { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.case {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
}
.case-meta h3 { margin: 8px 0 2px; font-size: 22px; }
.case-meta p { margin: 0; font-size: 14px; }
.case-body h4 { margin: 0 0 10px; font-size: 18px; }
.case-body p { margin: 8px 0; color: var(--muted); }
.case-body strong { color: var(--text); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }

/* Plans */
.plan { display: flex; flex-direction: column; position: relative; }
.plan-sub { font-size: 14px; margin-bottom: 14px !important; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.plan li::before { content: "✓ "; color: var(--accent-2); font-weight: 700; }
.plan .btn { text-align: center; }
.featured { border: 2px solid var(--accent); }
.pill { position: absolute; top: -12px; left: 24px; margin: 0 !important; background: var(--accent); color: var(--accent-text) !important; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { border-top: 2px solid var(--accent); padding-top: 16px; }
.steps span { font: 600 13px "JetBrains Mono", monospace; color: var(--accent); }
.steps h3 { margin: 6px 0; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); }

/* Toolkit */
.toolkit { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px 32px; margin-top: 28px; }
.toolkit h3 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.ticks li { padding-left: 34px; position: relative; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); font-size: 13px; font-weight: 700; }
.ticks strong { color: var(--text); }

/* Contact */
.contact {
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(63, 214, 163, .25), transparent 70%),
    radial-gradient(600px 300px at 0% 100%, rgba(109, 149, 255, .35), transparent 70%),
    var(--contact-bg);
  color: #fff; padding: 88px 0; text-align: center;
}
.contact-inner { max-width: 760px; }
.contact h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 14px; line-height: 1.2; }
.contact p { color: rgba(255,255,255,.78); font-size: 18px; margin: 0; }
.contact .cta { justify-content: center; }

.footer { padding: 28px 16px 40px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer p { margin: 0; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .why { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 600px) {
  .nav nav a:not(.btn) { display: none; }
  .hero { padding-top: 44px; }
  .section { padding: 60px 16px; }
  .steps { grid-template-columns: 1fr; }
  .grid, .toolkit { grid-template-columns: 1fr; }
  .kpis .v { font-size: 16px; }
  .dash figcaption { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Testimonials */
.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.quote p { font-size: 17px; color: var(--text); line-height: 1.6; }
.quote p::before { content: "“"; display: block; font-size: 48px; line-height: .6; color: var(--accent); font-weight: 800; margin-bottom: 8px; }
.quote footer { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); }
.quote footer strong { color: var(--text); }

/* Hero test-run panel */
.runs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.runs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: rgba(255,255,255,.04); border-radius: 10px; padding: 11px 14px; }
.r-name { font-weight: 600; font-size: 15px; display: flex; flex-direction: column; }
.r-name small { font-weight: 400; font-size: 12px; color: #8d97ab; }
.r-res { flex-shrink: 0; font: 500 12px "JetBrains Mono", monospace; color: #5fdc9b; background: rgba(95, 220, 155, .1); padding: 4px 10px; border-radius: 999px; }
.r-res::before { content: "✓ "; }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.08); margin-top: 16px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #6d95ff, #3fd6a3); }

/* Specialist service card */
.specialist { position: relative; border: 2px solid var(--accent-2); }
.specialist .pill { background: var(--accent-2); }

/* ---------- Motion ---------- */
.nav { transition: box-shadow .3s ease; }
.nav.scrolled { box-shadow: 0 6px 24px -12px rgba(16, 24, 40, .25); }

/* Hero entrance */
.js .hero-grid > div > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero-grid > div > :nth-child(2) { animation-delay: .1s; }
.js .hero-grid > div > :nth-child(3) { animation-delay: .2s; }
.js .hero-grid > div > :nth-child(4) { animation-delay: .3s; }
.js .hero-grid > div > :nth-child(5) { animation-delay: .4s; }
.js .dash { animation: rise 1s .25s cubic-bezier(.2, .7, .2, 1) both, float 7s 1.4s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Slowly drifting hero glow */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30% 35% at 70% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(25% 30% at 20% 80%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero > .wrap { position: relative; }
@keyframes drift { to { transform: translate(-6%, 4%) rotate(8deg); } }

/* Animated gradient on the highlighted headline words */
.hl { background-size: 200% auto; animation: shine 6s linear infinite; }
.hl { background-image: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); }
@keyframes shine { to { background-position: 200% center; } }

/* Test-run panel states */
.runs li { transition: background .4s ease; }
.runs li.running .r-res { color: #ffcf6b; background: rgba(255, 207, 107, .1); }
.runs li.running .r-res::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .7s linear infinite; }
.runs li:not(.running) .r-res { animation: pop .35s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 50% { transform: scale(1.12); } }
.js .dash .pass { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.js .dash .pass.show { opacity: 1; transform: none; }

/* Scroll reveal (only when JS is running; content stays visible without it) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms), transform .7s cubic-bezier(.2, .7, .2, 1) var(--delay, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-4px); transition-delay: 0ms; }

/* Button shine on hover */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); transition: transform .6s ease; }
.btn:hover::after { transform: translateX(100%); }

/* ---------- Framer-style motion ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* Scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; background: var(--hl); transform: scaleX(0); transform-origin: 0 50%; }

/* Cursor glow */
.cursor-glow { position: fixed; top: -220px; left: -220px; width: 440px; height: 440px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  opacity: 0; transition: opacity .4s ease; mix-blend-mode: multiply; }
.cursor-glow.on { opacity: 1; }
@media (prefers-color-scheme: dark) { .cursor-glow { mix-blend-mode: screen; } }

/* Word-by-word headline reveal */
.split-ready .word { display: inline-block; }
.js .split-ready:not(.statement) .word {
  opacity: 0; transform: translateY(45%) rotate(2deg); filter: blur(8px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1), filter .7s ease;
  transition-delay: calc(var(--i) * 55ms);
}
.js .split-ready.in:not(.statement) .word { opacity: 1; transform: none; filter: none; }
.js h2.reveal.split-ready { opacity: 1; transform: none; }
.js .hero-grid > div > h1 { animation: none; }

/* Marquees */
.marquee { flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track.running { display: flex; flex-wrap: nowrap; width: max-content; gap: 0; animation: marquee 28s linear infinite; }
.marquee-track.running > * { padding-right: 56px; white-space: nowrap; }
.marquee:hover .marquee-track, .big-marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.big-marquee { overflow: hidden; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.big-marquee .marquee-track { display: flex; }
.big-marquee .marquee-track.running { animation-duration: 45s; }
.big-marquee span { font-size: clamp(44px, 7.5vw, 104px); font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--text) 30%, transparent); }
.big-marquee span:nth-child(3n+1) { color: var(--text); -webkit-text-stroke: 0; }
.big-marquee span::after { content: "✦"; display: inline-block; margin-left: 56px; font-size: .4em; vertical-align: middle; color: var(--accent-2); -webkit-text-stroke: 0; }

/* Statement that fills in as you scroll */
.statement-wrap { padding: 110px 16px 90px; }
.statement { margin: 0; max-width: 980px; font-size: clamp(28px, 4.2vw, 52px); font-weight: 700; line-height: 1.22; letter-spacing: -0.025em; }
.statement .word { color: var(--text); opacity: .16; transition: opacity .35s ease, color .35s ease; }
.statement .word.lit { opacity: 1; }
.statement .hl-static .word.lit { color: var(--accent); }

/* Pinned "How I work" */
.process { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.process-head { position: sticky; top: 120px; }
.steps-pinned { grid-template-columns: 1fr; gap: 0; margin-top: 0; }
.steps-pinned li { border-top: 1px solid var(--border); padding: 44px 0 44px 4px; min-height: 30vh; opacity: .3; transition: opacity .5s ease, transform .5s ease; }
.steps-pinned li.active { opacity: 1; transform: translateX(10px); }
.steps-pinned li span { font-size: 15px; }
.steps-pinned li h3 { font-size: clamp(24px, 3vw, 34px); margin: 8px 0 10px; }
.steps-pinned li p { font-size: 18px; max-width: 460px; }

/* Card spotlight that follows the cursor */
.card:hover, .case:hover {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 65%), var(--surface);
}
.case { transition: transform .3s ease, border-color .3s ease; }
.case:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Magnetic buttons ease back smoothly */
.btn { transition: transform .35s cubic-bezier(.2, .7, .2, 1), filter .15s ease; will-change: transform; }

@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; gap: 16px; }
  .process-head { position: static; }
  .steps-pinned li { min-height: 0; padding: 28px 0; opacity: 1; }
  .steps-pinned li.active { transform: none; }
}
@media (max-width: 600px) {
  .trust .wrap { flex-direction: column; align-items: stretch; gap: 12px; }
  .big-marquee { padding: 24px 0; }
}
