@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
  --bg-primary: #0a0a12;
  --bg-card: #12121e;
  --bg-card-alt: #181828;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #a88a2e;
  --text-primary: #f0ece4;
  --text-secondary: #9a9ab0;
  --text-muted: #6b6b80;
  --red: #e74c3c;
  --red-bg: rgba(231,76,60,0.12);
  --green: #27ae60;
  --green-bg: rgba(39,174,96,0.12);
  --blue: #3498db;
  --blue-bg: rgba(52,152,219,0.12);
  --border: rgba(201,168,76,0.15);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior:smooth; font-size:16px; }

body {
  font-family:'Inter',sans-serif;
  background:var(--bg-primary);
  color:var(--text-primary);
  line-height:1.8;
  min-height:100vh;
}

/* PASSWORD GATE */
.password-gate {
  position:fixed; inset:0; z-index:9999;
  background:var(--bg-primary);
  display:flex; align-items:center; justify-content:center;
  flex-direction:column; gap:24px;
}
.password-gate.hidden { display:none; }
.password-gate .lock-icon { font-size:64px; margin-bottom:8px; }
.password-gate h2 { font-family:'Playfair Display',serif; color:var(--gold); font-size:1.8rem; }
.password-gate p { color:var(--text-secondary); max-width:320px; text-align:center; font-size:0.9rem; }
.password-gate input {
  background:var(--bg-card); border:2px solid var(--border); border-radius:12px;
  padding:14px 20px; color:var(--text-primary); font-size:1rem; width:280px;
  text-align:center; outline:none; transition:border 0.3s;
}
.password-gate input:focus { border-color:var(--gold); }
.password-gate button {
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  color:#0a0a12; border:none; border-radius:12px; padding:14px 48px;
  font-weight:700; font-size:1rem; cursor:pointer; transition:transform 0.2s,box-shadow 0.3s;
}
.password-gate button:hover { transform:scale(1.05); box-shadow:0 0 30px rgba(201,168,76,0.3); }
.password-gate .error-msg { color:var(--red); font-size:0.85rem; min-height:20px; }

/* PROGRESS BAR */
.progress-bar {
  position:fixed; top:0; left:0; right:0; height:4px;
  background:rgba(201,168,76,0.15); z-index:100;
}
.progress-bar .fill {
  height:100%; width:0%; background:linear-gradient(90deg,var(--gold),var(--gold-light));
  transition:width 0.3s; border-radius:0 2px 2px 0;
}

