:root {
  --bg: #16181D;
  --surface: #1D2026;
  --raised: #252932;
  --line: #2F343E;
  --text: #ECEEF1;
  --muted: #8E95A2;
  --dim: #5C6370;

  --c-stack: #ECEEF1;
  --c-backend: #22D3EE;
  --c-frontend: #6E8BFF;
  --c-scale: #B48CFF;
  --c-ai: #F472B6;

  --accent: #6E8BFF;
  --danger: #F87171;

  --font: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --btn-h: 44px;
  --section-pad: clamp(72px, 8.5vw, 128px);
  /* Space above and below each section; two of these make the gap around a divider */
  --section-space: clamp(54px, 12.5vw, 180px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--display-tracking);
}

:root { --font-display: "Archivo", sans-serif; --display-weight: 700; --display-stretch: 125%; --display-tracking: -0.02em; --hero-tracking: -0.035em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Background layers */
#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
#labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; }

.tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  font: 500 0.875rem/1 var(--mono); white-space: nowrap;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.35s ease, color 0.35s ease;
  will-change: transform;
}
.tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.tag span { padding: 4px 8px; border-radius: 6px; background: rgba(22, 24, 29, 0.7); backdrop-filter: blur(6px); }
.tag.is-active { color: var(--text); }
.tag.is-active::before { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }

main, .topbar, .footer { position: relative; z-index: 2; }

/* Top bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.topbar.is-scrolled { background: rgba(22, 24, 29, 0.85); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-size: 1.5rem; text-decoration: none; }
.topnav { display: flex; gap: 32px; align-items: center; font-size: 1rem; }
.topnav a { text-decoration: none; color: var(--muted); transition: color 0.15s; }
.topnav a:hover { color: var(--text); }
.topnav .topnav-cta {
  display: inline-flex; align-items: center; height: var(--btn-h);
  color: var(--bg); background: var(--text);
  padding: 0 18px; border-radius: 10px; font-weight: 500;
  transition: background-color 0.15s;
}
.topnav .topnav-cta:hover { color: var(--bg); background: var(--accent); }
@media (max-width: 640px) { .topnav a:not(.topnav-cta) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--btn-h); padding: 0 20px; border-radius: 10px;
  font: 500 1rem/1 var(--font); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--text); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(22, 24, 29, 0.5); }
.btn-ghost:hover { border-color: var(--muted); }


/* Sections size to their content, separated by one shared rhythm */
.story, .ai, .process, .contact { padding: var(--section-space) 0; }

/* Divider between sections: a hairline that fades out at both ends, with a small node in the brand gradient */
.divider { position: relative; z-index: 2; height: 1px; }
.divider::before {
  content: ""; position: absolute; inset: 0 var(--gutter);
  background: linear-gradient(90deg, transparent, var(--line) 25%, var(--line) 75%, transparent);
}
.divider::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-backend), var(--c-frontend) 40%, var(--c-scale) 70%, var(--c-ai));
  box-shadow: 0 0 0 5px var(--bg), 0 0 18px 2px color-mix(in srgb, var(--c-frontend) 45%, transparent);
}
/* The sphere needs room to breathe */
.story { min-height: clamp(520px, 68svh, 680px); display: flex; flex-direction: column; justify-content: center; }
.story > .wrap, .ai > .wrap, .process > .wrap, .contact > .wrap { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 100px var(--gutter) 120px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.75rem);
  line-height: 1;
  letter-spacing: var(--hero-tracking);
  max-width: 16ch;
}
/* The headline starts hidden while particles assemble it; it always appears after 5s as a fallback */
.js .hero-title { color: transparent; transition: color 0.9s ease; animation: hero-fallback 0s 5s forwards; }
.js.hero-ready .hero-title { color: var(--text); }
.js.hero-particles .hero-title { color: transparent; animation: none; }
@keyframes hero-fallback { to { color: var(--text); } }
.hero-title span { white-space: nowrap; }

