:root {
  --campo: oklch(0.46 0.23 265);
  --campo-deep: oklch(0.33 0.17 267);
  --ink: oklch(0.23 0.07 270);
  --ink-muted: oklch(0.43 0.05 270);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.96 0.016 268);
  --line: oklch(0.87 0.025 268);
  --sole: oklch(0.86 0.17 88);
  --sole-hover: oklch(0.81 0.17 85);
  --rope: oklch(0.65 0.17 88);
  --on-campo: oklch(1 0 0);
  --on-campo-muted: oklch(0.92 0.035 268);
  --done: oklch(0.47 0.12 160);
  --done-soft: oklch(0.94 0.04 160);
  --error: oklch(0.5 0.19 27);
  --phase-1: oklch(0.83 0.08 265);
  --phase-2: oklch(0.65 0.17 265);
  --phase-3: oklch(0.46 0.23 265);
  --focus: oklch(0.46 0.23 265);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --t-sm: 0.875rem; --t-0: 1rem; --t-1: 1.25rem; --t-2: 1.563rem;
  --t-3: 1.953rem; --t-4: 2.441rem; --t-5: 3.052rem;

  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;
  --gutter: 16px;
  --page: 1120px;
  --quick: 160ms;
  --font: 'Archivo', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 var(--t-0)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

h1, h2, h3 { font-stretch: 75%; font-weight: 800; line-height: 1.02; text-wrap: balance; letter-spacing: -0.005em; }
h2 { font-size: clamp(var(--t-4), 9vw, var(--t-5)); }
h3 { font-size: var(--t-2); line-height: 1.1; }
p { max-width: 62ch; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.on-campo :focus-visible { outline-color: var(--sole); }

.page { width: min(100%, var(--page)); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)); }
.muted { color: var(--ink-muted); }
.small { font-size: var(--t-sm); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: var(--s-2); top: -64px; z-index: 30;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-sm);
  background: var(--ink); color: var(--surface);
}
.skip:focus { top: var(--s-2); }

.proto {
  background: var(--ink); color: var(--surface);
  padding: var(--s-2) var(--gutter); font-size: var(--t-sm); line-height: 1.35; text-align: center;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: var(--s-3) var(--s-5);
  border: 2px solid transparent; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color var(--quick) ease-out, border-color var(--quick) ease-out, transform var(--quick) ease-out;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-buy { background: var(--sole); color: var(--ink); }
.btn-buy:hover { background: var(--sole-hover); }
.btn-plain { background: transparent; border-color: var(--line); }
.btn-plain:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--surface); }
.btn-ink:hover { background: var(--campo-deep); }
.btn-wide { width: 100%; }
.btn-lg { min-height: 56px; font-size: var(--t-1); }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--ink); border-right-color: transparent; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.nav { position: sticky; top: 0; z-index: 20; background: var(--surface); transition: box-shadow var(--quick) ease-out; }
.nav.is-stuck { box-shadow: 0 1px 0 var(--line), 0 8px 24px oklch(0.23 0.07 270 / 0.08); }
.nav-row { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-weight: 800; font-size: var(--t-1); font-stretch: 75%; text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: none; gap: var(--s-5); margin-inline: auto; }
.nav-links a { padding-block: var(--s-3); text-decoration: none; font-weight: 600; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-end { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.nav-end .btn { min-height: 44px; padding: var(--s-2) var(--s-4); }
.nav-enter { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-3); font-weight: 600; text-decoration: none; }
.nav-enter:hover { text-decoration: underline; text-underline-offset: 4px; }

.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; }
.field input {
  min-height: 48px; width: 100%; padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm); font-size: var(--t-0);
  transition: border-color var(--quick) ease-out;
}
.field input:hover { border-color: var(--ink-muted); }
.field input[aria-invalid='true'] { border-color: var(--error); }
.error { color: var(--error); font-size: var(--t-sm); font-weight: 600; }
.error:empty { display: none; }
.on-sole .error { color: oklch(0.38 0.16 27); }

.todo {
  display: grid; place-content: center; gap: var(--s-1); padding: var(--s-4); text-align: center;
  border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-muted); font-size: var(--t-sm);
}
.todo strong { color: var(--ink); font-weight: 600; }
.video { aspect-ratio: 9 / 16; }
.play { width: 48px; height: 48px; margin-inline: auto; color: var(--ink); }

.footer { background: var(--ink); color: var(--on-campo-muted); padding-block: var(--s-7); padding-bottom: calc(var(--s-9) + env(safe-area-inset-bottom)); font-size: var(--t-sm); }
.footer .brand { color: var(--surface); }
.footer-grid { display: grid; gap: var(--s-5); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--surface); }

@media (min-width: 800px) {
  :root { --gutter: 32px; }
  .nav-links { display: flex; }
  .nav-end { margin-left: 0; }
  .footer { padding-bottom: var(--s-7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
