:root {
  --bg: #F8F3EA;
  --paper: #FFFDF8;
  --paper-2: #F1E7DA;
  --ink: #1F1B18;
  --muted: #6F6258;
  --line: #E5D8C8;
  --primary: #8F3F2B;
  --primary-dark: #5B281D;
  --accent: #C59A4A;
  --accent-soft: #EFE0BF;
  --dark: #24201C;
  --dark-soft: #312B26;
  --white: #ffffff;
  --radius: 32px;
  --max: 1220px;
  --shadow: 0 28px 90px rgba(31, 27, 24, .20);
  --shadow-soft: 0 16px 45px rgba(31, 27, 24, .10);

  /* compatibility aliases used by the original editorial build */
  --night: var(--dark);
  --espresso: var(--dark-soft);
  --brown: var(--muted);
  --tan: var(--accent-soft);
  --gold: var(--primary);
  --paper2: var(--paper-2);
  --cream: var(--paper);
}

#series,
#library,
#about,
#event,
#contact {
  scroll-margin-top: 130px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Manrope, system-ui, -apple-system, Segoe UI, sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(197, 154, 74, .14), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(143, 63, 43, .10), transparent 32%),
    var(--bg);
  color: var(--ink);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--paper);
  border-radius: 10px;
}
.skip-link:focus { left: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 5vw, 64px);
  background: rgba(255, 253, 248, .84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(31, 27, 24, .10);
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.wordmark-symbol {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--accent-soft);
  display: grid;
  place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
}
.wordmark-text { white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--primary); }
.shop-link { background: var(--primary); color: var(--paper) !important; padding: 11px 18px; border-radius: 999px; }
.shop-link:hover { background: var(--primary-dark); }
.nav-toggle { display: none; border: 0; background: var(--dark); color: var(--paper); border-radius: 999px; padding: 10px 14px; font-size: 18px; }

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .8fr);
  grid-template-rows: 1fr auto;
  gap: 32px;
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 86px) clamp(18px, 5vw, 64px) 28px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(239, 224, 191, .72), rgba(239, 224, 191, .18) 43%, transparent 66%);
  right: -270px;
  top: -270px;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 63, 43, .11), transparent 64%);
  left: -220px;
  bottom: 10px;
  pointer-events: none;
}
.hero-text { align-self: center; max-width: 760px; position: relative; z-index: 1; }
.kicker, .section-label { margin: 0 0 14px; color: var(--primary); font-weight: 900; letter-spacing: .15em; text-transform: uppercase; font-size: 12px; }
.hero h1, .series-intro h2, .about-copy h2, .library-header h2, .event-panel h2, .contact-copy h2 {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: -.04em;
  line-height: .94;
  color: var(--ink);
  margin: 0;
}
.hero h1 { font-size: clamp(58px, 9vw, 126px); max-width: 850px; }
.lead { font-size: clamp(17px, 2vw, 22px); line-height: 1.75; max-width: 670px; color: var(--muted); margin: 26px 0 34px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 22px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; font-weight: 900; font-size: 14px; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button-primary { background: var(--primary); color: var(--paper); box-shadow: 0 16px 30px rgba(143, 63, 43, .25); }
.button-primary:hover { transform: translateY(-1px); background: var(--primary-dark); }
.button-secondary { border-color: rgba(31, 27, 24, .18); color: var(--ink); background: rgba(255,253,248,.62); }
.button-secondary:hover { border-color: var(--primary); color: var(--primary); }
.button-light { background: var(--paper); color: var(--ink); }

.hero-library { align-self: center; min-height: 620px; position: relative; z-index: 1; }
.cover { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 22px; box-shadow: var(--shadow); transition: transform .25s ease, filter .25s ease; }
.cover:hover { transform: translateY(-8px) rotate(0deg) !important; filter: saturate(1.04); }
.cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.cover-large { width: min(330px, 58vw); aspect-ratio: 2/3; right: 110px; top: 40px; transform: rotate(-5deg); }
.cover-large span { position: absolute; left: 20px; bottom: 20px; background: var(--primary); color: var(--paper); border-radius: 999px; padding: 9px 14px; font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cover-medium { width: 230px; aspect-ratio: 2/3; right: 0; bottom: 42px; transform: rotate(7deg); }
.cover-small { width: 170px; aspect-ratio: 2/3; left: 18px; top: 230px; transform: rotate(-10deg); }
.hero-note { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.74); overflow: hidden; }
.hero-note span { padding: 16px 20px; text-align: center; font-size: 13px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.hero-note span + span { border-left: 1px solid var(--line); }

.reading-paths { max-width: var(--max); margin: 0 auto; padding: 36px clamp(18px, 5vw, 64px) 84px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.reading-paths article { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px; box-shadow: var(--shadow-soft); }
.reading-paths span { color: var(--primary); font-weight: 900; font-size: 12px; }
.reading-paths h2 { margin: 12px 0 10px; font-size: 20px; color: var(--ink); }
.reading-paths p { margin: 0; color: var(--muted); line-height: 1.7; }

.series-section, .library-section { max-width: var(--max); margin: 0 auto; padding: 86px clamp(18px, 5vw, 64px); }
.series-intro, .library-header { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 38px; }
.series-intro h2, .library-header h2 { font-size: clamp(42px, 6vw, 78px); }
.series-intro p { max-width: 640px; color: var(--muted); line-height: 1.75; font-size: 17px; }
.text-link { font-weight: 900; color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 5px; white-space: nowrap; }
.text-link:hover { color: var(--primary-dark); }
.series-timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: book; }
.timeline-card { position: relative; min-height: 470px; border-radius: 30px; overflow: hidden; background: var(--dark); color: var(--paper); box-shadow: var(--shadow-soft); cursor: pointer; border: 0; text-align: left; padding: 0; }
.timeline-card img { width: 100%; height: 72%; object-fit: cover; opacity: .93; transition: transform .35s ease; }
.timeline-card:hover img { transform: scale(1.05); }
.timeline-card div { position: absolute; inset: auto 0 0; padding: 24px; background: linear-gradient(transparent, rgba(36,32,28,.96) 18%); }
.timeline-card span { display: inline-flex; color: var(--accent-soft); font-weight: 900; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.timeline-card h3 { margin: 8px 0 6px; font-family: 'Cormorant Garamond', serif; line-height: 1; font-size: 30px; }
.timeline-card p { margin: 0; color: rgba(255,253,248,.76); font-size: 13px; line-height: 1.55; }

.about-section { background: linear-gradient(135deg, var(--dark), var(--dark-soft)); color: var(--paper); margin: 42px 0; padding: 84px clamp(18px, 5vw, 64px); }
.about-card { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 380px 1fr; gap: clamp(34px, 7vw, 88px); align-items: center; }
.about-portrait { border-radius: 999px 999px 36px 36px; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 28px 80px rgba(0,0,0,.34); border: 8px solid rgba(255,253,248,.08); }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-copy .kicker { color: var(--accent-soft); }
.about-copy h2 { color: var(--paper); font-size: clamp(40px, 6vw, 76px); }
.about-copy p { color: rgba(255,253,248,.76); line-height: 1.85; font-size: 16px; max-width: 760px; }

.library-section { padding-top: 96px; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter { border: 1px solid rgba(31,27,24,.14); color: var(--muted); background: rgba(255,253,248,.58); padding: 10px 14px; border-radius: 999px; font-weight: 900; cursor: pointer; }
.filter.active, .filter:hover { background: var(--primary); color: var(--paper); border-color: var(--primary); }
.book-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.book-tile { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-soft); text-align: left; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.book-tile:hover { transform: translateY(-2px); border-color: rgba(143, 63, 43, .30); }
.book-tile[hidden] { display: none; }
.book-tile img { width: 132px; aspect-ratio: 2/3; object-fit: cover; border-radius: 16px; box-shadow: 0 12px 28px rgba(31,27,24,.18); }
.book-tile h3 { margin: 6px 0 6px; font-family: 'Cormorant Garamond', serif; font-size: 27px; line-height: .98; }
.book-tile p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }
.book-tile .book-meta { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

.event-section { padding: 34px clamp(18px, 5vw, 64px) 86px; }
.event-panel { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--primary-dark), var(--dark)); color: var(--paper); border-radius: 34px; padding: clamp(24px, 5vw, 44px); box-shadow: var(--shadow); }
.date-tile { width: 96px; height: 112px; display: grid; place-items: center; align-content: center; background: var(--accent-soft); color: var(--ink); border-radius: 24px; }
.date-tile span { font-size: 13px; font-weight: 900; letter-spacing: .14em; }
.date-tile strong { font-family: 'Cormorant Garamond', serif; font-size: 56px; line-height: .8; }
.event-panel .kicker { color: var(--accent-soft); }
.event-panel h2 { color: var(--paper); font-size: clamp(36px, 5vw, 62px); }
.event-panel p { color: rgba(255,253,248,.76); line-height: 1.7; }
.event-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.event-meta span { border: 1px solid rgba(255,253,248,.18); border-radius: 999px; padding: 8px 12px; font-size: 12px; font-weight: 800; color: rgba(255,253,248,.82); }

.contact-section { max-width: var(--max); margin: 0 auto; padding: 86px clamp(18px, 5vw, 64px); display: grid; grid-template-columns: 1fr 420px; gap: 46px; align-items: center; }
.contact-copy h2 { font-size: clamp(44px, 6vw, 78px); }
.contact-copy p { color: var(--muted); line-height: 1.75; max-width: 640px; }
.contact-actions { display: grid; gap: 12px; }
.contact-actions a { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; font-weight: 900; box-shadow: var(--shadow-soft); transition: transform .2s ease, border-color .2s ease; }
.contact-actions a:hover { transform: translateY(-2px); border-color: rgba(143, 63, 43, .30); color: var(--primary); }
.footer { text-align: center; padding: 42px 18px; background: var(--dark); color: rgba(255,253,248,.64); line-height: 1.7; }
.footer p { margin: 4px 0; }
.footer strong { color: var(--accent-soft); }

.book-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.book-modal.open { display: block; }
.modal-scrim { position: absolute; inset: 0; background: rgba(12,10,8,.72); backdrop-filter: blur(8px); }
.modal-window { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; display: grid; grid-template-columns: 310px 1fr; background: var(--paper); border-radius: 34px; box-shadow: 0 36px 100px rgba(0,0,0,.42); }
.modal-art { padding: 24px; background: var(--dark); }
.modal-art img { width: 100%; border-radius: 22px; box-shadow: var(--shadow); }
.modal-copy { padding: 42px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(31,27,24,.12); font-size: 24px; cursor: pointer; }
.modal-close:hover { background: rgba(31,27,24,.20); }
.modal-meta { color: var(--primary); font-weight: 900; letter-spacing: .13em; text-transform: uppercase; font-size: 12px; }
.modal-copy h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(38px, 5vw, 66px); line-height: .95; margin: 0 0 10px; }
.modal-tag { color: var(--muted); font-weight: 900; }
.modal-blurb { color: var(--muted); line-height: 1.85; }
body.modal-open { overflow: hidden; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .hero-library { min-height: 470px; max-width: 650px; width: 100%; justify-self: center; }
  .cover-large { right: 160px; top: 0; }
  .cover-medium { right: 70px; bottom: 0; }
  .cover-small { left: 70px; top: 170px; }
  .series-timeline { grid-template-columns: repeat(2, 1fr); }
  .book-shelf { grid-template-columns: repeat(2, 1fr); }
  .about-card, .contact-section { grid-template-columns: 1fr; }
  .about-portrait { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .topbar { height: 66px; }
  .wordmark-text { font-size: 14px; }
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; top: 66px; left: 12px; right: 12px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; border-radius: 14px; }
  .shop-link { text-align: center; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: clamp(46px, 16vw, 74px); }
  .hero-library { min-height: 390px; }
  .cover-large { width: 230px; right: 86px; }
  .cover-medium { width: 160px; right: 12px; }
  .cover-small { width: 130px; left: 8px; top: 150px; }
  .hero-note { border-radius: 22px; grid-template-columns: 1fr; }
  .hero-note span + span { border-left: 0; border-top: 1px solid var(--line); }
  .reading-paths, .series-timeline, .book-shelf { grid-template-columns: 1fr; }
  .series-intro, .library-header { display: block; }
  .filters { justify-content: flex-start; margin-top: 20px; }
  .book-tile { grid-template-columns: 100px 1fr; }
  .book-tile img { width: 100px; }
  .event-panel { grid-template-columns: 1fr; text-align: left; }
  .modal-window { grid-template-columns: 1fr; }
  .modal-art { padding: 18px; }
  .modal-art img { max-width: 220px; margin: 0 auto; }
  .modal-copy { padding: 28px; }
}
