/* === NextChapter Equity v3 — Monochrome + Red === */

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

:root {
  --red: #dc2626;
  --red-hover: #b91c1c;
  --red-light: #fef2f2;
  --red-glow: rgba(220, 38, 38, 0.25);
  --dark: #0f0f1a;
  --dark-light: #1a1a2e;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-800: #27272a;
  --green: #16a34a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px rgba(0,0,0,0.04), 0 12px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.06), 0 24px 48px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--red-hover); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; color: var(--dark); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

/* ---------- Animation ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate { animation: fadeUp 0.6s ease-out both; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s;
}

.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 1rem 0 2rem;
}

.logo {
  font-size: 1.25rem; font-weight: 800; color: var(--dark);
  letter-spacing: -0.03em;
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; margin-left: auto; }
.nav-links a { color: var(--gray-600); font-size: 0.9rem; font-weight: 500; letter-spacing: -0.01em; }
.nav-links a:hover { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 100px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all 0.25s ease;
  border: none; white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-cta {
  background: var(--red); color: white;
  box-shadow: 0 2px 8px var(--red-glow);
}
.btn-cta:hover {
  background: var(--red-hover); color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--red-glow);
}

.btn-outline {
  background: transparent; color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: white; transform: translateY(-2px); }

.btn-white {
  background: white; color: var(--dark);
  box-shadow: var(--shadow);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn-xl { padding: 1.15rem 2.75rem; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--dark);
  margin-top: -72px;
  padding-top: 72px;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('/assets/images/hero-bg.webp') center/cover no-repeat;
  opacity: 0.65;
}

.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(45, 20, 10, 0.12) 0%,
    rgba(15, 15, 26, 0.35) 40%,
    rgba(15, 15, 26, 0.88) 100%
  );
}

.hero-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 800px; padding: 4rem 2rem;
  margin-left: 7.5rem;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; color: rgba(255,255,255,0.9);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 2rem;
}

.hero h1 {
  color: white; font-size: clamp(2.8rem, 6vw, 4.5rem);
  margin-bottom: 1.5rem; line-height: 1.1;
}
.hero h1 span { color: rgba(255,255,255,0.9); font-weight: 700; }

.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem; max-width: 520px;
  margin-bottom: 2rem; line-height: 1.6;
}

.hero-features {
  display: flex; gap: 1.5rem; margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex; align-items: center; gap: 0.6rem;
  color: rgba(255,255,255,0.85); font-size: 0.95rem; font-weight: 500;
}

.hero-feature .check {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--green); font-size: 0.8rem; flex-shrink: 0;
}

.hero-stars {
  display: flex; align-items: center; gap: 0.6rem;
  color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 2.5rem;
}
.hero-stars .stars { color: #fbbf24; font-size: 1rem; letter-spacing: 1px; }
.hero-stars a { color: rgba(255,255,255,0.7); border-bottom: 1px dashed rgba(255,255,255,0.3); }
.hero-stars a:hover { color: white; border-bottom-color: white; }

.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 6rem 2rem; }

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-label {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 100px;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--gray-500); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

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

.section-cta {
  background: var(--dark);
  color: white; text-align: center; padding: 5rem 2rem;
  position: relative; overflow: hidden;
}
.section-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(220, 38, 38, 0.12) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(220, 38, 38, 0.06) 0%, transparent 50%);
}
.section-cta h2 { color: white; font-size: 2.5rem; margin-bottom: 1rem; position: relative; }
.section-cta p { color: rgba(255,255,255,0.8); font-size: 1.15rem; margin-bottom: 2rem; position: relative; }
.section-cta .btn { position: relative; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--gray-100); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.5rem;
  font-weight: 700;
}

.card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.card p { color: var(--gray-500); font-size: 0.95rem; line-height: 1.7; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.testimonial {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  border: 1px solid var(--gray-200);
  position: relative;
  transition: all 0.3s ease;
}
.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.testimonial-quote {
  position: absolute; top: -12px; left: 1.5rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; font-family: Georgia, serif;
}

.testimonial p {
  color: var(--gray-600); font-style: italic;
  font-size: 0.95rem; line-height: 1.75; margin-bottom: 1.5rem;
}

.testimonial-author { display: flex; align-items: center; gap: 0.75rem; }
.testimonial-author .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 1rem;
}
.testimonial-author .name { font-weight: 600; color: var(--dark); font-size: 0.95rem; }
.testimonial-author .role { color: var(--gray-400); font-size: 0.8rem; }

/* ---------- Compare Table ---------- */
.compare-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.compare-table thead th {
  background: var(--dark); color: white;
  padding: 1.25rem 1.5rem; text-align: left; font-weight: 600;
  font-size: 0.95rem;
}
.compare-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.compare-table thead th:last-child { border-radius: 0 var(--radius) 0 0; }

.compare-table td {
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--gray-100);
  font-size: 0.95rem;
}
.compare-table tr:last-child td:first-child { border-radius: 0 0 0 var(--radius); }
.compare-table tr:last-child td:last-child { border-radius: 0 0 var(--radius) 0; }

