/* =============================================================
   CSS — AI-Powered KDP Publishing Templates Pack
   Mobile-first, zero dependencies, pure CSS variables
   ============================================================= */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --yellow:      #FFEA00;
  --yellow-dim:  #e6d400;
  --dark:        #1A1A1A;
  --dark-soft:   #2d2d2d;
  --text:        #1A1A1A;
  --text-light:  #444;
  --text-muted:  #666;
  --bg:          #ffffff;
  --bg-alt:      #f8f8f8;
  --bg-yellow:   #fffef0;
  --border:      #e5e5e5;
  --border-light:#eee;
  --radius:      10px;
  --shadow:      0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 28px rgba(0, 0, 0, 0.08);
  --font-body:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-ui:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --transition:  0.2s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  will-change: transform;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Primary: yellow (main CTA — Get the Pack) — black text for WCAG contrast */
.btn-primary {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}
.btn-primary:hover { background: var(--yellow-dim); border-color: var(--yellow-dim); }

/* Accent: yellow (main purchase) */
.btn-accent {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.btn-accent:hover { background: var(--yellow-dim); border-color: var(--yellow-dim); }

/* Secondary: white outline (on dark bg) */
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* Green → dark grey for free tier (standalone on light bg) */
.btn-green {
  background: var(--dark-soft);
  color: #fff;
  border-color: var(--dark-soft);
}
.btn-green:hover { background: var(--dark); border-color: var(--dark); }

/* Small variant */
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* Full width */
.btn-full { width: 100%; display: block; }

/* ── Section Label ──────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--bg-yellow);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
}

/* ── Headings ───────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-ui);
  line-height: 1.2;
  color: var(--text);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 24px;
}
h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(26, 26, 26, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow var(--transition);
}
#site-header.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}
.header-brand {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.header-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.header-nav a:hover { color: #fff; }
.header-nav .btn { padding: 8px 18px; font-size: 0.82rem; }
.header-nav .btn-primary { color: #000; }
.header-nav .btn-primary:hover { color: #000; }

/* ═══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
#hero {
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-soft) 100%);
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 234, 0, 0.35);
}
#hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  color: #fff;
  max-width: 760px;
  margin: 0 auto 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.75;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 44px;
}
.micro-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}
.micro-proof li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 500;
}
.micro-proof li svg { color: var(--yellow); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   PROOF
══════════════════════════════════════════════════════════════ */
#proof {
  padding: 80px 0;
  background: var(--bg);
}
#proof .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
  align-items: start;
}
#proof .section-label { grid-column: 1 / -1; }
#proof h2 { grid-column: 1 / -1; }
.proof-body {
  margin-bottom: 0;
  color: var(--text-light);
  font-size: 1.02rem;
  line-height: 1.8;
}
.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
}
.stat-box {
  flex: 0 0 auto;
  background: var(--bg-yellow);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.proof-screenshot { grid-column: 1 / -1; }
.stat-number {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}
.proof-screenshot {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.proof-screenshot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--border-light);
  min-height: 240px;
  object-fit: cover;
}
.proof-screenshot figcaption {
  padding: 10px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════════════════════════════
   PAIN
══════════════════════════════════════════════════════════════ */
#pain {
  padding: 80px 0;
  background: var(--bg-alt);
}
.pain-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.pain-card {
  flex: 1 1 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.pain-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pain-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #333;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  line-height: 1;
}
.pain-card h3 { color: var(--dark); margin-bottom: 12px; }
.pain-card p { color: var(--text-light); font-size: 0.93rem; margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   SOLUTION
══════════════════════════════════════════════════════════════ */
#solution { padding: 80px 0; background: var(--bg); }
.solution-body {
  color: var(--text-light);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 40px;
}
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.benefit-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-yellow);
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text);
}
.benefit-icon {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--dark);
  flex-shrink: 0;
  margin-top: 1px;
}
.benefit-list strong { color: var(--dark); }

