/* =========================================================
   Remembering Elysha — Variation A: "The Letter"
   Aesthetic: ivory paper, deep ink, gold leaf accent.
   The page as an open letter — quiet, intimate, read-not-shouted.
   Type: Fraunces (display) + Newsreader (text) + Fraunces small caps utility
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400;1,9..144,500&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;0,6..72,500;1,6..72,300;1,6..72,400&display=swap');

:root {
  --paper: #F6F0E2;
  --paper-deep: #EDE4D1;
  --paper-card: #FBF7EC;
  --ink: #221C14;
  --ink-soft: #4A4133;
  --ink-mute: #8A7D66;
  --gold: #9C7A28;
  --gold-bright: #B8923B;
  --gold-leaf: #C9A646;
  --rule: #D8CBB0;
  --rule-soft: #E6DCC7;

  --shadow-paper: 0 30px 70px -40px rgba(74, 58, 30, 0.5);
  --shadow-cover: 0 40px 80px -30px rgba(60, 46, 22, 0.45);

  --display: 'Fraunces', Georgia, serif;
  --text: 'Newsreader', Georgia, serif;
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% -5%, rgba(201, 166, 70, 0.10), transparent 55%),
    radial-gradient(ellipse at 90% 105%, rgba(156, 122, 40, 0.06), transparent 60%);
  background-attachment: fixed;
}

/* faint laid-paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.47  0 0 0 0 0.32  0 0 0 0.04 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold-leaf); color: var(--paper); }

/* ==================== NAV ==================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 226, 0.82);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.nav-mark em { font-style: italic; font-weight: 400; color: var(--gold); }

.nav-links { display: flex; gap: 36px; align-items: center; }

.nav-links a {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: relative;
  padding: 6px 0;
  transition: color 0.4s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--gold);
}

@media (max-width: 820px) {
  .nav-inner { padding: 16px 24px; flex-direction: column; gap: 12px; }
  .nav-links { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 10px; letter-spacing: 0.16em; }
}

/* ==================== LAYOUT ==================== */

main { position: relative; z-index: 2; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 48px; }
.container-narrow { max-width: 680px; margin: 0 auto; padding: 0 48px; }

@media (max-width: 820px) {
  .container, .container-narrow { padding: 0 24px; }
}

/* ==================== TYPE ==================== */

.eyebrow {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.display {
  font-size: clamp(50px, 8vw, 104px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 0.98;
}
.display em { font-style: italic; font-weight: 400; color: var(--gold); }

h2 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 400; letter-spacing: -0.02em; }
h2 em { font-style: italic; color: var(--gold); }

h3 { font-size: clamp(21px, 2.3vw, 28px); font-weight: 500; }

h4 {
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

p { margin-bottom: 1.3em; color: var(--ink-soft); }

p.lede {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
}

.rule-center { width: 56px; height: 1px; background: var(--gold); margin: 36px auto; border: 0; }

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 17px 30px;
  font-family: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-card);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.4s ease;
}
.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -14px rgba(156, 122, 40, 0.5);
}

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
}
.btn-ghost:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: transparent;
  box-shadow: none;
}

.btn-arrow { display: inline-block; transition: transform 0.4s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ==================== HERO (Home) ==================== */

.hero { padding: 90px 0 70px; position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 88px;
  align-items: center;
}

.hero-text { animation: rise 1.1s cubic-bezier(0.2,0.8,0.2,1) both; }

.hero-eyebrow { margin-bottom: 30px; }
.hero-title { margin-bottom: 26px; }

.hero-subtitle {
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 300;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.45;
  margin-bottom: 38px;
  max-width: 500px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 44px;
  margin-bottom: 42px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-meta-item h4 { margin-bottom: 6px; }
.hero-meta-item p {
  font-family: var(--display);
  font-size: 18px;
  color: var(--ink);
  font-style: italic;
  margin: 0;
  font-weight: 400;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-cover-wrap { position: relative; }
.hero-cover {
  position: relative;
  aspect-ratio: 1600 / 2500;
  box-shadow: var(--shadow-cover);
  animation: cover-rise 1.3s cubic-bezier(0.2,0.8,0.2,1) both;
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(60,46,22,0.18);
  pointer-events: none;
}
.hero-cover-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,0.28), rgba(0,0,0,0.02));
  z-index: 2;
}

