/* ============================================================
   Design System — Christophor S. Wilson
   ============================================================ */

:root {
  --void:         #09100A;
  --forest:       #101710;
  --forest-mid:   #0D1510;
  --forest-light: #1A2618;
  --bark:         #2B3B2C;
  --sage:         #7A8C7D;
  --mist:         #556057;
  --gold:         #C4892A;
  --gold-light:   #DBA94E;
  --gold-dim:     rgba(196, 137, 42, 0.12);
  --cream:        #EDE7D4;
  --parchment:    #CFC4A8;
  --white:        #F8F5EE;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Lato', system-ui, -apple-system, sans-serif;

  --section-py: clamp(80px, 12vw, 140px);
  --section-px: clamp(24px, 8vw, 120px);
  --max-w:      1200px;
}

/* ============================================================
   Base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { display: block; max-width: 100%; }

/* ============================================================
   Navigation
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 28px var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.5s ease, background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  padding: 18px var(--section-px);
  background: rgba(9, 16, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(196, 137, 42, 0.12);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold-light); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%,  rgba(196, 137, 42, 0.11) 0%, transparent 100%),
    radial-gradient(ellipse 120% 40% at 50% 105%, rgba(5, 10, 5, 0.97)    0%, transparent 100%),
    linear-gradient(180deg, #09100A 0%, #0C1510 45%, #09100A 100%);
}

/* Subtle grain */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-treeline {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  pointer-events: none;
  width: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 960px;
  padding: 80px 32px 0;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
}

.book-title-hero {
  font-family: var(--font-display);
  font-size: clamp(88px, 16vw, 200px);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 28px;
}

.book-title-hero .line-city {
  color: var(--gold-light);
  font-style: italic;
  display: block;
}

.hero-byline {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 400;
  font-style: italic;
  color: var(--sage);
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}

.hero-setting {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 52px;
}

.hero-setting .accent { color: var(--gold-light); }

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  background: var(--gold);
  color: var(--void);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border: 1px solid rgba(196, 137, 42, 0.38);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-ghost:hover {
  border-color: var(--gold-light);
  color: var(--cream);
  transform: translateY(-2px);
}

/* ============================================================
   Scroll Indicator
   ============================================================ */

.scroll-indicator {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--mist);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: bobDown 2.2s ease-in-out infinite;
  z-index: 2;
}

.scroll-indicator svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

@keyframes bobDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%       { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ============================================================
   Section Utilities
   ============================================================ */

.section {
  padding: var(--section-py) var(--section-px);
  position: relative;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-label::before,
.section-label::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ============================================================
   Book Section
   ============================================================ */

.book-section { background: var(--forest); }

.book-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
}

/* CSS Book Cover */
.book-cover-wrap { display: flex; justify-content: center; }

.book-cover {
  width: 264px;
  height: 396px;
  position: relative;
  background: linear-gradient(155deg, #0C1B0D 0%, #142115 55%, #091009 100%);
  box-shadow:
    8px 12px 40px rgba(0, 0, 0, 0.9),
    inset -3px 0 10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(196, 137, 42, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 36px 28px 30px;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(1deg);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.book-cover:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(0deg) translateY(-6px);
  box-shadow:
    14px 24px 60px rgba(0, 0, 0, 0.95),
    inset -3px 0 10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(196, 137, 42, 0.25),
    0 0 60px rgba(196, 137, 42, 0.06);
}

/* Atmospheric forest glow */
.book-cover::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(196, 137, 42, 0.13) 0%, transparent 70%);
  pointer-events: none;
}

/* Dark ground at cover bottom */
.book-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(5, 10, 5, 0.95) 0%, transparent 100%);
  pointer-events: none;
}

.cover-header {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(196, 137, 42, 0.22);
}

.cover-series-label {
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}

.cover-body {
  position: relative;
  z-index: 1;
  text-align: center;
}

.cover-mill {
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 300;
  line-height: 0.9;
  color: var(--cream);
  letter-spacing: -0.01em;
  text-shadow: 0 0 60px rgba(196, 137, 42, 0.25);
  display: block;
}

.cover-city {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 400;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(196, 137, 42, 0.4);
  display: block;
}

