/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
:root {
  /* Spacing scale (4px base unit) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Colors */
  --bg: #1A1A1A;
  --navy: #113457;
  --blue: #0B78E4;
  --light-blue: #8CC5FF;
  --white: #FFFFFF;
  --muted: #939393;
  --text-contrast: #242424;
  --input-bg: #e7e7e7;

  /* Animation */
  --spring: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ========================================
   Base Styles
   ======================================== */
* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: Inter, sans-serif;
  overflow: hidden;
}

button, input {
  font: inherit;
}
/* ========================================
   SVG Filters & Background
   ======================================== */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 51% 48%, transparent 22%, rgba(0, 0, 0, 0.3) 100%);
}
/* ========================================
   Animated Blob Background
   ======================================== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.8;
}

.blob--top {
  width: 360px;
  height: 360px;
  left: -150px;
  top: -170px;
  background: var(--bg);
  animation: drift-top 20s ease-in-out infinite alternate;
}

.blob--center {
  width: 86vw;
  height: 86vw;
  max-width: 1080px;
  max-height: 1080px;
  left: 8%;
  top: -4%;
  background: var(--navy);
  animation: drift-center 26s ease-in-out infinite alternate;
}

.blob--bottom {
  width: 82vw;
  height: 82vw;
  max-width: 1120px;
  max-height: 1120px;
  right: -22%;
  bottom: -42%;
  background: var(--blue);
  animation: drift-bottom 32s ease-in-out infinite alternate;
}

/* Blob animation keyframes */
@keyframes drift-top {
  to { transform: translate(80px, 54px) scale(1.15); }
}

@keyframes drift-center {
  to { transform: translate(-30px, 50px) scale(1.08); }
}

@keyframes drift-bottom {
  to { transform: translate(-55px, -35px) scale(1.08); }
}
/* ========================================
   Page Layout
   ======================================== */
.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  padding: var(--space-4) var(--space-12) var(--space-8);
  isolation: isolate;
}

/* Oversized background wordmark (decorative) */
.wordmark {
  position: fixed;
  z-index: -1;
  width: 100vw;
  max-width: none;
  left: 50%;
  bottom: clamp(-250px, -25vh, 20vh);
  transform: translateX(-50%);
  opacity: 0.1;
  filter: brightness(0) invert(1);
}
/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  min-height: calc(100svh - 96px);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  column-gap: 12vw;
}

.hero__heading {
  align-self: start;
  padding-top: var(--space-6);
}

h1 {
  margin: 0;
  font-size: 7vw;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__subtitle {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.sense {
  position: relative;
  color: var(--white);
  display: inline-block;
}

.sense::after {
  content: '';
  position: absolute;
  height: 20px;
  left: -3%;
  right: -5%;
  bottom: -5px;
  background: url('assets/underline.svg') center / 100% 100% no-repeat;
}

.hero__details {
  align-self: start;
  width: min(100%, 480px);
  max-width: 480px;
  margin-left: auto;
  padding-top: var(--space-6);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.34;
}
/* ========================================
   Waitlist Form
   ======================================== */
.waitlist {
  margin-top: var(--space-8);
}

.waitlist__input-container {
  position: relative;
  max-width: 430px;
}

.waitlist__input-container.has-value {
  filter: url('#goo');
}

.waitlist input,
.waitlist button {
  border: 0;
  background: var(--input-bg);
  color: var(--text-contrast);
}

.waitlist input {
  display: block;
  min-width: 0;
  width: 100%;
  height: 66px;
  padding: 0 var(--space-6);
  border-radius: 999px;
  outline: none;
  font-size: 16px;
  transition: width 420ms var(--spring), transform 520ms var(--spring);
}

.waitlist__input-container.has-value input {
  width: calc(100% - 66px);
}

.waitlist input:focus {
  transform: scaleX(1.015);
}

.waitlist button {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 0;
  height: 66px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  opacity: 0;
  overflow: hidden;
  transition: width 420ms var(--spring), opacity 180ms ease, transform 220ms ease, background 220ms ease;
}

.waitlist__input-container.has-value button {
  width: 66px;
  opacity: 1;
}

.waitlist__input-container.is-invalid {
  animation: input-shake 360ms ease-in-out;
}

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.waitlist button:hover {
  transform: translateX(var(--space-1)) rotate(-8deg);
  background: var(--light-blue);
}

.form-note {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.4;
  margin: var(--space-3) 0 0;
}
/* ========================================
   Footer & Phone Mockup
   ======================================== */
.bottom-meta {
  position: fixed;
  z-index: 3;
  left: 5vh;
  right: 5vh;
  bottom: calc(43vw - 32vh + var(--space-4));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.founders {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  line-height: 1.4;
}

.phone-stage {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: clamp(-360px, -20vh, -160px);
  width: clamp(560px, 56vw, 820px);
  transform: translateX(-50%);
  pointer-events: none;
  margin: 0;
}

.phone {
  display: block;
  width: 100%;
  transform: rotate(-7deg);
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.35));
}

/* ========================================
   Form Success State
   ======================================== */
.success {
  max-width: 430px;
  margin: 0;
  padding: var(--space-6);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text-contrast);
  font-size: 16px;
  animation: success-fade-in 420ms ease both;
}

