@font-face {
  font-family: 'Pixelify Sans';
  src: url('fonts/pixelify-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Pixelify Sans';
  src: url('fonts/pixelify-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

/* The brand palette (the avatar's eight blues). */
:root {
  --sky: #01061c;
  --navy: #060a22;
  --royal: #2446c8;
  --blue: #4f8ef0;
  --ice: #b8d8ff;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--sky);
  color: var(--white);
  font-family: 'Pixelify Sans', system-ui, sans-serif;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  image-rendering: pixelated;
}

/* Entrance, about 3 s: main.js lights the sky first and then the land, with
   the falls already flowing; the words rise in once the falls are there, one
   after another. The words are CSS alone, so they show up even if the
   script fails. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.wordmark, .tagline, .waitlist, .meta, .nav, .foot { animation: rise 0.9s ease-out both; }
.wordmark { animation-delay: 1.7s; }
.tagline  { animation-delay: 1.95s; }
.waitlist { animation-delay: 2.2s; }
.meta     { animation-delay: 2.45s; }
.nav      { animation-delay: 1.95s; }
.foot     { animation-delay: 2.7s; }
@media (prefers-reduced-motion: reduce) {
  .waitlist .join, .waitlist .contact, .waitlist .done, .waitlist .error.on { animation: none; }
  .wordmark, .tagline, .waitlist, .meta, .nav, .foot { animation: none; }
}

.nav {
  position: fixed;
  top: clamp(16px, 3vw, 40px);
  right: clamp(16px, 4vw, 64px);
  display: flex;
  gap: 56px;
  font-size: clamp(34px, 2.9vw, 52px);
  z-index: 2;
}
.nav a { color: var(--ice); text-decoration: none; }
.nav a:hover { color: var(--white); }

.hero {
  position: fixed;
  left: clamp(20px, 6vw, 120px);
  /* Above the lake (--lake is set by main.js): no words on the water. */
  bottom: calc(var(--lake, 12svh) + clamp(56px, 17svh, 220px));
  max-width: min(640px, 90vw);
  z-index: 2;
}

.wordmark {
  margin: 0;
  font-weight: 600;
  font-size: clamp(34px, 3.7vw, 67px);
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.wordmark .accent { color: var(--ice); }

.tagline {
  margin: 0.7em 0 1.1em;
  font-size: clamp(16px, 1.2vw, 22px);
  color: var(--ice);
}
/* One sentence a line. */
.tagline span { display: block; }

/* Two steps: one button joins; the @ or email comes after. */
.waitlist .contact, .waitlist .done, .waitlist .error { display: none; }
.waitlist[data-step="contact"] .join { display: none; }
.waitlist[data-step="contact"] .contact { display: block; }
.waitlist[data-step="done"] .join { display: none; }
.waitlist[data-step="done"] .done { display: block; }
.waitlist .error.on { display: block; }
/* Each step fades and rises in when it's shown: going from hidden to shown
   restarts the animation. (On load the block itself is still entering.) */
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }
.waitlist .join, .waitlist .contact, .waitlist .done, .waitlist .error.on { animation: step-in 0.35s ease-out both; }
.waitlist .row { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist .note {
  margin: 0 0 0.8em;
  font-size: clamp(15px, 1.05vw, 18px);
  color: var(--white);
}
.waitlist .done { margin: 0; }
.waitlist .error { margin: 0.8em 0 0; color: #ff8a8a; }
.waitlist .fine { margin: 0.7em 0 0; font-size: 13px; color: #6f86c2; }
.waitlist .fine a { color: inherit; }
/* Corners cut one step, like a pixel button. */
.waitlist input, .waitlist button {
  font: inherit;
  font-size: clamp(16px, 1.1vw, 20px);
  height: clamp(44px, 3.1vw, 51px);
  padding: 0 18px;
  border: 0;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
                     100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
                     4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 4px 4px);
}
.waitlist input {
  width: min(clamp(260px, 18vw, 300px), 60vw);
  background: rgba(6, 10, 34, 0.85);
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--royal);
  outline: none;
}
.waitlist input::placeholder { color: #5b6fa8; }
.waitlist input:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.waitlist button {
  background: var(--royal);
  color: var(--white);
  cursor: pointer;
}
.waitlist button:hover { background: var(--blue); }
.waitlist button:disabled { opacity: 0.6; cursor: wait; }
.waitlist .join { padding: 0 28px; }

.meta {
  margin: 1.1em 0 0;
  /* As large as the tagline. Numbers here are spelled out: Pixelify's 5 reads as an S. */
  font-size: clamp(16px, 1.2vw, 22px);
  color: var(--ice);
  letter-spacing: 0.02em;
}

/* Who runs this and the rules, for anyone who looks: one quiet line at the
   foot, the same as on the terms and privacy pages. */
.foot {
  position: fixed;
  left: clamp(20px, 6vw, 120px);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2;
  font-size: 13px;
  color: #6f86c2;
}
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--ice); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Portrait phones: the scene above, the words at the bottom on a dark fade,
   so they read over the falls and the lake. */
@media (max-aspect-ratio: 4/5) {
  .hero {
    left: 16px;
    right: 16px;
    bottom: calc(44px + env(safe-area-inset-bottom));
    max-width: none;
  }
  .foot { left: 16px; }
  body::after {
    content: '';
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 58svh;
    background: linear-gradient(to top, rgba(1, 6, 28, 0.96) 0%, rgba(1, 6, 28, 0.88) 55%, rgba(1, 6, 28, 0) 100%);
    z-index: 1;
    pointer-events: none;
  }
  .tagline span { display: inline; }
}

/* Moving between the landing and the docs: the pages cross-fade (View
   Transitions; browsers without them switch at once, as before). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.3s ease-in both; }
::view-transition-new(root) { animation: vt-in 0.45s ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Back on the landing from another page of the site: no entrance again. */
html.no-entrance .wordmark, html.no-entrance .tagline, html.no-entrance .waitlist,
html.no-entrance .meta, html.no-entrance .nav, html.no-entrance .foot { animation: none; }
