/* ============================================================
   COYA PAYWALL — styles.css
   Design system: Chakra Petch headings / Nunito Sans body
   Colors: Dark navy #1a1c24 | Accent blue #4470f3 | Light gray #f7f7f5
   ============================================================ */

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

:root {
  --color-dark:      #1a1c24;
  --color-dark-2:    #23263a;
  --color-body:      #414141;
  --color-light:     #f7f7f5;
  --color-white:     #ffffff;
  --color-muted:     #9a9ea8;
  --color-border:    #e5e5e2;
  --color-accent:    #4470f3;
  --color-accent-2:  #6ec1e4;
  --color-featured:  #1a1c24;

  --font-heading: 'Chakra Petch', 'Nunito Sans', sans-serif;
  --font-body:    'Nunito Sans', 'Bio Sans', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 24px rgba(0,0,0,0.07);
  --shadow-featured: 0 8px 48px rgba(0,0,0,0.16);

  --container: 1160px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-body);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }

p { line-height: 1.65; }

a { color: inherit; text-decoration: none; }

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

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover {
  background: #3560e0;
  border-color: #3560e0;
  box-shadow: 0 4px 20px rgba(68,112,243,0.35);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-dark);
  color: var(--color-dark);
}
.btn-outline-dark:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.6);
  color: var(--color-white);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-white);
}

.btn-light {
  background: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-dark);
}
.btn-light:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-block { width: 100%; }
.btn-sm    { padding: 8px 18px; font-size: 0.82rem; }
.btn-lg    { padding: 16px 32px; font-size: 1rem; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-dark);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-body);
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--color-dark); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 100px 0 80px;
  overflow: hidden;
  text-align: center;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(68,112,243,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(78,205,196,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
}

/* Billing toggle */
.billing-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 40px;
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 36px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle-btn.active {
  background: var(--color-white);
  color: var(--color-dark);
}

.badge-save {
  background: var(--color-accent);
  color: var(--color-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ── Plans Section ────────────────────────────────────────── */
.plans-section {
  background: var(--color-light);
  padding: 80px 0;
}

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

/* Plan Card */
.plan-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.plan-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.plan-card--featured {
  background: var(--color-white);
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-featured);
  transform: translateY(-8px);
}
.plan-card--featured:hover { transform: translateY(-10px); }

.plan-card--dark {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-white);
}
.plan-card--dark h1, .plan-card--dark h2,
.plan-card--dark h3, .plan-card--dark .plan-tier,
.plan-card--dark .plan-tagline { color: var(--color-white); }
.plan-card--dark .plan-features li { color: rgba(255,255,255,0.82); }
.plan-card--dark .muted { color: rgba(255,255,255,0.3); }
.plan-card--dark .features-label { color: rgba(255,255,255,0.5); }
.plan-card--dark .check { color: var(--color-accent); }
.plan-card--dark .dash { color: rgba(255,255,255,0.2); }
.plan-card--dark .plan-price { color: var(--color-white); }
.plan-card--dark .price-period { color: rgba(255,255,255,0.5); }

/* Badge */
.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 20px;
}

.plan-header { margin-bottom: 28px; }

.plan-tier {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.price-period {
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 400;
}

.plan-tagline {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* Features list */
.plan-features {
  margin-top: 28px;
}

.features-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 14px;
}

.plan-features ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-body);
}

.plan-features li.muted { color: var(--color-muted); }

.check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.dash {
  color: var(--color-border);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.4;
}

