:root {
  --bg: #0d0f0c;
  --ink: #ece7da;
  --muted: #bdb8ab;
  --meta: #8a877d;
  --accent: #f2bd1d;
  --hairline: rgba(236, 231, 218, .18);
  --pill-border: rgba(236, 231, 218, .25);
  --hover-tint: rgba(242, 189, 29, .04);
  --gutter: clamp(20px, 4vw, 48px);
  --head: 'Odibee Sans', serif;
  --word: 'Rubik Glitch', serif;
  --mono: 'Martian Mono', monospace;
  --ease-type: cubic-bezier(.2, .9, .1, 1);
  --ease-reveal: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* clip, not hidden: hidden would make body a scroll container and break the sticky hero */
body {
  min-height: 100vh;
  font-family: var(--mono);
  overflow-x: clip;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--bg); }
input::placeholder { color: var(--meta); }
[hidden] { display: none !important; }

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
}

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

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  font-size: 13px;
  letter-spacing: .04em;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--head);
  font-size: 24px;
  letter-spacing: 0;
}

.wordmark-bird {
  display: block;
  width: auto;
  height: 28px;
  filter: drop-shadow(0 0 1px rgba(236, 231, 218, .7)) drop-shadow(0 0 8px rgba(236, 231, 218, .3));
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
}

.sound {
  display: flex;
  align-items: center;
  min-width: 0;
  background: rgba(13, 15, 12, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
}
.sound:hover { border-color: var(--accent); }

/* While music plays, a yellow highlight travels around the border */
@property --sound-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.sound:has([aria-pressed="true"]) {
  border-color: transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from var(--sound-angle), rgba(242, 189, 29, .28) 0deg, var(--accent) 70deg, #fff1bf 82deg, rgba(242, 189, 29, .28) 140deg) border-box;
  box-shadow: 0 0 18px rgba(242, 189, 29, .16);
  animation: sound-orbit 2.8s linear infinite;
}

@keyframes sound-orbit { to { --sound-angle: 360deg; } }

.sound button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 14px;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.sound button:hover { color: var(--accent); }

.sound-toggle .icon { color: rgba(236, 231, 218, .55); }
.sound-toggle:hover .icon,
.sound-toggle[aria-pressed="true"] .icon { color: var(--accent); }

.sound-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Track names are long; the rest of the header is ~470px, so the name gets what's left */
.sound-toggle[aria-pressed="true"] .sound-label {
  max-width: clamp(6ch, 100vw - 470px, 26ch);
}

.sound .sound-shuffle {
  padding-inline: 12px 14px;
  border-left: 1px solid var(--pill-border);
}

.cta {
  color: var(--bg);
  background: var(--accent);
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.cta:hover { background: var(--ink); color: var(--bg); }

/* Hero */

.hero {
  position: relative;
  height: 210vh;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.moon {
  --moon: min(78vw, 78vh, 760px);
  position: absolute;
  left: 60%;
  top: max(34%, 84px + var(--moon) / 2);
  width: var(--moon);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 38% 32%, #e7e4da 0%, #cfccc2 45%, #a9a69d 100%);
  box-shadow: 0 0 120px 10px rgba(231, 228, 218, .12), 0 0 400px 60px rgba(231, 228, 218, .06);
  will-change: transform;
}

.bird-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bird-fallback {
  position: absolute;
  left: 60%;
  top: max(34%, 84px + min(78vw, 78vh, 760px) / 2);
  width: min(56vw, 760px, 95vh);
  transform: translate(-50%, -50%);
}

.toast {
  position: absolute;
  left: 50%;
  top: 84px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

.hero-copy {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-title {
  margin: 0;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(54px, 9vw, 138px);
  line-height: .9;
  letter-spacing: -.02em;
  text-shadow: 0 2px 30px rgba(13, 15, 12, .9);
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
}

.word {
  padding-bottom: .12em;
  font-family: var(--word);
  color: var(--accent);
}

/* Hidden until script.js splits the lines into letters; the delayed animation is a failsafe if it never runs */
.js .line {
  opacity: 0;
  animation: rz-show 0s 3s forwards;
}

@keyframes rz-show { to { opacity: 1; } }

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 360px;
  padding: 18px 20px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #d6d1c4;
  background: rgba(13, 15, 12, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero-aside p {
  margin: 0;
  text-wrap: pretty;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  animation: rz-bob 2.4s ease-in-out infinite;
}

@keyframes rz-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* In the nest */

.nest {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(80px, 14vh, 160px) var(--gutter) 40px;
}

.nest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.nest-head h2 {
  margin: 0;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -.01em;
}

.meta {
  font-size: 13px;
  color: var(--meta);
}

.egg {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: default;
}
.egg:hover { background: var(--hover-tint); }

.egg-num {
  font-size: 13px;
  color: var(--meta);
}

.egg-title {
  min-width: 0;
  overflow: hidden;
  font-family: var(--head);
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: .01em;
  white-space: nowrap;
  text-overflow: clip;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill .icon { color: var(--accent); }

/* Launch list */

.launch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: end;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(100px, 16vh, 180px) var(--gutter);
}

.launch h2 {
  margin: 0;
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 112px);
  line-height: .92;
  letter-spacing: -.02em;
}
.launch h2 em { color: var(--accent); }

.launch-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.launch-body p {
  margin: 0;
  max-width: 440px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

.signup input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
}

.signup button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.signup button:hover { background: var(--ink); }

.signup-done {
  padding: 12px 0;
  border-bottom: 1px solid var(--accent);
  font-size: 18px;
  color: var(--accent);
}

/* Footer */

.site-footer {
  position: relative;
  padding: 60px var(--gutter) 32px;
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 32px;
}

.say-hi {
  display: inline-flex;
  align-items: center;
  gap: .12em;
  font-family: var(--head);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 1;
  letter-spacing: -.02em;
}

.say-hi .icon {
  width: .75em;
  height: .75em;
}

.footer-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--meta);
}

@media (max-width: 759px) {
  .moon {
    --moon: min(78vw, 60vh, 760px);
    left: 50%;
    top: max(30%, 84px + var(--moon) / 2);
  }
  .bird-fallback {
    left: 50%;
    top: max(30%, 84px + min(78vw, 60vh, 760px) / 2);
    width: 94vw;
  }
}

/* The header needs ~470px with both pills; on phones keep the signup CTA and drop the song toggle */
@media (max-width: 519px) {
  .sound { display: none; }
  .cta { padding-inline: 13px; }
}

@media (max-width: 359px) {
  .site-header { gap: 10px; }
  .wordmark { gap: 8px; }
  .wordmark-bird { height: 22px; }
  .cta { font-size: 12px; padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; }
  .sound:has([aria-pressed="true"]) { animation: none; border-color: var(--accent); background: var(--bg); }
  .js .line { opacity: 1; animation: none; }
}
