/* AGVI landing — dark, one accent (amber = "the hour hand"). No external resources. */
:root {
  --ink: #0b0b0c;
  --ink-2: #121214;
  --ink-3: #18181b;
  --line: #26262a;
  --line-2: #3a3a40;
  --text: #edece7;
  --muted: #a8a69f;
  --faint: #7a7872;
  --accent: #f0b43c;
  --accent-ink: #1a1306;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Helvetica, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "DejaVu Serif", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
canvas { display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- Nav (sticky; Login + Register always visible) ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 68px; padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(11, 11, 12, .86);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--line);
}
.nav-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  opacity: .8;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .18em; font-size: 15px; min-height: 44px; }
.brand-mark { width: 26px; height: 26px; transition: transform .9s var(--spring); }
.brand:hover .brand-mark { transform: rotate(360deg); }
.nav-links { display: flex; align-items: center; gap: clamp(6px, 2vw, 28px); }
.nav-anchor { font-size: 14px; color: var(--muted); text-decoration: none; padding: 10px 2px; transition: color .2s; }
.nav-anchor:hover { color: var(--text); }
.nav-login, .nav-register {
  --tx: 0px; --ty: 0px;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  transition: border-color .25s, background-color .25s, transform .5s var(--spring), box-shadow .3s;
}
.nav-login { border: 1px solid transparent; }
.nav-login:hover { border-color: var(--line-2); }
.nav-register { background: var(--accent); color: var(--accent-ink); transform: translate(var(--tx), var(--ty)); }
.nav-register:hover { box-shadow: 0 8px 30px -10px rgba(240, 180, 60, .6); }

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  --tx: 0px; --ty: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  transform: translate(var(--tx), var(--ty));
  transition: transform .5s var(--spring), background-color .25s, border-color .25s, color .25s, box-shadow .3s;
}
.btn .arrow { display: inline-block; transition: transform .45s var(--spring); }
.btn:hover .arrow { transform: translateX(5px); }
.btn:active { transform: translate(var(--tx), var(--ty)) scale(.96); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: 0 12px 44px -10px rgba(240, 180, 60, .55); }
.btn-ghost { border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); }

.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: rgba(18, 18, 20, .8); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  transition: transform .45s var(--spring), border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--text); transform: translateY(-2px); }
.chip:active { transform: scale(.95); }
.chip-accent { border-color: var(--accent); color: var(--accent); }
.chip-accent:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-quiet { border-color: transparent; color: var(--muted); background: transparent; }
.chip-quiet:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- Hero ---------- */
.hero {
  --hp: 0;
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: 1fr auto;
  column-gap: clamp(24px, 4vw, 64px);
  padding: 96px var(--pad) 44px; isolation: isolate; overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,11,12,.9) 0%, rgba(11,11,12,.5) 34%, rgba(11,11,12,0) 50%),
              linear-gradient(0deg, var(--ink) 0%, rgba(11,11,12,0) 16%);
}
.hero-copy {
  grid-column: 1; grid-row: 1; align-self: center; max-width: 620px;
  transform: translateY(calc(var(--hp) * -60px)); opacity: calc(1 - var(--hp) * .9);
}
.playground {
  grid-column: 2; grid-row: 1; position: relative; min-height: 420px;
  touch-action: pan-y; cursor: default;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.playground.is-over { cursor: grab; }
.playground.is-grabbing { cursor: grabbing; }
.pg-bar {
  grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding-top: 12px;
}
.pg-hint { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--text); }
.pg-hint-done { display: none; color: var(--accent); }
.hero.is-done .pg-hint-drag { display: none; }
.hero.is-done .pg-hint-done { display: inline; }
.pg-count { color: var(--muted); margin-left: 8px; white-space: nowrap; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(240,180,60,.15); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(240,180,60,0); } }
.hero h1 { font-size: clamp(60px, 10vw, 152px); font-weight: 650; letter-spacing: -0.055em; line-height: .9; margin-bottom: 30px; }
.hero h1 .line { display: inline-block; }
.hero h1 .accent { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.035em; padding-right: .06em; }
.lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 30ch; margin-bottom: 38px; line-height: 1.5; }

