@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --charcoal: #0b0b0b;
  --mint: #dfffd8;
  --accent: #e1f704;
  --ink: #f6f8f4;
  --muted: rgba(246, 248, 244, 0.6);
  --alert: #ff9d8a;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Every size in the hero is derived from the headline size. */
  --type: clamp(1.15rem, min(3.05vw, 5.3vh), 3.4rem);
  --gutter: clamp(20px, 3.2vw, 44px);
}

@media (max-aspect-ratio: 4/5) {
  :root {
    --type: clamp(1.1rem, min(6.1vw, 3.6vh), 2.6rem);
  }
}

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

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

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--charcoal);
}

p {
  margin: 0;
}

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

/* ------------------------------------------------------------------ scene */

.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Static stand-in for the 3D mark when WebGL or scripting is unavailable. */
.fallback {
  display: none;
  position: fixed;
  top: 9.5vh;
  left: 50%;
  height: clamp(60vh, 80vw, 118vh);
  aspect-ratio: 113 / 59;
  transform: translateX(-50%);
}

.no-webgl .scene {
  display: none;
}

html:not(.js) .fallback,
.no-webgl .fallback {
  display: block;
}

/* ------------------------------------------------------------------- page */

.page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  /* the shadow behind the type is wider than a phone screen */
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  pointer-events: none;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  font-size: clamp(0.62rem, 0.54rem + 0.22vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.mark {
  display: block;
  width: clamp(30px, 2.6vw, 40px);
  height: auto;
  fill: var(--mint);
}

.sound {
  display: flex;
  align-items: center;
  gap: 1em;
  /* a comfortable tap target without moving the label off the grid */
  margin: -14px;
  padding: 14px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.3s ease;
}

.sound:hover,
.sound:focus-visible,
.sound[aria-pressed="true"] {
  color: var(--ink);
}

.sound:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -6px;
}

.sound[hidden] {
  display: none;
}

.sound__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.sound__bars i {
  width: 2px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0.25);
  transform-origin: bottom;
  transition: transform 0.4s var(--ease-out);
}

.sound:hover .sound__bars i:nth-child(odd) {
  transform: scaleY(0.6);
}

.sound:hover .sound__bars i:nth-child(even) {
  transform: scaleY(0.4);
}

/* the bars only move while sound is actually playing */
.sound[data-live="true"] .sound__bars i {
  animation: level 0.9s ease-in-out infinite alternate;
}

.sound[data-live="true"] .sound__bars i:nth-child(2) {
  animation-duration: 0.6s;
  animation-delay: -0.3s;
}

.sound[data-live="true"] .sound__bars i:nth-child(3) {
  animation-duration: 0.75s;
  animation-delay: -0.5s;
}

.sound[data-live="true"] .sound__bars i:nth-child(4) {
  animation-duration: 1.1s;
  animation-delay: -0.2s;
}

@keyframes level {
  from {
    transform: scaleY(0.2);
  }
  to {
    transform: scaleY(1);
  }
}

html:not(.js) .sound,
.no-webgl .sound {
  display: none;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(18px, 2.6vw, 40px);
  pointer-events: auto;
}

.links a {
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.28em;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}

.links a:hover,
.links a:focus-visible {
  color: var(--ink);
}

.links a:hover::after,
.links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.links a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 6px;
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  font-size: var(--type);
  text-align: center;
}

