/* ═══════════════════════════════════════════════════════
   O CÓDIGO DA CLAREZA — Premium Ebook Styles
   LinguagemMestra | Design System
   ═══════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── CSS Variables / Design Tokens ─── */
:root {
  --navy-900: #0a0f1e;
  --navy-800: #0f1629;
  --navy-700: #141d36;
  --navy-600: #1a2544;
  --navy-500: #1f2d52;
  --gold-500: #c9a227;
  --gold-400: #d4b13a;
  --gold-300: #e0c255;
  --gold-200: #ebd8a0;
  --gold-100: #f5ecd0;
  --cream: #fdfaf2;
  --cream-dark: #f7f0e0;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-light: #e8e8f0;
  --text-muted: #8888aa;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 4px 20px rgba(10, 15, 30, 0.08);
  --shadow-medium: 0 8px 32px rgba(10, 15, 30, 0.12);
  --shadow-strong: 0 16px 48px rgba(10, 15, 30, 0.2);
  --shadow-glow: 0 0 40px rgba(201, 162, 39, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

img {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Scrollbar Styling ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--navy-800);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-500);
  border-radius: 3px;
}

/* ─── Navigation Sidebar ─── */
.nav-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.3);
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-toggle:hover {
  background: rgba(201, 162, 39, 0.15);
  border-color: var(--gold-500);
  transform: scale(1.05);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-400);
  position: relative;
  transition: var(--transition-fast);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--gold-400);
  transition: var(--transition-fast);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle.active span {
  background: transparent;
}
.nav-toggle.active span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle.active span::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: rgba(10, 15, 30, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-right: 1px solid rgba(201, 162, 39, 0.15);
  z-index: 999;
  padding: 100px 30px 40px;
  transition: var(--transition-smooth);
  overflow-y: auto;
}

.nav-sidebar.open {
  left: 0;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.nav-brand {
  font-family: var(--font-display);
  color: var(--gold-400);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.nav-list {
  list-style: none;
}

.nav-list li {
  margin-bottom: 4px;
}

.nav-list a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 400;
  transition: var(--transition-fast);
  position: relative;
}

.nav-list a:hover {
  color: var(--gold-300);
  background: rgba(201, 162, 39, 0.08);
  padding-left: 24px;
}

.nav-list a .nav-num {
  color: var(--gold-500);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-right: 10px;
  opacity: 0.7;
}

/* ─── Progress Bar ─── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-500));
  z-index: 1001;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.5);
}

/* ═══════════════════════════════════════════════════════
   COVER PAGE
   ═══════════════════════════════════════════════════════ */
.cover-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  position: relative;
  overflow: hidden;
}

.cover-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201, 162, 39, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(20, 29, 54, 0.8) 0%, transparent 70%);
  pointer-events: none;
}

.cover-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--gold-400);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 6s infinite ease-in-out;
}

.particle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 25%; left: 85%; animation-delay: 1s; }
.particle:nth-child(3) { top: 65%; left: 15%; animation-delay: 2s; }
.particle:nth-child(4) { top: 75%; left: 90%; animation-delay: 0.5s; }
.particle:nth-child(5) { top: 45%; left: 50%; animation-delay: 3s; width: 4px; height: 4px; }
.particle:nth-child(6) { top: 85%; left: 40%; animation-delay: 1.5s; }
.particle:nth-child(7) { top: 10%; left: 60%; animation-delay: 4s; }
.particle:nth-child(8) { top: 55%; left: 75%; animation-delay: 2.5s; }

@keyframes floatParticle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 0.6; transform: translateY(-30px) scale(1); }
}

.cover-content {
  text-align: center;
  padding: 40px 24px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.2s ease-out;
}

.cover-brand {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-400);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 48px;
  opacity: 0.9;
}

.cover-image-wrapper {
  margin: 0 auto 48px;
  max-width: 300px;
  position: relative;
}

.cover-image-wrapper img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(201, 162, 39, 0.1);
  transition: var(--transition-smooth);
}

