:root {
  --bg: #040b18;
  --line: rgba(168, 194, 233, 0.28);
  --line-strong: rgba(168, 194, 233, 0.44);
  --text-main: #f4f8ff;
  --text-soft: #b6c9e6;
  --text-muted: #8fa7cc;
  --accent: #2f70ff;
  --accent-strong: #1f52d0;
  --success: #8de5bf;
  --error: #ff9f9f;
  --shadow: 0 22px 64px rgba(1, 7, 17, 0.58);
}

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

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  color: var(--text-main);
  background: var(--bg);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
}

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

.trap-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(58, 92, 152, 0.34) 0%, rgba(5, 13, 28, 0.72) 56%, rgba(2, 7, 16, 0.94) 100%),
    #040b18;
}

.globe-wrap,
.stage-grade,
.stage-vignette,
.stage-noise {
  position: absolute;
  inset: -2%;
}

.globe-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1.06);
  will-change: transform;
  pointer-events: none;
}

#globe-iframe {
  width: min(146vmax, 1800px);
  height: min(146vmax, 1800px);
  border: 0;
  opacity: 0.98;
  filter: grayscale(1) contrast(1.03) brightness(0.96);
}

.stage-grade {
  pointer-events: none;
  background:
    linear-gradient(152deg, rgba(3, 8, 18, 0.58) 0%, rgba(3, 8, 18, 0.08) 48%, rgba(3, 8, 18, 0.68) 100%),
    linear-gradient(180deg, rgba(3, 8, 18, 0.08) 0%, rgba(3, 8, 18, 0.6) 100%);
}

.stage-vignette {
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 50%, rgba(2, 6, 14, 0.44) 100%);
}

.stage-noise {
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 0.5px, transparent 0.5px),
    radial-gradient(rgba(255, 255, 255, 0.05) 0.5px, transparent 0.5px);
  background-size:
    3px 3px,
    5px 5px;
  mix-blend-mode: soft-light;
}

.shell {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100svh;
  min-height: 100svh;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.top-row,
.center-stage,
.bottom-row {
  pointer-events: auto;
}

.top-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
}

.brand-logo {
  width: auto;
  height: 46px;
  display: block;
  filter: drop-shadow(0 14px 30px rgba(47, 112, 255, 0.25));
}

.manifesto {
  margin: 0;
  text-align: center;
  color: var(--text-soft);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.insta-link {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 10, 22, 0.62);
  display: grid;
  place-items: center;
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(1, 7, 17, 0.45);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
  text-decoration: none;
}

.insta-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.insta-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 112, 255, 0.8);
  background: rgba(12, 26, 52, 0.86);
  box-shadow: 0 14px 30px rgba(1, 7, 17, 0.6);
}

.insta-link:focus-visible {
  outline: 2px solid rgba(47, 112, 255, 0.85);
  outline-offset: 2px;
}

