/* ============================================================
   REBEL X — black & white, cinematic editorial
   The visual grammar is silence.
   ============================================================ */
:root {
  --bg: #0a0a0a;
  --ink: #f0ece4;
  --white: #ffffff;
  --dim: rgba(240, 236, 228, 0.55);
  --faint: rgba(240, 236, 228, 0.28);
  --line: rgba(255, 255, 255, 0.14);
  --line-soft: rgba(255, 255, 255, 0.4);
  --serif: "EB Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { background: #070707; } /* deep base sits behind the aura layer */

body {
  background: transparent; /* let #aura (z-index -2) show through */
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

/* ---- living darkness: a fixed monochrome aura behind everything ------
   A soft light from the top, two slowly drifting charcoal glows, and a
   faint glow that follows the cursor (--mx/--my set in JS). Dark, modern,
   never busy. Built in JS as #aura and styled here. */
/* calm night-sky starfield (twinkles in place, no motion on scroll) */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
#aura {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(60% 48% at 50% -8%, rgba(255, 255, 255, 0.055), transparent 60%),
    radial-gradient(46% 40% at 22% 18%, rgba(150, 150, 165, 0.05), transparent 60%),
    radial-gradient(46% 42% at 82% 80%, rgba(140, 142, 158, 0.045), transparent 60%),
    radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, 0.6), transparent 60%),
    #070707;
}

/* very faint, static grain over the aura — adds tooth without drawing
   attention or animating */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
img { max-width: 100%; display: block; }

/* micro-label */
.micro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- custom cursor ---------------------------------------- */
@media (pointer: fine) {
  body { cursor: none; }
  a, button, input, textarea, label { cursor: none; }
}
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
}
.cursor.is-hover { width: 56px; height: 56px; background: rgba(255, 255, 255, 0.85); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---- page transition wipe ----------------------------------- */
.page-transition-cover {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9500;
  transform-origin: top;
  pointer-events: none;
}

/* ---- navigation --------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 4.5vw, 60px) 22px;
  transition: transform 0.55s var(--ease), background 0.4s;
  background: transparent;
}
.site-nav.is-hidden { transform: translateY(-110%); }
.site-nav.past-hero { background: rgba(8, 8, 8, 0.94); }
.site-nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.6s;
}
.site-nav.past-hero::after { opacity: 1; }

.logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: 0.14em;
  position: relative;
}
.logo:hover { text-shadow: 0 0 14px rgba(255, 255, 255, 0.55), 0 0 30px rgba(255, 255, 255, 0.25); }

.nav-links { display: flex; gap: 38px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.35s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

/* hamburger */
.burger { display: none; width: 44px; height: 44px; position: relative; z-index: 1300; }
.burger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.45s var(--ease), opacity 0.3s, top 0.45s var(--ease);
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0;
  z-index: 1200;
  background: rgba(10, 10, 10, 0.98);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 36px;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-overlay a {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1.35;
  color: var(--dim);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), color 0.3s;
}
.nav-overlay.open a { opacity: 1; transform: translateY(0); }
.nav-overlay.open a:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.open a:nth-child(2) { transition-delay: 0.2s; }
.nav-overlay.open a:nth-child(3) { transition-delay: 0.3s; }
.nav-overlay.open a:nth-child(4) { transition-delay: 0.4s; }
.nav-overlay.open a:nth-child(5) { transition-delay: 0.5s; }
.nav-overlay a:hover, .nav-overlay a.active { color: var(--white); }
.nav-overlay .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--faint);
  margin-right: 18px;
  vertical-align: super;
}

/* ---- layout -------------------------------------------------- */
.wrap { width: min(1280px, 90vw); margin: 0 auto; }
.section { padding: clamp(90px, 14vh, 180px) 0; position: relative; }

/* sections are transparent so the cosmos shows through, seamlessly */
.tone-raise, .tone-deep, .seam, .glow-seam { background: transparent; }

.chapter-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 34px;
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 110px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.display i, .display em { font-style: italic; font-weight: 400; }

/* split-line reveal scaffolding */
.line-mask { display: block; overflow: hidden; }
.line-mask > span { display: block; }
.js .will-split .line-mask > span { transform: translateY(110%); }
.js [data-reveal] { opacity: 0; transform: translateY(30px); }