.cover-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-lg) + 3px);
  background: linear-gradient(135deg, var(--gold-500), transparent 40%, transparent 60%, var(--gold-300));
  z-index: -1;
  opacity: 0.4;
}

.cover-title-line {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
}

.cover-title-white {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--white);
  display: block;
}

.cover-title-gold {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--gold-400);
  display: block;
  margin-bottom: 24px;
}

.cover-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 48px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.cover-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  border: none;
  margin: 0 auto 32px;
}

.cover-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-200);
  font-weight: 400;
  opacity: 0.85;
}

.cover-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounceDown 2s infinite;
}

.cover-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--gold-500), transparent);
  margin: 12px auto 0;
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════════════
   CHAPTER PAGES
   ═══════════════════════════════════════════════════════ */
.chapter-section {
  background: var(--white);
  position: relative;
}

.chapter-section:nth-child(odd) {
  background: var(--cream);
}

/* ─── Chapter Header ─── */
.chapter-hero {
  background: var(--navy-800);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.chapter-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(201, 162, 39, 0.03) 0%, transparent 50%),
    linear-gradient(315deg, rgba(201, 162, 39, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.chapter-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-500));
}

.chapter-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-400);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.chapter-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.chapter-hero-image {
  max-width: 100%;
  width: 360px;
  margin: 40px auto 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  position: relative;
  z-index: 1;
}

/* ─── Chapter Body ─── */
.chapter-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.chapter-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: left;
}

.chapter-body p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.chapter-body p em {
  color: var(--navy-600);
}

.chapter-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.5vw, 1.65rem);
  font-weight: 700;
  color: var(--navy-700);
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-200);
  position: relative;
}

.chapter-body h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gold-500);
}

.chapter-body ul, .chapter-body ol {
  margin: 20px 0 20px 24px;
  padding: 0;
}

.chapter-body li {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-left: 4px;
}

.chapter-body li strong {
  color: var(--navy-700);
}

/* ─── Technique Box ─── */
.technique-box {
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  border-left: 5px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 28px 28px 24px;
  margin: 32px 0;
  position: relative;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.technique-box:hover {
  box-shadow: var(--shadow-medium), var(--shadow-glow);
  transform: translateY(-2px);
}

.technique-box::before {
  content: '✦';
  position: absolute;
  top: -14px;
  left: 20px;
  width: 28px;
  height: 28px;
  background: var(--gold-500);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.technique-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.technique-box p {
  font-size: 0.98rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 8px !important;
  line-height: 1.7 !important;
}

.technique-box p:last-child {
  margin-bottom: 0 !important;
}

/* ─── Insight do Mestre ─── */
.insight-box {
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  border-left: 5px solid var(--gold-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 28px 28px 24px;
  margin: 32px 0;
  position: relative;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.insight-box:hover {
  box-shadow: var(--shadow-medium), var(--shadow-glow);
  transform: translateY(-2px);
}

.insight-box::before {
  content: '💡';
  position: absolute;
  top: -14px;
  left: 20px;
  width: 32px;
  height: 32px;
  background: var(--gold-500);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

.insight-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.insight-box p {
  font-size: 0.98rem !important;
  color: var(--text-secondary) !important;
  margin-bottom: 8px !important;
  line-height: 1.7 !important;
}

.insight-box p:last-child {
  margin-bottom: 0 !important;
}

/* ─── Challenge Box ─── */
.challenge-box {
  background: var(--navy-800);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.challenge-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300), var(--gold-500));
}

.challenge-box::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.06), transparent 60%);
  pointer-events: none;
}

.challenge-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.challenge-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.challenge-subtitle {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 20px;
}

.challenge-box p {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.95rem !important;
  margin-bottom: 8px !important;
  line-height: 1.7 !important;
}

/* ─── Pull Quote ─── */
.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-style: italic;
  font-weight: 600;
  color: var(--gold-500);
  text-align: center;
  line-height: 1.5;
  margin: 40px 0;
  padding: 32px 24px;
  position: relative;
}

.pull-quote::before,
.pull-quote::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  margin: 0 auto;
}

