/* ── Google Fonts loaded via <link> in HTML ── */

/* ── Custom properties ── */
:root {
  --color-bg: #0d1b2a;
  --color-surface: #162033;
  --color-gold: #c9a84c;
  --color-text: #f0e6d3;
  --color-muted: #8a9bb0;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', system-ui, sans-serif;
  --nav-height: 64px;
  --transition-main: 600ms ease-out;
}

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

/* ── Base section ── */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 60px) 5vw 60px;
}
.section__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Scroll animation ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--transition-main), transform var(--transition-main);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 150ms; }
.animate-on-scroll.delay-2 { transition-delay: 300ms; }

/* ── Gold rule ── */
.gold-rule {
  width: 80px;
  height: 1px;
  background: var(--color-gold);
  margin: 20px 0;
}

/* ── Labels (PART I, etc.) ── */
.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* ── CTA button ── */
.cta-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
.cta-btn:hover {
  background: var(--color-gold);
  color: var(--color-bg);
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-bg);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 5vw;
  max-width: 1400px;
  margin: 0 auto;
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}
.nav__menu {
  display: flex;
  gap: 2rem;
}
.nav__menu .nav-link {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant: small-caps;
  color: var(--color-muted);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav__menu .nav-link:hover,
.nav__menu .nav-link.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-gold);
  transition: background 0.3s;
}

/* ── Mobile nav ── */
@media (max-width: 767px) {
  .nav__hamburger { display: flex; }
  .nav__menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: 1.5rem 5vw;
    gap: 1.25rem;
    border-top: 1px solid rgba(201,168,76,0.2);
  }
  .nav__menu.open { display: flex; }
  .nav__menu .nav-link { font-size: 0.85rem; }
}

/* ── Hero / Splash ── */
.section--hero {
  text-align: center;
  justify-content: center;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.05;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}
.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}
.hero__desc {
  max-width: 560px;
  margin: 1rem auto 0;
  color: var(--color-text);
  font-size: 0.95rem;
  opacity: 0.85;
}
.hero__title-block .gold-rule { margin: 20px auto; }

/* ── Book card grid ── */
.hero__books {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 680px;
}
.book-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 1.75rem;
  background: var(--color-surface);
  border: 1px solid rgba(201,168,76,0.15);
  transition: border-color 0.25s, transform 0.25s;
}
.book-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-3px);
}
.book-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-text);
}

/* ── Chevron bounce ── */
.hero__chevron {
  font-size: 2rem;
  color: var(--color-gold);
  opacity: 0.6;
  animation: bounce 1.8s ease-in-out infinite;
  display: block;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ── Book sections (shared) ── */
.section--book { background: var(--color-bg); }
.section--book:nth-child(even) { background: var(--color-surface); }

.book-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.book-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.1;
  margin-top: 0.5rem;
}
.book-desc {
  font-size: 0.95rem;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chapter-list li {
  font-size: 0.9rem;
  color: var(--color-text);
  padding-left: 1.25rem;
  position: relative;
}
.chapter-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-size: 1.2rem;
  line-height: 1.4;
}

/* ── Book cover frame ── */
.book-cover-frame {
  display: inline-block;
  border: 1px solid rgba(201,168,76,0.4);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  max-width: 360px;
  margin: 0 auto;
}
.book-cover-frame img {
  width: 100%;
  display: block;
}

/* ── Responsive book sections ── */
@media (max-width: 1023px) {
  .book-cols { gap: 2.5rem; }
}
@media (max-width: 767px) {
  .book-cols {
    grid-template-columns: 1fr;
  }
  .book-col--visual { order: -1; }
  .book-cover-frame { max-width: 280px; }
}

/* ── Typographic panel (Books II–IV) ── */
.typo-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
}
.typo-panel__bg {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 700;
  color: rgba(201,168,76,0.07);
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.typo-panel__themes {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.typo-panel__themes span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text);
  opacity: 0.75;
  font-style: italic;
}
.typo-panel__dot {
  color: var(--color-gold) !important;
  opacity: 1 !important;
  font-style: normal !important;
}

/* ── Author section ── */
.section--author { background: var(--color-surface); }
.author-cols {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}
.author-photo-frame {
  border: 1px solid rgba(201,168,76,0.4);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
}
.author-photo-frame img {
  width: 100%;
  display: block;
}
.author-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-gold);
  margin-top: 0.5rem;
  line-height: 1.1;
}
.author-bio {
  font-size: 0.95rem;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 1.75rem;
}
.author-bio em { color: var(--color-gold); font-style: normal; }
.author-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.author-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-gold);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.author-email:hover { opacity: 0.75; }
.email-icon {
  width: 18px;
  height: 18px;
  color: var(--color-gold);
  flex-shrink: 0;
}
.author-cta-note {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
}

/* ── Responsive author ── */
@media (max-width: 767px) {
  .author-cols {
    grid-template-columns: 1fr;
  }
  .author-photo-frame { max-width: 280px; }
}

/* ── Footer ── */
footer {
  display: block;
  text-align: center;
  padding: 2rem 5vw;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  background: var(--color-bg);
  border-top: 1px solid rgba(201,168,76,0.1);
}
footer a {
  color: var(--color-gold);
  text-decoration: none;
}
footer a:hover {
  opacity: 0.75;
}

/* ── Tablet adjustments ── */
@media (max-width: 1023px) {
  .hero__title { font-size: clamp(2.5rem, 7vw, 4.5rem); }
  .book-title  { font-size: clamp(2rem, 5vw, 3rem); }
}

/* ── Small mobile adjustments ── */
@media (max-width: 480px) {
  .hero__books { grid-template-columns: 1fr; max-width: 320px; }
  .book-card   { padding: 1.25rem; }
  .typo-panel  { min-height: 200px; }
}
