/* ===================================================================
   ConvoTrace.org — landing page styles
   Light/dark aware, mobile-first, framework-free.
   =================================================================== */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f7;
  --bg-alt:    #f5f5f7;
  --card:      #ffffff;
  --text:      #0a0a0c;
  --text-2:    #55555c;
  --text-3:    #86868b;
  --border:    rgba(0,0,0,0.10);
  --border-2:  rgba(0,0,0,0.06);
  --accent:    #007AFF;
  --accent-ink:#005ce0;
  --record:    #FF3B30;
  --green:     #34C759;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-lg: 0 30px 60px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.08);
  --device-bezel: #1a1a1c;
  --nav-bg:    rgba(255,255,255,0.72);
  --radius:    20px;
  --radius-lg: 28px;
  --maxw:      1140px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #000000;
    --bg-soft:   #0d0d0f;
    --bg-alt:    #0c0c0e;
    --card:      #161618;
    --text:      #f5f5f7;
    --text-2:    #b0b0b8;
    --text-3:    #86868b;
    --border:    rgba(255,255,255,0.12);
    --border-2:  rgba(255,255,255,0.07);
    --accent:    #0A84FF;
    --accent-ink:#409cff;
    --record:    #FF453A;
    --green:     #30D158;
    --shadow-sm: none;
    --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-lg: 0 30px 60px rgba(0,0,0,0.6);
    --device-bezel: #2a2a2c;
    --nav-bg:    rgba(12,12,14,0.72);
  }
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
em { font-style: normal; color: var(--accent-ink); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; cursor: pointer;
  border: none; border-radius: 14px; padding: 14px 22px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0,122,255,0.28); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-sm { padding: 9px 16px; border-radius: 11px; font-size: 15px; box-shadow: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-2);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 8px; }
.brand-name { font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: none; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { margin-left: auto; }

@media (min-width: 820px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 84px 0 64px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--record); box-shadow: 0 0 0 4px rgba(255,59,48,0.18); }

.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.lede { margin-top: 18px; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-2); max-width: 30ch; }

.waitlist-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; max-width: 480px; }
.waitlist-form input[type="email"] {
  flex: 1 1 220px; min-width: 0;
  font: inherit; font-size: 16px;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.waitlist-form input::placeholder { color: var(--text-3); }
.waitlist-form .btn { flex: 0 0 auto; }
.form-status { flex: 1 1 100%; margin: 2px 2px 0; font-size: 14.5px; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: var(--green); }
.form-status.err { color: var(--record); }

.hero-note { margin-top: 14px; font-size: 13.5px; color: var(--text-3); max-width: 44ch; }

/* ---------- Phone mockup ---------- */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 300px; max-width: 84vw;
  background: var(--device-bezel);
  border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  position: relative; background: var(--bg-soft);
  border-radius: 36px; overflow: hidden;
  aspect-ratio: 300 / 620; display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; left: 50%; top: 9px; transform: translateX(-50%);
  width: 92px; height: 24px; background: #000; border-radius: 14px; z-index: 3;
}
.phone-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 22px 0; font-size: 12px; font-weight: 600; color: var(--text);
}
.phone-status-right { display: flex; align-items: center; gap: 6px; }
.bars { width: 16px; height: 11px; border-radius: 2px; background:
  linear-gradient(to right, var(--text) 0 3px, transparent 3px 4px,
  var(--text) 4px 7px, transparent 7px 8px, var(--text) 8px 11px,
  transparent 11px 12px, var(--text) 12px 16px); opacity: .85; }
.batt { width: 22px; height: 11px; border: 1.2px solid var(--text); border-radius: 3px; opacity: .85; position: relative; }
.batt::after { content:""; position:absolute; left:1.5px; top:1.5px; bottom:1.5px; width:70%; background: var(--text); border-radius:1.5px; }

.phone-body { flex: 1; display: flex; flex-direction: column; padding: 22px 20px 18px; }

