/* ── Local fonts ────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SpaceMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/SpaceMono-Italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/SpaceMono-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'IM Fell English';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IMFellEnglish-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IM Fell English';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IMFellEnglish-Italic.woff2') format('woff2');
}

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

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --ink:    #e8e0d0;
  --dim:    #7a7060;
  --faint:  #2a2820;
  --bg:     #0d0c0a;
  --accent: #4CBB17;
  --glow:   rgba(200, 169, 110, 0.15);
}

/* ── Base ───────────────────────────────────────────────────────────────────── */
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.scene {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-top: 5rem;
  padding-bottom: 5rem;
  animation: flicker 8s infinite;
}

.core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  padding: 1rem;
}

/* ── Meta bar ───────────────────────────────────────────────────────────────── */
.meta-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.7rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid rgba(76, 187, 23, 0.08);
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--dim);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

/* ── Bunny ──────────────────────────────────────────────────────────────────── */
.bunny-wrap {
  position: relative;
}

.bunny {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.2rem, 1.8vw, 1.1rem);
  line-height: 1.3;
  color: var(--ink);
  text-align: center;
  white-space: pre;
  text-shadow: 0 0 18px var(--accent), 0 0 40px rgba(200, 169, 110, 0.3);
  animation: breathe 4s ease-in-out infinite;
}

.bunny-wrap::before {
  content: '';
  position: absolute;
  inset: -30px -40px;
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

/* ── Headline cycling ───────────────────────────────────────────────────────── */
.headline {
  text-align: center;
}

.headline__cycle {
  overflow: hidden;
  height: 56px;
}

.headline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  animation: hl-scroll 16s ease infinite;
}

.headline__item {
  display: block;
  list-style: none;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 4.5vw, 2.8rem);
  color: var(--ink);
  letter-spacing: 0.03em;
  line-height: 56px;
  height: 56px;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 30px rgba(232, 224, 208, 0.2);
}

@keyframes hl-scroll {
  0%       { transform: translateY(0);    }
  21.875%  { transform: translateY(0);    }
  25%      { transform: translateY(-20%); }
  46.875%  { transform: translateY(-20%); }
  50%      { transform: translateY(-40%); }
  71.875%  { transform: translateY(-40%); }
  75%      { transform: translateY(-60%); }
  96.875%  { transform: translateY(-60%); }
  99.9%    { transform: translateY(-80%); }
  100%     { transform: translateY(-80%); }
}

.headline .sub {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ── Divider ────────────────────────────────────────────────────────────────── */
.divider {
  width: 1px;
  height: 4rem;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.6;
  margin: 0.5rem 0;
}

/* ── Whisper ─────────────────────────────────────────────────────────────────── */
.whisper {
  min-height: 1.5em;
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  color: var(--dim);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.whisper.visible {
  opacity: 0.8;
}

.whisper.fading {
  opacity: 0;
}

/* ── Transmission ───────────────────────────────────────────────────────────── */
.transmission {
  max-width: 420px;
  text-align: center;
}

.transmission .label {
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  opacity: 0.8;
}

.transmission p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.9;
  color: var(--dim);
}

.transmission p em {
  color: var(--ink);
  font-style: normal;
}

/* ── Whisper toggle ─────────────────────────────────────────────────────────── */
.whisper-toggle {
  opacity: 0;
  min-height: 1.4em;
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  color: var(--dim);
  letter-spacing: 0.02em;
  transition: opacity 1.2s ease;
  margin: 0.2rem 0;
}

.whisper-toggle.visible {
  opacity: 0.65;
}

.whisper-toggle.fading {
  opacity: 0;
}

/* ── Cursor ─────────────────────────────────────────────────────────────────── */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
  opacity: 0.9;
}

/* ── Dossier ─────────────────────────────────────────────────────────────────── */
.dossier {
  max-width: 520px;
  width: 100%;
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

.dossier.visible {
  opacity: 1;
  transform: translateY(0);
}

.dossier__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.dossier__tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.7;
}

.dossier__warn {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1rem);
  color: var(--dim);
  line-height: 1.8;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(76, 187, 23, 0.15);
}

.dossier__warn em {
  color: var(--ink);
  font-style: normal;
}

.dossier__warn strong {
  color: var(--ink);
  font-style: normal;
}

.dossier__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.dossier__item {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: clamp(0.8rem, 1.3vw, 0.72rem);
  line-height: 1.6;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dossier__item:last-child {
  border-bottom: none;
}

.dossier__key {
  color: var(--accent);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.dossier__val {
  color: var(--ink);
  word-break: break-all;
}

.dossier__val.dim {
  color: var(--dim);
}

/* staggered reveal — each item fades in after the dossier itself */
.dossier__item {
  opacity: 0;
  animation: none;
}

.dossier.visible .dossier__item {
  animation: dossier-row 0.4s ease forwards;
}

@keyframes dossier-row {
  to { opacity: 1; }
}

/* ── Bottom bar ─────────────────────────────────────────────────────────────── */
.bottom-bar {
  position: static;
  padding: 2rem 2rem 3rem;
  border-top: 1px solid rgba(76, 187, 23, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
}

.bottom-bar .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

/* ── Overlays ───────────────────────────────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes breathe {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%       { opacity: 0.85; transform: translateY(-3px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 0; }
}

@keyframes flicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.97; }
  94%  { opacity: 1; }
  96%  { opacity: 0.98; }
  100% { opacity: 1; }
}
