/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ffffff;
  --bg-2:      #f6f6f4;
  --bg-3:      #eeeeeb;
  --ink:       #0d0d0d;
  --ink-soft:  rgba(13,13,13,0.78);
  --mute:      #63635e;
  --mute-2:    #9a9a94;
  --line:      rgba(13,13,13,0.12);
  --line-soft: rgba(13,13,13,0.07);

  --accent:    #1d4ed8;
  --accent-ink:#ffffff;
  --grad-1:    #0d9488;
  --grad-2:    #06b6d4;
  --grad-3:    #2dd4bf;
  --grad-4:    #67e8f9;

  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 72px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100svh;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--mono); font-weight: 500; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink);
  z-index: 9999; border-radius: 6px; font-weight: 600; font-family: var(--mono);
}
.skip-link:focus { top: 1rem; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mute);
}
.kicker .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.section { position: relative; padding-block: clamp(4rem, 10vw, 8rem); }
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-top: .9rem; }
.section-head p { color: var(--mute); font-size: 1.05rem; margin-top: 1rem; max-width: 52ch; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--mute); letter-spacing: .04em; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.6rem; border-radius: 999px;
  font-family: var(--mono); font-size: .9rem; font-weight: 500;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.chip {
  display: inline-flex; padding: .4rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); font-family: var(--mono); font-size: .76rem;
  color: var(--mute); white-space: nowrap;
}

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Nav --- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-solid {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-logo { font-family: var(--mono); font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.nav-logo .mark { width: 22px; height: 22px; }
.nav-logo-tld { color: var(--mute); font-weight: 500; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link { position: relative; font-family: var(--mono); font-size: .88rem; color: var(--mute); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px;
  background: var(--accent); transition: right .35s var(--ease-out);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { right: 0; }
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

.mobile-panel {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background: var(--bg);
  padding: 2rem var(--gutter);
  display: flex; flex-direction: column; gap: 1.5rem;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.mobile-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-panel a { font-family: var(--mono); font-size: 1.3rem; }

/* --- Page-wide ambient gradient (fixed — stays visible while navigating) --- */
.page-gradient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 640px at var(--mx, 20%) var(--my, 24%), color-mix(in srgb, var(--grad-2) 32%, transparent) 0%, transparent 60%),
    radial-gradient(circle 820px at calc(var(--mx, 20%) + 22%) calc(var(--my, 24%) - 12%), color-mix(in srgb, var(--grad-1) 26%, transparent) 0%, transparent 62%),
    radial-gradient(circle 760px at calc(var(--mx, 20%) - 16%) calc(var(--my, 24%) + 26%), color-mix(in srgb, var(--grad-3) 24%, transparent) 0%, transparent 64%),
    radial-gradient(circle 1000px at calc(var(--mx, 20%) + 8%) calc(var(--my, 24%) + 10%), color-mix(in srgb, var(--grad-4) 16%, transparent) 0%, transparent 68%),
    var(--bg);
  filter: blur(80px) saturate(130%);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 3rem;
  overflow: clip;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 30%, transparent 80%);
}
.hero-inner { position: relative; }
.hero-eyebrow { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.6rem; }
.hero-title {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  max-width: 15ch;
  line-height: .98;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub {
  margin-top: 1.6rem; max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: 1.75rem; border-top: 1px solid var(--line-soft);
}
.hero-meta-item { font-family: var(--mono); font-size: .82rem; color: var(--mute); }
.hero-meta-item strong { color: var(--ink); font-weight: 600; }

/* --- Manifesto --- */
.manifesto { text-align: center; }
.manifesto p {
  font-size: clamp(1.3rem, 3vw, 2rem);
  max-width: 46ch; margin-inline: auto;
  color: var(--ink-soft); line-height: 1.45;
  font-family: var(--mono); font-weight: 400; letter-spacing: -0.01em;
}
.manifesto p em { color: var(--accent); font-style: normal; }

/* --- Services (expandable list) --- */
.service-list { border-top: 1px solid var(--line); }
.service-row { border-bottom: 1px solid var(--line); }
.service-trigger {
  width: 100%; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0; text-align: left;
}
.service-num { font-family: var(--mono); color: var(--mute-2); font-size: 1rem; flex-shrink: 0; width: 2.5ch; }
.service-heading { flex: 1; min-width: 0; }
.service-title { font-size: clamp(1.15rem, 2.4vw, 1.7rem); transition: color .3s var(--ease-out); }
.service-summary { color: var(--mute); font-size: .95rem; margin-top: .35rem; display: none; }
.service-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease-out), border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.service-icon svg { width: 14px; height: 14px; transition: transform .4s var(--ease-out); }
.service-row.is-open .service-icon { transform: rotate(45deg); border-color: var(--accent); background: var(--accent); }
.service-row.is-open .service-icon svg { color: var(--accent-ink); }
.service-row:hover .service-title { color: var(--accent); }
.service-panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .45s var(--ease-out), opacity .35s var(--ease-out);
}
.service-row.is-open .service-panel { grid-template-rows: 1fr; opacity: 1; }
.service-panel-inner { overflow: hidden; }
.service-body {
  padding: 0 0 clamp(1.5rem, 3vw, 2.25rem) calc(2.5ch + clamp(1rem, 3vw, 2.5rem));
  max-width: 62ch;
}
.service-body p { color: var(--ink-soft); font-size: 1rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

@media (min-width: 720px) {
  .service-summary { display: block; }
}

/* --- Process --- */
.process-grid {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.process-item { background: var(--bg); padding: clamp(1.75rem, 3vw, 2.5rem); }
.process-num { font-family: var(--mono); color: var(--accent); font-size: .85rem; }
.process-item h3 { font-size: 1.25rem; margin-top: 1rem; }
.process-item p { color: var(--mute); font-size: .95rem; margin-top: .75rem; }

@media (min-width: 720px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .process-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Stats --- */
.stats-band {
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid; gap: 2.5rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.stat-value {
  font-family: var(--mono); font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  color: var(--accent); display: flex; align-items: baseline; gap: .15em;
}
.stat-label { color: var(--mute); font-size: .9rem; margin-top: .5rem; max-width: 24ch; }

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- Use cases --- */
.usecase-grid {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: 1fr;
}
.usecase-item { background: var(--bg); padding: clamp(1.5rem, 3vw, 2rem); }
.usecase-item h3 { font-size: 1.05rem; }
.usecase-item p { color: var(--mute); font-size: .9rem; margin-top: .6rem; }

@media (min-width: 720px) {
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .usecase-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- FAQ --- */
.faq-list { border-top: 1px solid var(--line); max-width: 760px; }
.faq-row { border-bottom: 1px solid var(--line); }
.faq-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0; text-align: left;
}
.faq-trigger h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.faq-plus { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-plus::before, .faq-plus::after {
  content: ""; position: absolute; background: var(--ink); transition: transform .35s var(--ease-out), background .35s var(--ease-out);
}
.faq-plus::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.faq-plus::after { left: 50%; top: 0; height: 100%; width: 1px; transform: translateX(-50%); }
.faq-row.is-open .faq-plus::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-row.is-open .faq-plus::before { background: var(--accent); }
.faq-panel {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .4s var(--ease-out), opacity .3s var(--ease-out);
}
.faq-row.is-open .faq-panel { grid-template-rows: 1fr; opacity: 1; }
.faq-panel-inner { overflow: hidden; }
.faq-panel p { color: var(--mute); padding-bottom: 1.5rem; max-width: 60ch; }

/* --- Contact CTA --- */
.cta-section { text-align: center; }
.cta-section .kicker { justify-content: center; width: 100%; }
.cta-section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 1rem; max-width: 24ch; margin-inline: auto; }
.contact-link {
  display: inline-block; margin-top: 2.5rem;
  font-family: var(--mono); font-size: clamp(1.5rem, 5vw, 3rem);
  position: relative; word-break: break-word;
}
.contact-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
}
.contact-link:hover::after { transform: scaleX(1); }
.contact-link:hover { color: var(--accent); }

.contact-form {
  max-width: 560px; margin: 3rem auto 0; text-align: left;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-family: var(--mono); font-size: .78rem; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  padding: .85rem 1rem; color: var(--ink); font-family: var(--sans); font-size: .95rem;
  transition: border-color .3s var(--ease-out);
}
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: .82rem; color: var(--mute-2); margin-top: -.3rem; }
.form-status { font-family: var(--mono); font-size: .85rem; color: var(--accent); min-height: 1.2em; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--mute); font-family: var(--mono); font-size: .85rem; }
.footer-links a:hover { color: var(--accent); }
.footer-meta { color: var(--mute-2); font-family: var(--mono); font-size: .8rem; }

/* =============================================================
   7. Effects
   ============================================================= */
.count-up { font-variant-numeric: tabular-nums; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =============================================================
   8. Responsive breakpoints reference
   ============================================================= */
/* 540 / 720 / 960 / 1280 / 1600 handled inline per component above */

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-gradient { transition: none; }
}