/* ---- hero (home) ---------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 100px 20px 120px;
}
.hero > * { position: relative; z-index: 2; }

.hero-hello {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 44px);
  color: var(--dim);
  margin-bottom: 2vw;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(64px, 16vw, 240px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hero-name .hero-char { display: inline-block; }
.hero-sub {
  margin-top: 4.5vh;
  font-size: clamp(16px, 1.7vw, 21px);
  color: var(--dim);
  max-width: 44ch;
}
.hero-sub i { color: var(--ink); }
.hero-sub .hero-word { display: inline-block; }
.hero-cta {
  margin-top: 5vh;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 6px;
}
.hero-cta::after, .draw-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.hero-cta:hover::after, .draw-link:hover::after { transform: scaleX(1); }
.draw-link {
  position: relative;
  padding-bottom: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scroll-indicator {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: opacity 0.6s;
}
.scroll-indicator.faded { opacity: 0; }
.scroll-indicator .micro { color: var(--faint); }
.scroll-track {
  width: 1px; height: 40px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-track::after {
  content: "";
  position: absolute;
  left: -1.5px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--white);
  animation: dot-slide 2s ease-in-out infinite;
}
@keyframes dot-slide {
  0% { top: -6px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 42px; opacity: 0; }
}

/* ---- intro (editorial reveal) --------------------------------- */
.intro-section { position: relative; overflow: hidden; }
.ghost-quote {
  position: absolute;
  top: -4vw; left: -2vw;
  font-family: var(--serif);
  font-size: 30vw;
  line-height: 1;
  color: var(--ink);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}
.intro-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.intro-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
}
.intro-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: grayscale(1) contrast(1.05);
}
.intro-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5));
  pointer-events: none;
}
.intro-copy { width: 100%; }
.intro-copy .intro-line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.1vw, 42px);
  line-height: 1.45;
  display: block;
}
.intro-copy .intro-line.lead-line {
  font-style: italic;
  font-size: clamp(30px, 4vw, 54px);
  margin-bottom: 0.9em;
}
.intro-copy .gap { display: block; height: 1.2em; }
.intro-foot { margin-top: 64px; }

.ink-divider { display: block; width: 100%; height: auto; opacity: 0.5; }

/* ---- horizontal book shelf ------------------------------------ */
.shelf-section { position: relative; overflow: hidden; }
.shelf-track {
  display: flex;
  height: 100svh;
  align-items: stretch;
  will-change: transform;
}
.shelf-panel {
  flex: 0 0 100vw;
  min-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 90px 24px 60px;
}
.shelf-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--line);
  z-index: 5;
}
.shelf-progress .bar {
  display: block;
  height: 100%;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.book-cover {
  width: clamp(200px, 24vw, 300px);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(240, 236, 228, 0.22);
  border-radius: 2px 6px 6px 2px;
  background: #0e0e0e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 22px;
  position: relative;
  box-shadow: 0 30px 50px -12px rgba(0, 0, 0, 0.85);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.book-cover:hover {
  transform: translateY(-20px);
  box-shadow: 0 56px 70px -16px rgba(0, 0, 0, 0.95);
}
.book-cover::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 1px;
  background: rgba(240, 236, 228, 0.12);
  z-index: 1;
}
/* real cover artwork fills the frame */
.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.book-cover:has(img)::before { display: none; }
.book-cover .bc-author { font-family: var(--mono); font-size: 8px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--dim); }
.book-cover .bc-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
}
.book-cover .bc-title i { display: block; }
.book-cover .bc-foot { font-family: var(--mono); font-size: 8px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--faint); }
/* upcoming titles: show the art, but muted so it reads as not-yet-released */
.book-cover.ghost { filter: grayscale(0.35) brightness(0.82); }
.book-cover.ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.25);
  border-radius: inherit;
}

.shelf-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  text-align: center;
}
.shelf-panel .poetic {
  font-style: italic;
  color: var(--dim);
  font-size: clamp(16px, 1.6vw, 20px);
  text-align: center;
  max-width: 40ch;
}

/* ---- reviews (home cards + page) ------------------------------- */
.review-block { padding: clamp(48px, 7vw, 90px) 0; border-top: 1px solid var(--line); }
.review-block:first-of-type { border-top: 0; }
.review-quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 52px);
  line-height: 1.3;
  max-width: 24ch;
}
.review-quote.center { margin: 0 auto; text-align: center; }
.review-quote.right { margin-left: auto; text-align: right; }
.review-attrib {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}
.review-attrib.center { justify-content: center; }
.review-attrib.right { justify-content: flex-end; }
.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--dim);
  flex-shrink: 0;
}
.review-attrib .who .micro { color: var(--ink); display: block; }
.review-attrib .who small {
  font-family: var(--body);
  font-size: 13px;
  color: var(--dim);
  display: block;
  margin-top: 4px;
}
.review-full {
  margin-top: 26px;
  color: var(--dim);
  max-width: 60ch;
  font-size: 16px;
}
.review-full.center { margin-left: auto; margin-right: auto; text-align: center; }
.review-full.right { margin-left: auto; text-align: right; }