@keyframes cover-rise {
  from { opacity: 0; transform: translateY(34px) rotate(-1deg); }
  to   { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero-cover-wrap { max-width: 320px; order: -1; }
  .hero { padding: 56px 0 50px; }
}

/* ==================== DEDICATION (Home) ==================== */

.dedication {
  padding: 100px 0 110px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.dedication-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.dedication-inner::before {
  content: "❦";
  display: block;
  color: var(--gold-leaf);
  font-size: 26px;
  margin-bottom: 34px;
}
.dedication blockquote {
  font-family: var(--display);
  font-size: clamp(25px, 3.2vw, 40px);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.dedication cite {
  font-style: normal;
  font-family: var(--text);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ==================== PAGE HEADER ==================== */

.page-header { padding: 96px 0 56px; }
.page-header .eyebrow { margin-bottom: 30px; }
.page-header h1 {
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 300;
  letter-spacing: -0.025em;
  margin-bottom: 30px;
  line-height: 0.98;
}
.page-header h1 em { font-style: italic; font-weight: 400; color: var(--gold); }
.page-header .lede { max-width: 600px; }

/* ==================== AUTHOR PAGE ==================== */

.author-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: start;
  padding: 24px 0 120px;
}
.author-photo-wrap { position: relative; padding: 14px; }
.author-photo-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--gold);
  opacity: 0.55;
  pointer-events: none;
}
.author-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  box-shadow: var(--shadow-paper);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.author-photo::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(60,46,22,0.2);
}
.author-caption {
  margin-top: 24px;
  font-family: var(--display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-mute);
  text-align: right;
}
.author-caption span { color: var(--gold); margin-right: 6px; }

.author-text h2 { margin-bottom: 30px; margin-top: 0; }
.author-text p { font-size: 18.5px; line-height: 1.85; color: var(--ink-soft); }

.author-philosophy {
  margin: 46px 0;
  padding: 30px 0 30px 34px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.5;
}

.author-social {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}
.author-social-label {
  font-family: var(--text);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.author-social a {
  color: var(--ink);
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: all 0.4s ease;
}
.author-social a:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 1000px) {
  .author-grid { grid-template-columns: 1fr; gap: 50px; padding-bottom: 70px; }
  .author-photo-wrap { max-width: 440px; }
}

/* ==================== BOOK PAGE ==================== */

.book-section { padding: 44px 0 90px; }
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 80px;
  align-items: start;
}
.book-cover-side { position: sticky; top: 120px; }
.book-cover-side .hero-cover { animation: none; max-width: 320px; }
.book-cover-meta {
  margin-top: 26px;
  font-family: var(--text);
  font-size: 13.5px;
  color: var(--ink-mute);
  line-height: 1.8;
}
.book-cover-meta strong { color: var(--ink); font-weight: 500; }

.book-text h2 { margin-bottom: 26px; }
.book-text p { font-size: 18px; line-height: 1.85; color: var(--ink-soft); }

.author-note-block {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 44px 48px;
  margin: 52px 0;
  position: relative;
}
.author-note-block::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 72px; height: 2px;
  background: var(--gold);
}
.author-note-block h4 { margin-bottom: 22px; color: var(--gold); }
.author-note-block p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
}
.author-note-block p:last-child { margin-bottom: 0; }

.themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 56px 0;
}
.theme-card { padding: 30px 0; border-top: 1px solid var(--gold); }
.theme-card h4 { margin-bottom: 14px; color: var(--gold); }
.theme-card h3 { font-size: 21px; font-weight: 400; margin-bottom: 12px; }
.theme-card p { font-size: 15px; color: var(--ink-mute); line-height: 1.7; margin: 0; }

@media (max-width: 1000px) {
  .book-grid { grid-template-columns: 1fr; gap: 50px; }
  .book-cover-side { position: static; }
  .book-cover-side .hero-cover { max-width: 280px; margin: 0 auto; }
  .themes { grid-template-columns: 1fr; gap: 0; }
  .theme-card { padding: 26px 0; }
  .author-note-block { padding: 30px 26px; }
}

