:root {
  --bg: #140f0c;
  --bg-deep: #0c0908;
  --ink: #f4eadc;
  --muted: #b7a494;
  --line: rgba(244, 234, 220, 0.16);
  --gold: #f0c27a;
  --copper: #d4784a;
  --ember: #e7a07a;
  --paper: #231911;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 18%, rgba(212, 120, 74, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(240, 194, 122, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  line-height: 1.55;
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: #ffe3b0; }

.top {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.page .top { position: sticky; background: rgba(20, 15, 12, 0.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }

.mark {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
}

.mark-lobe {
  position: absolute;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 250, 230, 0.98) 0 8%, transparent 28%),
    radial-gradient(circle at 72% 80%, rgba(92, 42, 8, 0.55), transparent 46%),
    radial-gradient(circle at 38% 36%, #ffe7a3, #e2a63a 42%, #b56d16 100%);
  box-shadow: inset 0 -6px 10px rgba(80, 32, 6, 0.28);
  animation: liquify 9s ease-in-out infinite;
}

.mark-lobe-a { inset: 2px 14px 8px 0; }
.mark-lobe-b {
  inset: 10px 0 0 16px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 244, 214, 0.95) 0 7%, transparent 26%),
    radial-gradient(circle at 70% 78%, rgba(70, 28, 6, 0.5), transparent 48%),
    radial-gradient(circle at 40% 34%, #ffd978, #d4922a 48%, #8a4a10 100%);
  animation-duration: 12s;
  animation-delay: -4s;
}

.top nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--gold); }

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6rem 1.25rem 4rem;
}

.scene-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage:has(.scene-gl.is-live) .scene { display: none; }

.scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: url("#liquid");
}

.liquid-def { position: absolute; width: 0; height: 0; }

.blob {
  position: absolute;
  left: 0;
  top: 0;
  width: 168px;
  height: 168px;
}

.blob-life,
.blob-body {
  width: 100%;
  height: 100%;
  transform-origin: center;
}

.blob-body {
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 250, 230, 0.98) 0 7%, transparent 26%),
    radial-gradient(circle at 70% 78%, rgba(90, 40, 8, 0.5), transparent 42%),
    radial-gradient(circle at 40% 38%, #ffe7a3, #e2a63a 44%, #8a4a10 100%);
  animation: liquify 11s ease-in-out infinite;
}

