:root {
  /* Palette */
  --red:   #ec2027;  /* main stage — matches logo-fire.png */
  --blush: #f6e1dd;  /* top band + typed text */
  --black: #111111;

  /* Type */
  --font: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --band-h: clamp(96px, 18vh, 190px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--red);
  color: var(--blush);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Layout shell ----
   Logo and skip link are pinned as overlays at top/bottom so the typed
   copy can center on the true page center, not the leftover middle row. */
.intro {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- Top band ---- */
.band {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--band-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
}

.logo {
  /* Fixed size on desktop and mobile alike; only shrinks on
     very narrow screens so it never overflows the band. */
  width: min(306px, 75vw);
  max-height: calc(var(--band-h) - 48px);
  object-fit: contain;
  display: block;
}

/* ---- Red stage ---- */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: clamp(24px, 8vh, 120px) clamp(24px, 16vw, 320px);
}

.typed {
  margin: 0;
  max-width: 46rem;
  font-weight: 500;
  font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.3125rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
}

/* Preserve intentional line breaks (e.g. the Perceive / Discern list) */
.typed__text { white-space: pre-wrap; }

/* Blinking block caret */
.caret {
  display: inline-block;
  width: 0.62ch;
  height: 1.05em;
  transform: translateY(0.16em);
  margin-left: 0.06em;
  background: var(--blush);
  animation: blink 1s steps(1) infinite;
}

.caret.is-idle { animation: none; opacity: 1; }

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

/* ---- Controls ---- */
.controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 0 clamp(28px, 6vh, 64px);
}

.skip {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--blush);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.skip:hover { opacity: 1; }

/* ---- Fade between passages ---- */
.typed.is-fading { opacity: 0; transition: opacity 0.45s ease; }
.typed { transition: opacity 0.45s ease; }

/* ---- Skipped / end state ---- */
.intro.is-done .stage .typed { font-weight: 500; }

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

/* ---- Mobile: keep logo the same fixed size, just tidy spacing ---- */
@media (max-width: 640px) {
  .band { padding: 0 4vw; }

  .stage {
    padding: clamp(24px, 6vh, 80px) 7vw;
  }
}