/* NAV */
.ebook-nav {
  position:fixed; top:4px; left:0; right:0; z-index:99;
  background:rgba(10,10,18,0.92); backdrop-filter:blur(20px);
  border-bottom:1px solid var(--border); padding:12px 20px;
  display:flex; justify-content:space-between; align-items:center;
}
.ebook-nav .brand { display:flex; align-items:center; gap:10px; }
.ebook-nav .brand span { color:var(--gold); font-weight:700; font-size:0.9rem; }
.ebook-nav .chapter-indicator { color:var(--text-secondary); font-size:0.8rem; }
.nav-btn {
  background:var(--bg-card); border:1px solid var(--border); color:var(--gold);
  padding:6px 14px; border-radius:8px; cursor:pointer; font-size:0.8rem; transition:all 0.3s;
}
.nav-btn:hover { background:var(--gold); color:#0a0a12; }

/* HERO */
.hero-section {
  min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center;
  padding:120px 24px 60px; position:relative; overflow:hidden;
}
.hero-section::before {
  content:''; position:absolute; top:50%; left:50%; width:600px; height:600px;
  background:radial-gradient(circle,rgba(201,168,76,0.08),transparent 70%);
  transform:translate(-50%,-50%); pointer-events:none;
}
.hero-section .emoji-icon { font-size:80px; margin-bottom:20px; }
.hero-section h1 {
  font-family:'Playfair Display',serif; font-size:clamp(2.2rem,5vw,3.5rem);
  color:var(--gold); line-height:1.15; margin-bottom:16px;
}
.hero-section .subtitle {
  font-size:clamp(1rem,2.5vw,1.3rem); color:var(--text-secondary);
  max-width:560px; margin-bottom:24px;
}
.hero-section .author { color:var(--text-muted); font-size:0.9rem; }
.hero-section .quote {
  margin-top:32px; font-style:italic; color:var(--gold-light);
  font-size:1.05rem; max-width:480px; opacity:0.8;
}
.scroll-indicator {
  position:absolute; bottom:32px; left:50%; transform:translateX(-50%);
  color:var(--gold); font-size:0.8rem; animation:bounce 2s infinite;
  display:flex; flex-direction:column; align-items:center; gap:4px;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* CHAPTER SECTIONS */
.chapter {
  max-width:720px; margin:0 auto; padding:80px 24px;
  border-bottom:1px solid var(--border);
  opacity:0; transform:translateY(30px); transition:all 0.6s ease;
}
.chapter.visible { opacity:1; transform:translateY(0); }
.chapter-header {
  display:flex; align-items:center; gap:14px; margin-bottom:32px;
}
.chapter-number {
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  color:#0a0a12; width:48px; height:48px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:1.1rem; flex-shrink:0;
}
.chapter-title {
  font-family:'Playfair Display',serif; font-size:clamp(1.4rem,3vw,2rem);
  color:var(--text-primary); line-height:1.2;
}
.chapter-subtitle { color:var(--gold); font-size:0.95rem; font-weight:600; margin-top:4px; }

/* SECTION LABELS */
.section-label {
  display:inline-flex; align-items:center; gap:6px;
  font-size:0.75rem; font-weight:700; text-transform:uppercase;
  letter-spacing:1.5px; margin-bottom:16px; padding:6px 14px;
  border-radius:20px;
}
.section-label.ferida { background:var(--red-bg); color:var(--red); }
.section-label.engrenagem { background:var(--blue-bg); color:var(--blue); }
.section-label.troco { background:var(--green-bg); color:var(--green); }

/* CONTENT BOXES */
.box {
  border-radius:var(--radius); padding:24px; margin:20px 0;
  border-left:4px solid; position:relative;
}
.box-gold { background:rgba(201,168,76,0.08); border-color:var(--gold); }
.box-gold .box-title { color:var(--gold); }
.box-blue { background:var(--blue-bg); border-color:var(--blue); }
.box-blue .box-title { color:var(--blue); }
.box-red { background:var(--red-bg); border-color:var(--red); }
.box-red .box-title { color:var(--red); }
.box-green { background:var(--green-bg); border-color:var(--green); }
.box-green .box-title { color:var(--green); }
.box-title {
  font-weight:700; font-size:0.8rem; text-transform:uppercase;
  letter-spacing:1px; margin-bottom:12px; display:flex; align-items:center; gap:8px;
}

/* CHECKLIST INTERACTIVE */
.checklist { list-style:none; display:flex; flex-direction:column; gap:12px; }
.checklist li {
  display:flex; align-items:flex-start; gap:12px; padding:12px 16px;
  background:rgba(39,174,96,0.06); border-radius:12px;
  cursor:pointer; transition:all 0.3s; border:1px solid transparent;
  user-select:none;
}
.checklist li:hover { border-color:var(--green); background:rgba(39,174,96,0.1); }
.checklist li.checked { opacity:0.5; }
.checklist li.checked .check-box { background:var(--green); border-color:var(--green); }
.checklist li.checked .check-box::after { content:'✓'; color:#fff; font-size:14px; }
.check-box {
  width:24px; height:24px; border:2px solid var(--green); border-radius:6px;
  flex-shrink:0; display:flex; align-items:center; justify-content:center;
  transition:all 0.3s; margin-top:2px;
}

/* PARAGRAPH & TEXT */
.chapter p { margin-bottom:16px; color:var(--text-primary); font-size:1rem; }
.chapter strong { color:var(--gold-light); }
.highlight { color:var(--gold); font-weight:600; }

/* QUOTE */
blockquote {
  border-left:3px solid var(--gold); padding:16px 20px; margin:20px 0;
  background:rgba(201,168,76,0.05); border-radius:0 12px 12px 0;
  font-style:italic; color:var(--gold-light);
}

/* PROGRESS COUNTER */
.progress-counter {
  position:fixed; bottom:24px; right:24px; z-index:90;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:50px; padding:10px 20px; display:flex; align-items:center; gap:10px;
  box-shadow:var(--shadow); font-size:0.85rem;
}
.progress-counter .pct { color:var(--gold); font-weight:700; }

/* TABLE OF CONTENTS */
.toc { list-style:none; display:flex; flex-direction:column; gap:8px; }
.toc li a {
  display:flex; align-items:center; gap:12px; padding:14px 18px;
  background:var(--bg-card); border-radius:12px; text-decoration:none;
  color:var(--text-primary); transition:all 0.3s; border:1px solid transparent;
}
.toc li a:hover { border-color:var(--gold); background:var(--bg-card-alt); transform:translateX(8px); }
.toc-num {
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  color:#0a0a12; width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:0.85rem; flex-shrink:0;
}

/* VALUE STACK TABLE */
.value-table { width:100%; border-collapse:collapse; margin:20px 0; }
.value-table th {
  text-align:left; padding:12px 16px; color:var(--gold);
  border-bottom:2px solid var(--gold); font-size:0.85rem; text-transform:uppercase;
}
.value-table td { padding:12px 16px; border-bottom:1px solid var(--border); }
.value-table tr:last-child td { border-bottom:none; font-weight:700; }
.value-table .price-old { text-decoration:line-through; color:var(--text-muted); }
.value-table .price-new { color:var(--green); font-weight:700; font-size:1.2rem; }

/* CTA */
.cta-section { text-align:center; padding:60px 24px; }
.cta-btn {
  display:inline-flex; align-items:center; gap:10px;
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  color:#0a0a12; padding:16px 40px; border-radius:50px;
  font-weight:700; font-size:1.1rem; text-decoration:none;
  transition:all 0.3s; border:none; cursor:pointer;
}
.cta-btn:hover { transform:scale(1.05); box-shadow:0 0 40px rgba(201,168,76,0.3); }

/* FOOTER */
.ebook-footer {
  text-align:center; padding:40px 24px; border-top:1px solid var(--border);
  color:var(--text-muted); font-size:0.85rem;
}
.ebook-footer .social-links { display:flex; justify-content:center; gap:16px; margin-top:16px; }
.ebook-footer .social-links a {
  color:var(--gold); text-decoration:none; padding:8px 16px;
  border:1px solid var(--border); border-radius:8px; transition:all 0.3s;
}
.ebook-footer .social-links a:hover { background:var(--gold); color:#0a0a12; }

/* ANIMATIONS */
@keyframes fadeIn { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation:fadeIn 0.6s ease forwards; }

/* RESPONSIVE */
@media(max-width:640px) {
  .chapter { padding:48px 16px; }
  .box { padding:18px; }
  .ebook-nav { padding:10px 14px; }
  .progress-counter { bottom:12px; right:12px; padding:8px 14px; font-size:0.75rem; }
}