.blob-b .blob-body { animation-duration: 9s; animation-delay: -3s; background: radial-gradient(circle at 30% 28%, #fff1c2, #d4922a 46%, #6e320c 100%); }
.blob-c .blob-body { animation-duration: 13s; animation-delay: -6s; }
.blob-d .blob-body { animation-duration: 8s; animation-delay: -2s; background: radial-gradient(circle at 38% 24%, #fff6d0, #f0c14a 40%, #b56d16 100%); }
.blob-e .blob-body { animation-duration: 7s; animation-delay: -4s; }
.blob-f .blob-body { animation-duration: 10s; animation-delay: -5s; }
.blob-g .blob-body { animation-duration: 12s; animation-delay: -8s; background: radial-gradient(circle at 34% 30%, #ffe09a, #c98420 48%, #5c2c0c 100%); }
.blob-h .blob-body { animation-duration: 8.5s; animation-delay: -1s; }

.blob-c .blob-life,
.blob-e .blob-life,
.blob-f .blob-life,
.blob-g .blob-life,
.blob-h .blob-life { animation: census 18s ease-in-out infinite; }
.blob-c .blob-life { animation-delay: -4s; }
.blob-e .blob-life { animation-delay: -9s; }
.blob-f .blob-life { animation-delay: -2s; }
.blob-g .blob-life { animation-delay: -13s; }
.blob-h .blob-life { animation-delay: -7s; }

.blob-a { width: 210px; height: 190px; animation: wander-a 26s ease-in-out infinite; }
.blob-b { width: 160px; height: 170px; animation: wander-b 22s ease-in-out infinite; }
.blob-c { width: 240px; height: 180px; animation: wander-c 31s ease-in-out infinite; }
.blob-d { width: 130px; height: 170px; animation: wander-d 18s ease-in-out infinite; }
.blob-e { width: 110px; height: 110px; animation: wander-e 16s ease-in-out infinite; }
.blob-f { width: 180px; height: 140px; animation: wander-f 24s ease-in-out infinite; }
.blob-g { width: 140px; height: 190px; animation: wander-g 28s ease-in-out infinite; }
.blob-h { width: 96px; height: 120px; animation: wander-h 15s ease-in-out infinite; }

.hero {
  position: relative;
  z-index: 2;
  max-width: 38rem;
  text-align: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(ellipse at center, rgba(20, 15, 12, 0.72), rgba(20, 15, 12, 0.2) 70%, transparent 78%);
}

.kicker {
  margin: 0 0 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 0.72rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

.lead {
  margin: 1.25rem auto 0;
  max-width: 28rem;
  font-size: 1.2rem;
  color: var(--ink);
}

.sheet {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 40rem;
  padding: 4rem 1.5rem 5rem;
}

.sheet h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
  font-weight: 500;
}

.sheet p { margin: 0 0 1rem; font-size: 1.15rem; color: #efe4d6; }
.sheet p.quiet { color: var(--muted); }

.page-main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
}

.page-main h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
}

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.notes li {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  font-size: 1.12rem;
}

.site-footer {
  padding: 0 1.5rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 0.85rem;
}

.miss {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

.miss h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); }

@keyframes liquify {
  0% { border-radius: 63% 37% 58% 42% / 49% 61% 39% 51%; transform: scale(1, 1); }
  25% { border-radius: 38% 62% 30% 70% / 72% 28% 64% 36%; transform: scale(1.34, 0.68); }
  50% { border-radius: 72% 28% 66% 34% / 32% 68% 40% 60%; transform: scale(0.7, 1.36); }
  75% { border-radius: 44% 56% 26% 74% / 58% 42% 70% 30%; transform: scale(1.2, 0.8); }
  100% { border-radius: 63% 37% 58% 42% / 49% 61% 39% 51%; transform: scale(1, 1); }
}

@keyframes census {
  0%, 14% { opacity: 1; transform: scale(1); }
  26%, 48% { opacity: 0; transform: scale(0.12); }
  62%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes wander-a {
  0% { transform: translate(6vw, 12vh); }
  25% { transform: translate(62vw, 8vh); }
  50% { transform: translate(48vw, 62vh); }
  75% { transform: translate(8vw, 58vh); }
  100% { transform: translate(6vw, 12vh); }
}

@keyframes wander-b {
  0% { transform: translate(70vw, 18vh); }
  30% { transform: translate(18vw, 28vh); }
  60% { transform: translate(40vw, 74vh); }
  100% { transform: translate(70vw, 18vh); }
}

@keyframes wander-c {
  0% { transform: translate(-6vw, 64vh); }
  35% { transform: translate(55vw, 70vh); }
  70% { transform: translate(28vw, 6vh); }
  100% { transform: translate(-6vw, 64vh); }
}

@keyframes wander-d {
  0% { transform: translate(78vw, 68vh); }
  50% { transform: translate(14vw, 10vh); }
  100% { transform: translate(78vw, 68vh); }
}

@keyframes wander-e {
  0% { transform: translate(42vw, 8vh); }
  33% { transform: translate(8vw, 40vh); }
  66% { transform: translate(72vw, 46vh); }
  100% { transform: translate(42vw, 8vh); }
}

@keyframes wander-f {
  0% { transform: translate(20vw, 78vh); }
  40% { transform: translate(74vw, 22vh); }
  100% { transform: translate(20vw, 78vh); }
}

@keyframes wander-g {
  0% { transform: translate(58vw, 4vh); }
  50% { transform: translate(4vw, 48vh); }
  100% { transform: translate(58vw, 4vh); }
}

@keyframes wander-h {
  0% { transform: translate(30vw, 36vh); }
  50% { transform: translate(80vw, 70vh); }
  100% { transform: translate(30vw, 36vh); }
}

@media (max-width: 720px) {
  .blob-a { width: 128px; height: 116px; }
  .blob-b { width: 100px; height: 108px; }
  .blob-c { width: 146px; height: 112px; }
  .blob-d { width: 84px; height: 108px; }
  .blob-e { width: 70px; height: 70px; }
  .blob-f { width: 112px; height: 88px; }
  .blob-g { width: 90px; height: 120px; }
  .blob-h { width: 64px; height: 78px; }
  .hero { padding-inline: 0.5rem; }
  .lead { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .blob-life, .blob-body, .mark-lobe { animation: none; }
  .blob-body, .mark-lobe { border-radius: 60% 40% 55% 45% / 50% 58% 42% 50%; }
  .blob-a { transform: translate(8vw, 16vh); }
  .blob-b { transform: translate(68vw, 14vh); }
  .blob-c { transform: translate(6vw, 62vh); }
  .blob-d { transform: translate(74vw, 64vh); }
  .blob-e { transform: translate(44vw, 8vh); }
  .blob-f { transform: translate(18vw, 72vh); }
  .blob-g { transform: translate(52vw, 6vh); }
  .blob-h { transform: translate(30vw, 40vh); }
}
