:root {
  --bg: #FADC78;
  --ink: #1d1a14;
  --ink-soft: rgba(29, 26, 20, .62);
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

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

html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--mono); overscroll-behavior: none; }

/* El scroll solo existe para mover la escena: el canvas queda fijo */
.scroll-track { height: 520vh; }

#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  display: block;
}

.mark {
  position: fixed; top: clamp(16px, 3vw, 32px); left: clamp(16px, 3vw, 36px);
  pointer-events: none;
}
.mark h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px); line-height: .9; letter-spacing: -.01em;
}
.mark p {
  margin-top: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft);
}

.intro, .outro {
  position: fixed; right: clamp(16px, 3vw, 36px); bottom: clamp(20px, 4vw, 40px);
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.08;
  text-align: right; pointer-events: none;
}
.intro em, .outro em { font-style: italic; }
.outro { opacity: 0; }

.hint {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  pointer-events: none;
}
.hint span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

.label {
  position: fixed; left: 0; top: 0; pointer-events: none;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--bg);
  padding: 5px 8px 4px; border-radius: 2px;
  opacity: 0; transform: translate(-50%, -140%);
  transition: opacity .18s ease;
  white-space: nowrap;
}
.label.on { opacity: 1; }

.loading {
  position: fixed; inset: 0; display: grid; place-items: center;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  background: var(--bg); transition: opacity .6s ease; pointer-events: none;
}
.loading.done { opacity: 0; }

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

@media (max-width: 600px) {
  .intro, .outro { font-size: 22px; }
  .hint { bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .hint span { animation: none; }
}
