:root {
  --ink-0: #040404;
  --ink-1: #09080a;
  --ink-2: #150f14;
  --wine: #5f2434;
  --royal: #24395f;
  --gold: #e4b56a;
  --gold-soft: rgba(228, 181, 106, 0.18);
  --pearl: #fbf2e7;
  --pearl-soft: rgba(251, 242, 231, 0.88);
  --halo: rgba(255, 241, 216, 0.22);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: #050507;
}

body {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 246, 229, 0.1), transparent 18%),
    radial-gradient(circle at 18% 24%, rgba(126, 44, 59, 0.44), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(46, 67, 113, 0.3), transparent 28%),
    radial-gradient(circle at 50% 82%, rgba(236, 188, 104, 0.12), transparent 32%),
    linear-gradient(160deg, #050507 0%, #120d11 42%, #040405 100%);
  color: var(--pearl);
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Palatino, Georgia, serif;
  isolation: isolate;
}

body::before,
body::after,
.stage::before,
.stage::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: -24vmax;
  z-index: -4;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 239, 212, 0.14), transparent 16%),
    conic-gradient(
      from 210deg at 50% 48%,
      rgba(228, 181, 106, 0.14) 0deg,
      rgba(120, 41, 59, 0.24) 86deg,
      rgba(43, 61, 105, 0.2) 178deg,
      rgba(228, 181, 106, 0.12) 286deg,
      rgba(255, 250, 241, 0.05) 360deg
    );
  filter: blur(76px) saturate(120%);
  opacity: 0.92;
  animation: sky-shift 24s ease-in-out infinite alternate;
}

body::after {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 21%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 67%, rgba(255, 243, 226, 0.55) 0 1.2px, transparent 2px),
    radial-gradient(circle at 31% 38%, rgba(255, 228, 182, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 47% 17%, rgba(255, 255, 255, 0.45) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 63% 72%, rgba(255, 238, 210, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 77% 26%, rgba(255, 248, 235, 0.62) 0 1.3px, transparent 2.2px),
    radial-gradient(circle at 86% 61%, rgba(255, 228, 182, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 44%, rgba(255, 255, 255, 0.3) 0 0.8px, transparent 1.8px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 36%, rgba(255, 215, 153, 0.03) 68%, transparent 100%);
  opacity: 0.55;
  animation: shimmer 22s linear infinite;
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
}

.stage::before {
  left: 50%;
  top: 50%;
  z-index: -3;
  width: min(80vw, 54rem);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 246, 231, 0.22) 0%, rgba(255, 226, 175, 0.16) 13%, rgba(148, 72, 51, 0.12) 28%, rgba(12, 9, 13, 0.9) 44%, rgba(12, 9, 13, 0.98) 52%, transparent 66%),
    radial-gradient(circle at 50% 50%, transparent 57%, rgba(249, 226, 186, 0.16) 60%, transparent 63%),
    radial-gradient(circle at 50% 50%, transparent 71%, rgba(249, 226, 186, 0.1) 74%, transparent 77%);
  filter: blur(0.8px) drop-shadow(0 0 60px rgba(244, 208, 141, 0.08));
  opacity: 0.94;
  animation: halo-pulse 14s ease-in-out infinite;
}

.stage::after {
  left: 50%;
  top: 50%;
  z-index: -2;
  width: min(116vw, 82rem);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  background:
    radial-gradient(ellipse at center, rgba(255, 241, 216, 0.1), transparent 43%),
    repeating-radial-gradient(circle at center, transparent 0 4.8rem, rgba(255, 231, 190, 0.055) 4.8rem 4.92rem, transparent 4.92rem 7.8rem);
  opacity: 0.72;
  filter: blur(0.6px);
  animation: ring-drift 26s ease-in-out infinite alternate;
}

.line {
  position: relative;
  z-index: 1;
  margin: 0;
  display: grid;
  place-items: center;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(1rem, 2.85vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0.018em;
  font-weight: 500;
  font-style: italic;
  color: var(--pearl);
  text-shadow:
    0 0 1px rgba(255, 245, 230, 0.48),
    0 0 22px rgba(255, 236, 204, 0.08),
    0 0 48px rgba(228, 181, 106, 0.08);
  animation: breathe 9s ease-in-out infinite;
  transform-origin: center;
  text-transform: lowercase;
}

.line__copy {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  opacity: 0;
  filter: blur(16px);
  transform: translate3d(0, 0.52em, 0) scale(0.985);
  transform-origin: center;
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1.5s cubic-bezier(0.19, 1, 0.22, 1),
    transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, filter, transform;
}

.line__copy.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.line__copy.is-exiting {
  opacity: 0;
  filter: blur(18px);
  transform: translate3d(0, -0.46em, 0) scale(1.015);
}

.line__text {
  color: var(--pearl-soft);
}

.line__number {
  margin-inline-start: 0.18em;
  color: var(--pearl);
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow:
    0 0 0.5px rgba(255, 255, 255, 0.72),
    0 0 16px var(--halo),
    0 0 42px var(--gold-soft);
}

.line__message {
  color: rgba(255, 246, 231, 0.98);
  font-weight: 600;
  text-shadow:
    0 0 0.5px rgba(255, 255, 255, 0.7),
    0 0 16px rgba(255, 243, 221, 0.16),
    0 0 42px rgba(228, 181, 106, 0.12);
}

@keyframes sky-shift {
  from {
    transform: translate3d(-2%, -1.5%, 0) scale(1);
  }

  to {
    transform: translate3d(2.5%, 1.5%, 0) scale(1.07);
  }
}

@keyframes halo-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.985);
    opacity: 0.88;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.025);
    opacity: 1;
  }
}

@keyframes ring-drift {
  from {
    transform: translate(-50%, -50%) rotate(-12deg) scale(0.98);
  }

  to {
    transform: translate(-50%, -50%) rotate(7deg) scale(1.04);
  }
}

@keyframes shimmer {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 0.42;
  }

  50% {
    opacity: 0.62;
  }

  to {
    transform: translate3d(0, -1.5%, 0);
    opacity: 0.46;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(0);
    text-shadow:
      0 0 1px rgba(255, 245, 230, 0.4),
      0 0 16px rgba(255, 236, 204, 0.06),
      0 0 34px rgba(228, 181, 106, 0.06);
  }

  50% {
    transform: translateY(-1px);
    text-shadow:
      0 0 1px rgba(255, 245, 230, 0.5),
      0 0 20px rgba(255, 236, 204, 0.1),
      0 0 46px rgba(228, 181, 106, 0.1);
  }
}

@media (max-width: 640px) {
  .stage::before {
    width: min(122vw, 36rem);
  }

  .stage::after {
    width: 150vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after,
  .stage::before,
  .stage::after,
  .line {
    animation: none;
  }

  .line__copy,
  .line__copy.is-visible,
  .line__copy.is-exiting {
    filter: none;
    transform: none;
    transition: none;
  }
}
