:root {
  color-scheme: dark;
  --navy: #10104e;
  --ivory: #fafaf7;
  --coral: #f3776d;
  --display: "Archivo", "Inter Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--display);
  color: var(--ivory);
  background: var(--navy);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; background: var(--navy); }
body { overflow-x: clip; position: relative; }

.stage {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 36px 20px 76px;
}
.rocket-flight {
  flex-shrink: 0;
  width: clamp(220px, 30vw, 360px);
  max-width: 76vw;
  aspect-ratio: 1;
}
.rocket {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ---- Type: Starknet-style wide display + mono label ---- */
.announcement {
  margin-top: 18px;
  text-align: center;
  max-width: min(94vw, 880px);
}
.headline {
  margin: 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(22px, 3.4vw, 48px);
  line-height: 1.04;
  letter-spacing: -.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.headline .word {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 15%, #dcdbea 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.label {
  margin: 22px 0 0;
  padding-left: .34em;               /* balances the trailing letter-spacing */
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(13px, 1.2vw, 17px);
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--coral);
  white-space: nowrap;
}
.caret {
  display: inline-block;
  width: .62em;
  height: 1.05em;
  margin-left: .1em;
  vertical-align: -.18em;
  background: var(--coral);
}
.label-done .caret { animation: blink 1.05s steps(1) infinite; }

/* ---- Sound toggle ---- */
.sound-toggle {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: rgba(250, 250, 247, .55);
  font: 500 11px/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: fade-in .8s ease .9s both;
  transition: color .2s;
}
.sound-toggle:hover { color: var(--ivory); }
.sound-toggle[aria-pressed="true"] { color: var(--coral); }
.sound-toggle:focus-visible { outline: 1px solid var(--coral); outline-offset: 2px; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i {
  display: block;
  width: 2px;
  height: 3px;
  border-radius: 1px;
  background: currentColor;
  transition: height .3s;
}
.sound-toggle[aria-pressed="true"] .eq i { animation: eq .9s ease-in-out infinite alternate; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.sound-toggle[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---- X profile ---- */
.social-x {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: rgba(250, 250, 247, .55);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: fade-in .8s ease .9s both;
  transition: color .2s;
}
.social-x svg { width: 21px; height: 21px; fill: currentColor; }
.social-x:hover { color: var(--coral); }
.social-x:focus-visible { outline: 1px solid var(--coral); outline-offset: 2px; border-radius: 4px; }

/* ---- Intro states ---- */
.intro-pending .rocket-flight,
.intro-pending .announcement { opacity: 0; }
.intro-play #brand-star,
.intro-play #brand-dot,
.intro-play .headline .word,
.intro-play .label { opacity: 0; }
.star-in #brand-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: twinkle .9s cubic-bezier(.2, 1.4, .4, 1) both;
}
.star-in #brand-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: planet .75s cubic-bezier(.3, 1.6, .5, 1) .18s both;
}
.headline-in .headline .word {
  animation: rise .8s var(--ease) both;
  animation-delay: calc(var(--i) * var(--word-stagger, 70ms));
}
.label-in .label { opacity: 1; }

@keyframes twinkle {
  from { opacity: 0; transform: scale(.2) rotate(-60deg); }
  60% { opacity: 1; }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes planet {
  from { opacity: 0; transform: scale(0); }
  40% { opacity: 1; }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 600px) {
  .sound-toggle { left: max(10px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .social-x { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .stage { padding: 32px 18px 72px; }
  .rocket-flight { width: min(70vw, 280px); }
  .announcement { margin-top: 14px; }
  .headline { font-size: clamp(20px, 6.4vw, 30px); }
  .label { margin-top: 18px; font-size: 12px; }
}
@media (max-height: 560px) and (min-width: 601px) {
  .stage { padding: 20px 20px 76px; }
  .rocket-flight { width: min(46vh, 240px); }
  .announcement { margin-top: 6px; }
  .headline { font-size: 24px; }
  .label { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .social-x { animation: none; transition: none; }
  .intro-pending .rocket-flight,
  .intro-pending .announcement,
  .intro-play #brand-star,
  .intro-play #brand-dot,
  .intro-play .headline .word,
  .intro-play .label { opacity: 1; }
  .star-in #brand-star,
  .star-in #brand-dot,
  .headline-in .headline .word,
  .label-done .caret,
  .sound-toggle[aria-pressed="true"] .eq i { animation: none; }
  .sound-toggle[aria-pressed="true"] .eq i { height: 8px; }
}