.review-card-home { will-change: transform; }

/* ---- contact ----------------------------------------------------- */
.contact-heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 1;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 130px);
  align-items: start;
}
.ambient-lines p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.5;
  color: var(--dim);
}
.ambient-lines p:last-of-type { color: var(--ink); font-style: italic; }
.social-stack { margin-top: 56px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.social-stack a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex;
  gap: 14px;
  transition: color 0.3s, transform 0.4s var(--ease);
}
.social-stack a:hover { color: var(--white); transform: translateX(8px); }

.contact-form { display: flex; flex-direction: column; }
.field { position: relative; padding: 30px 0 12px; }
.field input, .field textarea {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  outline: none;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  padding: 6px 0 10px;
  resize: vertical;
  transition: border-color 0.4s, box-shadow 0.4s;
  border-radius: 0;
}
.field input:focus, .field textarea:focus {
  border-color: var(--white);
  box-shadow: 0 14px 22px -16px rgba(255, 255, 255, 0.35);
}
.field label {
  position: absolute;
  top: 36px; left: 0;
  color: var(--dim);
  font-size: 16px;
  pointer-events: none;
  transition: all 0.35s var(--ease);
}
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
  top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

.send-btn {
  margin-top: 48px;
  align-self: flex-start;
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 7px;
}
.send-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.send-btn:hover::after { transform: scaleX(1); }
.send-btn.sent::after { transform: scaleX(1); }
.send-btn.sent .send-label { opacity: 0; }
.send-btn .send-label { transition: opacity 0.4s; }
.sent-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  margin-top: 22px;
  opacity: 0;
  transition: opacity 0.7s;
}
.sent-note.visible { opacity: 1; }
.form-note {
  margin-top: 40px;
  font-size: 14px;
  color: var(--dim);
  line-height: 1.8;
}
.form-note .micro { color: var(--faint); display: block; margin-bottom: 8px; }

/* ---- footer ------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: clamp(70px, 10vw, 130px) 24px 44px;
}
.footer-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 7vw, 96px);
  letter-spacing: 0.08em;
}
.footer-sign { width: clamp(140px, 18vw, 220px); margin: 28px auto 0; opacity: 0.85; }
.footer-sign path { stroke: var(--ink); fill: none; }
.footer-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 48px;
}
.footer-socials a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s;
}
.footer-socials a:hover { color: var(--white); }
.footer-tagline {
  margin-top: 50px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--dim);
}
.footer-micro {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- about page ----------------------------------------------------- */
.about-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  position: relative;
}
.about-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(20px, 5vw, 70px) 80px;
}
.about-hero-right {
  position: relative;
  border-left: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 60% 35%, rgba(240, 236, 228, 0.06), transparent 65%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brush-mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(160px, 22vw, 340px);
  color: var(--ink);
  opacity: 0.1;
  filter: blur(1px);
  user-select: none;
}
/* the anonymous portrait — rim-lit, B&W to honour the system */
.about-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) contrast(1.05);
  will-change: transform;
}
/* feather the left edge so the photo dissolves into the black column */
.about-hero-right::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(10,10,10,0.35) 22%, transparent 55%);
  pointer-events: none;
  z-index: 2;
}

.chapter {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(30px, 5vw, 80px);
  padding: clamp(70px, 10vw, 140px) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.chapter:first-of-type { border-top: 0; }
.chapter-anchor { position: relative; }
.chapter-anchor .micro { color: var(--dim); position: sticky; top: 130px; display: block; }
.chapter-body p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.7vw, 36px);
  line-height: 1.5;
  max-width: 26ch;
}
.chapter-body p + p { margin-top: 1.4em; }
.chapter-body p i { color: var(--dim); }

