/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0d0e;
  --bg-card:   #141416;
  --bg-card2:  #1a1a1d;
  --red:       #c0392b;
  --red-light: #e74c3c;
  --gold:      #c9a84c;
  --text:      #e8e6e1;
  --text-muted:#9a9799;
  --border:    rgba(255,255,255,0.08);
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 8px 40px rgba(0,0,0,0.6);
  --font-serif:'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.section-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 60px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-primary:hover { background: var(--red-light); border-color: var(--red-light); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.04); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s;
}
.navbar.scrolled {
  background: rgba(13,13,14,0.95);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700;
  color: var(--text);
}
.nav-links {
  display: flex; gap: 36px;
}
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 120px 24px 80px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(192,57,43,0.12) 0%, transparent 70%);
}
.hero-bg-text {
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: clamp(80px, 18vw, 260px);
  font-weight: 900;
  color: rgba(255,255,255,0.025);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  letter-spacing: -4px;
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; max-width: 800px;
}
.hero-tag {
  font-size: 13px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(60px, 13vw, 150px);
  font-weight: 900; line-height: 0.9;
  margin-bottom: 28px;
  letter-spacing: -2px;
}
.hero-title span { color: var(--red); }
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  max-width: 540px; margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  font-size: 22px; color: var(--text-muted);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ===== ABOUT ===== */
.about { background: var(--bg-card); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.about-text p {
  color: var(--text-muted); margin-bottom: 18px; font-size: 16px;
}
.about-text em { color: var(--text); font-style: italic; }
.about-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.badge {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px; color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}
.about-quote-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}
.about-quote-card blockquote {
  font-family: var(--font-serif);
  font-size: 24px; line-height: 1.4;
  color: var(--text); margin-bottom: 12px;
}
.about-quote-card cite {
  font-size: 13px; color: var(--text-muted); font-style: normal;
}
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stat {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 700; color: var(--red);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ===== BOOKS ===== */
.books { background: var(--bg); }
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(192,57,43,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(192,57,43,0.2);
}
.book-cover-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-card2);
}
.book-cover-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.book-card:hover .book-cover-wrap img { transform: scale(1.04); }
.book-year-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(13,13,14,0.85);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600; color: var(--gold);
  backdrop-filter: blur(6px);
}
.book-publisher-tag {
  position: absolute; top: 12px; right: 12px;
  background: rgba(192,57,43,0.85);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px; font-weight: 700; color: #fff;
  backdrop-filter: blur(6px);
}
.book-info {
  padding: 20px;
}
.book-genre {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--red); margin-bottom: 8px;
}
.book-title {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 8px; line-height: 1.2;
}
.book-tagline {
  font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.book-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.book-price {
  font-size: 18px; font-weight: 700; color: var(--text);
}
.book-cta {
  font-size: 13px; font-weight: 600; color: var(--red);
  padding: 6px 14px;
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: 6px;
  transition: all 0.2s;
}
.book-card:hover .book-cta {
  background: var(--red); color: #fff; border-color: var(--red);
}

/* ===== PRESS ===== */
.press { background: var(--bg-card); }
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.press-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}
.press-card:hover { border-color: rgba(201,168,76,0.3); }
.press-quote {
  font-family: var(--font-serif);
  font-size: 16px; line-height: 1.6;
  color: var(--text); margin-bottom: 16px;
  font-style: italic;
}
.press-source {
  font-size: 12px; color: var(--gold);
  font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}

/* ===== CONTACT ===== */
.contact { background: var(--bg); }
.contact-inner {
  max-width: 640px;
}
.contact p {
  color: var(--text-muted); font-size: 17px; margin-bottom: 28px;
}
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.contact-note { font-size: 14px !important; color: var(--text-muted); font-style: italic; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-logo {
  display: block;
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 700;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 14px; color: var(--text-muted); max-width: 280px; }
.footer-links h4 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted); margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 860px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-box--small { max-width: 460px; text-align: center; padding: 48px 40px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* Book detail modal content */
.modal-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
}
.modal-cover-col {
  position: sticky; top: 0;
  background: var(--bg-card2);
  padding: 40px 32px;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px;
  border-right: 1px solid var(--border);
}
.modal-cover-col img {
  width: 100%; max-width: 200px;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.modal-price-big {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 700;
  color: var(--text);
}
.modal-text-col {
  padding: 40px;
}
.modal-genre {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px;
  color: var(--red); margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 800;
  line-height: 1.1; margin-bottom: 8px;
}
.modal-subtitle {
  font-size: 16px; color: var(--text-muted);
  margin-bottom: 28px; font-style: italic;
}
.modal-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px;
}
.meta-tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px; color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}
.modal-desc {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 28px;
}
.modal-isbn {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 28px; font-family: monospace;
}
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Redirect modal */
.redirect-icon { font-size: 48px; margin-bottom: 16px; }
.modal-box--small h3 {
  font-family: var(--font-serif);
  font-size: 24px; margin-bottom: 16px;
}
.modal-box--small p {
  color: var(--text-muted); margin-bottom: 32px; font-size: 15px; line-height: 1.6;
}
.redirect-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .modal-detail { grid-template-columns: 1fr; }
  .modal-cover-col { position: relative; flex-direction: row; justify-content: flex-start; padding: 24px 28px; border-right: none; border-bottom: 1px solid var(--border); gap: 24px; }
  .modal-cover-col img { max-width: 100px; }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .hero-title { font-size: 72px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(13,13,14,0.97); padding: 20px 24px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .books-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .press-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .modal-box--small { padding: 32px 24px; }
  .modal-text-col { padding: 24px; }
}

@media (max-width: 400px) {
  .books-grid { grid-template-columns: 1fr; }
}

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