/* A soft pool of shadow keeps the type legible as the slabs move behind it. */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24em;
  max-width: 130vw;
  height: 21em;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(11, 11, 11, 0.62), rgba(11, 11, 11, 0.36) 55%, rgba(11, 11, 11, 0));
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.headline {
  margin: 0;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.line {
  display: block;
  overflow: hidden;
  /* balances the tracking after the last letter so the line centres optically */
  padding-left: 0.3em;
}

.line > span {
  display: block;
}

.line--accent {
  color: var(--accent);
}

.rule {
  display: block;
  width: 2.1em;
  height: max(3px, 0.11em);
  margin-top: 1.35em;
  background: var(--accent);
}

.wordmark {
  display: block;
  width: 6.1em;
  min-width: 150px;
  height: auto;
  margin-top: 2em;
  fill: var(--mint);
}

.location {
  margin-top: 1.25em;
  padding-left: 0.46em;
  font-size: max(0.4em, 0.66rem);
  font-weight: 500;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --------------------------------------------------------------- waitlist */

.waitlist {
  width: min(100%, 30rem);
  margin-top: clamp(20px, 4.4vh, 44px);
  font-size: 1rem;
  pointer-events: auto;
}

.waitlist__trap {
  display: none;
}

.waitlist__field {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(223, 255, 216, 0.26);
  background: rgba(11, 11, 11, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s ease;
}

.waitlist__field:focus-within {
  border-color: rgba(223, 255, 216, 0.75);
}

.waitlist__row {
  display: flex;
  /* lets a row shrink to its share of the line instead of to its inputs' natural width */
  min-width: 0;
  height: 54px;
}

.waitlist__row + .waitlist__row {
  border-top: 1px solid rgba(223, 255, 216, 0.16);
  transition: border-color 0.4s ease;
}

.waitlist__prefix {
  align-self: center;
  padding: 2px 12px 2px 20px;
  border-right: 1px solid rgba(223, 255, 216, 0.22);
  color: var(--mint);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  transition: opacity 0.4s ease;
}

.waitlist__input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  transition: opacity 0.4s ease;
}

.waitlist__input--name {
  padding-left: 20px;
}

.waitlist__input::placeholder {
  color: rgba(246, 248, 244, 0.45);
}

.waitlist__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 100px #111 inset;
}

.waitlist__button {
  display: flex;
  align-items: center;
  gap: 0.9em;
  padding: 0 22px 0 36px;
  border: 0;
  background: var(--accent);
  color: var(--charcoal);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  /* the leading edge leans like the arms of the V */
  clip-path: polygon(16px 0, 100% 0, 100% 100%, 0 100%);
  transition: background-color 0.3s ease, opacity 0.4s ease;
}

.waitlist__button:hover {
  background: #eeff3d;
}

.waitlist__button:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: -6px;
}

.waitlist__label--short {
  display: none;
}

.waitlist__arrow {
  width: 16px;
  transition: transform 0.4s var(--ease-out);
}

.waitlist__button:hover .waitlist__arrow {
  transform: translateX(4px);
}

/* indeterminate progress while the entry is sent */
.waitlist__field::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40%;
  height: 2px;
  background: var(--mint);
  transform: translateX(-100%);
}

.waitlist[data-state="sending"] .waitlist__field::after {
  animation: sending 1.1s ease-in-out infinite;
}

.waitlist[data-state="sending"] .waitlist__button {
  opacity: 0.55;
  cursor: progress;
}

@keyframes sending {
  to {
    transform: translateX(250%);
  }
}