.cover-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.cover-author-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 137, 42, 0.22);
}

.cover-year-label {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--mist);
  text-transform: uppercase;
  margin-top: 7px;
}

/* Book Info */
.book-info h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 24px;
}

.book-synopsis {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--sage);
  margin-bottom: 32px;
}

.book-synopsis p + p { margin-top: 14px; }

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.book-tag {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(196, 137, 42, 0.28);
  padding: 6px 14px;
}

/* ============================================================
   Excerpt Section
   ============================================================ */

.excerpt-section {
  background: var(--void);
  text-align: center;
  overflow: hidden;
}

.excerpt-section::before {
  content: '';
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 360px;
  background: radial-gradient(ellipse, rgba(196, 137, 42, 0.055) 0%, transparent 70%);
  pointer-events: none;
}

.excerpt-inner { max-width: 820px; margin: 0 auto; }

.excerpt-chapter-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 10px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 52px;
}

.excerpt-chapter-label::before,
.excerpt-chapter-label::after {
  content: '';
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: rgba(196, 137, 42, 0.4);
}

.excerpt-opening-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 29px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.72;
  color: var(--cream);
  text-align: left;
  margin-bottom: 44px;
  position: relative;
  padding-left: 28px;
}

.excerpt-opening-quote::before {
  content: '\201C';
  position: absolute;
  left: -4px; top: -20px;
  font-size: 100px;
  line-height: 1;
  color: rgba(196, 137, 42, 0.18);
  font-family: var(--font-display);
  font-style: normal;
}

.excerpt-attr {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 44px;
}

/* ============================================================
   Author Section
   ============================================================ */

.author-section { background: var(--forest-mid); }

.author-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: start;
}

.author-photo-frame {
  position: relative;
}

/* Offset decorative border */
.author-photo-frame::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid rgba(196, 137, 42, 0.18);
  z-index: 0;
  pointer-events: none;
}

.author-photo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: contrast(1.06) brightness(0.93) saturate(0.9);
}

.author-name-heading {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 8px;
}

.author-role {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
}

.author-bio {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--sage);
}

.author-bio p + p { margin-top: 14px; }

.author-bio em { color: var(--cream); font-style: italic; }

/* ============================================================
   Newsletter Section
   ============================================================ */

.newsletter-section {
  background: var(--forest);
  text-align: center;
}

.newsletter-inner { max-width: 580px; margin: 0 auto; }

.newsletter-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 18px;
}

.newsletter-inner p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--sage);
  margin-bottom: 40px;
}

.newsletter-inner p em { color: var(--cream); font-style: italic; }

.email-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}

.email-input {
  flex: 1;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 137, 42, 0.25);
  border-right: none;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.email-input::placeholder { color: var(--mist); }
.email-input:focus { border-color: rgba(196, 137, 42, 0.55); }

.email-submit {
  padding: 15px 28px;
  background: var(--gold);
  color: var(--void);
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.email-submit:hover { background: var(--gold-light); }

.form-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--mist);
  letter-spacing: 0.04em;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--void);
  padding: 36px var(--section-px);
  border-top: 1px solid rgba(196, 137, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  color: var(--mist);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--gold-light); }

/* ============================================================
   Reveal Animations
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.22s; }
.reveal-d3 { transition-delay: 0.36s; }
.reveal-d4 { transition-delay: 0.5s; }

/* ============================================================
   Responsive
   ============================================================ */

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

  .book-cover-wrap {
    order: -1;
  }

  .author-grid {
    grid-template-columns: 1fr;
  }

  .author-photo-frame {
    max-width: 280px;
    margin: 0 auto;
  }

  .author-photo-frame::before {
    inset: 12px -12px -12px 12px;
  }
}

@media (max-width: 640px) {
  .site-nav { padding: 20px 24px; }
  .site-nav.scrolled { padding: 14px 24px; }
  .nav-links { display: none; }

  .hero-content { padding: 80px 20px 0; }

  .email-form {
    flex-direction: column;
  }

  .email-input {
    border-right: 1px solid rgba(196, 137, 42, 0.25);
    border-bottom: none;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
  }
}
