:root {
  --primary: #111827; 
  --secondary: #374151; 
  --bg: #F9FAFB; 
  --surface: #FFFFFF;
  --accent: #DC2626; 
  --highlight: #F3F4F6;
  --text-dark: #1F2937;
  --border: #E5E7EB;
  
  --font-heading: 'Georgia', serif;
  --font-body: 'Helvetica Neue', Arial, sans-serif;
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

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

body {
  background-color: var(--bg);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}
p { margin-bottom: var(--spacing-sm); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }

/* Typo */
.text-huge { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.1; }
.text-xl { font-size: clamp(2rem, 4vw, 3rem); }
.text-lg { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.text-md { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.text-sm { font-size: 0.9rem; }
.text-center { text-align: center; }
.desc-text { color: var(--secondary); margin-bottom: var(--spacing-md); }
.color-accent { color: var(--accent); }

/* Utility */
.max-w-800 { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-auto { margin-top: auto; }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-md { margin-bottom: var(--spacing-md); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.bg-highlight { background-color: var(--highlight); }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: var(--spacing-lg) 0; }
.section-header { text-align: center; margin-bottom: var(--spacing-lg); max-width: 700px; margin-left: auto; margin-right: auto; }

/* Grids */
.grid { display: grid; gap: var(--spacing-md); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-1 { grid-template-columns: 1fr; }

/* Buttons & Labels */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background-color: var(--primary); color: var(--surface);
  padding: 0.75rem 1.5rem; font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--primary); cursor: pointer; transition: all 0.2s;
}
.btn:hover { background-color: var(--accent); border-color: var(--accent); color: var(--surface); }
.btn-outline { background-color: transparent; color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: var(--surface); }
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-full { width: 100%; }
.text-link { font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; }

.label {
  display: inline-block; background-color: var(--highlight); color: var(--secondary);
  padding: 0.25rem 0.6rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: var(--spacing-sm); border-radius: 2px;
}
.label.accent { background-color: var(--accent); color: var(--surface); }

/* Header */
.site-header {
  background-color: var(--surface); border-bottom: 1px solid var(--border);
  padding: var(--spacing-sm) 0; position: relative; z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand-logo { font-family: var(--font-heading); font-size: 1.6rem; font-weight: bold; color: var(--primary); letter-spacing: -0.02em; }
.brand-logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); }
.nav-links a:hover { color: var(--accent); }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* Hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); }

/* Cards */
.book-card {
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; transition: box-shadow 0.3s;
}
.book-card:hover { box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05); }
.book-image { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--highlight); border-bottom: 1px solid var(--border); }
.card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.author { color: var(--secondary); font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; }
.card-meta { background: var(--bg); padding: 1rem; border-left: 3px solid var(--accent); font-size: 0.85rem; margin-bottom: 1.5rem; }
.card-meta p { margin-bottom: 0.5rem; }
.card-meta p:last-child { margin-bottom: 0; }

/* Discovery Cards */
.discovery-card { background: var(--surface); border: 1px solid var(--border); padding: 2rem; position: relative; }
.disc-number { font-family: var(--font-heading); font-size: 2.5rem; color: var(--highlight); position: absolute; top: 1rem; right: 1rem; font-weight: bold; line-height: 1; }
.discovery-card h3 { position: relative; z-index: 2; }
.discovery-card p { position: relative; z-index: 2; font-size: 0.95rem; color: var(--secondary); }

/* Featured Layout */
.featured-layout { display: grid; grid-template-columns: 2fr 1fr; gap: var(--spacing-md); }
.featured-main .book-image { aspect-ratio: 16/9; }
.featured-side { display: flex; flex-direction: column; gap: var(--spacing-md); }
.mini-card .book-image-mini { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--border); }

/* Filters */
.filter-group { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--secondary);
  padding: 0.5rem 1rem; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: var(--surface); border-color: var(--primary); }