.plans-note {
  text-align: center;
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* ── Comparison Table ─────────────────────────────────────── */
.comparison-section {
  background: var(--color-white);
  padding: 100px 0;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.comparison-section h2 { margin-bottom: 56px; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dark);
  background: var(--color-light);
  padding: 16px 20px;
}

.feature-col { text-align: left !important; width: 36%; }

.comparison-table td:first-child { text-align: left; font-size: 0.88rem; }

.section-row td {
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
}
.section-row td:first-child { border-radius: 0; }

.col-featured {
  background: rgba(68,112,243,0.06);
  border-left: 2px solid rgba(68,112,243,0.25);
  border-right: 2px solid rgba(68,112,243,0.25);
}

.tcheck { color: var(--color-accent); font-size: 1.1rem; font-weight: 700; }
.tcross { color: var(--color-border); font-size: 1.1rem; }

.comparison-table tfoot tr { border-top: 2px solid var(--color-border); }
.comparison-table tfoot td {
  padding: 24px 20px;
  border-bottom: none;
}

/* ── Social Proof ─────────────────────────────────────────── */
.proof-section {
  background: var(--color-dark);
  padding: 80px 0;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  padding: 24px 48px;
  flex: 1;
  min-width: 160px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}

.stat-unit {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials-section {
  background: var(--color-light);
  padding: 100px 0;
}

.testimonials-section h2 { margin-bottom: 56px; }

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

.testimonial-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: box-shadow 0.2s;
}
.testimonial-card:hover { box-shadow: var(--shadow-card); }

.testimonial-text {
  font-size: 0.95rem;
  color: var(--color-body);
  line-height: 1.7;
  flex: 1;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.author-title {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 2px;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-section {
  background: var(--color-white);
  padding: 100px 0;
}

.faq-container { max-width: 720px; }
.faq-section h2 { margin-bottom: 48px; }

.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  text-align: left;
  transition: color 0.15s;
}
.faq-question:hover { color: var(--color-accent); }
.faq-question[aria-expanded="true"] { color: var(--color-accent); }

.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: var(--color-accent);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-answer.open { max-height: 300px; }
.faq-answer p {
  padding-bottom: 22px;
  font-size: 0.92rem;
  color: var(--color-body);
  line-height: 1.7;
}

.inline-link {
  color: var(--color-accent);
  font-weight: 600;
  border-bottom: 1px solid var(--color-accent);
}

/* ── CTA Band ─────────────────────────────────────────────── */
.cta-section {
  position: relative;
  background: var(--color-dark);
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 100%, rgba(68,112,243,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner { position: relative; z-index: 1; }

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--color-dark-2);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-white);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-heading {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--color-white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}

/* ── Checkout Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,28,36,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--color-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--color-dark); }

.modal-header { margin-bottom: 32px; }

.modal-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.modal h3 {
  font-size: 1.6rem;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.modal-price {
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* Form */
.modal-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-dark);
  text-transform: uppercase;
}

.form-group input {
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-dark);
  background: var(--color-white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(68,112,243,0.15);
}
.form-group input::placeholder { color: var(--color-muted); }
.form-group input.error { border-color: #e05b5b; }

.submit-btn { margin-top: 8px; }

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: -4px;
}

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .plans-grid {
    grid-template-columns: 1fr 1fr;
  }
  .plan-card--featured { transform: none; }
  .plan-card--featured:hover { transform: translateY(-2px); }
  .plan-card--dark {
    grid-column: span 2;
  }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid .testimonial-card:last-child { grid-column: span 2; }
  .stats-row { gap: 0; }
  .stat { padding: 24px 32px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }

  .hero { padding: 72px 0 60px; }
  .hero h1 { font-size: 2.2rem; }

  .plans-section { padding: 56px 0; }
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .plan-card--dark { grid-column: span 1; }

  .comparison-section { padding: 72px 0; }

  .stats-row { flex-direction: column; gap: 0; }
  .stat-divider { width: 80px; height: 1px; }

  .testimonials-section { padding: 72px 0; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonials-grid .testimonial-card:last-child { grid-column: span 1; }

  .faq-section { padding: 72px 0; }

  .cta-section { padding: 72px 0; }

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

  .modal { padding: 36px 24px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stat { padding: 20px 24px; min-width: 140px; }
  .stat-number { font-size: 2.4rem; }
  .billing-toggle { flex-direction: column; border-radius: 12px; }
  .toggle-btn { border-radius: 8px; justify-content: center; }
  .toggle-btn.active { border-radius: 8px; }
}
