/* ===================================================================
   ReplyHero — landing page styles
   Design system + components. No framework, zero build.
   =================================================================== */

:root {
  --indigo: #6366f1;
  --violet: #a855f7;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #f5f3ff;
  --white: #ffffff;
  --grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .1);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, .12), 0 8px 10px -6px rgba(15, 23, 42, .08);
  --shadow-lg: 0 25px 50px -12px rgba(79, 70, 229, .25);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --pad: clamp(1.2rem, 4vw, 2rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { color: var(--body); }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: normal; color: var(--indigo); }

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

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

/* Accessibility helpers */
.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: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .98rem; line-height: 1; cursor: pointer;
  padding: .8rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: .55rem .9rem; font-size: .85rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--body); font-weight: 500; font-size: .97rem; }
.nav-links a:hover { color: var(--indigo); text-decoration: none; }
.nav-actions { margin-left: .5rem; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px; margin-left: auto;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(50% 50% at 95% 10%, rgba(168, 85, 247, .12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--indigo); margin-bottom: .9rem; }
.hero-copy h1 { margin-bottom: 1.1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1rem; }
.hero-note { font-size: .9rem; color: var(--muted); }

/* Product mockup */
.hero-visual { display: grid; }
.mock-window { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #f87171; } .dot.amber { background: #fbbf24; } .dot.green { background: #34d399; }
.mock-title { margin-left: .6rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.mock-body { padding: 1.1rem; display: grid; gap: 1rem; }
.mock-ticket { display: flex; gap: .8rem; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.mock-from { font-size: .82rem; color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.mock-text { font-size: .95rem; color: var(--ink); line-height: 1.55; }
.mock-draft { background: var(--bg-tint); border: 1px solid #ddd6fe; border-radius: 12px; padding: 1rem; }
.draft-head { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--indigo); font-size: .85rem; margin-bottom: .55rem; }
.spark { color: var(--violet); }
.conf { margin-left: auto; font-weight: 600; font-size: .72rem; color: #7c3aed; background: #ede9fe; padding: .2rem .5rem; border-radius: 999px; }
.draft-actions { display: flex; gap: .5rem; margin-top: .8rem; }

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2rem 0; text-align: center; }
.stat { display: grid; gap: .25rem; }
.stat-num { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat-label { font-size: .9rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3.2rem); }
.section-head h2 { margin: .4rem 0 .7rem; }
.section-sub { color: var(--muted); font-size: 1.08rem; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #ddd6fe; }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-tint); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .96rem; }

/* Steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; position: relative; box-shadow: var(--shadow-sm); }
.step-num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 1rem; }
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .96rem; }

/* Showcase */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.showcase h2 { margin: .4rem 0 1.2rem; }
.check-list { list-style: none; display: grid; gap: .7rem; margin-bottom: 1.6rem; }
.check-list li { position: relative; padding-left: 1.9rem; color: var(--body); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.35rem; height: 1.35rem; background: var(--bg-tint); color: var(--indigo);
  border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}
.showcase-visual .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-md); display: grid; gap: 1rem; }
.panel-row { display: flex; align-items: center; gap: 1rem; }
.tag { flex: none; width: 120px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.bar { height: 12px; border-radius: 999px; background: var(--grad); }
.bar.b1 { width: 85%; } .bar.b2 { width: 60%; } .bar.b3 { width: 92%; } .bar.b4 { width: 48%; }
.panel-foot { font-size: .85rem; font-weight: 600; color: var(--indigo); border-top: 1px dashed var(--line); padding-top: 1rem; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; align-items: start; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem 1.6rem; box-shadow: var(--shadow-sm); position: relative; display: grid; gap: .5rem; }
.price-card.featured { border-color: var(--indigo); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.price { font-size: 1.1rem; color: var(--muted); }
.price span { font-size: 2.4rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-note { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.price-card .check-list { margin: .6rem 0 1.2rem; }
.price-card .check-list li { font-size: .93rem; }
.price-card .btn { width: 100%; }

/* FAQ */
.faq { display: grid; gap: .8rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.2rem; box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 1.1rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--indigo); font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 0 1.2rem; color: var(--muted); }

/* About */
.about h2 { margin: .4rem 0 1rem; }
.about p { margin-bottom: 1rem; font-size: 1.05rem; }

/* CTA / waitlist */
.cta { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--grad); color: #fff; }
.cta-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .9); margin: .7rem 0 1.6rem; }
.waitlist-form { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.waitlist-form .field { flex: 1 1 200px; }
.waitlist-form input {
  width: 100%; padding: .95rem 1.1rem; border-radius: 999px; border: 1px solid transparent;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.waitlist-form input:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); }
.waitlist-form .btn { flex: none; }
.hp { position: absolute; left: -5000px; }
.cta-note { font-size: .85rem; color: rgba(255, 255, 255, .85); margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer .brand, .site-footer .brand-name { color: #fff; }
.footer-tag { color: #94a3b8; margin-top: .7rem; max-width: 26ch; font-size: .95rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.footer-col a { display: block; color: #cbd5e1; font-size: .93rem; padding: .25rem 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .88rem; color: #94a3b8; }
.footer-bottom a { color: #cbd5e1; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; }
  .lead { max-width: none; }
  .cards, .steps, .pricing { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .price-card.featured { transform: none; }

  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: .5rem var(--pad) 1rem;
    margin: 0; transform: translateY(-120%); transition: transform .28s ease; box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav-actions { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  .cards, .steps, .pricing { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .btn-lg { width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