/* Reading Notes */
.reading-note {
  display: flex; gap: var(--spacing-md); background: var(--surface);
  border: 1px solid var(--border); padding: var(--spacing-md);
}
.note-number { font-family: var(--font-heading); font-size: 3.5rem; color: var(--accent); line-height: 1; font-weight: bold; }
.note-body { flex: 1; }
.note-meta { font-size: 0.9rem; color: var(--secondary); border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1rem; }
.note-audience { border-left: 3px solid var(--accent); }

/* Methodology */
.methodology-card { background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; }

/* Forms */
.contact-form { max-width: 600px; margin: 0 auto; background: var(--surface); padding: 2rem; border: 1px solid var(--border); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: bold; margin-bottom: 0.5rem; font-size: 0.9rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border); background: var(--bg);
  font-family: var(--font-body); font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-success { background: var(--highlight); padding: 2rem; border-left: 4px solid var(--accent); }

/* Legal Pages */
.legal-content { max-width: 800px; margin: 0 auto; background: var(--surface); padding: 2rem; border: 1px solid var(--border); }
.legal-content h2 { margin-top: 2rem; font-size: 1.4rem; }
.legal-content ul { margin-left: 1.5rem; margin-bottom: 1rem; }
.legal-content li { margin-bottom: 0.5rem; }

/* Footer */
.site-footer { background: var(--primary); color: var(--surface); padding: var(--spacing-lg) 0 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-lg); border-bottom: 1px solid var(--secondary); padding-bottom: 2rem; margin-bottom: 2rem; }
.footer-brand { font-family: var(--font-heading); font-size: 1.8rem; font-weight: bold; color: var(--surface); margin-bottom: 0.2rem; display: inline-block; }
.footer-tagline { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em; margin-bottom: 1rem; }
.footer-text, .footer-address { color: #9CA3AF; font-size: 0.9rem; max-width: 400px; }
.footer-address { font-style: normal; margin-top: 1rem; }
.footer-links-group { display: flex; gap: 4rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links strong { color: var(--surface); font-size: 0.9rem; margin-bottom: 0.5rem; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links a { color: #9CA3AF; font-size: 0.9rem; }
.footer-links a:hover { color: var(--surface); }
.footer-disclaimer p { color: #6B7280; font-size: 0.75rem; margin-bottom: 0.5rem; text-align: center; }
.cookie-settings-btn { background: none; border: none; color: #9CA3AF; text-decoration: underline; cursor: pointer; font-size: 0.9rem; font-family: var(--font-body); text-align: left; padding: 0; }
.cookie-settings-btn:hover { color: var(--surface); }

/* Cookie System */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--surface); border-top: 4px solid var(--accent); padding: 1.5rem; z-index: 9999; display: none; box-shadow: 0 -4px 6px -1px rgba(0,0,0,0.1); }
.cookie-banner-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; max-width: 1200px; margin: 0 auto; }
.cookie-banner-text p { margin: 0; font-size: 0.95rem; }
.cookie-banner-actions { display: flex; gap: 0.5rem; }

.cookie-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17,24,39,0.8); z-index: 10000; display: none; justify-content: center; align-items: center; }
.cookie-modal { background: var(--surface); padding: 2rem; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; border-top: 4px solid var(--accent); }
.cookie-option { border-bottom: 1px solid var(--border); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; }
.cookie-option-text h4 { margin-bottom: 0.2rem; font-size: 1rem; color: var(--primary); font-family: var(--font-body); }
.cookie-option-text p { font-size: 0.85rem; margin: 0; color: var(--secondary); }
.cookie-modal-actions { margin-top: 1.5rem; display: flex; justify-content: flex-end; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border); transition: .3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--surface); transition: .3s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); }
input:disabled + .slider { background-color: var(--secondary); cursor: not-allowed; }

/* Responsive */
@media (max-width: 900px) {
  .featured-layout { grid-template-columns: 1fr; }
  .reading-note { flex-direction: column; gap: 1rem; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0;
    width: 100%; background: var(--surface); padding: 1.5rem; border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  }
  .nav-links.active { display: flex; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links-group { flex-direction: column; gap: 2rem; }
  .cookie-banner-inner { flex-direction: column; text-align: center; }
  .cookie-banner-actions { flex-direction: column; width: 100%; }
  .cookie-banner-actions .btn { width: 100%; }
}