:root {
  --ink-1000: oklch(7% 0.009 252);
  --ink-950: oklch(9% 0.011 252);
  --ink-900: oklch(12% 0.013 250);

  --mist-400: oklch(61% 0.018 238);
  --mist-200: oklch(86% 0.010 238);
  --alloy-50: oklch(98% 0.004 240);

  --signal: oklch(86% 0.135 215);
  --focus: oklch(78% 0.155 224);

  --font-display: "Avenir Next", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-sans: "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "SFMono-Regular", ui-monospace, monospace;

  --fs-hero: clamp(3.2rem, 1.4rem + 6vw, 6.5rem);
  --fs-micro: 0.75rem;

  --panel-stroke: oklch(90% 0.008 240 / 0.10);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  color-scheme: dark;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--ink-1000);
  color: var(--alloy-50);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout root ------------------------------------------------------------
   Fixed to the viewport and laid out as an explicit three-row grid. The
   middle row takes the slack, so the wordmark is centred without a flex item
   growing against a min-height — which is where WebKit and Blink disagreed.
   Every decorative layer is a child of this same box, so the canvas can never
   drift out of register with the type. */

.root {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.root__field,
.root__canvas,
.root__grid,
.root__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Layered gradient field, drifting slowly — the launch site's signature
   background, reduced to its quietest form. */
.root__field {
  z-index: 0;
  background:
    radial-gradient(ellipse 62% 52% at 18% 22%, oklch(78% 0.155 224 / 0.22), transparent 64%),
    radial-gradient(ellipse 52% 46% at 84% 18%, oklch(86% 0.135 215 / 0.14), transparent 66%),
    radial-gradient(ellipse 58% 60% at 56% 90%, oklch(72% 0.190 334 / 0.13), transparent 62%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-1000) 70%);
  animation: field-drift 32s var(--ease-out-expo) infinite alternate;
}

.root__canvas {
  z-index: 1;
  display: block;
}

/* 120px measure grid, masked away at the edges. */
.root__grid {
  z-index: 2;
  background-image:
    linear-gradient(to right, oklch(100% 0 0 / 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(100% 0 0 / 0.022) 1px, transparent 1px);
  background-size: 120px 120px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent 78%);
  opacity: 0.5;
}

/* Film grain. */
.root__grain {
  z-index: 3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.95 0 0 0 0 0.95 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* Stage ------------------------------------------------------------------ */

.stage {
  position: relative;
  z-index: 4;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 0;
  min-height: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-400);
  animation: rise 1.8s var(--ease-out-expo) 0.3s both;
}

.eyebrow__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 0.15rem;
  background: linear-gradient(180deg, var(--signal), var(--focus));
  box-shadow: 0 0 14px oklch(86% 0.135 215 / 0.5);
  flex-shrink: 0;
  animation: dot-breathe 6s ease-in-out 2s infinite;
}

.wordmark {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 640;
  letter-spacing: -0.085em;
  line-height: 0.84;
  text-transform: uppercase;
  color: var(--alloy-50);
  text-shadow: 0 0 72px oklch(86% 0.135 215 / 0.30);
  animation: rise 2.2s var(--ease-out-expo) 0.5s both;
}

.line {
  margin-top: 1.6rem;
  max-width: 26rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--mist-200);
  opacity: 0.82;
  animation: rise 2.2s var(--ease-out-expo) 0.9s both;
}

/* Footer ----------------------------------------------------------------- */

.mark {
  position: relative;
  z-index: 4;
  grid-row: 2;
  text-align: center;
  padding: 1.75rem 1.5rem 2rem;
  border-top: 1px solid var(--panel-stroke);
  margin: 0 clamp(1.5rem, 6vw, 6rem);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-400);
  animation: rise 2.2s var(--ease-out-expo) 1.3s both;
}

/* Motion ----------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes field-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(0, -1.5%, 0); }
}

@keyframes dot-breathe {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

/* Narrow and short viewports ---------------------------------------------
   The root is fixed with no scroll, so everything has to fit. Tighten the
   type rather than let it collide or clip. */

@media (max-width: 30rem) {
  .eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.6875rem;
  }

  .line {
    font-size: 0.9375rem;
    max-width: 20rem;
  }
}

@media (max-height: 34rem) {
  .stage {
    padding-top: 1.5rem;
  }

  .wordmark {
    margin-top: 0.75rem;
    font-size: clamp(2rem, 1rem + 5vw, 3.5rem);
  }

  .line {
    margin-top: 0.9rem;
  }

  .mark {
    padding: 0.9rem 1.5rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .root__field,
  .eyebrow,
  .eyebrow__dot,
  .wordmark,
  .line,
  .mark {
    animation: none;
  }
}
