@font-face {
  font-family: Onest;
  src: url("assets/onest.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Unbounded;
  src: url("assets/unbounded.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --text: #f1e9eb;
  --accent: #f43f5e;
  --accent-light: #f7708c;
  --display: Unbounded, system-ui, sans-serif;
  --body: Onest, system-ui, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --arrival: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  display: flex;
  isolation: isolate;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--body);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 47%, #140b10c9, transparent 68%),
    radial-gradient(1px 1px at 11% 21%, #f4dbdf 55%, transparent),
    radial-gradient(1px 1px at 78% 75%, #ceadb9 55%, transparent),
    radial-gradient(1px 1px at 87% 32%, #f4dbdf 55%, transparent),
    linear-gradient(#0a080ce6, #0a080cba), url('assets/bloom.webp') center / cover;
}

.sky-canvas {
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.sky.is-rendered .sky-canvas { visibility: visible; }

.scene {
  display: grid;
  flex: 1;
  place-items: center;
  padding: max(2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.teaser {
  display: grid;
  justify-items: center;
  width: min(100%, 46rem);
  min-width: 0;
  text-align: center;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: .09em;
  font: 600 clamp(3rem, 9.5vw, 7rem)/1 var(--display);
  letter-spacing: -.07em;
  -webkit-text-stroke: .018em currentColor;
  text-shadow: 0 2px .12em #17060d85, 0 0 .55em #f43f5e48;
}

.wordmark img { width: .98em; height: .98em; filter: brightness(1.35) drop-shadow(0 0 .14em #f43f5e78); }
.wordmark > span { transform: translateY(-.045em); }

.teaser h1 {
  margin: 1.7rem 0 clamp(1.65rem, 4vh, 2.5rem);
  padding-inline-start: .14em;
  color: var(--text);
  font: 600 clamp(1.125rem, 3.4vw, 2.2rem)/1.2 var(--display);
  letter-spacing: .14em;
  -webkit-text-stroke: .024em currentColor;
  text-shadow: 0 1px .16em #17060daa;
  text-transform: uppercase;
}

.countdown-wrap { width: min(100%, 34rem); }

.countdown:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.3rem, 1.2vw, .8rem);
}

.counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  column-gap: .16em;
  padding: clamp(1rem, 3.2vw, 1.85rem) .25rem;
  background: var(--accent);
  color: #17060d;
  box-shadow: inset 0 1px #ffffff38, 0 0 1.2rem #f43f5e25;
  font: 700 clamp(1.65rem, 6.3vw, 4.5rem)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.counter:last-child { background: var(--accent-light); }

.counter abbr {
  font: 700 clamp(.75rem, 1.85vw, 1.15rem)/1 var(--mono);
  text-decoration: none;
}

.number { position: relative; }

.glitch {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch::before, .glitch::after {
  position: absolute;
  inset: 0;
  content: attr(data-value);
}

.glitch::before {
  color: #6cff9a;
  text-shadow: -5px 0 var(--accent-light);
  clip-path: inset(6% -.55em 52%);
  transform: translate(-5px, -1px);
}

.glitch::after {
  color: #fff;
  text-shadow: 5px 0 #ff304e;
  clip-path: inset(53% -.55em 2%);
  transform: translate(5px, 2px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 40rem) and (orientation: portrait) {
  .wordmark { font-size: clamp(3.25rem, 14vw, 5rem); }
  .teaser h1 { font-size: clamp(1.125rem, 4.4vw, 1.8rem); }
  .counter {
    padding-block: clamp(1.2rem, 4vw, 1.6rem);
    font-size: clamp(1.75rem, 7.8vw, 3rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .intro .wordmark { animation: docking .82s both; }
  .intro h1 { animation: reveal .85s cubic-bezier(.22, .65, .3, 1) .68s both; }
  .intro .countdown-wrap { animation: reveal 1s cubic-bezier(.22, .65, .3, 1) .82s both; }
}

@keyframes docking {
  0% { opacity: 0; transform: translateY(var(--launch-y)) scale(.64); animation-timing-function: var(--arrival); }
  44% { opacity: 1; transform: translateY(var(--launch-y)) scale(1.29); }
  56% { transform: translateY(var(--launch-y)) scale(1.29); animation-timing-function: cubic-bezier(.55, 0, .24, 1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

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

@media (prefers-reduced-motion: reduce) {
  .glitch { visibility: hidden; }
}
