@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}

:root {
  --ground: #08090a;
  --bone: #f2f0ed;
  --signal: #ff5b27;
  --bone-70: #f2f0edb3;
  --bone-40: #f2f0ed66;
  --bone-28: #f2f0ed47;
  --bone-12: #f2f0ed1f;
  --frame-inset: max(1.5rem, env(safe-area-inset-left), env(safe-area-inset-right));
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (min-width: 768px) {
  :root {
    --frame-inset: 3rem;
  }
}

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

html,
body {
  height: 100%;
  background: var(--ground);
  color: var(--bone);
  color-scheme: dark;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

::selection {
  background: var(--signal);
  color: var(--ground);
}

main {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--ground);
}

.eclipse,
.eclipse::before,
.eclipse::after {
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.eclipse {
  z-index: 0;
}

.eclipse::before,
.eclipse::after {
  content: "";
}

.eclipse::before {
  transform-origin: 50% 112%;
  background: radial-gradient(
    147vw 69vh at 50% 112%,
    #ff5b27f0 0%,
    #ff5b2799 28%,
    #ff5b274d 52%,
    #ff5b271f 70%,
    transparent 88%
  );
  animation:
    eclipse-rise 3.2s cubic-bezier(0.22, 1, 0.36, 1) both,
    eclipse-breathe 24s ease-in-out 3.5s infinite alternate;
}

.eclipse::after {
  background: radial-gradient(70vw 25vh at 50% 112%, #08090a 0% 68%, #08090a00 100%);
}

@keyframes eclipse-rise {
  from {
    opacity: 0;
    transform: translateY(7%) scale(0.92);
  }
  to {
    opacity: 0.94;
    transform: scale(1.08);
  }
}

@keyframes eclipse-breathe {
  from {
    transform: translateX(-1.2%) scale(1.08);
  }
  to {
    transform: translateX(1.2%) scale(1.12);
  }
}

.stage {
  position: relative;
  z-index: 20;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--frame-inset);
  padding-bottom: calc(var(--frame-inset) + 2.5rem);
  text-align: center;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, min(22vw, 26vh), 18rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--bone);
  user-select: none;
  white-space: nowrap;
}

.soon {
  margin-top: 1.75rem;
  font-size: 1.0625rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--bone-70);
}

.copy {
  margin-top: 2rem;
  max-width: 36rem;
  font-size: 1.0625rem;
  line-height: 1.625;
  color: var(--bone-70);
}

footer {
  position: absolute;
  z-index: 20;
  left: var(--frame-inset);
  bottom: max(var(--frame-inset), env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 1.25rem;
  pointer-events: none;
}

.meta {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-70);
}

.rule {
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--bone-28);
}

.stage h1,
.stage .soon,
.stage .copy,
footer {
  animation: reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stage h1 {
  animation-delay: 0.15s;
}

.stage .soon {
  animation-delay: 0.55s;
}

.stage .copy {
  animation-delay: 0.85s;
}

footer {
  animation-delay: 1.2s;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .copy {
    font-size: 1rem;
    max-width: 22.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eclipse::before,
  .stage h1,
  .stage .soon,
  .stage .copy,
  footer {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .eclipse::before {
    opacity: 0.94;
    transform: scale(1.08);
  }
}