.waitlist.is-submitting .waitlist__input-container,
.waitlist.is-submitting .form-note {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 220ms ease, transform 260ms var(--spring);
}

@keyframes success-fade-in {
  from {
    opacity: 0;
    transform: translateY(var(--space-2));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ========================================
   Accessibility
   ======================================== */
.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;
}
/* ========================================
   Responsive: Tablet
   ======================================== */
@media (max-width: 950px) and (min-width: 761px) {
  .blob--top {
    width: 280px;
    height: 280px;
    left: -120px;
    top: 1030px;
  }

  .blob--center {
    width: 68vw;
    height: 68vw;
    max-width: 680px;
    max-height: 680px;
    left: 16%;
    top: 6%;
  }

  .blob--bottom {
    width: 64vw;
    height: 64vw;
    max-width: 720px;
    max-height: 720px;
    right: -16%;
    bottom: -28%;
  }

  .vignette {
    background: radial-gradient(ellipse at 52% 44%, transparent 18%, rgba(0, 0, 0, 0.38) 100%);
  }
}
/* ========================================
   Responsive: Medium Screens & Mobile
   ======================================== */
@media (max-width: 950px) {
  .page-shell {
    padding: var(--space-6);
  }

  .wordmark {
    right: 0;
    bottom: 0%;
    opacity: 0.08;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero-content {
    display: contents;
  }

  .hero__heading {
    order: 1;
    width: 100%;
    padding-top: 0;
    margin-bottom: var(--space-6);
    max-width: none;
  }

  h1 {
    font-size: clamp(46px, 20vw, 68px);
  }

  .subtitle {
    font-size: 16px;
    line-height: 1.42;
  }

  .hero__details {
    order: 3;
    width: 58%;
    margin-left: auto;
    padding-top: 0;
    max-width: none;
  }

  .waitlist {
    margin-top: var(--space-6);
  }

  .waitlist__input-container {
    max-width: none;
  }

  .waitlist input,
  .waitlist button {
    height: 60px;
  }

  .waitlist__input-container.has-value input {
    width: calc(100% - 60px);
  }

  .waitlist__input-container.has-value button {
    width: 60px;
  }

  .bottom-meta {
    position: fixed;
    z-index: 3;
    left: auto;
    right: var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
    text-align: right;
    bottom: calc(50vw - 10vh + var(--space-4));
  }

  .eyebrow {
    margin: 0;
    color: var(--white);
    font-size: 12px;
  }

  .founders {
    margin: 0;
    max-width: 400px;
    color: var(--white);
    text-align: right;
  }

  .phone-stage {
    left: 25%;
    bottom: -2%;
    width: 70vh;
  }
}
/* ========================================
   Responsive: Small Screens
   ======================================== */
@media (max-width: 630px) {
  .page-shell {
    padding-inline: var(--space-6);
    padding-bottom: var(--space-16);
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-content {
    display: contents;
  }

  .hero__heading {
    order: 1;
    width: 100%;
    margin-bottom: var(--space-3);
  }

  .bottom-meta .eyebrow {
    order: 1;
    margin: 0;
    margin-top: var(--space-2);
    margin-bottom: -2%;
    text-align: left;
  }

  .bottom-meta {
    position: static;
    order: 2;
    width: 100%;
    margin: 0 0 var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    text-align: left;
  }

  .hero__heading h1 br {
    display: none;
  }

  h1 {
    font-size: 10vw;
    max-width: 100%;
  }

  .hero__details {
    order: 3;
    width: 80%;
    margin: 0 0 0 auto;
  }

  .bottom-meta .founders {
    order: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
  }

  .phone-stage {
    left: 50%;
    width: 70vh;
    bottom: -30%;
  }

  .blob--center {
    width: 68vw;
    height: 68vw;
    max-width: 680px;
    max-height: 680px;
    left: 16%;
    top: 20%;
  }

  .blob--bottom {
    width: 64vw;
    height: 64vw;
    max-width: 720px;
    max-height: 720px;
    right: -16%;
    bottom: -10%;
  }
}

/* ========================================
   Accessibility: Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .blob,
  .waitlist__input-container,
  .waitlist input,
  .waitlist button {
    animation: none;
    transition: none;
  }

  .waitlist__input-container.has-value {
    filter: none;
    gap: var(--space-2);
  }
}