.pull-quote::before { margin-bottom: 24px; }
.pull-quote::after { margin-top: 24px; }

.pull-quote span {
  display: block;
}

/* ─── Quote Block ─── */
.quote-block {
  background: linear-gradient(135deg, var(--cream), var(--cream-dark));
  border-left: 5px solid var(--navy-700);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 28px 32px;
  margin: 36px 0;
}

.quote-block .quote-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  color: var(--navy-700);
  line-height: 1.5;
  margin-bottom: 12px;
}

.quote-block .quote-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 400;
}

/* ─── Data Table ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}

.data-table thead th {
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.data-table thead th:first-child {
  background: var(--navy-800);
  color: var(--white);
}

.data-table thead th:last-child {
  background: var(--gold-500);
  color: var(--white);
}

.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}

.data-table tbody tr:hover td {
  background: rgba(201, 162, 39, 0.05);
}

/* ─── Chapter Divider ─── */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-200), transparent);
  margin: 40px 0;
}

/* ─── Mensagem do Autor ─── */
.author-message {
  padding: 60px 24px;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.author-signature {
  margin-top: 40px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy-700);
  font-weight: 600;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-signature::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--gold-500);
  display: block;
}

/* ─── Sumário ─── */
.toc-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-medium);
  margin: 40px 0;
  border-top: 4px solid var(--gold-500);
}

.toc-title {
  font-family: var(--font-display);
  color: var(--navy-800);
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

.toc-module {
  margin-bottom: 24px;
}

.toc-module-title {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--navy-600);
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.toc-list a:hover {
  color: var(--gold-500);
  padding-left: 4px;
}

.toc-list a::after {
  content: '';
  flex-grow: 1;
  border-bottom: 1px dotted rgba(0,0,0,0.1);
  margin: 0 12px;
}

.toc-num {
  font-family: var(--font-mono);
  color: var(--gold-400);
  font-size: 0.85rem;
  margin-right: 8px;
}

/* ═══════════════════════════════════════════════════════
   CONCLUSION / FOOTER
   ═══════════════════════════════════════════════════════ */
.footer-section {
  background: var(--navy-900);
  padding: 60px 24px;
  text-align: center;
  position: relative;
}

.footer-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-400);
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ═══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .cover-image-wrapper {
    max-width: 360px;
  }

  .chapter-body {
    padding: 72px 40px 96px;
  }

  .technique-box {
    padding: 36px 36px 32px;
  }

  .challenge-box {
    padding: 40px 36px;
  }

  .chapter-hero {
    padding: 100px 40px 80px;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .cover-content {
    padding: 32px 20px;
  }

  .cover-brand {
    font-size: 0.65rem;
    margin-bottom: 36px;
  }

  .cover-image-wrapper {
    max-width: 240px;
    margin-bottom: 36px;
  }

  .cover-subtitle {
    font-size: 0.9rem;
    margin-bottom: 36px;
  }

  .chapter-hero {
    padding: 72px 16px 48px;
  }

  .chapter-hero-image {
    width: 280px;
    margin-top: 32px;
  }

  .chapter-body {
    padding: 40px 16px 56px;
  }

  .chapter-body p {
    font-size: 1rem;
  }

  .technique-box {
    padding: 24px 16px 20px;
    margin: 28px 0;
  }

  .challenge-box {
    padding: 28px 16px;
    margin: 32px 0;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table thead th,
  .data-table tbody td {
    padding: 10px 14px;
  }

  .nav-sidebar {
    width: 260px;
  }

  .pull-quote {
    font-size: 1.05rem;
    padding: 24px 16px;
  }
}

/* ─── Print Optimization ─── */
@media print {
  .nav-toggle,
  .nav-sidebar,
  .nav-overlay,
  .progress-bar,
  .cover-scroll-hint,
  .cover-particles {
    display: none !important;
  }

  .chapter-section {
    page-break-before: always;
  }

  .challenge-box,
  .technique-box {
    break-inside: avoid;
  }

  body {
    background: white;
    color: black;
  }
}