.hero-lead {
  margin: 32px 0 0; max-width: 54ch;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem); color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }

.scroll-cue {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--dim); border-radius: 14px;
  transition: border-color 0.15s;
}
.scroll-cue:hover { border-color: var(--text); }
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--text);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }

/* Story: tabs + sphere */
.story { position: relative; display: flex; align-items: center; }
.story-sphere { position: absolute; top: 0; bottom: 0; left: 48%; right: 0; pointer-events: none; }
.story-inner { width: 100%; display: grid; grid-template-columns: minmax(0, 640px); gap: 40px; align-content: center; }

.story-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.story-tabs button {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 10px;
  flex: none; height: var(--btn-h); padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(22, 24, 29, 0.6);
  font: 500 0.9375rem/1.2 var(--font); color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.story-tabs button::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dim); transition: background-color 0.2s;
}
.story-tabs button:hover { color: var(--text); border-color: var(--muted); }
.story-tabs button[aria-selected="true"] { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--bg)); }
.story-tabs button[aria-selected="true"]::before { background: var(--c); }
/* Autoplay progress fills the active pill */
.story-tabs .progress {
  position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--c) 16%, transparent); transform-origin: left; transform: scaleX(0);
}

.story-panels { display: grid; max-width: 540px; }
.panel {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(10px); visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0.4s;
}
.panel.is-active { opacity: 1; transform: none; visibility: visible; transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s; }
.panel h2 { font-size: clamp(1.875rem, 3vw, 2.75rem); line-height: 1.08; }
.panel p { margin: 22px 0 0; color: var(--muted); max-width: 42ch; font-size: 1.1875rem; }

.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  font: 400 0.9375rem/1 var(--mono); padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: 6px;
  color: var(--text);
}

.stats { margin: 32px 0 0; display: grid; gap: 22px; }
.stats div { display: grid; grid-template-columns: minmax(0, auto); gap: 2px; border-left: 2px solid var(--c); padding-left: 16px; }
.stats dt { font-weight: 600; font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats dd { margin: 2px 0 0; color: var(--muted); font-size: 1.0625rem; }

@media (max-width: 900px) {
  .story { flex-direction: column; align-items: stretch; justify-content: center; min-height: 0; }
  .story-sphere { position: relative; left: auto; right: auto; top: auto; bottom: auto; height: 42svh; }
  .story-inner { grid-template-columns: 1fr; gap: 20px; }
  .story-tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
  }
  .story-tabs::-webkit-scrollbar { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stats div { padding-left: 10px; }
  .stats dt { font-size: 1.375rem; }
  .stats dd { font-size: 0.875rem; }
}

/* Generic sections */
.section-title { font-size: clamp(2.125rem, 4.2vw, 3.5rem); line-height: 1.04; max-width: 18ch; }

.ai-icon { width: min(100%, 260px); aspect-ratio: 1; margin-top: 24px; }
@media (max-width: 900px) { .ai-icon { width: 240px; margin: 32px auto 0; } }
.ai-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.ai-intro p { margin: 24px 0 0; color: var(--muted); max-width: 40ch; font-size: 1.1875rem; }
.ai-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px 56px; padding-top: 12px; }
.ai-list div { border-top: 1px solid var(--line); padding-top: 24px; }
.ai-list dt { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; }
.ai-list dd { margin: 12px 0 0; color: var(--muted); font-size: 1.0625rem; }
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-list { grid-template-columns: 1fr; gap: 28px; }
}

