/* =========================================================================
   Ava — landing page
   Plain CSS. Brand tokens from docs/design-system.md.
   ========================================================================= */

:root {
  /* Colors */
  --cream:        #FDF6EF;
  --linen:        #F7EDE3;
  --sand:         #E8D5C4;
  --espresso:     #3D2B1F;
  --brown:        #7A6254;
  --cite:         #A89181;
  --sunrise:      #D4845A;
  --terracotta:   #C2694B;
  --golden-peach: #F0C5A0;
  --mood-happy:   #8DB48E;
  --mood-low:     #8BA7BE;
  --mood-mixed:   #D4A96A;
  --error:        #C47070;

  /* Shadows */
  --shadow-sm:  0 4px 12px rgba(212, 132, 90, 0.22);
  --shadow-md:  0 8px 24px rgba(212, 132, 90, 0.30);
  --shadow-lg:  0 16px 40px rgba(212, 132, 90, 0.35);

  /* Type stack */
  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--espresso);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(212, 132, 90, 0.25); color: var(--espresso); }

:focus-visible {
  outline: 2px solid var(--sunrise);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  border: 0; overflow: hidden;
  clip: rect(0 0 0 0);
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) { .container { padding: 0 32px; } }

/* ====================== Typography ====================== */

h1, h2, h3 {
  font-family: var(--font-rounded);
  color: var(--espresso);
  letter-spacing: -0.01em;
  margin: 0;
}
h1 {
  font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.75rem, 2.4vw + 1rem, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
}
h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
}

.eyebrow {
  font-family: var(--font-rounded);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brown);
  margin: 0 0 12px;
}
.eyebrow-sunrise { color: var(--sunrise); }
.eyebrow-peach   { color: var(--golden-peach); }

.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--brown);
  max-width: 36rem;
  margin: 20px 0 0;
}
@media (min-width: 640px) { .lede { font-size: 1.25rem; } }

.body-lg {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--brown);
  margin: 16px 0 0;
}

/* ====================== Nav ====================== */

.nav { background: var(--cream); }
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 640px) { .nav-inner { padding: 22px 32px; } }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--espresso);
}
.brand-name {
  font-family: var(--font-rounded);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-cta {
  display: inline-flex; align-items: center;
  font-family: var(--font-rounded);
  font-size: 0.9rem; font-weight: 600;
  color: var(--espresso);
  background: var(--cream);
  border: 1px solid rgba(61, 43, 31, 0.15);
  border-radius: var(--r-xl);
  padding: 9px 16px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--linen); }
@media (min-width: 640px) { .nav-cta { font-size: 1rem; } }

/* ====================== Hero ====================== */

.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0%,
    rgba(240, 197, 160, 0.45) 0%, rgba(240, 197, 160, 0) 60%);
}

.hero-grid {
  position: relative; z-index: 1;
  display: grid; gap: 40px;
  padding: 24px 20px 64px;
}
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
    align-items: center; gap: 32px;
    padding: 56px 32px 96px;
  }
}

.hero-copy { min-width: 0; }
.hero-visual { display: flex; justify-content: center; }
@media (min-width: 768px) { .hero-visual { justify-content: flex-end; } }

.form-wrap { margin-top: 32px; max-width: 28rem; scroll-margin-top: 96px; }
.form-wrap-narrow { max-width: 28rem; margin-left: auto; margin-right: auto; }

.waitlist-form {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
@media (min-width: 480px) { .waitlist-form { flex-direction: row; } }

.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--espresso);
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--r-xl);
  padding: 14px 20px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
}
.waitlist-form input[type="email"]::placeholder { color: var(--cite); }
.waitlist-form input[type="email"]:focus {
  border-color: var(--sunrise);
  background: var(--cream);
}
.waitlist-form input[type="email"]:disabled { opacity: 0.6; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-rounded);
  font-size: 1rem; font-weight: 600;
  color: var(--cream);
  background: var(--sunrise);
  border: none;
  border-radius: var(--r-xl);
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--terracotta); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.form-help {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--brown);
}
.form-status {
  margin: 10px 0 0;
  font-size: 0.9rem;
  min-height: 1.4em;
  color: var(--brown);
}
.form-status.is-error { color: var(--error); }
.form-status.is-success { color: var(--espresso); font-weight: 500; }

/* ====================== Record button visual ====================== */

.record-button {
  position: relative;
  width: 224px; height: 224px;
  display: flex; align-items: center; justify-content: center;
}

.record-button .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(212, 132, 90, 0.30);
}
.record-button .ring-2 { background: rgba(212, 132, 90, 0.20); }

