:root {
  --bg: #060607;
  --fg: #f2f2f0;
  --dim: rgba(242, 242, 240, .45);
  --faint: rgba(242, 242, 240, .15);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 3vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); color-scheme: dark; }
html.snap { scroll-snap-type: y mandatory; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- background field ---------- */

#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0;
  transition: opacity 1.4s ease;
}
body:not(.is-hero) #field { opacity: .2; }
body.is-final #field { opacity: .4; }

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, .8) 100%);
}

/* ---------- fixed chrome ---------- */

.brand, .status, .legal, .progress { position: fixed; z-index: 3; }

.brand {
  top: var(--gutter); left: var(--gutter);
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
}
.brand::after { content: "_"; animation: blink 1.1s steps(1) infinite; }

.status {
  top: var(--gutter); right: var(--gutter);
  font-size: 11px; color: var(--dim); text-align: right;
}

.legal {
  bottom: var(--gutter); right: var(--gutter);
  display: flex; gap: 20px;
  font-size: 11px; color: var(--dim);
}
.legal a { transition: color .3s; }
.legal a:hover, .legal a:focus-visible { color: var(--fg); }

.progress {
  right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.progress i {
  display: block; width: 12px; height: 1px;
  background: var(--faint);
  transition: width .5s ease, background .5s ease;
}
.progress i.on { width: 24px; background: var(--fg); }

/* ---------- panels ---------- */

main { position: relative; z-index: 2; }

.panel {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 96px calc(var(--gutter) + 32px) 96px var(--gutter);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero { align-items: end; padding: 96px var(--gutter) calc(var(--gutter) + 56px); }

.tagline {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .14em; color: var(--dim);
}
.scroll-hint {
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  animation: drift 2.4s ease-in-out infinite;
}
.scroll-hint::after { content: ""; display: block; width: 1px; height: 28px; margin: 10px auto 0; background: var(--dim); }

.statement { width: min(100%, 26ch); font-size: clamp(1.5rem, 4.2vw, 3.25rem); }

.idx {
  display: block; margin-bottom: 1.6rem;
  font-size: 11px; letter-spacing: .24em; color: var(--dim);
}

.line {
  font-weight: 300; line-height: 1.22; letter-spacing: -.02em;
  text-wrap: balance;
}

.contact {
  display: inline-block; margin-top: 3rem; padding-bottom: 4px;
  font-size: 13px; color: var(--dim);
  border-bottom: 1px solid var(--faint);
  opacity: 0; transform: translateY(6px);
  transition: opacity .8s ease .2s, transform .8s ease .2s, color .3s, border-color .3s;
}
.revealed .contact { opacity: 1; transform: none; }
.contact:hover, .contact:focus-visible { color: var(--fg); border-color: var(--fg); }

/* ---------- legal pages ---------- */

.doc {
  position: relative; z-index: 2;
  max-width: 68ch; margin: 0 auto;
  padding: 128px var(--gutter) 64px;
  color: rgba(242, 242, 240, .8);
}
.doc h1 {
  margin-bottom: .4rem;
  font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 300; letter-spacing: -.01em; color: var(--fg);
}
.doc .sub { margin-bottom: 3rem; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.doc h2 {
  margin: 2.6rem 0 .8rem;
  font-size: 12px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--fg);
}
.doc p, .doc ul { margin-bottom: 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .3rem; }
.doc a { border-bottom: 1px solid var(--faint); transition: border-color .3s; }
.doc a:hover { border-color: var(--fg); }
.doc .back { display: inline-block; margin-bottom: 3rem; font-size: 12px; color: var(--dim); border: 0; }
.doc .back:hover { color: var(--fg); }

.legal.static { position: static; justify-content: flex-end; padding: 0 var(--gutter) var(--gutter); }

/* ---------- motion ---------- */

@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { 50% { transform: translateY(6px); opacity: .6; } }

@media (max-width: 600px) {
  .status { display: none; }
  .progress { display: none; }
  .panel { padding-right: var(--gutter); }
}

@media (prefers-reduced-motion: reduce) {
  .brand::after, .scroll-hint { animation: none; }
  #field, .contact { transition: none; }
}
