:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #0c0c0d;
  --ink-2: #4a4a4f;
  --ink-3: #8a8a90;
  --line: #e6e6e2;
  --accent: #2f5bff;
  --dark: #0c0c0d;
  --dark-ink: #f4f4f1;
  --dark-ink-2: #a3a3a8;
  --radius: 14px;
  --max: 1160px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 248, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  position: relative;
  flex-shrink: 0;
}
.logo-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #26262a; }
.btn-light { background: var(--dark-ink); color: var(--ink); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.nav .btn { padding: 9px 16px; color: var(--bg); }

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .6;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 28px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 14ch;
}
h1 .muted { color: var(--ink-3); }
.hero p.lead {
  margin-top: 28px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2);
  max-width: 560px;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 56px;
}
.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.section-head p {
  color: var(--ink-2);
  font-size: 17px;
  max-width: 460px;
  justify-self: end;
}

/* Pillars strip */
.pillars {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.pillars .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.pillar {
  padding: 36px 28px;
  border-left: 1px solid var(--line);
}
.pillar:first-child { border-left: 0; padding-left: 0; }
.pillar strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.pillar span { color: var(--ink-2); font-size: 14px; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.service {
  background: var(--surface);
  padding: 36px 32px 40px;
  transition: background .2s ease;
}
.service:hover { background: #fcfcfb; }
.service .num {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.service h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 44px 0 10px;
}
.service p { color: var(--ink-2); font-size: 15px; }

/* Approach */
.approach { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}
.step {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}
.step:nth-child(n+2) { border-top-color: var(--line); }
.step .phase {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.step h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 8px 0 10px;
}
.step p { color: var(--ink-2); font-size: 15px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
}
.about-copy p {
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.6;
}
.about-copy p + p { margin-top: 20px; }
.about-copy p strong { color: var(--ink); font-weight: 500; }

/* CTA */
.cta { padding: 0 0 110px; }
.cta-card {
  background: var(--dark);
  color: var(--dark-ink);
  border-radius: 24px;
  padding: 88px 64px;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 91, 255, .45), transparent 65%);
  pointer-events: none;
}
.cta-card h2 { max-width: 16ch; position: relative; }
.cta-card p {
  color: var(--dark-ink-2);
  font-size: 18px;
  margin-top: 18px;
  max-width: 480px;
  position: relative;
}
.cta-card .btn { margin-top: 36px; position: relative; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  font-size: 14px;
  color: var(--ink-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-grid p, .footer-grid li { line-height: 1.8; }
.footer-grid ul { list-style: none; }
.footer-grid a:hover { color: var(--ink); }
footer .logo { color: var(--ink); }
.footer-about { max-width: 300px; margin-top: 14px; }
address { font-style: normal; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

/* ---------- Legal page ---------- */
.legal { padding: 80px 0 110px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); max-width: none; }
.legal .updated { color: var(--ink-3); margin: 16px 0 48px; font-size: 14px; }
.legal h2 { font-size: 22px; letter-spacing: -0.02em; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; }
.legal ul { padding-left: 20px; margin-top: 8px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .pillars .wrap { grid-template-columns: repeat(2, 1fr); }
  .pillar { padding: 28px 20px; }
  .pillar:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pillar:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-links li:not(:last-child) { display: none; }
  .hero { padding: 80px 0 72px; }
  section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
  .section-head p { justify-self: start; }
  .services-grid { grid-template-columns: 1fr; }
  .service h3 { margin-top: 28px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .cta { padding-bottom: 80px; }
  .cta-card { padding: 56px 28px; border-radius: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
