:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-secondary: #515154;
  --text-muted: #86868b;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --success: #18794e;
  --error: #c62828;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 36px;
}

/* 1. Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 15px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  padding: 11px 22px;
  font-size: 14.5px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-nav {
  padding: 7px 16px;
  font-size: 13px;
}

/* 2. Hero — Flagship Live Polish */
.hero {
  padding: 104px 0 112px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.hero-top {
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
}

.hero-kicker {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 22px;
}

.hero-subhead {
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}

.waitlist-form {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 10px;
}

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

.waitlist-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.waitlist-input::placeholder {
  color: var(--text-muted);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.waitlist-form .btn-primary {
  height: 46px;
  padding: 0 24px;
  white-space: nowrap;
}

.waitlist-status {
  font-size: 13px;
  line-height: 1.4;
  min-height: 20px;
  margin: 0 auto 6px;
  max-width: 460px;
  color: var(--text-secondary);
}

.waitlist-status.is-success {
  color: var(--success);
}

.waitlist-status.is-error {
  color: var(--error);
}

.waitlist-status.is-info {
  color: var(--accent);
}

.meta-line {
  font-size: 13px;
  color: var(--text-muted);
}

/* Product Window Frame & Video Slots */
.video-frame {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.hero-frame {
  max-width: 980px;
  margin: 0 auto 56px;
}

.feature-frame {
  max-width: 880px;
  margin: 0 auto;
}

.mac-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #fbfbfd;
  border-bottom: 1px solid var(--border);
}

.traffic-lights {
  display: flex;
  gap: 8px;
  min-width: 64px;
}

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }

.window-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.mode-badge {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.video-player-wrap {
  display: none;
  position: relative;
  background: #f5f5f7;
}

.video-slot.has-video .video-player-wrap {
  display: block;
}

.video-slot.has-video .video-fallback {
  display: none;
}

.video-player {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  background: #f5f5f7;
}

.video-toggle-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.15s ease;
}

.video-toggle-btn:hover {
  background: #ffffff;
}

/* Codex Fallback UI in Hero */
.codex-body {
  padding: 36px 40px 32px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  background: #ffffff;
}

.codex-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.codex-chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text-secondary);
}

.codex-prev-msg {
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--bg-alt);
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 72%;
}

.codex-composer {
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.composer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.composer-timer {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.live-pill.polished {
  background: var(--bg-alt);
  color: var(--text);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.composer-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  min-height: 82px;
}

.composer-prefix {
  color: var(--text-muted);
}

.dictated-span {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 113, 227, 0.08);
  border-bottom: 1.5px dashed rgba(0, 113, 227, 0.45);
  transition: background 0.35s ease;
}

.dictated-span.polished {
  background: rgba(0, 113, 227, 0.13);
  border-bottom-style: solid;
  border-bottom-color: var(--accent);
}

.cursor-caret {
  display: inline-block;
  width: 2px;
  height: 19px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.composer-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-points {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.hero-point {
  padding: 28px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border);
}

.hero-point h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.hero-point p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Feature Sections */
.section-white {
  background: #ffffff;
  padding: 108px 0;
}

.section-alt {
  background: var(--bg-alt);
  padding: 108px 0;
}

.section-header-center {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

h2 {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.section-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.visual-stage {
  padding: 36px 40px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-card {
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.step-card.is-highlighted {
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.3);
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.step-label-accent {
  color: var(--accent);
}

.step-text {
  font-size: 17px;
  color: var(--text);
}

.step-text-muted {
  color: var(--text-secondary);
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--accent);
}

.mistake-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff3d6;
  color: #8a5300;
}

.fix-pill {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.vocab-chip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.vocab-chip-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.vocab-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* 6. Languages Strip */
.languages-strip {
  padding: 44px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.languages-line {
  font-size: 16px;
  color: var(--text-secondary);
}

.languages-line strong {
  color: var(--text);
  font-weight: 600;
}

/* 7. Minimal Pricing Teaser */
.pricing-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: center;
}

.pricing-card p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 8. Final Waitlist CTA */
.final-cta {
  padding: 112px 0 96px;
  text-align: center;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.final-cta .section-sub {
  margin-bottom: 32px;
}

/* 9. Minimal Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pulse-dot,
  .cursor-caret {
    animation: none;
  }
}

@media (max-width: 900px) {
  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 34px;
  }

  .hero-points {
    grid-template-columns: 1fr;
  }

  .codex-prev-msg {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    padding: 68px 0 76px;
  }

  .section-white,
  .section-alt,
  .final-cta {
    padding: 72px 0;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 28px;
  }

  .hero-subhead {
    font-size: 17px;
  }

  .section-sub {
    font-size: 16px;
  }

  .waitlist-form {
    flex-direction: column;
    align-items: stretch;
  }

  .mac-titlebar {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .traffic-lights {
    min-width: auto;
  }

  .codex-body,
  .visual-stage {
    padding: 20px;
  }

  .codex-composer {
    padding: 16px;
  }

  .composer-header,
  .composer-footer,
  .step-label {
    flex-wrap: wrap;
  }

  .composer-text {
    font-size: 15.5px;
    min-height: 110px;
  }

  .pricing-card {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
