/* ═══════════════════════════════════════════════════════════
   The Dead Raven — reubenoliverauthor.com
   Restored original design language: Poe-inspired, mysterious
   & minimal. Parchment on ink, rust accent, aged typography.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Cinzel:wght@400;600;700&display=swap');

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

:root {
  --ink:        #0a0806;
  --parchment:  #f0ebe0;
  --aged:       #c9b99a;
  --rust:       #8b3a2a;
  --rust-light: #a04432;
  --ghost:      rgba(240,235,224,0.06);
  --dim:        rgba(240,235,224,0.40);
  --mid:        rgba(240,235,224,0.65);
  --rule:       rgba(240,235,224,0.12);
  --purple:     #2A1550;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--ink);
  color: var(--parchment);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.1rem;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Grain & vignette ─────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  pointer-events: none;
  z-index: 2;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 1;
}
.page, nav, footer { position: relative; z-index: 3; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rust-light);
  outline-offset: 3px;
}

/* ── Nav ──────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 3rem;
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-brand { display: flex; flex-direction: column; gap: 1px; }

.nav-name {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--aged);
  text-transform: uppercase;
  text-decoration: none;
}

.nav-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--dim);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--parchment); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--aged);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary, .btn-ghost {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  transition: all 0.3s;
}

.btn-primary {
  color: var(--parchment);
  background: var(--rust);
  border: 1px solid var(--rust);
}
.btn-primary:hover { background: var(--rust-light); border-color: var(--rust-light); }

.btn-ghost {
  color: var(--aged);
  background: transparent;
  border: 1px solid rgba(201,185,154,0.35);
}
.btn-ghost:hover { border-color: var(--aged); color: var(--parchment); }

/* ── Ornament divider ─────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.ornament-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--aged));
}
.ornament-line.r {
  background: linear-gradient(90deg, var(--aged), transparent);
}
.ornament-diamond {
  width: 5px; height: 5px;
  background: var(--rust);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.ornament-text {
  font-family: 'Cinzel', serif;
  font-size: 0.63rem;
  letter-spacing: 0.42em;
  color: var(--aged);
  text-transform: uppercase;
}

.section-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.38em;
  color: var(--rust-light);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem;
  position: relative;
}

.cathedral-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  width: min(680px, 92vw); opacity: 0.055;
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: 0.055; transform: translate(-50%,-52%) scale(1); }
  50%      { opacity: 0.08;  transform: translate(-50%,-52%) scale(1.015); }
}

.hero-title {
  font-family: 'IM Fell English', serif;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.9; color: var(--parchment);
  font-weight: 400;
  margin-bottom: 0.12em;
  animation: fadeUp 1.4s ease both 0.4s;
  text-shadow: 0 0 100px rgba(139,58,42,0.25);
}
.hero-title .the {
  font-size: 0.42em; font-style: italic; display: block;
  color: var(--aged); letter-spacing: 0.22em; margin-bottom: 0.18em;
}

.hero-author {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.6rem, 1.4vw, 0.8rem);
  letter-spacing: 0.55em; color: var(--dim); text-transform: uppercase;
  margin-top: 1.1rem;
  animation: fadeUp 1.4s ease both 0.6s;
}

.hero-tagline {
  font-family: 'IM Fell English', serif; font-style: italic;
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  color: var(--aged); margin-top: 2.2rem; letter-spacing: 0.04em;
  animation: fadeUp 1.4s ease both 0.8s;
}
.hero-tagline::before, .hero-tagline::after { content: '—'; margin: 0 0.55em; opacity: 0.45; }

.hero-signup {
  width: 100%;
  max-width: 460px;
  margin-top: 2.8rem;
  animation: fadeUp 1.4s ease both 1s;
}
.signup-line {
  font-style: italic;
  font-size: 1rem;
  color: var(--mid);
  margin-bottom: 1.4rem;
}
.kit-wrap { max-width: 440px; margin: 0 auto; }
.signup-note {
  margin-top: 1.3rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--dim);
}

.scroll-cue {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  opacity: 0; animation: fadeUp 2s ease both 1.5s, pulse 3s ease-in-out 2.5s infinite;
}
.scroll-cue span {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--aged);
}
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, var(--aged), transparent); }
@keyframes pulse {
  0%,100% { opacity: 0.38; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 0.65; transform: translateX(-50%) translateY(4px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Book section ─────────────────────────────── */
.book-section {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 6.5rem 2rem;
  border-top: 1px solid var(--rule);
}

.book-cover {
  width: 100%; max-width: 240px; display: block;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border: 1px solid var(--rule);
}

.book-cover-placeholder {
  width: 100%; max-width: 240px;
  aspect-ratio: 2 / 3;
  background: var(--ghost);
  border: 1px solid rgba(201,185,154,0.25);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; gap: 1.4rem; padding: 1.5rem;
}
.ph-title {
  font-family: 'IM Fell English', serif;
  font-size: 1.7rem; line-height: 1.15; color: var(--parchment);
}
.ph-title em { display: block; font-size: 0.55em; color: var(--aged); letter-spacing: 0.2em; }
.ph-note {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--rust-light);
}

.book-title-display {
  font-family: 'IM Fell English', serif;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 1.8rem;
}
.book-title-display em { font-size: 0.5em; display: block; color: var(--aged); letter-spacing: 0.18em; margin-bottom: 0.2em; }

.book-desc { margin-bottom: 1.3rem; color: var(--mid); }
.book-desc:first-of-type { color: var(--parchment); }

.genre-tags { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 2rem 0 2.4rem; }
.genre-tags span {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--aged);
  border: 1px solid rgba(201,185,154,0.25);
  padding: 0.5rem 1rem;
}

/* ── About ────────────────────────────────────── */
.about-section {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 6.5rem 2rem;
}

.author-photo {
  width: 100%; max-width: 250px; display: block;
  filter: grayscale(100%) contrast(1.05);
  border: 1px solid var(--rule);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.about-heading {
  font-family: 'IM Fell English', serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 1.6rem;
}

.about-text-col p { margin-bottom: 1.3rem; color: var(--mid); }
.about-contact { font-size: 0.95rem; font-style: italic; }
.about-contact a { color: var(--aged); text-decoration: none; border-bottom: 1px solid rgba(201,185,154,0.35); transition: color 0.3s, border-color 0.3s; }
.about-contact a:hover { color: var(--parchment); border-color: var(--aged); }

/* ── Footer ───────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.4rem 3rem;
  border-top: 1px solid var(--rule);
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem; font-style: italic; color: var(--dim);
}

.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a {
  font-family: 'Cinzel', serif; font-size: 0.55rem;
  letter-spacing: 0.28em; color: var(--aged);
  text-decoration: none; text-transform: uppercase;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--parchment); }

/* ── Scroll fade-in ───────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Reduced motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cathedral-bg, .scroll-cue { animation: none; }
  .scroll-cue { opacity: 0.5; }
  .hero-title, .hero-author, .hero-tagline, .hero-signup, .hero .ornament { animation: none !important; opacity: 1; transform: none; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ── Mobile ───────────────────────────────────── */
@media (max-width: 700px) {
  nav { padding: 1.2rem 1.5rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 1.1rem 1.5rem; }

  .nav-toggle { display: flex; }

  .book-section, .about-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4.5rem 1.5rem;
  }
  .book-cover, .book-cover-placeholder { margin: 0 auto; }
  .book-cover-col, .about-photo-col { display: flex; justify-content: center; }
  .author-photo { margin: 0 auto; }

  footer { flex-direction: column; gap: 1.2rem; text-align: center; padding: 2rem 1.5rem; }
}
