:root {
  --bg: #070708;
  --ink: #f3eee6;
  --muted: #c9c1b4;
  --faint: #a79e92;
  --line: rgba(243, 238, 230, 0.18);
  --ember: #c47a74;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 5;
  transform: translateY(-160%);
  background: var(--ink);
  color: #111;
  padding: 0.7rem 1rem;
  text-decoration: none;
}
.skip:focus { transform: none; }

.world {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% 42%, rgba(40, 42, 48, 0.55), transparent 70%),
    #070708;
}
.figure {
  position: absolute;
  left: 50%;
  bottom: -6vh;
  width: min(78vw, 460px);
  transform: translateX(-50%);
  opacity: 0.78;
  animation: drift 22s ease-in-out infinite alternate;
}
.mist, .vignette { position: absolute; inset: -12%; }
.mist-a {
  background: radial-gradient(ellipse at 30% 60%, rgba(210, 214, 220, 0.09), transparent 55%);
  animation: fog 28s linear infinite alternate;
}
.mist-b {
  background: radial-gradient(ellipse at 70% 40%, rgba(160, 150, 148, 0.07), transparent 50%);
  animation: fog 36s linear infinite alternate-reverse;
}
.vignette {
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.72) 78%);
}
@keyframes drift {
  from { transform: translate3d(-52%, 0, 0); }
  to { transform: translate3d(-46%, -2vh, 0); }
}
@keyframes fog {
  from { transform: translate3d(-4%, 0, 0); }
  to { transform: translate3d(4%, -2%, 0); }
}

.sound {
  position: fixed;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 4;
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.55);
  color: var(--ink);
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.gate, .story {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 18vh 0 12vh;
}
.gate { text-align: center; min-height: 100vh; display: grid; align-content: center; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
h1 { margin: 0.2rem 0 0.8rem; font-size: clamp(4rem, 16vw, 7.5rem); }
h2 { margin: 0 0 0.6rem; font-size: clamp(2.4rem, 8vw, 4rem); }
h2:focus { outline: none; }
.eyebrow, .steps {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}
.whisper { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 1.6rem; }
.whisper em { font-style: italic; color: var(--ember); }
.quiet, .lead, .hint, .colophon { color: var(--muted); }
.enter {
  min-height: 52px;
  width: min(100%, 28rem);
  border: 1px solid rgba(243, 238, 230, 0.45);
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.9rem 1rem;
}
.enter.slim { width: auto; }
.enter:hover { border-color: var(--ember); }
.steps, .task-list { padding: 0; margin: 1rem 0 1.4rem; }
.steps { display: flex; gap: 1rem; list-style: none; }
.task-list:empty { display: none; }
.task-list { color: var(--muted); }
.steps [aria-current="step"] { color: var(--ink); }
.js [data-stage] { display: none; }
.js [data-stage].is-current { display: block; }
.screen-gate #apply { display: none; }
.screen-apply #gate { display: none; }
label, .consent { display: grid; gap: 0.35rem; }
input[type="text"], input[type="url"] {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  border-radius: 0;
  padding: 0.7rem 0;
}
.field-error { min-height: 1.2em; margin: 0.2rem 0 0; color: var(--ember); }
.hint { margin: 0.35rem 0 0; font-size: 0.95rem; }
.consent { grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; margin-top: 0.6rem; }
.consent input { width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; accent-color: var(--ember); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.2rem; }
.text {
  min-height: 44px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  padding: 0.4rem 0.2rem;
}
.alert, .status { margin: 0 0 1rem; }
.alert:empty, .status:empty { display: none; }
.alert { color: var(--ember); }
.colophon { margin-top: 3rem; font-size: 0.95rem; }
code { overflow-wrap: anywhere; }
.submit:disabled { opacity: 0.6; }

@media (min-width: 900px) {
  .figure { width: min(46vw, 560px); bottom: -8vh; }
  .story { width: min(46rem, calc(100% - 8rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .figure, .mist-a, .mist-b { animation: none !important; }
}
.reduce-motion .figure,
.reduce-motion .mist-a,
.reduce-motion .mist-b { animation: none !important; }
@media print {
  .world, .sound, .gate { display: none !important; }
  #apply { display: block !important; }
}