/* Intro stagger (JS adds .is-ready on <html>) */
.js .hero-copy > *, .js .pg-bar { opacity: 0; transform: translateY(18px); }
.js.is-ready .hero-copy > *, .js.is-ready .pg-bar { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.js.is-ready .hero-copy > *:nth-child(2) { transition-delay: .12s; }
.js.is-ready .hero-copy > *:nth-child(3) { transition-delay: .26s; }
.js.is-ready .hero-copy > *:nth-child(4) { transition-delay: .4s; }
.js.is-ready .pg-bar { transition-delay: .7s; }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(96px, 15vw, 190px) var(--pad); max-width: var(--max); margin: 0 auto; }
.statement { font-size: clamp(28px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; max-width: 22ch; }
.statement span { display: block; color: var(--faint); }
.statement q { quotes: "\201C" "\201D"; font-family: var(--serif); font-style: italic; color: var(--muted); }
.statement .hl { color: var(--text); margin-top: .35em; }
.js .statement .hl { transition: color 1.4s var(--ease) .35s; }
.js .statement:not(.is-in) .hl { color: var(--faint); }

/* ---------- Explorer (tabs) ---------- */
.explorer {
  max-width: var(--max); margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: center;
  border-top: 1px solid var(--line);
}
.index { display: flex; align-items: baseline; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.index span { color: var(--accent); }
.ex-title { font-size: clamp(34px, 4.2vw, 60px); margin-bottom: 36px; max-width: 14ch; }
.tabs {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; margin-bottom: 32px; background: var(--ink-2);
}
.tab-ink {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3);
  border-radius: 999px; background: var(--text);
  transition: transform .6s var(--spring);
}
.tabs[data-active="1"] .tab-ink { transform: translateX(100%); }
.tabs[data-active="2"] .tab-ink { transform: translateX(200%); }
.tab {
  position: relative; z-index: 1; min-height: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .3s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab:focus-visible { outline-offset: 2px; }
.panels { min-height: 10.5em; }
.panel { animation: panelIn .6s var(--ease) both; border-radius: 8px; }
.panel h3 { font-size: clamp(26px, 2.6vw, 36px); margin-bottom: 16px; }
.panel p { color: var(--muted); max-width: 42ch; font-size: 18px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ex-stage {
  position: relative; aspect-ratio: 6 / 5; width: 100%;
  border-radius: 22px; background: var(--ink-2); border: 1px solid var(--line); overflow: hidden;
}
.ex-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- How ---------- */
.how { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--pad); border-top: 1px solid var(--line); }
.how-head h2 { font-size: clamp(36px, 5vw, 72px); max-width: 16ch; margin-bottom: clamp(48px, 6vw, 80px); }
.how-track { position: relative; }
.how-canvas { position: absolute; left: 0; right: 0; top: 0; height: 64px; width: 100%; }
.steps { list-style: none; margin: 0; padding: 88px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); counter-reset: s; }
.step { counter-increment: s; }
.step-n { display: block; font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.step-n::before { content: "0" counter(s); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); vertical-align: middle; margin-right: 12px; }
.step p { color: var(--muted); max-width: 32ch; }
.js .how-track[data-reveal] .step { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .how-track.is-in .step { opacity: 1; transform: none; }
.js .how-track.is-in .step:nth-child(2) { transition-delay: .15s; }
.js .how-track.is-in .step:nth-child(3) { transition-delay: .3s; }

/* ---------- Closing ---------- */
.closing {
  position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  border-top: 1px solid var(--line);
}
.closing-art { aspect-ratio: 1; width: 100%; max-width: 500px; justify-self: center; position: relative; }
.closing-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.closing h2 { font-size: clamp(44px, 6.4vw, 96px); letter-spacing: -0.05em; margin-bottom: 20px; }
.closing-copy > p { color: var(--muted); font-size: 18px; margin-bottom: 36px; max-width: 34ch; }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 36px;
  display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.footer-brand { font-weight: 700; letter-spacing: .18em; color: var(--text); }
.footer a { margin-left: auto; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-anchor { display: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; padding-top: 104px; padding-bottom: 24px; }
  .hero-copy { grid-column: 1; grid-row: 1; transform: none; opacity: 1; }
  .playground { grid-column: 1; grid-row: 2; min-height: 0; height: 380px; margin-top: 16px; }
  .pg-bar { grid-column: 1; grid-row: 3; }
  .hero::after { background: linear-gradient(180deg, rgba(11,11,12,.9) 0%, rgba(11,11,12,.6) 40%, rgba(11,11,12,0) 58%); }
  .explorer, .closing { grid-template-columns: 1fr; }
  .ex-stage { aspect-ratio: 1 / 1; }
  .steps { grid-template-columns: 1fr; padding-top: 0; padding-left: 56px; gap: 40px; }
  .how-canvas { top: 0; bottom: 0; left: 0; right: auto; width: 40px; height: 100%; }
  .closing-art { max-width: 320px; order: 2; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .eyebrow { margin-bottom: 18px; font-size: 12px; letter-spacing: .1em; color: var(--text); }
  .hero h1 { margin-bottom: 20px; }
  .lede { margin-bottom: 26px; }
  .hero { padding-top: 92px; }
  .nav { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-login, .nav-register { padding: 0 13px; }
  .brand { letter-spacing: .14em; }
  .btn { flex: 1 1 auto; }
  .pg-actions { width: 100%; }
  .pg-actions .chip { flex: 1 1 auto; }
  .tab { font-size: 13px; padding: 0 4px; }
  .footer { flex-wrap: wrap; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .hero-copy > *, .js .pg-bar, .js [data-reveal], .js .how-track[data-reveal] .step { opacity: 1 !important; transform: none !important; }
  .hero-copy { transform: none; opacity: 1; }
  .js .statement:not(.is-in) .hl { color: var(--text); }
  .btn, .nav-register { transform: none !important; }
}
