/* ==========================================================================
   Reply Flow — Shared Stylesheet
   Standalone affiliate-first design
   Last updated: 2026-04-02
   ========================================================================== */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --color-primary:       #2563EB; /* rgb(37,99,235) — blue CTA */
  --color-primary-hover: #1D4ED8;
  --color-primary-light: #EFF6FF; /* light blue tint for badges/bg */
  --color-slate-900:     #0F172A; /* headings, footer bg */
  --color-slate-700:     #334155;
  --color-slate-600:     #475569;
  --color-slate-500:     #64748B;
  --color-slate-400:     #94A3B8;
  --color-slate-300:     #CBD5E1; /* outline btn border */
  --color-slate-200:     #E2E8F0; /* card border */
  --color-slate-100:     #F1F5F9;
  --color-slate-50:      #F8FAFC;
  --color-white:         #FFFFFF;
  --color-body:          #1E293B; /* body text */
  --color-green:         #16A34A;
  --color-amber:         #F59E0B;
  --color-red:           #EF4444;

  /* Typography */
  --font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Spacing */
  --container-max: 1200px;
  --section-pad-y: 80px;
  --section-pad-y-sm: 48px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08);
}

html { font-size: var(--font-size-base); scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  color: var(--color-body);
  background: var(--color-white);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- LAYOUT --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad-y) 0;
}

.section--sm {
  padding: var(--section-pad-y-sm) 0;
}

.section--gray {
  background: var(--color-slate-50);
}

.section--dark {
  background: var(--color-slate-900);
  color: var(--color-white);
}

.section--blue {
  background: var(--color-primary);
  color: var(--color-white);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  color: var(--color-slate-900);
  line-height: 1.2;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
}

.text-center { text-align: center; }
.text-muted  { color: var(--color-slate-500); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-white  { color: var(--color-white); }

.subheadline {
  font-size: 1.125rem;
  color: var(--color-slate-600);
  max-width: 560px;
  line-height: 1.7;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
  line-height: 1;
}

.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.btn--outline {
  background: var(--color-white);
  color: var(--color-body);
  border: 1.5px solid var(--color-slate-300);
}
.btn--outline:hover {
  border-color: var(--color-slate-400);
  background: var(--color-slate-50);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
}
.btn--white:hover {
  background: var(--color-slate-100);
}

.btn--sm {
  font-size: 0.875rem;
  padding: 10px 20px;
}

.btn--lg {
  font-size: 1.125rem;
  padding: 16px 40px;
}

/* --- HEADER / NAV --- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-slate-900);
  text-decoration: none;
}

.site-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-slate-600);
  text-decoration: none;
}
.nav-links a:hover { color: var(--color-primary); }

.nav-cta {
  font-size: 0.875rem !important;
  padding: 10px 20px !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-slate-700);
}

/* --- CARDS --- */
.card {
  background: var(--color-white);
  border: 1.5px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-slate-300);
}

.card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-card);
}

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge--green {
  background: #DCFCE7;
  color: var(--color-green);
}

/* --- TRUST STRIP --- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-slate-500);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- GRID HELPERS --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-slate-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-family);
  font-size: 1rem;
  border: 1.5px solid var(--color-slate-300);
  border-radius: var(--radius-md);
  background: var(--color-white);
  color: var(--color-body);
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-input::placeholder {
  color: var(--color-slate-400);
}

.form-inline {
  display: flex;
  gap: 12px;
}

.form-inline .form-input {
  flex: 1;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-slate-600);
  cursor: pointer;
  padding: 8px 16px;
  border: 1.5px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, background 0.15s;
}

.checkbox-label:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.checkbox-label input {
  accent-color: var(--color-primary);
}

/* --- FOOTER --- */
.site-footer {
  background: var(--color-slate-900);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-brand .site-logo {
  color: var(--color-white);
  margin-bottom: 12px;
  display: inline-block;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin-bottom: 10px;
  text-decoration: none;
}
.footer-col a:hover { color: var(--color-white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.footer-endorsed {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* --- UTILITY --- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* --- HERO --- */
.hero {
  padding: 64px 0 56px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero .subheadline {
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- HOW IT WORKS --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 { margin-bottom: 8px; }
.step p { font-size: 0.9375rem; color: var(--color-slate-500); }

/* --- TOOL CARD (match page) --- */
.tool-card {
  padding: 28px;
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-white);
  flex-shrink: 0;
}

.tool-meta {
  flex: 1;
}

.tool-meta h3 { margin-bottom: 2px; }

.tool-meta .rating {
  color: var(--color-amber);
  font-size: 0.875rem;
}

.tool-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
  font-size: 0.875rem;
}

.tool-pros li, .tool-cons li {
  list-style: none;
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}

.tool-pros li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-green);
  font-weight: 700;
}

.tool-cons li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: var(--color-red);
  font-weight: 700;
}

.tool-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--color-slate-200);
  padding: 20px 0;
}

.faq-question {
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--color-slate-900);
  font-family: var(--font-family);
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-slate-400);
  transition: transform 0.2s;
}

.faq-question.active::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding-top: 12px;
  font-size: 0.9375rem;
  color: var(--color-slate-600);
  line-height: 1.7;
}

.faq-answer.show {
  display: block;
}

/* --- THANK-YOU STATE --- */
.thank-you {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.thank-you.show {
  display: block;
}

.thank-you .check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #DCFCE7;
  color: var(--color-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 16px;
}

/* --- CTA BLOCK (reusable inline CTA) --- */
.cta-block {
  background: var(--color-slate-50);
  border: 1.5px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.cta-block h3 { margin-bottom: 8px; }
.cta-block p { margin-bottom: 20px; color: var(--color-slate-600); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 40px 0 32px; }

  .grid-2, .grid-3, .steps {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .form-inline {
    flex-direction: column;
  }

  .nav-links { display: none; }
  .nav-toggle { display: block; }

  /* Mobile nav open state */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-slate-200);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .tool-pros-cons {
    grid-template-columns: 1fr;
  }

  .section { padding: 48px 0; }

  .trust-strip {
    flex-direction: column;
    align-items: center;
  }

  .checkbox-group {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  .container { padding: 0 16px; }
  .card { padding: 20px; }
}

/* --- FORM STATES (error + loading) --- */
.form-error {
  color: var(--color-red);
  font-size: 0.875rem;
  margin-top: 12px;
  text-align: center;
}

.btn--loading {
  opacity: 0.7;
  cursor: wait;
}

/* --- COMPARISON TABLE (match page) --- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-slate-100);
  vertical-align: middle;
}

.compare-table thead th {
  background: var(--color-slate-50);
  font-weight: 600;
  color: var(--color-slate-700);
  font-size: 0.8125rem;
  text-align: center;
  padding: 16px 12px;
}

.compare-table thead th:first-child {
  text-align: left;
}

.compare-table tbody td {
  text-align: center;
  color: var(--color-slate-600);
}

.compare-table tbody td:first-child {
  text-align: left;
}

.compare-tool-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-slate-900);
}

.row-label {
  font-weight: 600;
  color: var(--color-slate-700);
  white-space: nowrap;
}

.check-yes {
  color: var(--color-green);
  font-weight: 700;
}

.check-no {
  color: var(--color-red);
  font-weight: 700;
}

.check-partial {
  color: var(--color-amber);
  font-weight: 700;
}

.compare-cta-row td {
  padding: 16px 12px;
  border-bottom: none;
  text-align: center;
}

@media (max-width: 768px) {
  .compare-table {
    font-size: 0.8125rem;
  }
  .compare-table th,
  .compare-table td {
    padding: 10px 8px;
  }
}