.waitlist__done {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  padding-left: 0.24em;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.waitlist__done svg {
  width: 16px;
}

.waitlist[data-state="done"] .waitlist__field {
  border-color: rgba(223, 255, 216, 0.6);
}

.waitlist[data-state="done"] .waitlist__row + .waitlist__row {
  border-color: transparent;
}

.waitlist[data-state="done"] .waitlist__prefix,
.waitlist[data-state="done"] .waitlist__input,
.waitlist[data-state="done"] .waitlist__button {
  opacity: 0;
  visibility: hidden;
}

.waitlist[data-state="done"] .waitlist__done {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease 0.25s, transform 0.8s var(--ease-out) 0.25s;
}

.waitlist__note {
  min-height: 1.5em;
  margin-top: 12px;
  padding-left: 0.14em;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.waitlist[data-state="invalid"] .waitlist__field,
.waitlist[data-state="failed"] .waitlist__field {
  border-color: var(--alert);
}

.waitlist[data-state="invalid"] .waitlist__note,
.waitlist[data-state="failed"] .waitlist__note {
  color: var(--alert);
}

.waitlist__note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.3em;
}

/* ----------------------------------------------------------------- reveal */
/* Content is visible by default; the hidden start state only applies once
   scripting is confirmed, and "is-live" is set when the 3D intro lands. */

.js .hero::before,
.js .mark,
.js .sound,
.js .bar--foot,
.js .wordmark,
.js .location,
.js .waitlist {
  opacity: 0;
}

.js .line > span {
  transform: translateY(108%);
}

.js .rule {
  transform: scaleX(0);
}

.js .wordmark {
  transform: translateY(0.5em);
  filter: blur(10px);
}

.js .location {
  letter-spacing: 0.9em;
}

.js .waitlist {
  transform: translateY(14px);
}

.js.is-live .hero::before {
  opacity: 1;
  transition: opacity 1.6s ease;
}

.js.is-live .line > span {
  transform: none;
  transition: transform 1.25s var(--ease-out);
}

.js.is-live .line:nth-child(2) > span {
  transition-delay: 0.12s;
}

.js.is-live .line:nth-child(3) > span {
  transition-delay: 0.24s;
}

.js.is-live .rule {
  transform: none;
  transition: transform 1s var(--ease-out) 0.5s;
}

.js.is-live .wordmark {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1.2s ease 0.75s, transform 1.4s var(--ease-out) 0.75s, filter 1.2s ease 0.75s;
}

.js.is-live .location {
  opacity: 1;
  letter-spacing: 0.46em;
  transition: opacity 1.2s ease 1.05s, letter-spacing 1.6s var(--ease-out) 1.05s;
}

.js.is-live .waitlist {
  opacity: 1;
  transform: none;
  transition: opacity 1.2s ease 1.3s, transform 1.4s var(--ease-out) 1.3s;
}

.js.is-live .mark,
.js.is-live .bar--foot {
  opacity: 1;
  transition: opacity 1.4s ease 1.6s;
}

/* Shown as soon as the intro starts, so sound can be muted at once, and it stays through replays. */
.js.has-controls .sound {
  opacity: 1;
  transition: opacity 0.9s ease 0.3s, color 0.3s ease;
}

/* The intro is about to replay: everything but the sound control fades out first. */
.js.is-rewinding .hero,
.js.is-live.is-rewinding .mark,
.js.is-live.is-rewinding .bar--foot {
  opacity: 0;
  transition: opacity 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .js .line > span,
  .js .rule,
  .js .wordmark,
  .js .waitlist {
    transform: none;
    filter: none;
  }

  .js .location {
    letter-spacing: 0.46em;
  }

  .js .line > span,
  .js .rule {
    opacity: 0;
  }

  .js.is-live .line > span,
  .js.is-live .rule,
  .js.is-live .wordmark,
  .js.is-live .location,
  .js.is-live .waitlist,
  .js.is-live .mark,
  .js.is-live .bar--foot,
  .js.has-controls .sound {
    opacity: 1;
    transition: opacity 0.6s ease;
  }

  .sound[data-live="true"] .sound__bars i {
    animation: none;
    transform: scaleY(0.7);
  }

  .waitlist[data-state="sending"] .waitlist__field::after {
    animation: none;
    transform: none;
    width: 100%;
  }
}

/* ------------------------------------------------------------------ small */

@media (max-width: 640px) {
  .bar--foot {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  .tagline {
    padding-left: 0.28em;
  }
}

@media (max-width: 560px) {
  .waitlist__prefix,
  .waitlist__input--name {
    padding-left: 14px;
  }

  .waitlist__button {
    padding: 0 18px 0 30px;
  }

  .waitlist__label--long {
    display: none;
  }

  .waitlist__label--short {
    display: inline;
  }
}

/* the smallest phones: an arrow-only button leaves room for the whole number */
@media (max-width: 370px) {
  .waitlist__label--short {
    display: none;
  }

  .waitlist__input {
    padding: 0 10px;
  }
}

@media (max-height: 420px) {
  .rule {
    margin-top: 0.9em;
  }

  .wordmark {
    margin-top: 1.2em;
  }

  .location {
    margin-top: 0.9em;
  }
}

@media (max-height: 480px) {
  .waitlist {
    margin-top: 14px;
  }

  .waitlist__row {
    height: 44px;
  }

  /* no room for the hint; messages still appear */
  .waitlist[data-state="idle"] .waitlist__note {
    display: none;
  }
}

/* short screens: the footer keeps to one line of links */
@media (max-height: 480px) {
  .tagline {
    display: none;
  }

  .bar--foot {
    justify-content: center;
    letter-spacing: 0.18em;
  }

  .links {
    column-gap: 16px;
  }
}

/* the very smallest phones on their side */
@media (max-height: 340px) {
  :root {
    --type: 1rem;
    --gutter: 14px;
  }

  .bar--foot {
    letter-spacing: 0.14em;
  }

  .wordmark {
    min-width: 130px;
  }

  .waitlist {
    margin-top: 10px;
  }
}

/* short and wide (a phone on its side): name and number share one line */
@media (max-height: 480px) and (min-width: 540px) {
  .waitlist {
    width: min(100%, 42rem);
  }

  .waitlist__field {
    flex-direction: row;
  }

  .waitlist__row:first-child {
    flex: 0.8;
  }

  .waitlist__row + .waitlist__row {
    flex: 1.6;
    border-top: 0;
    border-left: 1px solid rgba(223, 255, 216, 0.16);
  }

  .waitlist__label--long {
    display: none;
  }

  .waitlist__label--short {
    display: inline;
  }
}