/* ==================== EXCERPT PAGE ==================== */

.excerpt-body { padding: 24px 0 120px; max-width: 660px; margin: 0 auto; }
.excerpt-block { margin: 54px 0; }
.excerpt-block h3 {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 32px;
  font-size: 22px;
}
.excerpt-prose p {
  font-family: var(--text);
  font-size: 19px;
  line-height: 1.95;
  color: var(--ink);
  margin-bottom: 1.4em;
}
.excerpt-prose p:first-of-type::first-letter {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 4em;
  color: var(--gold);
  float: left;
  line-height: 0.86;
  margin: 0.06em 0.12em 0 0;
}
.excerpt-prose.no-dropcap p:first-of-type::first-letter {
  font-family: inherit;
  font-style: inherit;
  font-weight: inherit;
  font-size: inherit;
  color: inherit;
  float: none;
  line-height: inherit;
  margin: 0;
}

.excerpt-divider {
  text-align: center;
  margin: 56px 0;
  color: var(--gold-leaf);
  font-size: 18px;
  letter-spacing: 1.2em;
  padding-left: 1.2em;
}

/* ==================== PRE-ORDER PAGE ==================== */

.preorder-body { padding: 24px 0 120px; }
.retailer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 56px 0;
}
.retailer {
  padding: 38px 30px 32px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  transition: all 0.5s cubic-bezier(0.2,0.8,0.2,1);
}
.retailer:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-paper);
}
.retailer-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 400;
  font-size: 24px;
  color: var(--gold);
  background: var(--paper);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
  transition: all 0.5s cubic-bezier(0.2,0.8,0.2,1);
  flex-shrink: 0;
}
.retailer:hover .retailer-logo {
  background: var(--gold);
  color: var(--paper-card);
  border-color: var(--gold);
}
.retailer h3 { font-size: 24px; font-weight: 400; margin-bottom: 10px; color: var(--ink); line-height: 1.1; }
.retailer-region {
  font-family: var(--text);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 22px;
}
.retailer-desc { font-size: 14px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 28px; flex-grow: 1; }
.retailer-go {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: auto;
}
.retailer-go .btn-arrow { transition: transform 0.4s ease; }
.retailer:hover .retailer-go .btn-arrow { transform: translateX(6px); }

.preorder-details {
  margin-top: 84px;
  padding-top: 56px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
}
.preorder-details h4 { margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 38px; }
.detail-item { border-top: 1px solid var(--rule); padding-top: 15px; }
.detail-item h4 { color: var(--gold); margin-bottom: 8px; }
.detail-item p {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}

@media (max-width: 1000px) {
  .retailer-grid { grid-template-columns: 1fr; gap: 14px; }
  .retailer { padding: 32px 26px 28px; }
  .preorder-details { grid-template-columns: 1fr; gap: 28px; }
  .detail-grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (min-width: 1001px) and (max-width: 1180px) {
  .retailer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== FOOTER ==================== */

footer {
  border-top: 1px solid var(--rule);
  padding: 52px 0 38px;
  background: var(--paper-deep);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-mark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 8px;
}
.footer-mark span { color: var(--gold); }
.footer-tag {
  font-family: var(--text);
  font-size: 13px;
  color: var(--ink-mute);
  font-style: italic;
  max-width: 320px;
  line-height: 1.6;
}
.footer-meta {
  font-family: var(--text);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: right;
  line-height: 2;
}
.footer-meta a:hover { color: var(--gold); }

@media (max-width: 700px) {
  .footer-inner { padding: 0 24px; flex-direction: column; align-items: flex-start; gap: 26px; }
  .footer-meta { text-align: left; }
}

/* ==================== UTILITY ==================== */

.fade-in { animation: rise 0.95s cubic-bezier(0.2,0.8,0.2,1) both; }
.fade-in.d-1 { animation-delay: 0.1s; }
.fade-in.d-2 { animation-delay: 0.2s; }
.fade-in.d-3 { animation-delay: 0.34s; }
.fade-in.d-4 { animation-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