.rec-row { display: flex; align-items: center; justify-content: space-between; }
.rec-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,59,48,0.12); color: var(--record);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--record); }
.pause-chip { font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--bg-alt); border: 1px solid var(--border-2); padding: 6px 11px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .pause-chip { background: #1c1c1e; } }

.hero-wave {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  height: 60px; margin: 26px 0 22px;
}
.hero-wave .bar {
  width: 3px; border-radius: 2px; background: var(--record);
  height: 10%;
  animation: wave 1.1s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wave .bar { animation: none; }
}

.reach-label { text-align: center; color: var(--text-2); font-size: 13px; }
.reach-time { text-align: center; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.reach-sub { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 4px; }

.coverage { margin: 14px 0 6px; height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.coverage-fill { display: block; height: 100%; width: 86%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #28b14e); }
.coverage-ends { display: flex; justify-content: space-between; color: var(--text-3); font-size: 11px; }

.phone-save {
  margin-top: 18px; font: inherit; font-size: 15px; font-weight: 600;
  background: var(--accent); color: #fff; border: none; border-radius: 14px;
  padding: 13px; cursor: default;
}
.phone-foot { text-align: center; color: var(--text-3); font-size: 11.5px; margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
@media (min-width: 900px) { .section { padding: 96px 0; } }

.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.section-sub { margin-top: 14px; color: var(--text-2); font-size: 1.1rem; }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm);
  counter-increment: step;
}
.step::before {
  content: counter(step); position: absolute; top: 22px; right: 24px;
  font-size: 13px; font-weight: 700; color: var(--text-3);
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%;
}
.step-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(0,122,255,0.10); color: var(--accent); margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 0.97rem; }

/* ---------- Feature showcase ---------- */
.showcase {
  display: grid; gap: 30px; align-items: center;
  padding: 12px 0 56px;
}
@media (min-width: 860px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 60px; padding: 24px 0 72px; }
  .showcase-rev .showcase-text { order: 2; }
  .showcase-rev .showcase-shot { order: 1; }
}
.showcase-text h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; }
.showcase-text p { margin-top: 14px; color: var(--text-2); font-size: 1.08rem; max-width: 42ch; }
.showcase-shot { display: flex; justify-content: center; }
.phone-shot { width: 280px; padding: 9px; border-radius: 40px; }
.phone-shot img { border-radius: 30px; display: block; }

/* ---------- Feature grid ---------- */
.feature-grid {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: 18px;
}
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow-sm);
}
.feat-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(0,122,255,0.10); color: var(--accent); margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.12rem; margin-bottom: 7px; }
.feature-card p { color: var(--text-2); font-size: 0.95rem; }

/* ---------- Privacy ---------- */
.privacy { padding-bottom: 24px; }
.privacy-card {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, rgba(0,122,255,0.06), rgba(0,122,255,0.02));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 32px; box-shadow: var(--shadow-md);
}
.privacy-badge {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 22px;
  display: grid; place-items: center; color: #fff; background: var(--accent);
  box-shadow: 0 10px 24px rgba(0,122,255,0.35);
}
.privacy-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.privacy-lede { margin: 16px auto 0; color: var(--text-2); font-size: 1.1rem; max-width: 48ch; }
.privacy-list {
  list-style: none; margin: 28px 0 0; padding: 0; text-align: left;
  display: grid; gap: 12px;
}
@media (min-width: 640px) { .privacy-list { grid-template-columns: 1fr 1fr; gap: 14px; } }
.privacy-list li {
  position: relative; padding: 14px 16px 14px 44px;
  background: var(--card); border: 1px solid var(--border-2); border-radius: 14px;
  font-size: 0.97rem; color: var(--text-2);
}
.privacy-list li strong { color: var(--text); }
.privacy-list li::before {
  content: "✓"; position: absolute; left: 15px; top: 13px;
  color: var(--green); font-weight: 800;
}

/* ---------- Honest limitations ---------- */
.limits { padding: 28px 0 8px; }
.limits-note {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 760px; margin: 0 auto; color: var(--text-2);
  font-size: 0.97rem; background: var(--bg-soft);
  border: 1px solid var(--border-2); border-radius: 16px; padding: 18px 20px;
}
.limits-ico { color: var(--text-3); flex: 0 0 auto; margin-top: 1px; }
.limits-note strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; text-align: left; font: inherit; font-weight: 600; color: var(--text);
  background: none; border: none; padding: 20px 4px; cursor: pointer;
}
.faq-q:hover { color: var(--accent); }
.faq-chevron {
  flex: 0 0 auto; width: 12px; height: 12px; position: relative;
  transition: transform .2s ease;
}
.faq-chevron::before, .faq-chevron::after {
  content: ""; position: absolute; top: 5px; width: 8px; height: 2px;
  background: var(--text-3); border-radius: 2px;
}
.faq-chevron::before { left: 0; transform: rotate(45deg); }
.faq-chevron::after { right: 0; transform: rotate(-45deg); }
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .faq-chevron { transition: none; } }
.faq-a { padding: 0 4px 22px; }
.faq-a p { color: var(--text-2); font-size: 1rem; max-width: 62ch; }

/* ---------- Final CTA ---------- */
.final-cta { padding-top: 40px; }
.cta-card {
  text-align: center; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 52px 32px; box-shadow: var(--shadow-md);
}
.cta-card h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; }
.cta-card > p { margin-top: 14px; color: var(--text-2); font-size: 1.1rem; }
.waitlist-form-center { margin-left: auto; margin-right: auto; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-2); background: var(--bg-alt); padding: 44px 0 32px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-tag { color: var(--text-3); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.footer-links a { color: var(--text-2); font-size: 14.5px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-links a[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.footer-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.footer-legal p { color: var(--text-3); font-size: 13.5px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