.process-flow { height: 40px; margin: clamp(48px, 5vw, 72px) 0 -20px; pointer-events: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.steps li { counter-increment: step; padding: 32px 32px 0 0; border-top: 1px solid var(--line); position: relative; }
.steps li::before {
  content: ""; position: absolute; top: -6px; left: 0;
  width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent);
}
.steps li:first-child::before { background: var(--accent); }
.step-when { display: block; font: 500 0.9375rem/1.4 var(--mono); color: var(--accent); }
.steps h3 { font-size: 1.75rem; margin-top: 10px; }
.steps h3::before { content: counter(step) ". "; color: var(--dim); font-weight: 400; }
.steps p { margin: 12px 0 0; color: var(--muted); max-width: 28ch; font-size: 1.0625rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.contact-icon { width: 260px; aspect-ratio: 1.4; margin-top: 40px; }
@media (max-width: 900px) { .contact-icon { display: none; } }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-intro p { color: var(--muted); max-width: 38ch; margin: 24px 0 0; font-size: 1.1875rem; }
.contact-direct a { color: var(--text); font-weight: 500; font-size: 1.375rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; align-content: start; }
.field label, .field legend { font-size: 1rem; font-weight: 500; padding: 0; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 15px 16px;
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110, 139, 255, 0.25); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 0.875rem; }
.field-error:empty { display: none; }

.budget { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.budget label { position: relative; cursor: pointer; font-weight: 400; }
.budget input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.budget span {
  display: inline-flex; align-items: center; height: var(--btn-h); padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); font-size: 1rem;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}
.budget label:hover span { border-color: var(--muted); color: var(--text); }
.budget input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.budget input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.form .btn { justify-self: start; }
.form-status { margin: 0; color: var(--accent); font-weight: 500; }
.form-status:empty { display: none; }

/* Footer */
.footer { padding: var(--section-space) 0 28px; color: var(--muted); font-size: 1rem; }
.footer.footer-doc { padding-top: 28px; border-top: 1px solid var(--line); }
.footer > .wrap { width: 100%; }
.footer a { text-decoration: none; transition: color 0.15s; }
.footer a:hover { color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px 48px; }
.footer .logo { color: var(--text); font-size: 1.75rem; }
.footer-about { margin: 16px 0 0; max-width: 34ch; }
.footer-cta { display: inline-block; margin-top: 24px; color: var(--text); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.footer-cta:hover { border-color: var(--accent); }
.footer h2 { font: 500 0.9375rem/1.4 var(--font); letter-spacing: 0; color: var(--text); margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer address { font-style: normal; line-height: 1.7; }
.footer-wordmark { width: 100%; aspect-ratio: 5.2; margin-top: clamp(40px, 5vw, 72px); }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  margin-top: clamp(24px, 3vw, 40px); padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.875rem;
}
.footer-legal ul { display: flex; gap: 24px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand, .footer-contact { grid-column: 1 / -1; } }

/* Honeypot field for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.link-button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; transition: color 0.15s; }
.link-button:hover { color: var(--text); }

.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status.is-error { color: var(--danger); }

/* Cookie banner */
.cookie-banner {
  position: fixed; z-index: 30; right: 16px; bottom: 16px; left: 16px;
  max-width: 440px; margin-left: auto;
  padding: 22px 22px 20px; border-radius: 14px;
  background: rgba(29, 32, 38, 0.96); border: 1px solid var(--line);
  backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.125rem; letter-spacing: -0.01em; }
.cookie-banner p { margin: 10px 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.cookie-banner a { color: var(--text); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }


/* Policy pages */
.doc { position: relative; z-index: 2; padding: 140px 0 96px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.doc .doc-meta { color: var(--muted); margin: 16px 0 0; }
.doc h2 { font-size: 1.375rem; margin: 48px 0 0; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--muted); }
.doc p { margin: 14px 0 0; }
.doc ul { margin: 14px 0 0; padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--text); font-weight: 500; }
.doc td { color: var(--muted); }
.doc-back { display: inline-block; margin-bottom: 32px; color: var(--muted); text-decoration: none; }
.doc-back:hover { color: var(--text); }
@media (max-width: 700px) { .doc table { display: block; overflow-x: auto; white-space: normal; } .doc th, .doc td { min-width: 140px; } }