.center-stage {
  margin: 0 auto;
  width: min(960px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--text-muted);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 15ch;
  font-family: 'Sora', 'Avenir Next', sans-serif;
  font-size: clamp(2rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.sub-copy {
  margin: 0;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 1.45vw, 1.15rem);
  line-height: 1.55;
}

.countdown-wrap {
  margin-top: 12px;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.time-cell {
  border: 1px solid var(--line);
  background: rgba(3, 9, 20, 0.44);
  border-radius: 16px;
  padding: 14px 8px;
  backdrop-filter: blur(8px);
}

.time-value {
  margin: 0;
  color: var(--text-main);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: clamp(1.36rem, 2.6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.time-label {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottom-row {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding-bottom: 22px;
}

.waitlist-prompt {
  margin: 0;
  color: var(--text-main);
  font-family: 'Sora', 'Avenir Next', sans-serif;
  font-size: clamp(0.92rem, 1.5vw, 1.12rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-align: center;
}

.waitlist-form {
  width: min(680px, calc(100vw - 48px));
  border-bottom: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
}

.waitlist-form input,
.waitlist-form button {
  font: inherit;
}

.waitlist-form input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-main);
  padding: 10px 0;
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.waitlist-form input::placeholder {
  color: rgba(244, 248, 255, 0.46);
}

.waitlist-form button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  color: #f8fbff;
  background: linear-gradient(135deg, #2f70ff 0%, #3f82ff 46%, #1f52d0 100%);
  box-shadow: 0 12px 28px rgba(31, 82, 208, 0.45);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}

.waitlist-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(31, 82, 208, 0.58);
}

.waitlist-form button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.feedback {
  margin: 0;
  min-height: 1.1rem;
  color: var(--text-muted);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feedback.success {
  color: var(--success);
}

.feedback.error {
  color: var(--error);
}

.waitlist-note {
  margin: 0;
  color: var(--text-soft);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  justify-content: space-evenly;
}

.grid-lines span {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
}

#scene-fallback {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(540px, calc(100vw - 32px));
}

.fallback-card {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(4, 10, 22, 0.9);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}

.fallback-card h2 {
  margin: 0;
  font-family: 'Sora', 'Avenir Next', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.46rem);
}

.fallback-card p {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.success-overlay {
  position: fixed;
  z-index: 7;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(4, 10, 22, 0.95);
  box-shadow: var(--shadow);
  padding: 10px 15px;
  max-width: calc(100vw - 20px);
}

.success-overlay p {
  margin: 0;
  color: var(--success);
  font-family: 'Martian Mono', 'Consolas', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .top-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .manifesto {
    text-align: center;
  }

  .social {
    justify-self: center;
  }

  .countdown-wrap {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 12px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .top-row {
    width: 100%;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand social'
      'manifesto manifesto';
    align-items: center;
    row-gap: 6px;
    column-gap: 10px;
  }

  .brand {
    grid-area: brand;
    justify-self: start;
  }

  .manifesto {
    grid-area: manifesto;
    text-align: left;
    letter-spacing: 0.1em;
  }

  .social {
    grid-area: social;
    justify-self: end;
  }

  #globe-iframe {
    width: 178vmax;
    height: 178vmax;
  }

  .brand-logo {
    height: 36px;
  }

  .manifesto {
    font-size: 0.58rem;
  }

  .social {
    font-size: 0.58rem;
  }

  .insta-link {
    width: 38px;
    height: 38px;
  }

  .insta-link svg {
    width: 18px;
    height: 18px;
  }

  .center-stage {
    width: calc(100vw - 24px);
    gap: 8px;
  }

  .eyebrow {
    font-size: 0.61rem;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 9.8vw, 2.8rem);
    line-height: 0.98;
  }

  .sub-copy {
    max-width: 34ch;
    font-size: clamp(0.95rem, 4vw, 1.08rem);
    line-height: 1.42;
  }

  .countdown-wrap {
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .time-cell {
    border-radius: 14px;
    padding: 11px 8px;
  }

  .time-value {
    font-size: clamp(1.22rem, 8vw, 1.9rem);
  }

  .time-label {
    margin-top: 6px;
    font-size: 0.6rem;
  }

  .waitlist-form {
    width: calc(100vw - 24px);
    grid-template-columns: 1fr;
    gap: 7px;
    border-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(3, 9, 20, 0.46);
    padding: 10px;
  }

  .waitlist-form input {
    font-size: 0.74rem;
    border-bottom: 1px solid var(--line);
    padding: 7px 0 10px;
  }

  .waitlist-form button {
    width: 100%;
    justify-self: stretch;
    padding: 10px 14px;
    font-size: 0.68rem;
  }

  .bottom-row {
    gap: 6px;
    padding-bottom: 0;
  }

  .waitlist-prompt {
    font-size: clamp(1rem, 4.3vw, 1.12rem);
    line-height: 1.2;
  }

  .waitlist-note {
    display: none;
  }

  .grid-lines {
    opacity: 0.42;
  }
}

@media (max-width: 760px) and (max-height: 780px) {
  .manifesto {
    font-size: 0.54rem;
  }

  h1 {
    font-size: clamp(1.78rem, 8.8vw, 2.32rem);
  }

  .sub-copy {
    font-size: 0.9rem;
  }

  .time-cell {
    padding: 8px 7px;
  }

  .time-value {
    font-size: clamp(1.1rem, 7.6vw, 1.58rem);
  }

  .waitlist-prompt {
    font-size: 0.94rem;
  }
}

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