/* ============================================================
   ReplySurge shared site styles
   -----------------------------------------------------------
   Design system extracted from the landing (index.html) so every
   content page (alternatives, use-cases, comparisons, blog) looks
   native to the same site. Link this file from a content page and
   reuse the header/footer markup pattern below it.

   Scope: design tokens, reset/base typography, nav/header, footer,
   buttons, and the reusable content blocks content pages need
   (section headings, prose, comparison table, FAQ, CTA card).
   It deliberately does NOT include the hero-demo animation CSS.

   Self-contained: no external fonts or CDNs. The font stack falls
   back to system fonts, so the page renders correctly offline.
   ============================================================ */

:root {
  --ink:        #08130d;
  --ink-soft:   #4b5a52;
  --ink-faint:  #67766e;
  --line:       #e8ebe8;
  --bg:         #ffffff;
  --bg-alt:     #f5f7f5;
  --bg-dark:    #07120c;
  --accent:     #00b06a;
  --accent-2:   #18d27f;
  --accent-ink: #047a4b;
  --grad:       linear-gradient(125deg, #18d27f 0%, #00b06a 45%, #06b6a8 100%);
  --grad-soft:  linear-gradient(125deg, rgba(24,210,127,.14), rgba(6,182,168,.10));
  --shadow-sm:  0 2px 8px rgba(8,19,13,.05);
  --shadow-md:  0 18px 50px -24px rgba(8,19,13,.30);
  --shadow-lg:  0 40px 120px -40px rgba(8,19,13,.45);
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --ease: cubic-bezier(.16,.84,.44,1);
  --maxw: 1120px;
}

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}
::selection { background: rgba(24,210,127,.25); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  padding: 13px 22px; border-radius: 980px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), opacity .25s;
  white-space: nowrap;
}
.btn-primary {
  color: #fff; background: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(8,19,13,.5); }
.btn-grad {
  color: #04150d; background: var(--grad);
  box-shadow: 0 10px 30px -10px rgba(0,176,106,.6);
}
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(0,176,106,.7); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { color: var(--accent-ink); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Nav ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0,176,106,.7);
}
.brand .logo svg { width: 18px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-cta .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding: 96px 0; }
@media (max-width: 720px) { .section-pad { padding: 64px 0; } }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--accent-ink); text-transform: uppercase; margin-bottom: 16px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
.section-head p { font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); margin-top: 18px; line-height: 1.55; }

/* ---------- Pill badge ---------- */
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 980px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
}
.pill-badge b { color: var(--ink); font-weight: 600; }
.pill-badge .spark { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Prose (article body) ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; margin-top: 56px; }
.prose h3 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; letter-spacing: -0.02em; margin-top: 36px; }
.prose p { font-size: 17px; color: var(--ink-soft); line-height: 1.65; }
.prose p b, .prose li b { color: var(--ink); font-weight: 600; }
.prose a.inline-link { color: var(--accent-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(4,122,75,.35); }
.prose a.inline-link:hover { border-bottom-color: var(--accent-ink); }
.prose ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.prose ul li { position: relative; padding-left: 30px; font-size: 16.5px; color: var(--ink-soft); line-height: 1.6; }
.prose ul li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 16px; height: 16px;
  border-radius: 6px; background: var(--grad-soft); border: 1px solid rgba(0,176,106,.3);
}
.prose ul.plain li::before { background: none; border: none; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); left: 5px; }
.lead { font-size: clamp(18px, 2.2vw, 21px) !important; color: var(--ink) !important; line-height: 1.55 !important; font-weight: 400; }
.lead b { font-weight: 700; }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 auto; max-width: 900px; }
.cmp {
  width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-sm); font-size: 15px;
}
.cmp th, .cmp td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; }
.cmp thead th:first-child { color: var(--ink-faint); font-weight: 600; }
.cmp thead .col-rs {
  color: var(--accent-ink); background: var(--grad-soft);
  border-bottom: 1px solid rgba(0,176,106,.25);
}
.cmp thead .col-rs .rs-badge { display: inline-flex; align-items: center; gap: 7px; }
.cmp thead .col-rs .rs-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.cmp tbody th { font-weight: 600; color: var(--ink); width: 30%; }
.cmp td { color: var(--ink-soft); line-height: 1.5; }
.cmp td.col-rs { color: var(--ink); font-weight: 500; background: rgba(24,210,127,.045); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: none; }
.cmp .yes { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 640px) { .cmp { font-size: 14px; } .cmp th, .cmp td { padding: 13px 14px; } }

/* ---------- Card grid (why / when-not) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 900px; margin: 0 auto; }
@media (max-width: 720px) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(0,176,106,.28); }
.card .card-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--grad-soft); display: grid; place-items: center; margin-bottom: 20px; }
.card .card-ic svg { width: 23px; height: 23px; color: var(--accent-ink); }
.card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 9px; }
.card p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  padding: 4px 22px; box-shadow: var(--shadow-sm); transition: border-color .3s var(--ease);
}
.faq details[open] { border-color: rgba(0,176,106,.3); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-size: 17.5px; font-weight: 600;
  letter-spacing: -0.01em; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 24px; font-weight: 400; color: var(--accent-ink);
  transition: transform .3s var(--ease); line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 20px; font-size: 16px; color: var(--ink-soft); line-height: 1.6; max-width: 64ch; }

/* ---------- CTA card ---------- */
.cta-wrap { text-align: center; }
.cta-card {
  background: var(--bg-dark); border-radius: var(--r-lg); padding: clamp(48px, 8vw, 88px) 32px;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at 50% 0%, rgba(24,210,127,.4), transparent 62%);
}
.cta-card h2 { position: relative; color: #fff; font-size: clamp(30px, 5.5vw, 52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; max-width: 18ch; margin: 0 auto; }
.cta-card p { position: relative; color: rgba(255,255,255,.66); font-size: 18px; margin: 22px auto 0; max-width: 46ch; line-height: 1.55; }
.cta-actions { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.cta-card .btn-ghost { color: rgba(255,255,255,.85); }
.cta-card .btn-ghost:hover { color: #fff; }
.cta-note { position: relative; margin-top: 22px; font-size: 13.5px; color: rgba(255,255,255,.5); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 60px 0 40px; margin-top: 30px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot-brand { max-width: 280px; }
.foot-brand p { margin-top: 14px; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h3 { font-size: 13px; font-weight: 700; letter-spacing: .02em; margin-bottom: 16px; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 11px; transition: color .2s; }
.foot-col a:hover { color: var(--accent-ink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-faint); }

/* ---------- Reveal animation (progressive enhancement) ---------- */
.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
.js-ready .reveal { opacity: 0; transform: translateY(28px); }
.js-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}
