:root {
  --sand: #efe5d4;
  --sand-2: #e4d5bd;
  --paper: #f8f3ea;
  --ink: #2a211b;
  --ink-2: #5b4d42;
  --line: #d8c7ab;
  --accent: #2f9e6e;
  --accent-ink: #1f6e4c;
  --radius: 18px;
  --max: 1160px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 6vw, 68px); }
h2 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 18px; }
h3 { font-size: 22px; margin-bottom: 8px; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; }
section { padding: 96px 0; }
section.alt { background: var(--sand); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248, 243, 234, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.logo { font-family: var(--serif); font-size: 24px; font-weight: 600; text-decoration: none; }
.logo span { color: var(--accent); }
.nav ul { display: flex; gap: 26px; list-style: none; font-size: 15px; }
.nav ul a { text-decoration: none; color: var(--ink-2); }
.nav ul a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 6px 12px; font: 600 13px var(--sans); color: var(--ink); cursor: pointer;
}
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink); transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.sm { padding: 8px 16px; font-size: 14px; }

/* hero */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.hero .lead { margin: 24px 0 32px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: var(--sand); border: 1px solid var(--line);
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }

.scan {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(42, 33, 27, .45); aspect-ratio: 4 / 5; background: var(--sand-2);
}
.scan img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease; }
.scan img.top { opacity: 0; }
.scan.on img.top { opacity: 1; }
.scan-card {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: rgba(248, 243, 234, .94); border-radius: 14px; padding: 14px 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 12px; color: var(--ink-2);
}
.scan-card b { display: block; font-size: 20px; color: var(--ink); font-family: var(--serif); font-weight: 600; }
.scan-toggle {
  position: absolute; top: 14px; right: 14px; font: 600 12px var(--sans);
  background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer;
}

/* grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
section:not(.alt) .card { background: #fff; }
.card p { color: var(--ink-2); font-size: 15.5px; }
.num { font-family: var(--serif); font-size: 15px; color: var(--accent-ink); font-weight: 600; margin-bottom: 14px; display: block; }

/* pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 48px; counter-reset: s; }
.step { padding: 0 24px 0 0; position: relative; }
.step::before {
  counter-increment: s; content: "0" counter(s);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 18px;
  background: var(--ink); color: var(--paper); font: 600 15px var(--sans);
}
.step::after {
  content: ""; position: absolute; top: 22px; left: 52px; right: 8px; border-top: 1px dashed var(--line);
}
.step:last-child::after { display: none; }
.step p { color: var(--ink-2); font-size: 15px; }
.step .tag { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--accent-ink); }

/* before/after architecture */
.arch { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.arch .card h3 { display: flex; align-items: center; gap: 10px; }
.pill { font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.pill.old { background: var(--sand-2); color: var(--ink-2); }
.pill.new { background: var(--accent); color: #fff; }
.arch ul { list-style: none; margin-top: 14px; }
.arch li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.arch li:first-child { border-top: 0; }
.arch li b { color: var(--ink); }
pre.code {
  margin-top: 28px; background: var(--ink); color: #e9dfcf; border-radius: var(--radius);
  padding: 24px; font: 13.5px/1.65 ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto;
}
pre.code .c { color: #a8977f; }
pre.code .k { color: #7fd1a8; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.gallery figure { border-radius: 14px; overflow: hidden; background: var(--sand-2); position: relative; }
.gallery figcaption {
  position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 600;
  background: rgba(248, 243, 234, .94); padding: 5px 10px; border-radius: 999px;
}
.note { margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }

/* roadmap */
.roadmap { margin-top: 44px; border-left: 2px solid var(--line); padding-left: 32px; display: grid; gap: 30px; }
.milestone { position: relative; }
.milestone::before {
  content: ""; position: absolute; left: -41px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--line);
}
.milestone.done::before { background: var(--accent); border-color: var(--accent); }
.milestone.now::before { background: var(--paper); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(47, 158, 110, .18); }
.milestone .when { font-size: 13px; font-weight: 700; color: var(--accent-ink); letter-spacing: .06em; text-transform: uppercase; }
.milestone p { color: var(--ink-2); max-width: 70ch; }

/* safety list */
.checks { list-style: none; display: grid; gap: 16px; }
.checks li { padding-left: 34px; position: relative; color: var(--ink-2); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.checks b { color: var(--ink); }

/* contact */
.contact { text-align: center; }
.contact .lead { margin: 0 auto 30px; }
.mail { font-family: var(--serif); font-size: clamp(26px, 4vw, 40px); text-decoration: none; border-bottom: 2px solid var(--accent); }

footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--ink-2); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--ink-2); }

/* legal page */
.legal { max-width: 760px; padding: 72px 24px 96px; margin: 0 auto; }
.legal h1 { font-size: 44px; margin-bottom: 8px; }
.legal h2 { font-size: 24px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }

@media (max-width: 960px) {
  .hero .wrap, .grid-2, .arch { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .step::after { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .nav ul { display: none; }
  section { padding: 72px 0; }
}
@media (max-width: 520px) {
  .pipeline { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scan img, .btn { transition: none; }
}
@media (max-width: 420px) {
  .nav-right .btn { display: none; }
  .scan-card b { font-size: 17px; }
}
.hero .wrap > *, .grid-2 > *, .arch > * { min-width: 0; }
