/* ═══════════════════════════════════════════════════════════════════════════
   traviti waitlist — styles
   Aesthetic direction: atmospheric dusk. Logo colors as a gradient mesh
   against deep navy. Refined editorial typography. Zero generic AI gloss.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* brand — locked palette from the app's design system */
  --navy:       #0B1F3B;
  --navy-deep: #060f1e;
  --navy-soft: #1e3a5f;
  --blue:       #2F5BFF;
  --purple:     #7A5CFF;
  --teal:       #2ED3C6;
  --cream:      #F7F3EC;
  --ink-strong: #F7F9FC;
  --ink:        #E2E8F4;
  --ink-muted: #8996B3;
  --ink-dim:   #5D6B82;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --dur-fast: 180ms;
  --dur-slow: 540ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('https://fonts.gstatic.com/s/fraunces/v34/6NUh8FyLNQOQZAnv9ZwNjucMHVn85Ni7emA3LU.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('https://fonts.gstatic.com/s/plusjakartasans/v8/LDIbaomQNQcsA88c7O9yZ4KMCoOg4IA6-91aHEjcWuA_qU79TJ.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.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;
}

/* ───────────────────────────────────────────────────────────────────────────
   Atmospheric background — three soft orbs that echo the logo's gradient,
   plus a subtle grain overlay for depth. Pure CSS, no images needed.
   ─────────────────────────────────────────────────────────────────────────── */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 50% 0%, rgba(122, 92, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #0B1F3B 0%, #060f1e 100%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
  animation: orb-drift 22s ease-in-out infinite alternate;
}
.bg-orb--purple {
  width: 520px; height: 520px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, #7A5CFF 0%, rgba(122, 92, 255, 0) 68%);
  animation-duration: 28s;
}
.bg-orb--teal {
  width: 460px; height: 460px;
  bottom: -140px; right: -60px;
  background: radial-gradient(circle, #2ED3C6 0%, rgba(46, 211, 198, 0) 68%);
  animation-duration: 24s;
  animation-delay: -6s;
}
.bg-orb--blue {
  width: 380px; height: 380px;
  top: 30%; right: 20%;
  background: radial-gradient(circle, #2F5BFF 0%, rgba(47, 91, 255, 0) 68%);
  opacity: 0.35;
  animation-duration: 32s;
  animation-delay: -12s;
}
@keyframes orb-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(40px, -30px, 0) scale(1.08); }
  100% { transform: translate3d(-20px, 40px, 0) scale(0.96); }
}

.bg-grain {
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.75'/></svg>");
}

/* ───────────────────────────────────────────────────────────────────────────
   Page layout
   ─────────────────────────────────────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px 24px;
}

.card {
  width: 100%;
  max-width: 540px;
  text-align: center;
  padding: 28px 0 0;
}

/* ───────────────────────────────────────────────────────────────────────────
   Logo mark — icon + wordmark, tightly paired. Fraunces at a display weight
   with optical sizing enabled. Letter-spacing tuned for the specific word.
   ─────────────────────────────────────────────────────────────────────────── */

.mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 900ms var(--ease) 120ms forwards;
}
.mark__icon {
  width: 96px;
  height: 96px;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(122, 92, 255, 0.45));
  user-select: none;
  -webkit-user-drag: none;
}
.mark__word {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  font-variation-settings: 'opsz' 144;
}

/* ───────────────────────────────────────────────────────────────────────────
   Copy — eyebrow, body
   ─────────────────────────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.35;
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 900ms var(--ease) 260ms forwards;
}

.body {
  margin: 0 auto 36px;
  max-width: 440px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-muted);
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 900ms var(--ease) 400ms forwards;
}

/* ───────────────────────────────────────────────────────────────────────────
   Form — pill-shaped row, input + button. Glassy card on the input, gradient
   fill on the button echoing logo colors.
   ─────────────────────────────────────────────────────────────────────────── */

.form {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 900ms var(--ease) 540ms forwards;
}

.form__row {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.form__row:focus-within {
  border-color: rgba(122, 92, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.form__input {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  border: 0;
  background: transparent;
  color: var(--ink-strong);
  font: inherit;
  font-size: 15px;
  letter-spacing: -0.005em;
  outline: none;
}
.form__input::placeholder {
  color: var(--ink-dim);
}

.form__button {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #7A5CFF 0%, #2F5BFF 55%, #2ED3C6 100%);
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow:
    0 8px 24px rgba(122, 92, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background-position 420ms var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.form__button:hover {
  background-position: 100% 50%;
  box-shadow:
    0 12px 32px rgba(122, 92, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.form__button:active { transform: translateY(1px); }
.form__button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.form__button-loading {
  display: none;
  align-items: center;
  justify-content: center;
}
.spinner {
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* States: loading and success */
.form[data-state="loading"] .form__button-label { display: none; }
.form[data-state="loading"] .form__button-loading { display: inline-flex; }
.form[data-state="loading"] .form__input { pointer-events: none; opacity: 0.7; }
.form[data-state="loading"] .form__button { pointer-events: none; }

.form[data-state="success"] .form__row { display: none; }

.form__msg {
  min-height: 22px;
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease);
}
.form__msg[data-type="error"]   { color: #FF8A8A; }
.form__msg[data-type="success"] {
  color: var(--teal);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
}

/* ───────────────────────────────────────────────────────────────────────────
   Footer
   ─────────────────────────────────────────────────────────────────────────── */

.foot {
  margin-top: 56px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  animation: reveal 900ms var(--ease) 760ms forwards;
}

/* ───────────────────────────────────────────────────────────────────────────
   Entrance animation
   ─────────────────────────────────────────────────────────────────────────── */

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg-orb { animation: none; }
}

/* ───────────────────────────────────────────────────────────────────────────
   Responsive
   ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 520px) {
  .mark__word { font-size: 52px; }
  .mark__icon { width: 72px; height: 72px; }
  .eyebrow { font-size: 17px; }
  .body { font-size: 15px; }

  .form__row { flex-direction: column; padding: 10px; border-radius: var(--radius-lg); }
  .form__input { padding: 12px 14px; text-align: center; }
  .form__button { width: 100%; min-height: 48px; }
}