.compare-table .section-header td {
  background: var(--dark-light); color: var(--gray-300);
  font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.9rem 1.5rem;
}

.compare-table .us { color: var(--green); font-weight: 600; }
.compare-table .them { color: var(--gray-400); }

.compare-table tbody tr:not(.section-header):hover { background: var(--gray-50); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item:hover { border-color: var(--gray-400); }

.faq-question {
  width: 100%; padding: 1.25rem 1.5rem; text-align: left;
  background: white; border: none;
  font-size: 1rem; font-weight: 600;
  color: var(--dark); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq-question::after {
  content: '+'; font-size: 1.4rem; font-weight: 300;
  color: var(--red); transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,0.1); }
.faq-item.open .faq-question { color: var(--red); }
.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600); font-size: 0.95rem; line-height: 1.75;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.blog-card-body { padding: 1.75rem; }
.blog-card-body .meta { color: var(--gray-400); font-size: 0.8rem; margin-bottom: 0.5rem; font-weight: 500; }
.blog-card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.blog-card-body h3 a { color: var(--dark); }
.blog-card-body h3 a:hover { color: var(--red); }
.blog-card-body p { color: var(--gray-500); font-size: 0.9rem; line-height: 1.65; }

/* ---------- Page Content ---------- */
.page-content {
  max-width: 780px; margin: 0 auto; padding: 5rem 2rem 4rem;
}
.page-content h1 { margin-bottom: 1.5rem; }
.page-content h2 { margin: 2.5rem 0 1rem; font-size: 1.6rem; }
.page-content h3 { margin: 2rem 0 0.75rem; }
.page-content p { margin-bottom: 1.25rem; color: var(--gray-600); }
.page-content ul, .page-content ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--gray-600); }
.page-content li { margin-bottom: 0.5rem; }

/* ---------- Blog Post ---------- */
.blog-post {
  max-width: 780px; margin: 0 auto; padding: 5rem 2rem 4rem;
}
.blog-post .meta { color: var(--gray-400); font-size: 0.85rem; margin-bottom: 0.5rem; font-weight: 500; }
.blog-post h1 { margin-bottom: 1rem; }
.blog-post h2 { margin: 2.5rem 0 1rem; font-size: 1.6rem; }
.blog-post h3 { margin: 2rem 0 0.75rem; }
.blog-post p { margin-bottom: 1.25rem; color: var(--gray-600); line-height: 1.8; }
.blog-post ul, .blog-post ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--gray-600); }
.blog-post li { margin-bottom: 0.5rem; line-height: 1.7; }

/* ---------- Forms ---------- */
.form-page {
  max-width: 560px; margin: 0 auto; padding: 5rem 2rem 4rem;
}
.form-page h1 { margin-bottom: 0.75rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--dark); font-size: 0.9rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 0.85rem 1rem;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; background: var(--gray-50);
  transition: all 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--red);
  background: white; box-shadow: 0 0 0 4px rgba(220,38,38,0.08);
}

.checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; }
.checkbox-group input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0;
  accent-color: var(--red);
}
.checkbox-group label { font-weight: 400; font-size: 0.85rem; color: var(--gray-600); }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 8rem 2rem; }
.page-404 h1 { font-size: clamp(4rem, 10vw, 8rem); color: var(--red); margin-bottom: 0; }
.page-404 h2 { margin-bottom: 1rem; }
.page-404 p { color: var(--gray-500); margin-bottom: 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark); color: var(--gray-400);
  padding: 3rem 2rem; text-align: center;
}
.site-footer .footer-links {
  display: flex; gap: 1.75rem; justify-content: center;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.site-footer .footer-links a { color: var(--gray-400); font-size: 0.9rem; font-weight: 500; }
.site-footer .footer-links a:hover { color: white; }
.site-footer p { font-size: 0.85rem; }
.site-footer p a { color: var(--gray-400); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-3 { margin-top: 2rem; }

/* ---------- Process Steps ---------- */
.steps { max-width: 780px; margin: 0 auto; }

.step {
  display: flex; gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: flex-start;
}
.step:last-child { border-bottom: none; }

.step-number {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem;
}

.step-content h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.step-content p { color: var(--gray-500); font-size: 0.95rem; line-height: 1.7; }
.step-label {
  font-size: 0.75rem; font-weight: 600; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem;
}

/* Mobile process steps */
@media (max-width: 768px) {
  .step { gap: 1rem; padding: 1.25rem 0; }
  .step-number { width: 40px; height: 40px; min-width: 40px; font-size: 1rem; }
}

/* ---------- Mobile (max-width: 768px) ---------- */
@media (max-width: 768px) {
  /* Header */
  .menu-toggle {
    display: flex; align-items: center; gap: 0.4rem;
    background: none; border: 1px solid var(--gray-200);
    border-radius: 8px; padding: 0.5rem 0.75rem;
    font-size: 0.9rem; font-family: inherit; color: var(--dark);
    cursor: pointer;
  }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: white; padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .header-inner { padding: 0 1rem; }

  /* Hero — no margin, reduced padding */
  .hero-content {
    margin-left: 0;
    padding: 2rem 1rem;
  }
  .hero { min-height: auto; padding: 8rem 0 3rem; }
  .hero-bg { background-position: 30% center; }
  .hero-cta-group { flex-direction: column; }

  /* Sections */
  .section { padding: 3rem 1rem; }
  .section-header { margin-bottom: 2rem; }
  .section-cta { padding: 3rem 1rem; }
  .section-cta h2 { font-size: 1.75rem; }

  /* Cards — single column */
  .card-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }

  /* Compare Table — stacked cards */
  .compare-wrapper { overflow-x: visible; box-shadow: none; }
  .compare-table { min-width: 0; }
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; }
  .compare-table tr {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    overflow: hidden;
    background: white;
  }
  .compare-table tr.section-header {
    background: var(--dark);
    border-color: var(--dark);
    margin-bottom: 0.75rem; margin-top: 1rem;
  }
  .compare-table tr.section-header td {
    background: var(--dark); color: var(--gray-300);
    padding: 0.6rem 1rem;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
  }
  .compare-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
  }
  .compare-table td:first-child {
    font-weight: 600; color: var(--dark);
    padding: 0.75rem 1rem 0.25rem;
    border-bottom: none;
  }
  .compare-table td:nth-child(2),
  .compare-table td:nth-child(3) {
    display: inline-block; width: 50%;
    padding: 0.25rem 1rem 0.75rem;
    border-bottom: none;
    font-size: 0.85rem;
  }
  .compare-table td:nth-child(2) { color: var(--green); }
  .compare-table td:nth-child(3) { color: var(--gray-400); }
  .compare-table tr:not(.section-header):hover { background: white; }
  .compare-table tr:last-child td:first-child,
  .compare-table tr:last-child td:last-child { border-radius: 0; }

  /* Page content */
  .page-content { padding: 2rem 1rem 3rem; }
  .blog-post { padding: 2rem 1rem 3rem; }
  .form-page { padding: 2rem 1rem 3rem; }

  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  /* Footer */
  .site-footer { padding: 2rem 1rem; }
  .site-footer .footer-links { gap: 1rem; }

  /* 404 */
  .page-404 { padding: 4rem 1rem; }
}

/* Desktop — hide hamburger */
@media (min-width: 769px) {
  .menu-toggle { display: none; }
}