/* ═══════════════════════════════════════════════════════════════
   INCLUDED (TIERS)
══════════════════════════════════════════════════════════════ */
#included { padding: 80px 0; background: var(--bg-alt); }
.tier-grid {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.tier-card {
  flex: 1 1 320px;
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: visible;
}
.tier-free { border: 2px solid var(--dark-soft); }
.tier-paid { border: 2px solid var(--yellow); }
.tier-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
}
.tier-badge-free { background: var(--dark-soft); color: #fff; }
.tier-badge-paid { background: var(--yellow); color: var(--dark); }
.tier-price {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  line-height: 1;
}
.tier-free .tier-price { color: var(--dark); }
.tier-paid .tier-price { color: var(--dark); }
.tier-card h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 8px;
}
.tier-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}
.tier-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.tier-features li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
}
.tier-features li svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.tier-free .tier-features li svg { color: var(--dark); }
.tier-paid .tier-features li svg { color: var(--dark); }
.bonus-item { border-top: 1px solid var(--border-light); padding-top: 12px; }
.bonus-item svg { color: var(--yellow-dim) !important; }
.guarantee-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
  padding: 10px;
  background: var(--bg-alt);
  border-radius: 6px;
}
.guarantee-note svg { flex-shrink: 0; margin-top: 2px; color: var(--dark); }

/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
══════════════════════════════════════════════════════════════ */
#testimonials { padding: 80px 0; background: var(--bg); }
.testimonials-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.testimonial-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.testimonial-card {
  flex: 1 1 260px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.testimonial-card blockquote {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
  padding-left: 20px;
}
.testimonial-card blockquote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -6px;
  font-size: 2.5rem;
  color: var(--dark);
  opacity: 0.2;
  font-style: normal;
  line-height: 1;
}
.testimonial-card footer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.testimonial-author strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 2px;
}
.testimonial-author span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   FAQ
══════════════════════════════════════════════════════════════ */
#faq { padding: 80px 0; background: var(--bg-alt); }
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
details {
  border-bottom: 1px solid var(--border-light);
}
details:last-child { border-bottom: none; }
summary {
  cursor: pointer;
  padding: 20px 24px;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background var(--transition);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--dark);
  line-height: 1;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform var(--transition);
}
details[open] summary { background: var(--bg-yellow); }
details[open] summary::after { content: '−'; }
summary:hover { background: var(--bg-alt); }
details[open] summary:hover { background: var(--bg-yellow); }
.faq-body {
  padding: 4px 24px 24px;
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.8;
  border-top: 1px solid var(--border-light);
}
.faq-body p { margin-bottom: 0.8rem; }

/* ═══════════════════════════════════════════════════════════════
   FINAL CTA
══════════════════════════════════════════════════════════════ */
#cta-final {
  padding: 90px 0;
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-soft) 100%);
  text-align: center;
}
#cta-final h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  max-width: 640px;
  margin: 0 auto 20px;
}
.cta-final-body {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.75;
}
.cta-final-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}
.cta-fine-print {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
#site-footer {
  background: var(--dark);
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.82rem;
  color: #fff;
  margin: 0;
}
.footer-copy a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-copy a:hover { color: var(--yellow); }
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.82rem;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--yellow); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #hero { padding: 110px 0 60px; }
  #hero h1 { font-size: 1.75rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  #proof .container { grid-template-columns: 1fr; gap: 32px; }
  .stat-grid { flex-direction: row; flex-wrap: wrap; }
  .stat-box { flex: 1 1 100%; }
  .pain-grid { flex-direction: column; }
  .tier-grid { flex-direction: column; }
  .testimonial-grid { flex-direction: column; }
  .header-nav a:not(.btn) { display: none; }
  .cta-final-buttons { flex-direction: column; align-items: stretch; }
  .cta-final-buttons .btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .tier-card { padding: 32px 20px; }
  summary { font-size: 0.9rem; padding: 18px 18px; }
  .faq-body { padding: 4px 18px 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .pain-card { padding: 24px 20px; }
  .testimonial-card { padding: 22px 18px; }
}