@media (prefers-reduced-motion: no-preference) {
  .record-button .ring { animation: breathe 3.2s ease-in-out infinite; }
  .record-button .ring-2 { animation-delay: 1.6s; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  50%      { transform: scale(1.18); opacity: 0; }
}

.record-core {
  position: relative;
  width: 60%; height: 60%;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #D4845A 0%, #C2694B 50%, #D4845A 100%);
  box-shadow: var(--shadow-lg);
}

/* ====================== Sections ====================== */

.section { padding: 64px 0; }
@media (min-width: 640px) { .section { padding: 96px 0; } }

.pitch { background: var(--cream); }
.pitch-grid {
  display: grid; gap: 40px; align-items: center;
}
@media (min-width: 768px) {
  .pitch-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}

/* Phone mock */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 280px; max-width: 100%;
  border: 1px solid rgba(61, 43, 31, 0.15);
  background: var(--espresso);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 9 / 19.5;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--cream);
  border-radius: 34px;
  overflow: hidden;
}
.phone-notch {
  position: absolute; left: 50%; top: 8px;
  width: 96px; height: 20px;
  transform: translateX(-50%);
  background: var(--espresso);
  border-radius: 999px;
  z-index: 1;
}
.phone-content {
  display: flex; flex-direction: column;
  height: 100%;
  padding: 40px 16px 20px;
}
.phone-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 500; color: var(--brown);
}
.mood-pill {
  display: inline-flex; align-items: center; gap: 4px;
}
.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--mood-mixed);
}
.dot-sunrise { background: var(--sunrise); }
.phone-title {
  margin-top: 12px;
  font-family: var(--font-rounded);
  font-size: 15px; font-weight: 600;
  color: var(--espresso);
  line-height: 1.2;
}
.phone-card {
  margin-top: 12px;
  background: var(--linen);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  padding: 14px;
}
.phone-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--espresso);
}
.phone-meta-sm {
  margin-top: 10px;
  font-size: 10px;
  color: var(--brown);
  display: inline-flex; align-items: center; gap: 6px;
}
.tags {
  margin-top: 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tag {
  background: rgba(240, 197, 160, 0.4);
  color: var(--espresso);
  font-size: 10px; font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
}
.phone-spacer { flex: 1; }
.phone-record {
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.phone-mic {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4845A 0%, #C2694B 100%);
  box-shadow: var(--shadow-sm);
}
.phone-record-label {
  font-size: 10px; font-weight: 500; color: var(--brown);
}

/* ====================== How it works ====================== */

.how { background: var(--linen); }

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.step {
  display: flex; flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  font-family: var(--font-rounded);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--brown);
}
.step-visual {
  margin-top: 20px;
  height: 80px;
  display: flex; align-items: center;
}
.step-mic {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #D4845A, #C2694B);
  box-shadow: var(--shadow-sm);
}
.step h3 {
  margin-top: 20px;
  font-size: 1.25rem;
}
.step p {
  margin: 8px 0 0;
  font-size: 1rem; line-height: 1.55;
  color: var(--brown);
}

.moods { display: flex; align-items: center; gap: 8px; }
.mood {
  width: 48px; height: 48px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--cream);
}
.mood-happy { background: var(--mood-happy); }
.mood-mixed { background: var(--mood-mixed); }
.mood-low   { background: var(--mood-low); }

.reflection-mock {
  width: 100%; max-width: 224px;
  background: var(--linen);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.reflection-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500; color: var(--brown);
  margin-bottom: 8px;
}
.line {
  display: block;
  height: 8px;
  background: var(--sand);
  border-radius: 999px;
  margin-top: 6px;
}
.w-100 { width: 100%; }
.w-83  { width: 83%; }
.w-75  { width: 75%; }

/* ====================== Privacy ====================== */

.privacy {
  position: relative;
  background: var(--espresso);
  color: var(--cream);
  overflow: hidden;
}
.privacy h2, .privacy h3 { color: var(--cream); }
.privacy-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 80% 0%,
    rgba(212, 132, 90, 0.18) 0%, rgba(212, 132, 90, 0) 60%);
}
.privacy .container { position: relative; }

.privacy-h { max-width: 32rem; margin-top: 12px; }
.privacy-lede {
  max-width: 36rem;
  margin: 16px 0 0;
  font-size: 1.125rem; line-height: 1.55;
  color: rgba(253, 246, 239, 0.80);
}

