:root {
  --view-height: 100vh;
  --art-height: 100vh;
  --art-width: min(172vw, 194vh);
  --sphere-crop: 0.43631;
  --blur-height: clamp(120px, 18vh, 220px);
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #000;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; margin: 0; }

html {
  min-height: 100%;
  overflow-x: clip;
}

body {
  position: relative;
  min-height: var(--art-height);
  isolation: isolate;
}

@supports (height: 100dvh) {
  :root {
    --view-height: 100dvh;
    --art-height: 100lvh;
    --art-width: min(172vw, 194dvh);
  }
}

.landing {
  width: 100%;
  height: var(--view-height);
  position: relative;
  container-type: size;
}

.artwork {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background: #fff;
  pointer-events: none;
}

.sphere {
  /* Match the original slide's lower crop: the visible dome starts at
     about 61.45% of the screen on desktop. Account for source white space. */
  position: absolute;
  top: calc(var(--view-height) - var(--art-width) * var(--sphere-crop));
  left: 50%;
  display: block;
  width: var(--art-width);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.bottom-blur {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  /* Continue the fade through the extra artwork behind mobile browser chrome. */
  height: calc(var(--blur-height) + var(--art-height) - var(--view-height));
}

.bottom-blur span {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--blur-radius));
  backdrop-filter: blur(var(--blur-radius));
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--blur-start), #000 var(--blur-end));
  mask-image: linear-gradient(to bottom, transparent var(--blur-start), #000 var(--blur-end));
}

.bottom-blur span:nth-child(1) { --blur-radius: 2px; --blur-start: 0%; --blur-end: 35%; }
.bottom-blur span:nth-child(2) { --blur-radius: 6px; --blur-start: 20%; --blur-end: 55%; }
.bottom-blur span:nth-child(3) { --blur-radius: 12px; --blur-start: 40%; --blur-end: 75%; }
.bottom-blur span:nth-child(4) { --blur-radius: 24px; --blur-start: 60%; --blur-end: 100%; }

.bottom-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 15%, rgb(255 255 255 / 12%) 55%, rgb(255 255 255 / 65%) 100%);
}

