:root {
  --paper: #faf7f2;
  --paper-deep: #f3ede3;
  --card: #fffdf9;
  --ink: #1a1a1a;
  --ink-soft: #3d3a35;
  --muted: #6f6a60;
  --accent: #f8a23b;
  --accent-soft: #fdeed;
  --accent-deep: #d97f14;
  --dark: #141210;
  --dark-soft: #23201b;
  --line: rgba(26, 26, 26, .12);
  --line-dark: rgba(250, 247, 242, .16);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, .06), 0 2px 8px rgba(20, 18, 16, .06);
  --shadow-md: 0 2px 4px rgba(20, 18, 16, .08), 0 12px 32px rgba(20, 18, 16, .12);
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--ink); line-height: 1.1; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 1.5rem + 7vw, 5.5rem); letter-spacing: -.03em; font-weight: 700; }
h2 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
p { margin: 0 0 16px; max-width: 65ch; }
a { color: var(--ink); }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip:focus { top: 16px; color: var(--paper); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 128px 0; } }

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.eyebrow::before { content: ""; width: 24px; height: 3px; background: var(--accent); border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 28px; border-radius: 999px;
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #ffa944; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost-light { background: transparent; color: var(--paper); border-color: rgba(250,247,242,.5); }
.btn-ghost-light:hover { border-color: var(--paper); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.link-more { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link-more:hover { background: var(--accent-soft); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 242, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 1.25rem; color: var(--ink); margin-right: auto; }
.brand img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--ink-soft); font-size: .9375rem; }
.nav-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.nav .btn { min-height: 44px; padding: 10px 20px; font-size: .9375rem; }
.lang-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.lang-toggle button { font: 700 .8125rem/1 var(--font); color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: 10px 14px; min-height: 38px; cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: clip; padding: 64px 0 64px; }
@media (min-width: 900px) { .hero { padding: 96px 0 128px; } }
.hero-grid { position: relative; }
.hero-copy { max-width: 800px; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: var(--accent-soft); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; margin: 0 0 24px;
}
.hero h1 .finish { color: var(--accent-deep); position: relative; white-space: nowrap; }
.hero h1 .finish svg { position: absolute; left: 0; right: 0; bottom: -.12em; width: 100%; height: .22em; }
.hero-hook { font-size: clamp(1.15rem, 1rem + 1vw, 1.4rem); font-weight: 500; color: var(--ink); max-width: 34ch; }
.hero-sub { font-size: 1.125rem; max-width: 56ch; }
.hero-note { font-size: .9375rem; color: var(--muted); margin-top: 24px; }
.flight { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; animation: flight-in 1.6s var(--ease) .2s forwards; }
@keyframes flight-in { to { opacity: 1; } }

/* load choreography */
.rise { opacity: 0; transform: translateY(28px); animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; } .d3 { animation-delay: .25s; }
.d4 { animation-delay: .35s; } .d5 { animation-delay: .45s; } .d6 { animation-delay: .6s; }
.d7 { animation-delay: .75s; }

/* scroll reveals */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 24px 0; }
.strip-list { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; padding: 0; list-style: none; font-weight: 500; color: var(--ink); }
.strip-list li { display: flex; align-items: center; gap: 8px; }
.strip-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- stakes ---------- */
.split { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { padding: 8px 0 8px 32px; position: relative; }
.card li + li { border-top: 1px dashed var(--line); }
.card.bad li::before { content: "✕"; position: absolute; left: 4px; color: #b3502e; font-weight: 700; }
.card.good { background: var(--ink); color: #e9e4d8; border-color: var(--ink); }
.card.good h3 { color: var(--paper); }
.card.good li + li { border-color: var(--line-dark); }
.card.good li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ---------- value ---------- */
.value-grid { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 900px) { .value-grid { grid-template-columns: 1fr 1fr; } }
.value-card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.value-card .icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.value-card .icon svg { width: 24px; height: 24px; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.value-card h3 { margin: 0 0 8px; }
.value-card p { margin: 0; font-size: 1rem; }
.use-grid { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 900px) { .use-grid { grid-template-columns: repeat(2, 1fr); } }
.use-card h3 { margin: 0 0 8px; }
.use-card p { margin: 0; font-size: 1rem; }

/* ---------- product tour ---------- */
.tour-list { display: grid; gap: 64px; margin-top: 40px; }
.tour-item h3 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem); margin-bottom: 8px; }
.tour-item > p { max-width: 70ch; }
.shot { margin: 24px 0 0; }
.shot-frame {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  background: var(--paper-deep); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-md);
}
.shot-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; background: var(--paper-deep);
}
.shot-frame img.missing { display: none; }
.shot-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 32px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center;
}
.shot-kicker {
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.shot-soon { font-size: 1.25rem; font-weight: 500; color: var(--ink); margin: 0; }
.shot-placeholder .link-more { font-size: 1rem; }
.video-frame { aspect-ratio: 16/9; background: var(--dark); border-color: var(--dark); }
.video-frame .shot-placeholder { background-color: var(--dark); background-image: none; }
.video-frame .shot-kicker { color: #a09a8c; }
.video-frame .shot-soon { color: var(--paper); }
.video-frame .link-more { color: var(--paper); }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--dark); }
.video-frame video[hidden] { display: none; }
.play {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.play svg { width: 28px; height: 28px; fill: var(--ink); }

/* ---------- developers ---------- */
.dev { background: var(--dark); color: #cfc9bc; }
.dev h2, .dev h3 { color: var(--paper); }
.dev .eyebrow { color: #a09a8c; }
.dev-grid { display: grid; gap: 32px; margin-top: 32px; align-items: start; }
@media (min-width: 900px) { .dev-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.dev-points { list-style: none; margin: 24px 0 0; padding: 0; }
.dev-points li { padding: 16px 0; border-top: 1px solid var(--line-dark); }
.dev-points li:first-child { border-top: 0; }
.dev-points strong { color: var(--paper); display: block; margin-bottom: 4px; }
.code {
  background: var(--dark-soft); border: 1px solid var(--line-dark); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-md); margin: 0;
}
.code figcaption {
  font-size: .8125rem; color: #a09a8c; padding: 12px 24px; border-bottom: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.code figcaption a { color: var(--accent); }
.code pre { margin: 0; padding: 24px; overflow-x: auto; font: 0.9375rem/1.7 var(--mono); color: #e9e4d8; }
.code .c { color: #8a8478; } .code .k { color: var(--accent); } .code .s { color: #a8d3a2; }

/* ---------- guide ---------- */
.guide { text-align: center; }
.guide blockquote {
  font-size: clamp(1.5rem, 1.2rem + 2vw, 2.25rem); font-weight: 500; letter-spacing: -.01em;
  color: var(--ink); max-width: 28ch; margin: 0 auto 16px; text-wrap: balance;
}
.guide blockquote span.hi { color: var(--accent-deep); }
.guide .btn-row { justify-content: center; }

/* ---------- plan ---------- */
.steps { display: grid; gap: 24px; margin-top: 32px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em; color: var(--accent-deep);
  display: block; margin-bottom: 8px;
}
.step h3 { margin: 0 0 8px; }
.step p { margin: 0; font-size: 1rem; }
.plan-cta { margin-top: 32px; }

/* ---------- demo band ---------- */
.band { background: var(--accent); color: var(--ink); border-radius: 24px; padding: 48px; text-align: center; box-shadow: var(--shadow-md); }
@media (min-width: 900px) { .band { padding: 64px; } }
.band h2 { margin: 0 0 8px; }
.band p { margin: 0 auto; color: #4a3620; max-width: 52ch; }
.band .btn-row { justify-content: center; }
.band .demo-login { margin-top: 24px; font-size: .9375rem; }
p code { font-family: var(--mono); font-size: .9em; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.token-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); border-radius: 10px; padding: 6px 6px 6px 16px; margin: 4px 8px 4px 8px; vertical-align: middle; }
.token-chip code { font-size: .9375rem; color: var(--paper); background: none; border: 0; padding: 0; }
.copy-btn { font: 700 .8125rem/1 var(--font); color: var(--ink); background: var(--paper); border: 0; border-radius: 7px; padding: 10px 14px; min-height: 36px; cursor: pointer; }
.copy-btn:hover { background: #fff; }
.copy-status { display: block; font-size: .8125rem; min-height: 1.4em; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 64px; } }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; color: var(--ink); font-size: .9375rem; }
.field input, .field textarea {
  font: 1rem/1.5 var(--font); color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent-deep); }
.field .error { font-size: .875rem; color: #a33d1f; min-height: 1.4em; margin: 0; }
.field.invalid input, .field.invalid textarea { border-color: #a33d1f; }
.form-note { font-size: .9375rem; color: var(--muted); margin: 0; }
.form-status { font-weight: 600; color: var(--ink); margin: 0; min-height: 1.6em; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0; background: var(--card); }
.foot { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.foot small { color: var(--muted); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn, .nav-links a { transition: none; }
  .flight { display: none; }
}
