:root {
  --bg: #060708;
  --ink: #f4f0e8;
  --muted: #8c877d;
  --line: rgba(244, 240, 232, 0.14);
  --gold: #c8a96a;
  --green: #789b8a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: #030405;
  color: var(--ink);
  font-family: "Segoe UI", "Aptos", sans-serif;
}

.atmosphere,
.scene,
body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere {
  z-index: 0;
  overflow: hidden;
  background: #030405;
}

.scene {
  opacity: 0;
  transform: scale(1.02);
  animation: sceneCycle 30s infinite;
}

.scene-ocean {
  animation-delay: 0s;
  background:
    radial-gradient(ellipse at 50% 112%, rgba(52, 170, 213, 0.66), transparent 46%),
    repeating-radial-gradient(ellipse at 50% 118%, rgba(198, 241, 247, 0.28) 0 2px, transparent 4px 30px),
    linear-gradient(180deg, #031117 0%, #071b23 54%, #020405 100%);
}

.scene-ocean::before,
.scene-wind::before,
.scene-cosmos::before,
.scene-snow::before,
.scene-fire::before {
  content: "";
  position: absolute;
  inset: -18%;
}

.scene-ocean::before {
  background:
    repeating-linear-gradient(172deg, transparent 0 28px, rgba(170, 218, 219, 0.12) 29px 31px, transparent 32px 58px);
  filter: blur(1px);
  animation: oceanDrift 11s linear infinite;
}

.scene-snow {
  animation-delay: 6s;
  background:
    linear-gradient(155deg, transparent 0 44%, rgba(230, 238, 240, 0.34) 45% 48%, transparent 49%),
    linear-gradient(205deg, transparent 0 50%, rgba(230, 238, 240, 0.2) 51% 54%, transparent 55%),
    radial-gradient(circle at 50% -15%, rgba(229, 235, 239, 0.38), transparent 30rem),
    linear-gradient(180deg, #080d12 0%, #101820 56%, #030405 100%);
}

.scene-snow::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.5px);
  background-size: 120px 120px, 190px 190px;
  animation: snowFall 14s linear infinite;
}

.scene-fire {
  animation-delay: 12s;
  background:
    radial-gradient(ellipse at 50% 118%, rgba(255, 106, 31, 0.72), transparent 48%),
    radial-gradient(ellipse at 45% 88%, rgba(255, 202, 96, 0.34), transparent 34%),
    linear-gradient(180deg, #090404 0%, #150804 58%, #030405 100%);
}

.scene-fire::before {
  background:
    radial-gradient(ellipse at 42% 88%, rgba(255, 178, 74, 0.2), transparent 18%),
    radial-gradient(ellipse at 58% 82%, rgba(255, 83, 30, 0.18), transparent 21%),
    repeating-linear-gradient(94deg, transparent 0 34px, rgba(255, 146, 63, 0.1) 35px 38px, transparent 39px 78px);
  filter: blur(12px);
  animation: flameLift 7s ease-in-out infinite alternate;
}

.scene-wind {
  animation-delay: 18s;
  background:
    radial-gradient(circle at 20% 18%, rgba(188, 226, 216, 0.24), transparent 28rem),
    linear-gradient(135deg, #06090a 0%, #0a1011 48%, #030405 100%);
}

.scene-wind::before {
  background:
    repeating-linear-gradient(165deg, transparent 0 44px, rgba(220, 230, 226, 0.13) 45px 47px, transparent 48px 110px);
  filter: blur(2px);
  animation: windSweep 8s linear infinite;
}

.scene-cosmos {
  animation-delay: 24s;
  background:
    radial-gradient(circle at 70% 25%, rgba(123, 148, 255, 0.32), transparent 20rem),
    radial-gradient(circle at 30% 72%, rgba(200, 169, 106, 0.24), transparent 22rem),
    linear-gradient(180deg, #030407 0%, #080913 58%, #020203 100%);
}

.scene-cosmos::before {
  background:
    radial-gradient(circle, rgba(255,255,255,0.75) 0 1px, transparent 1.5px),
    linear-gradient(118deg, transparent 0 46%, rgba(255, 255, 255, 0.42) 46.1% 46.4%, transparent 47%);
  background-size: 150px 150px, 520px 520px;
  animation: cometField 13s linear infinite;
}

body::before {
  content: "";
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  opacity: 0.2;
  z-index: 1;
}

body::after {
  content: "";
  background:
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.32) 74%),
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.46));
  z-index: 1;
}

.comets,
.energy-ring {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.comets {
  background:
    linear-gradient(122deg, transparent 0 48%, rgba(255,255,255,0.78) 48.2% 48.45%, transparent 49%),
    linear-gradient(122deg, transparent 0 58%, rgba(200,169,106,0.55) 58.2% 58.35%, transparent 59%);
  background-size: 620px 620px, 880px 880px;
  filter: blur(0.2px);
  opacity: 0.65;
  animation: cometAlways 16s linear infinite;
}

.energy-ring {
  width: min(62vw, 760px);
  height: min(62vw, 760px);
  margin: auto;
  border: 1px solid rgba(200, 169, 106, 0.17);
  border-radius: 50%;
  box-shadow:
    inset 0 0 60px rgba(200, 169, 106, 0.08),
    0 0 120px rgba(120, 155, 138, 0.09);
  opacity: 0.75;
  animation: ringPulse 8s ease-in-out infinite alternate;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 34px 0;
}

header {
  border-bottom: 1px solid var(--line);
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 8vh 0;
}

@keyframes sceneCycle {
  0% {
    opacity: 0;
  }
  4%,
  20% {
    opacity: 1;
    transform: scale(1);
  }
  25%,
  100% {
    opacity: 0;
    transform: scale(1.045);
  }
}

@keyframes cometAlways {
  to {
    transform: translate3d(-620px, 420px, 0);
  }
}

@keyframes ringPulse {
  from {
    transform: scale(0.96) rotate(0deg);
    opacity: 0.35;
  }
  to {
    transform: scale(1.05) rotate(12deg);
    opacity: 0.78;
  }
}

@keyframes oceanDrift {
  to {
    transform: translate3d(-90px, 24px, 0);
  }
}

@keyframes snowFall {
  to {
    transform: translate3d(48px, 180px, 0);
  }
}

@keyframes flameLift {
  from {
    transform: translate3d(0, 40px, 0) scale(1);
  }
  to {
    transform: translate3d(0, -30px, 0) scale(1.08);
  }
}

@keyframes windSweep {
  to {
    transform: translate3d(220px, -80px, 0);
  }
}

@keyframes cometField {
  to {
    transform: translate3d(-260px, 180px, 0);
  }
}

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

  .scene-ocean {
    opacity: 1;
  }
}

.overline {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.6rem, 17vw, 14rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.105em;
}

.line {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .shell {
    width: min(100% - 28px, 1180px);
  }

  header,
  footer {
    padding: 24px 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  h1 {
    font-size: clamp(4.4rem, 25vw, 7rem);
  }
}
