/* Geist by Vercel, SIL Open Font License 1.1 (https://openfontlicense.org). Latin subset, variable weight. */
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Brand */
  --navy: #010736;
  --navy-deep: #050a2a;
  --ink: #02030a; /* near-black, never pure #000 */
  --text: #eef1fb;
  --text-dim: rgb(238 241 251 / 0.7);
  --text-faint: rgb(238 241 251 / 0.52);
  --light: 196 206 250; /* horizon light, rgb channels for alpha mixing */

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(16px, 5vw);
  --horizon: clamp(150px, 27vh, 320px); /* height of the planet edge above the bottom of the page */
  --mark-size: min(17vw, 26vh);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.page {
  position: relative;
  isolation: isolate;
  overflow: hidden; /* fallback: Safari < 16 has no overflow: clip, and the wide horizon would scroll sideways */
  overflow: clip;
  min-height: 100vh; /* fallback: Safari < 15.4 has no dvh */
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* Night sky: near-black at the top, brand navy gathering toward the horizon */
  background:
    radial-gradient(120% 70% at 50% 100%, rgb(18 30 110 / 0.55) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #030620 55%, var(--navy) 100%);
}

/* Film grain on a fixed layer: breaks up gradient banding on dark screens */
.page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1280px);
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding-top: max(8px, env(safe-area-inset-top));
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  /* letter-spacing adds trailing space after the last letter; pull it back so the box hugs the word */
  margin-right: -0.34em;
}

.brand:focus-visible {
  outline: 2px solid rgb(var(--light));
  outline-offset: 6px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  align-self: center;
  /* keep the copy clear of the rising wordmark and horizon */
  padding-block: 4vh calc(var(--horizon) + var(--mark-size) * 0.45);
}

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

h1 {
  margin: 0;
  font-size: clamp(3.25rem, 9.5vw, 8.75rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--text);
}

.lede {
  margin: 1.75rem 0 0;
  max-width: 46ch;
  text-wrap: pretty;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-dim);
}

/* ---------- Horizon + rising wordmark ---------- */

/* Huge circle whose top edge peeks above the bottom of the page: reads as a planet horizon */
.horizon {
  position: absolute;
  z-index: -1;
  top: calc(100% - var(--horizon));
  left: 50%;
  width: max(1600px, 230vw);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, #0d1a5c 0%, var(--navy-deep) 9%, var(--ink) 30%);
  box-shadow:
    inset 0 1px 0 rgb(var(--light) / 0.6),
    inset 0 18px 40px -20px rgb(var(--light) / 0.25),
    0 -1px 18px rgb(var(--light) / 0.28),
    0 -40px 140px rgb(70 92 210 / 0.32);
}

/* Atmosphere above the rim, breathing slowly */
.horizon::before {
  content: "";
  position: absolute;
  inset: -6% 8% auto;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgb(var(--light) / 0.16), transparent 70%);
  filter: blur(20px);
}

/* Sits behind the planet, so its lower part is hidden below the horizon */
.mark {
  position: absolute;
  z-index: -2;
  left: 50%;
  bottom: var(--horizon);
  margin: 0;
  translate: -50% 0;
  transform: translateY(30%);
  font-size: var(--mark-size);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, rgb(var(--light) / 0.26) 0%, rgb(var(--light) / 0.06) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

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

.site-footer {
  position: relative;
  z-index: 2;
}

.site-footer .wrap {
  padding-block: 1.5rem max(1.75rem, env(safe-area-inset-bottom));
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 1s var(--ease-out) both;
    animation-delay: calc(0.55s + var(--i, 0) * 0.12s);
  }

  .horizon {
    animation: horizon-up 1.8s var(--ease-out) both;
  }

  .horizon::before {
    animation: breathe 9s ease-in-out 2s infinite alternate;
  }

  .mark {
    animation: mark-up 2.4s var(--ease-out) 0.2s both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes horizon-up {
  from {
    transform: translateY(8vh);
  }
}

@keyframes mark-up {
  from {
    opacity: 0;
    transform: translateY(85%);
  }
}

@keyframes breathe {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}