.atticus-quote {
  text-align: center;
  padding: clamp(80px, 14vw, 180px) 0;
}
.atticus-quote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 72px);
  line-height: 1.3;
  max-width: 22ch;
  margin: 0 auto;
}
.atticus-quote cite {
  display: block;
  margin-top: 36px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

.signature-stage { text-align: center; padding: clamp(70px, 11vw, 150px) 0; }
.signature-svg { width: clamp(220px, 34vw, 420px); margin: 0 auto; }
.signature-svg path { stroke: var(--ink); fill: none; }

/* real signature, painted in --ink via alpha mask (works for any
   transparent-background PNG regardless of the stroke colour) and
   wiped left-to-right on scroll so it looks signed in real time. */
.signature-img {
  width: clamp(180px, 26vw, 340px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background-color: var(--ink);
  -webkit-mask: url("../assets/signature.png") center / contain no-repeat;
  mask: url("../assets/signature.png") center / contain no-repeat;
  clip-path: inset(0 100% 0 0);
}
.js .signature-img.drawn { clip-path: inset(0 0% 0 0); }
.footer-sign-img {
  width: clamp(110px, 14vw, 168px);
  aspect-ratio: 1 / 1;
  margin: 22px auto;
  background-color: var(--ink);
  -webkit-mask: url("../assets/signature.png") center / contain no-repeat;
  mask: url("../assets/signature.png") center / contain no-repeat;
  opacity: 0.85;
  clip-path: inset(0 100% 0 0);
}
.js .footer-sign-img.drawn { clip-path: inset(0 0% 0 0); }
.signature-foot {
  margin-top: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.9;
  color: var(--dim);
}
.signature-foot .closing { color: var(--ink); display: block; margin-top: 1.6em; }

/* ---- books page ------------------------------------------------------- */
.page-hero { padding: clamp(150px, 24vh, 240px) 0 clamp(40px, 6vw, 80px); }
.rule-draw {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line-soft);
  transform: scaleX(0);
  transform-origin: left;
  margin-top: clamp(36px, 5vw, 60px);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.book-card { text-align: center; perspective: 900px; }
.book-card .book-cover { margin: 0 auto; }
.book-card:hover .book-cover:not(.ghost) {
  transform: rotateY(5deg) translateY(-12px);
  box-shadow: 0 50px 70px -16px rgba(0, 0, 0, 0.95);
}
.book-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px);
  margin-top: 34px;
}
.book-card .price-line {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 12px;
  color: var(--dim);
}
.book-card .price-line s { color: var(--faint); margin-right: 12px; }
.book-card .price-line .now { color: var(--white); }
.book-card .price-line .sale-tag {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-right: 14px;
  color: var(--faint);
}
.book-card .card-desc {
  font-style: italic;
  color: var(--dim);
  font-size: 15px;
  max-width: 34ch;
  margin: 16px auto 0;
}
.book-card .card-links { margin-top: 24px; display: flex; gap: 28px; justify-content: center; }
.coming-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); margin-top: 14px; display: block; }

/* drawer */
.drawer-scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.drawer-scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 94vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  z-index: 2100;
  transform: translateX(102%);
  transition: transform 0.6s var(--ease);
  padding: clamp(30px, 5vw, 60px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.drawer.open { transform: translateX(0); }
.drawer .book-cover { width: 200px; }
.drawer h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; }
.drawer .drawer-desc { color: var(--dim); font-style: italic; }
.drawer .drawer-meta { font-family: var(--mono); font-size: 11px; line-height: 2.2; color: var(--dim); letter-spacing: 0.08em; }
.drawer-close {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.drawer-close:hover { color: var(--white); }

/* ---- reviews page hairlines ----------------------------------------- */
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- 404 -------------------------------------------------------------- */
.lost {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  padding: 24px;
}
.lost h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.4;
}

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .about-hero { min-height: auto; }
  .about-hero-left { order: 2; padding-top: 50px; }
  .about-hero-right {
    order: 1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    height: 56svh;
    min-height: 360px;
  }
  .about-hero-right::after {
    background: linear-gradient(180deg, rgba(10,10,10,0.5) 0%, transparent 35%, rgba(10,10,10,0.55) 100%);
  }
  .brush-mark { display: none; }
  .chapter { grid-template-columns: 1fr; gap: 22px; }
  .chapter-anchor .micro { position: static; }
  .intro-grid { grid-template-columns: 1fr; gap: 36px; }
  .intro-portrait { max-width: 360px; aspect-ratio: 4/4.4; }
  /* shelf falls back to vertical stack on mobile (pin disabled in JS) */
  .shelf-track.no-pin { flex-direction: column; height: auto; }
  .shelf-track.no-pin .shelf-panel { min-width: 0; flex-basis: auto; padding: 70px 24px; }
  .hero-name { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .grain-overlay, .scroll-track::after { animation: none; }
}
