/* Zodra — waitlist landing page
   Palette lifted from the app's Observatory theme (app/lib/core/theme.dart),
   pushed brighter for a marketing surface. */

:root {
  --midnight: #0a0d18;
  --nebula: #141828;
  --nebula-high: #1d2236;
  --nebula-inset: #262c42;
  --hairline: #2a3049;

  --brass: #e9b44c;
  --brass-dim: #6c5730;
  --verdigris: #58c6ae;
  --ember: #ff7085;
  --violet: #8b7cf6;

  --starlight: #f4f1ea;
  --starlight-dim: #8b92a9;
  --starlight-faint: #5b6279;

  --font-display: "Instrument Serif", serif;
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", monospace;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --gutter: clamp(20px, 5vw, 64px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--midnight);
  color: var(--starlight);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--brass);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--brass) 0%, var(--ember) 55%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p {
  margin: 0;
}

/* ---------------------------------------------------------------- ambient */

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb--brass {
  width: 480px;
  height: 480px;
  background: var(--brass);
  top: -120px;
  left: -100px;
}

.orb--violet {
  width: 420px;
  height: 420px;
  background: var(--violet);
  top: 220px;
  right: -140px;
  opacity: 0.28;
}

.orb--ember {
  width: 380px;
  height: 380px;
  background: var(--ember);
  bottom: -160px;
  left: 30%;
  opacity: 0.22;
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  background: rgba(10, 13, 24, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}

.nav.scrolled {
  border-bottom-color: var(--hairline);
  background: rgba(10, 13, 24, 0.92);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.5px;
  color: var(--brass);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--starlight-dim);
  transition: color 150ms ease;
}

.nav-links a:not(.btn):hover {
  color: var(--starlight);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--starlight);
  font-size: 24px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--brass), #f2c869);
  color: var(--midnight);
  box-shadow: 0 8px 30px rgba(233, 180, 76, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 10px 36px rgba(233, 180, 76, 0.4);
}

.btn-ghost {
  background: var(--nebula-high);
  color: var(--starlight);
  border: 1px solid var(--hairline);
}

.btn-ghost:hover {
  border-color: var(--brass);
}

.btn-block {
  width: 100%;
}

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

.hero {
  position: relative;
  z-index: 1;
  padding: 96px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
}

.hero-copy .eyebrow {
  margin-bottom: 18px;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.04;
}

.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--starlight-dim);
  font-size: 18px;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-hint {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--verdigris);
  letter-spacing: 0.3px;
}

.hero-badges {
  margin-top: 40px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--starlight-faint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verdigris);
  box-shadow: 0 0 8px var(--verdigris);
}

/* ------------------------------------------------------------- theme wheel */

.wheel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-wrap svg {
  width: 100%;
  max-width: 420px;
  animation: spin 90s linear infinite;
}

.wheel-wrap .wheel-static {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
}

.wheel-static .num {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--starlight);
}

.wheel-static .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--starlight-dim);
  text-transform: uppercase;
  margin-top: 4px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* A second, faster ring moving opposite the main wheel — an orrery layered
   under one rotation, rather than everything turning as a single disc. */
.wheel-comet {
  transform-origin: 210px 210px;
  animation: spin 22s linear infinite reverse;
}

.wheel-comet circle:first-child {
  filter: blur(3px);
}

@media (prefers-reduced-motion: reduce) {
  .wheel-wrap svg,
  .wheel-comet {
    animation: none;
  }
}

/* --------------------------------------------------------------- sections */

section {
  position: relative;
  z-index: 1;
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.section-head p {
  margin-top: 16px;
  color: var(--starlight-dim);
  font-size: 17px;
}

/* -------------------------------------------------------------- features */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: linear-gradient(180deg, var(--nebula-high), var(--nebula));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.feature-card:hover {
  border-color: var(--brass);
  transform: translateY(-4px);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 21px;
  margin-bottom: 10px;
  color: var(--starlight);
}

.feature-card p {
  color: var(--starlight-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------- how it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 32px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--nebula);
  border: 1px solid var(--hairline);
}

.step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--midnight);
  background: var(--brass);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 20px;
}

.step h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
}

.step p {
  color: var(--starlight-dim);
  font-size: 14.5px;
}

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

.waitlist {
  padding: 100px 0;
}

.waitlist-panel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 28px;
  padding: 56px clamp(24px, 6vw, 64px);
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -10%, rgba(233, 180, 76, 0.16), transparent 60%),
    linear-gradient(180deg, var(--nebula-high), var(--nebula));
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.waitlist-panel h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.waitlist-panel > p {
  margin-top: 16px;
  color: var(--starlight-dim);
  font-size: 16px;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.offer-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 24px auto 0;
  background: var(--brass-wash, rgba(233, 180, 76, 0.12));
  border: 1px solid rgba(233, 180, 76, 0.4);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
}

.waitlist-form {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--starlight-dim);
}

.field input {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--starlight);
  background: var(--nebula);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition: border-color 150ms ease;
}

.field input::placeholder {
  color: var(--starlight-faint);
}

.field input:focus {
  border-color: var(--brass);
}

.field.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--starlight-faint);
}

.form-error {
  color: var(--ember);
  font-size: 13px;
  min-height: 18px;
}

.waitlist-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.waitlist-success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(88, 198, 174, 0.14);
  border: 1px solid var(--verdigris);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--verdigris);
}

.waitlist-success h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 19px;
}

.waitlist-success p {
  color: var(--starlight-dim);
  font-size: 14.5px;
  max-width: 40ch;
}

.waitlist-panel.is-submitted .waitlist-form {
  display: none;
}

.waitlist-panel.is-submitted .waitlist-success {
  display: flex;
}

/* --------------------------------------------------------------- footer */

footer {
  position: relative;
  z-index: 1;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand .wordmark {
  font-size: 20px;
}

.footer-brand .brand-icon {
  width: 24px;
  height: 24px;
}

footer .fine {
  font-size: 13px;
  color: var(--starlight-faint);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--starlight-dim);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brass);
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
    text-align: center;
  }

  .hero-copy {
    order: 1;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-badges {
    justify-content: center;
  }

  .wheel-wrap {
    order: 0;
  }

  .wheel-wrap svg {
    max-width: 300px;
  }

  /* The center hub shrinks with the wheel (300/420 of its desktop size) —
     the label has to scale down with it or it overruns the circle. */
  .wheel-static .num {
    font-size: 31px;
  }

  .wheel-static .label {
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 3px;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 68px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--nebula-high);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    padding: 18px;
    gap: 14px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a:not(.btn) {
    padding: 8px 4px;
  }

  .nav-toggle {
    display: block;
  }
}