.claims {
  list-style: none; padding: 0;
  margin: 48px 0 0;
  display: grid; gap: 20px;
}
@media (min-width: 768px) {
  .claims { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.claim {
  background: rgba(253, 246, 239, 0.04);
  border: 1px solid rgba(253, 246, 239, 0.15);
  border-radius: var(--r-lg);
  padding: 24px;
  backdrop-filter: blur(2px);
}
.claim-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(240, 197, 160, 0.20);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.claim h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--cream);
}
.claim p {
  margin: 8px 0 0;
  font-size: 1rem; line-height: 1.55;
  color: rgba(253, 246, 239, 0.75);
}

.privacy-note {
  margin: 36px 0 0;
  max-width: 42rem;
  font-size: 0.95rem; line-height: 1.55;
  color: rgba(253, 246, 239, 0.70);
}
.privacy-note strong { color: var(--cream); font-weight: 600; }

.privacy-cta { margin-top: 36px; }
.privacy-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-rounded);
  font-size: 1rem; font-weight: 600;
  color: var(--cream);
  background: rgba(253, 246, 239, 0.05);
  border: 1px solid rgba(253, 246, 239, 0.25);
  border-radius: var(--r-xl);
  padding: 12px 20px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.privacy-cta a:hover { background: rgba(253, 246, 239, 0.10); }

/* ====================== Built by one ====================== */

.built { background: var(--cream); text-align: center; }
.built-inner { max-width: 48rem; margin: 0 auto; text-align: center; }
.built h2 { margin: 12px auto 0; max-width: 40rem; }
.built .body-lg { margin: 20px auto 0; max-width: 40rem; }

/* ====================== Final CTA ====================== */

.final-cta { background: var(--linen); }
.final-cta-inner {
  max-width: 36rem; margin: 0 auto;
  text-align: center;
}
.final-cta h2 { margin-bottom: 16px; }
.final-cta .body-lg { margin-bottom: 32px; }

/* ====================== Footer ====================== */

.footer {
  background: var(--cream);
  border-top: 1px solid var(--sand);
}
.footer-inner {
  display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: space-between;
  padding-top: 32px; padding-bottom: 16px;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand-name { font-size: 1rem; }
.footer-copy { font-size: 0.875rem; color: var(--brown); }

.footer-nav { display: flex; gap: 20px; }
.footer-nav a {
  font-size: 0.875rem;
  color: var(--brown);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-nav a:hover { color: var(--espresso); }

.footer-fineprint {
  padding-top: 12px; padding-bottom: 32px;
  font-size: 0.8125rem; line-height: 1.5;
  color: var(--cite);
  max-width: 56rem;
}

/* ====================== Launch-mode toggle ======================
   `.launch-only` is hidden by default. When `html.launch-mode` is set
   (by the head-inline script in index.html when AVA_LAUNCH = true),
   pre-launch sections collapse and launch sections appear. Class is on
   <html> rather than <body> so the swap resolves before first paint.
   Each launch-only block declares its own display value explicitly
   (rather than relying on `display: revert`) for predictable layout.
*/
.launch-only { display: none; }
.launch-mode .prelaunch-only { display: none; }
.launch-mode .nav-cta.launch-only { display: inline-flex; }
.launch-mode .cta-wrap.launch-only { display: block; }
.launch-mode .final-cta-inner > .launch-only { display: block; }

.cta-wrap {
  margin-top: 32px;
  max-width: 28rem;
}
.cta-wrap .btn-primary { width: 100%; }

/* ====================== QR modal ====================== */

body.body-locked { overflow: hidden; }

.qr-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: qrFadeIn 0.18s ease-out;
}
.qr-modal[hidden] { display: none; }

.qr-backdrop {
  position: absolute; inset: 0;
  background: rgba(61, 43, 31, 0.55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.qr-dialog {
  position: relative;
  width: 100%; max-width: 22rem;
  background: var(--cream);
  border-radius: var(--r-xl);
  padding: 32px 24px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: qrSlideUp 0.22s ease-out;
}

.qr-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--espresso);
  transition: background 0.15s ease;
}
.qr-close:hover { background: var(--linen); }

.qr-title {
  font-family: var(--font-rounded);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--espresso);
  margin: 0;
}
.qr-copy {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--brown);
}
.qr-image-wrap {
  margin: 20px auto 0;
  width: 220px; height: 220px;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  padding: 10px;
}
.qr-image-wrap img { width: 100%; height: 100%; }
.qr-fallback-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qr-fallback-link:hover { color: var(--espresso); }

@keyframes qrFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qrSlideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .qr-modal,
  .qr-dialog { animation: none; }
}
