:root {
  --bg: #fafaf9;
  --bg-elev: #ffffff;
  --fg: #0c0a09;
  --muted: #57534e;
  --subtle: #a8a29e;
  --line: #e7e5e4;
  --accent: #16a34a;
  --accent-soft: rgba(22, 163, 74, 0.10);
  --glow: rgba(74, 222, 128, 0.22);
  --radius: 16px;
  --s: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-elev: #111111;
    --fg: #fafafa;
    --muted: #a3a3a3;
    --subtle: #525252;
    --line: #1f1f1f;
    --accent: #4ade80;
    --accent-soft: rgba(74, 222, 128, 0.10);
    --glow: rgba(74, 222, 128, 0.14);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: baseline; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; font-size: 1.2rem; }
.brand-dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; transition: color .2s; }
.nav a:hover { color: var(--fg); }
.nav .hide-sm { display: none; }
@media (min-width: 760px) { .nav .hide-sm { display: inline; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500; text-decoration: none;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--fg); color: var(--bg) !important; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--glow), 0 0 0 4px var(--accent-soft); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); background: var(--bg-elev); }
.btn-ghost:hover { border-color: var(--subtle); }
.nav .btn { padding: 8px 14px; font-size: 0.86rem; }

/* Hero */
@media (min-width: 720px) { :root { --s: 128px; } }
.hero { position: relative; padding: calc(var(--s) * 1.1) 0 var(--s); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: .7;
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 560px; height: 560px; left: 50%; top: -120px; transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow), transparent 65%);
  filter: blur(20px);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate(-60%, 0) scale(1); } to { transform: translate(-40%, 40px) scale(1.15); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-elev); color: var(--muted); font-size: 0.82rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 600;
  max-width: 900px;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--fg), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin-top: 24px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 820px; }
.hero .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Marquee */
.marquee { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; position: relative; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 1; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; }
.marquee-track span { color: var(--subtle); font-weight: 500; font-size: 0.98rem; white-space: nowrap; letter-spacing: -0.01em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
section.block { padding: var(--s) 0 0; }
.section-head { margin-bottom: 48px; }
.kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; }
.section-head h2 { margin-top: 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

/* Services */
.services { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service { position: relative; background: var(--bg-elev); padding: 32px 28px 36px; transition: background .35s var(--ease); }
.service::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.service:hover::before { opacity: 1; }
.icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); background: var(--bg); }
.icon svg { width: 20px; height: 20px; }
.service h3 { margin-top: 24px; font-size: 1.08rem; letter-spacing: -0.02em; font-weight: 600; }
.service p { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }
.tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 0.76rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* Process */
.process { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .process { grid-template-columns: repeat(4, 1fr); } }
.step { padding-top: 24px; border-top: 1px solid var(--line); position: relative; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 0; background: var(--accent); transition: width 1.2s var(--ease); }
.step.in::before { width: 100%; }
.step .num { font-variant-numeric: tabular-nums; color: var(--subtle); font-size: 0.85rem; }
.step h3 { margin-top: 10px; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.step p { margin-top: 8px; color: var(--muted); font-size: 0.94rem; }

/* Principles */
.split { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; gap: 80px; } }
.principles { display: grid; gap: 28px; }
.principle { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.principle h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.principle p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }

/* Sectors */
.sectors { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sectors { grid-template-columns: repeat(4, 1fr); } }
.card { border: 1px solid var(--line); background: var(--bg-elev); border-radius: var(--radius); padding: 28px; transition: transform .35s var(--ease), border-color .35s; }
.card:hover { transform: translateY(-3px); border-color: var(--subtle); }
.card h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 0.94rem; }
.card-open { display: flex; flex-direction: column; text-decoration: none; border-style: dashed; background: transparent; }
.card-open h3 { color: var(--accent); }
.card-open .more { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 500; color: var(--fg); }
.card-open .more svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.card-open:hover { border-color: var(--accent); background: var(--accent-soft); }
.card-open:hover .more svg { transform: translateX(3px); }

/* Product */
.product { border: 1px solid var(--line); border-radius: 20px; background: var(--bg-elev); padding: 36px 28px; display: grid; gap: 24px; position: relative; overflow: hidden; }
@media (min-width: 860px) { .product { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 48px; } }
.product::after { content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.product h3 { font-size: 1.5rem; letter-spacing: -0.03em; font-weight: 600; }
.product p { color: var(--muted); margin-top: 10px; }
.product ul { list-style: none; display: grid; gap: 10px; }
.product li { display: flex; gap: 10px; color: var(--muted); font-size: 0.95rem; }
.product li svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 3px; }

/* CTA */
.cta { text-align: center; padding: var(--s) 0 calc(var(--s) * 1.1); position: relative; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 50% 60% at 50% 100%, var(--glow), transparent 70%); }
.cta h2 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.04em; line-height: 1.05; font-weight: 600; margin: 0 auto; }
.cta p { color: var(--muted); margin: 18px auto 0; }
.cta .actions { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 0.84rem; color: var(--subtle); }
.site-footer .wrap { display: grid; gap: 20px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer .legal { line-height: 1.7; }
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

/* Legal pages */
.doc { padding: 72px 0 96px; max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.04em; line-height: 1.1; font-weight: 600; }
.doc .updated { margin-top: 12px; color: var(--subtle); font-size: 0.9rem; }
.doc h2 { margin-top: 40px; font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 600; }
.doc p, .doc li { color: var(--muted); }
.doc p { margin-top: 12px; }
.doc ul { margin-top: 12px; padding-left: 20px; display: grid; gap: 6px; }
.doc a { color: var(--accent); }

/* Reveal motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