.hero {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 5.078125vw, 104px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.sr-only, .waitlist-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.waitlist {
  position: absolute;
  top: calc(100% + clamp(22px, 3.5vh, 36px));
  left: 50%;
  width: min(280px, calc(100vw - 48px));
  transform: translateX(-50%);
  font-size: 14px;
  line-height: 1.4;
}

.waitlist-shell {
  position: relative;
  width: 88px;
  height: 48px;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 28px;
  background: transparent;
  transition: width 420ms cubic-bezier(.22, 1, .36, 1), background-color 280ms ease, border-color 280ms ease;
}

.waitlist[data-state="open"] .waitlist-shell,
.waitlist[data-state="submitting"] .waitlist-shell {
  width: 100%;
  background: rgb(255 255 255 / 92%);
  border-color: #d8d8d8;
}

.waitlist[data-state="open"] .waitlist-shell:focus-within {
  border-color: #000;
  box-shadow: none;
}

.waitlist svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.waitlist-open {
  position: relative;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

@media (hover: hover) {
  .waitlist-submit:hover .submit-arrow { transform: translateX(3px); }
}

.waitlist :is(button, input):focus-visible {
  outline: 2px solid #666;
  outline-offset: 4px;
}

.waitlist-form {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 1px 3px 1px 5px;
  animation: waitlist-reveal 300ms ease both;
}

.waitlist-form input[name="contact"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: none;
  color: #171717;
  background: transparent;
  border-radius: 20px;
  font-size: 16px;
}

.waitlist-form input::placeholder { color: #737373; }
.waitlist-form input[name="contact"]:focus-visible { outline: none; }
.waitlist-form input[aria-invalid="true"] { color: #a63434; }

.waitlist-submit {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #171717;
  background: transparent;
  cursor: pointer;
}

.submit-arrow { transition: transform 220ms ease; }
.waitlist-submit:disabled { cursor: wait; }
.submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgb(0 0 0 / 15%);
  border-top-color: #171717;
  border-radius: 50%;
  animation: waitlist-spin 700ms linear infinite;
}

.waitlist[data-state="submitting"] .submit-spinner { display: block; }
.waitlist[data-state="submitting"] .submit-arrow { display: none; }

.waitlist[data-state="success"] .waitlist-shell {
  width: 220px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.waitlist-success {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  outline: none;
  animation: waitlist-reveal 350ms ease both;
}

.waitlist-success.is-leaving {
  animation: waitlist-fade-out 600ms ease forwards;
}

.waitlist-error {
  margin: 10px 0 0;
  font-size: 12px;
  color: #a63434;
}
.waitlist-error:empty { display: none; }
.waitlist-noscript { font-size: 12px; color: #737373; }

@keyframes waitlist-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes waitlist-spin { to { transform: rotate(360deg); } }
@keyframes waitlist-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist *, .waitlist *::before, .waitlist *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .submit-spinner { animation: none !important; }
}

@supports (height: 1cqh) {
  h1 { font-size: min(clamp(40px, 5.078125vw, 104px), 13cqh); }
}

.footer {
  position: absolute;
  z-index: 1;
  top: var(--view-height);
  right: 0;
  left: 0;
  transform: translateY(-100%);
  padding: 20px max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  font-size: clamp(10px, min(2.6vw, 3vh), 18px);
  font-size: clamp(10px, min(2.6vw, 3dvh), 18px);
  line-height: 1.4;
  text-align: center;
}

.footer p { margin: 0; text-wrap: balance; }
.footer-links { white-space: nowrap; }
.social {
  position: relative;
  color: inherit;
  text-decoration: none;
}
.social::after, .waitlist-open::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -.25em;
  right: -.25em;
  height: 44px;
  transform: translateY(-50%);
}
.social:focus-visible, .waitlist-open:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

@media (max-width: 760px) {
  :root {
    --sphere-crop: 0.49;
    --blur-height: clamp(130px, 20vh, 180px);
  }

  h1 {
    font-size: min(12vw, 11vh);
    font-size: min(12vw, 11dvh);
  }
}

/* Keep decorative paint below mobile browser controls without allowing the
   extra artwork height to become a scrollable page. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  html {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pinch-zoom;
  }

  body { min-height: calc(var(--art-height) + 128px); }

  .bottom-blur {
    /* Preserve the existing transition; only extend its fully blurred tail. */
    --blur-ramp: calc(var(--blur-height) + var(--art-height) - var(--view-height));
    top: calc(var(--view-height) - var(--blur-height));
    height: auto;
  }

  .bottom-blur span:nth-child(1) { --blur-start: 0px; --blur-end: calc(var(--blur-ramp) * .35); }
  .bottom-blur span:nth-child(2) { --blur-start: calc(var(--blur-ramp) * .2); --blur-end: calc(var(--blur-ramp) * .55); }
  .bottom-blur span:nth-child(3) { --blur-start: calc(var(--blur-ramp) * .4); --blur-end: calc(var(--blur-ramp) * .75); }
  .bottom-blur span:nth-child(4) { --blur-start: calc(var(--blur-ramp) * .6); --blur-end: var(--blur-ramp); }

  .bottom-blur::after {
    background: linear-gradient(to bottom, transparent calc(var(--blur-ramp) * .15), rgb(255 255 255 / 12%) calc(var(--blur-ramp) * .55), rgb(255 255 255 / 65%) var(--blur-ramp));
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .bottom-blur::after {
    /* Keep the dome's crop while letting more silver show through the blur. */
    background: linear-gradient(to bottom, transparent calc(var(--blur-ramp) * .15), rgb(255 255 255 / 5%) calc(var(--blur-ramp) * .55), rgb(255 255 255 / 25%) var(--blur-ramp));
  }
}

/* Let short landscape screens and an open software keyboard scroll instead
   of clipping the email field, its feedback, or the footer. */
@media (max-height: 380px) {
  :root { --view-height: 380px; --art-height: 380px; }
  html { overflow-y: auto; touch-action: pan-y pinch-zoom; }
  body { min-height: var(--art-height); }
}
