/* ==========================================================================
   Raven Rose — dark gothic design system
   Mobile-first. Breakpoints go up from here via @media (min-width: …).
   ========================================================================== */

:root{
  /* colour */
  --bg-primary:#0d0f12;                    /* dark slate / charcoal */
  --bg-secondary:#161a20;                  /* elevated card */
  --accent-gold:#e2b85d;                   /* nav active, primary buttons, icons */
  --accent-gold-hi:#f2d597;                /* gold hover */
  --accent-glow:rgba(138,28,28,.35);       /* crimson radial glow */
  --accent-crimson:#8a1c1c;                /* solid form of the glow */
  --text-primary:#f3f4f6;                  /* off-white */
  --text-muted:#9ca3af;                    /* neutral silver */
  --border-subtle:rgba(138,28,28,.25);     /* dark oxblood border */

  /* type */
  --font-display:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --font-body:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  /* rhythm */
  --section-gap:clamp(3rem,8vh,5rem);
  --wrap:76rem;
}

*{box-sizing:border-box}
html{color-scheme:dark;scroll-behavior:smooth}

body{
  margin:0;min-width:0;
  background:var(--bg-primary);
  color:var(--text-primary);
  font:400 16px/1.65 var(--font-body);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{max-width:100%;height:auto}
figure{margin:0}
ul{list-style:none;margin:0;padding:0}

a{color:var(--accent-gold);text-decoration-thickness:1px;text-underline-offset:.22em}
a:hover{color:var(--accent-gold-hi)}
a:focus-visible,button:focus-visible,input:focus-visible{
  outline:2px solid var(--accent-gold);outline-offset:3px}

.wrap{width:min(100% - 2rem,var(--wrap));margin-inline:auto}
.narrow{max-width:46rem}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap}

.skip-link{position:fixed;z-index:120;top:0;left:1rem;transform:translateY(-140%);
  background:var(--text-primary);color:var(--bg-primary);padding:.7rem 1rem;
  font-weight:600;border-radius:0 0 6px 6px}
.skip-link:focus{transform:translateY(0)}
.skip-link:hover{color:var(--bg-primary)}

/* ---------- type scale ------------------------------------------------- */

h1,h2,h3{font-family:var(--font-display);font-weight:600;line-height:1.1;margin:0}
h1{font-size:clamp(2.1rem,6vw,3.4rem)}
h2{font-size:clamp(1.6rem,4vw,2.3rem)}
h3{font-size:clamp(1.25rem,3vw,1.6rem)}
p{margin:0 0 1rem;max-width:64ch}

/* section headers and author titles: uppercase, letterspaced */
.section-title,.site-title{
  font-family:var(--font-display);font-weight:700;
  text-transform:uppercase;letter-spacing:.08em;
  color:var(--text-primary);margin:0}
.site-title{font-size:clamp(2rem,7vw,3.25rem);text-align:center}
.section-title{font-size:clamp(1.4rem,3.5vw,2rem);text-align:center}

.eyebrow{margin:0 0 .75rem;font:500 .72rem/1 var(--font-body);
  text-transform:uppercase;letter-spacing:.16em;color:var(--accent-gold)}
.muted{color:var(--text-muted)}

/* ---------- header / navigation ---------------------------------------- */

/* z-index must beat .nav-scrim (70): backdrop-filter makes this header a
   stacking context, so the drawer nested inside it cannot escape this value.
   At 40 the scrim painted over the drawer and swallowed every click. */
.site-header{position:sticky;top:0;z-index:100;
  background:rgba(13,15,18,.85);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--border-subtle)}

.header-inner{min-height:3.75rem;display:flex;align-items:center;
  justify-content:space-between;gap:1rem}

.wordmark{display:inline-flex;align-items:center;gap:.55rem;
  color:var(--text-primary);text-decoration:none;
  font-family:var(--font-display);font-weight:700;font-size:1.15rem;
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.wordmark img{width:26px;height:auto;display:block}

/* hamburger — mobile only */
.nav-toggle{width:2.6rem;height:2.6rem;padding:0;display:inline-flex;
  flex-direction:column;align-items:center;justify-content:center;gap:.3rem;
  border:1px solid var(--border-subtle);border-radius:999px;
  background:transparent;cursor:pointer}
.nav-toggle span{display:block;width:1.1rem;height:1px;background:var(--text-primary)}
.nav-toggle:hover{border-color:var(--accent-gold)}

/* off-canvas drawer — mobile */
.nav-scrim{position:fixed;inset:0;z-index:70;background:rgba(5,6,8,.65);
  opacity:0;pointer-events:none;transition:opacity .22s ease}
.nav-scrim.is-open{opacity:1;pointer-events:auto}

.site-nav{position:fixed;top:0;right:0;z-index:80;height:100vh;
  width:min(80vw,18rem);display:flex;flex-direction:column;gap:.15rem;
  padding:4.5rem 1.25rem 2rem;
  background:var(--bg-secondary);border-left:1px solid var(--border-subtle);
  box-shadow:-2rem 0 4rem rgba(0,0,0,.6);
  transform:translateX(100%);transition:transform .28s ease}
.site-nav.is-open{transform:translateX(0)}
.site-nav a{min-height:48px;display:flex;align-items:center;padding:.5rem .7rem;
  border-radius:8px;color:var(--text-muted);text-decoration:none;
  font-size:.95rem;letter-spacing:.04em}
.site-nav a:hover{color:var(--text-primary);background:rgba(243,244,246,.05)}
.site-nav a[aria-current="page"]{color:var(--accent-gold)}

.nav-close{position:absolute;top:1rem;right:1rem;width:2.4rem;height:2.4rem;
  border:none;background:transparent;color:var(--text-muted);
  font-size:1.6rem;line-height:1;cursor:pointer;border-radius:999px}
.nav-close:hover{color:var(--text-primary);background:rgba(243,244,246,.05)}
body.nav-locked{overflow:hidden}

/* ---------- buttons ----------------------------------------------------- */

.btn{display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:.65rem 1.4rem;border-radius:4px;
  font:500 .78rem/1 var(--font-body);letter-spacing:.1em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;text-align:center;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease}

.btn--solid{background:var(--accent-gold);border:1px solid var(--accent-gold);
  color:#17130a;font-weight:600}
.btn--solid:hover{background:var(--accent-gold-hi);border-color:var(--accent-gold-hi);
  color:#17130a}

.btn--outline{background:transparent;border:1px solid var(--accent-gold);
  color:var(--accent-gold)}
.btn--outline:hover{background:rgba(226,184,93,.12);color:var(--accent-gold-hi);
  border-color:var(--accent-gold-hi)}

.btn--ghost{background:transparent;border:1px solid var(--border-subtle);
  color:var(--text-muted)}
.btn--ghost:hover{color:var(--text-primary);border-color:var(--text-muted)}

.btn-stack{display:flex;flex-direction:column;gap:.6rem;align-items:stretch}

/* ---------- book display ------------------------------------------------ */

.hero{padding:clamp(2rem,6vh,3.5rem) 0 var(--section-gap)}
.hero .site-title{margin-bottom:clamp(1.75rem,5vh,2.75rem)}

/* 2-up grid on mobile, per spec */
.book-grid{display:grid;grid-template-columns:repeat(2,1fr);
  gap:clamp(1rem,4vw,2rem);align-items:start}

.book-card{display:flex;flex-direction:column;align-items:center;
  text-align:center;gap:.85rem}

/* the ambient crimson glow + lift, exactly as specified */
.book-figure{
  position:relative;width:100%;max-width:14rem;margin:0 auto;
  filter:drop-shadow(0 0 25px var(--accent-glow));
  transition:transform .3s ease;
}
.book-card:hover .book-figure,
.book-card:focus-within .book-figure{transform:translateY(-6px)}

/* pseudo-3D hardcover: cover face + page block on the right edge */
.book-figure__cover{display:block;width:100%;border-radius:2px 5px 5px 2px;
  box-shadow:
    inset 7px 0 10px -6px rgba(0,0,0,.85),
    0 1rem 2rem rgba(0,0,0,.7),
    0 0 0 1px rgba(0,0,0,.6)}
.book-figure__pages{position:absolute;top:1.5%;right:-6px;height:97%;width:7px;
  border-radius:0 3px 3px 0;pointer-events:none;
  background:repeating-linear-gradient(180deg,
    #cfc7b7 0 1px,#8e8676 1px 2px);
  box-shadow:1px 0 3px rgba(0,0,0,.55)}

/* in-progress title: frosted card in place of a cover */
.book-figure--frosted{background:rgba(22,26,32,.55);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  border:1px solid var(--border-subtle);border-radius:5px;
  aspect-ratio:2/3;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:.6rem;padding:1.25rem}

.book-title{font-family:var(--font-display);font-weight:600;
  font-size:clamp(1.05rem,3.4vw,1.35rem);line-height:1.2;color:var(--text-primary)}
.book-meta{font-size:.78rem;color:var(--text-muted);letter-spacing:.04em}
.book-status{font-size:.68rem;text-transform:uppercase;letter-spacing:.14em;
  color:var(--accent-gold)}

.book-promises{display:none}
.book-card .btn{width:100%;max-width:12rem}

/* ---------- author promises -------------------------------------------- */

/* no top padding: the section above already supplies the gap */
.promises{padding:0 0 var(--section-gap)}
.promises__panel{background:var(--bg-secondary);
  border:1px solid var(--border-subtle);border-radius:10px;
  padding:clamp(1.5rem,5vw,2.5rem)}
.promises .section-title{margin-bottom:clamp(1.25rem,4vh,2rem)}
.promises__list{display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(.75rem,3vw,2rem)}
.promises__item{display:flex;flex-direction:column;align-items:center;
  text-align:center;gap:.6rem}
.promises__item svg{width:30px;height:30px;color:var(--accent-gold);
  stroke:currentColor;fill:none;stroke-width:1.4;
  stroke-linecap:round;stroke-linejoin:round}
.promises__label{font-size:.7rem;text-transform:uppercase;letter-spacing:.12em;
  color:var(--text-primary)}

/* ---------- compact signup --------------------------------------------- */

.signup{padding:0 0 var(--section-gap)}
.signup__panel{background:var(--bg-secondary);border:1px solid var(--border-subtle);
  border-radius:10px;padding:clamp(1.25rem,4vw,2rem);text-align:center}
.signup__panel .section-title{margin-bottom:.75rem}
.signup__panel p{margin-inline:auto}

form{margin-top:1.25rem}
.form-row{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center}
label{display:block;margin-bottom:.5rem;font-size:.72rem;font-weight:500;
  letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted)}
input[type="email"]{flex:1 1 15rem;min-width:0;min-height:44px;
  border:1px solid var(--border-subtle);border-radius:4px;
  background:rgba(243,244,246,.04);color:var(--text-primary);
  padding:.65rem 1rem;font:inherit}
input[type="email"]:hover{border-color:var(--text-muted)}
input::placeholder{color:#6b7280;opacity:1}

.fineprint{font-size:.8rem;color:var(--text-muted);margin-top:.9rem}
.status-note{margin:1.25rem 0 0;padding:.9rem 1rem;border-radius:6px;
  border:1px solid var(--border-subtle);background:rgba(138,28,28,.08);
  color:var(--text-primary);font-size:.85rem;text-align:left}

/* ---------- library (books page) --------------------------------------- */

.library{padding:clamp(2rem,6vh,3rem) 0 var(--section-gap)}
.library__head{margin-bottom:clamp(2rem,6vh,3rem)}
.library__list{display:grid;gap:clamp(2.5rem,7vh,4rem)}

.entry{display:grid;gap:clamp(1.25rem,4vw,2rem);align-items:start;
  padding-bottom:clamp(2rem,5vh,3rem);border-bottom:1px solid var(--border-subtle)}
.entry:last-child{border-bottom:0;padding-bottom:0}
.entry__figure{width:min(100%,13rem);margin-inline:auto}
.entry__body h2{margin-bottom:.5rem}
.entry__meta{font-size:.8rem;color:var(--text-muted);letter-spacing:.04em;
  margin-bottom:1rem}
.entry__synopsis{color:var(--text-muted);max-width:60ch}
.entry__synopsis strong{color:var(--text-primary);font-weight:500}
.entry__actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1.25rem}

/* ---------- prose pages (about) ----------------------------------------- */

.page-section{padding:clamp(2.5rem,7vh,4rem) 0 var(--section-gap)}
.prose{position:relative}
.prose h1{margin-bottom:1.75rem}
.prose > p{max-width:58ch;color:var(--text-muted)}
.prose > p strong,.prose > p em{color:var(--text-primary)}
.contact-section{margin-top:clamp(2.5rem,7vh,4rem);padding-top:2rem;
  border-top:1px solid var(--border-subtle)}
.contact-section h2{margin-bottom:.75rem}
.page-accent{display:none}

/* ---------- newsletter page --------------------------------------------- */

.newsletter-page{padding:clamp(2.5rem,7vh,4rem) 0 var(--section-gap)}
.newsletter-panel{background:var(--bg-secondary);border:1px solid var(--border-subtle);
  border-radius:10px;padding:clamp(1.5rem,5vw,2.75rem)}
.newsletter-panel h1{margin-bottom:.75rem}
.newsletter-panel .lede{color:var(--text-muted);max-width:38ch}

/* ---------- 404 ---------------------------------------------------------- */

.not-found{min-height:60vh;display:flex;align-items:center;
  padding:var(--section-gap) 0;text-align:center}
.not-found .wrap{display:flex;flex-direction:column;align-items:center}
.not-found-mark{width:6rem;margin:0 0 1.75rem;opacity:.9;
  filter:drop-shadow(0 0 25px var(--accent-glow))}
.not-found h1{margin-bottom:1rem}
.not-found p{color:var(--text-muted)}
.not-found .entry__actions{justify-content:center}

/* ---------- footer ------------------------------------------------------- */

footer{padding:2.25rem 0 2.75rem;border-top:1px solid var(--border-subtle);
  color:var(--text-muted);font-size:.82rem}
.footer-inner{display:flex;flex-direction:column;align-items:center;
  gap:.85rem;text-align:center}
.footer-links{display:flex;align-items:center;gap:.75rem}
footer a{color:var(--text-muted);text-decoration:none}
footer a:hover{color:var(--accent-gold)}

/* ==========================================================================
   768px and up
   ========================================================================== */

@media (min-width:768px){
  body{font-size:17px}

  /* nav becomes inline; hamburger and drawer stand down */
  .nav-toggle,.nav-close{display:none}
  .nav-scrim{display:none}
  .site-nav{position:static;height:auto;width:auto;padding:0;
    flex-direction:row;align-items:center;gap:.25rem;
    background:none;border-left:0;box-shadow:none;transform:none}
  .site-nav a{min-height:40px;padding:.4rem .7rem;font-size:.88rem;
    border-radius:4px}
  .site-nav a[aria-current="page"]{color:var(--accent-gold);
    background:transparent;box-shadow:inset 0 -1px 0 var(--accent-gold)}

  .header-inner{min-height:4.25rem}

  /* books sit side by side with their copy, per the desktop spec */
  .book-grid{grid-template-columns:repeat(2,1fr);
    gap:clamp(2rem,5vw,4rem);align-items:center}
  .book-card{flex-direction:row;text-align:left;align-items:center;
    gap:clamp(1.25rem,3vw,2rem)}
  .book-figure{max-width:15rem;flex:0 0 auto;margin:0}
  .book-card__body{display:flex;flex-direction:column;gap:.5rem}
  .book-card .btn{width:auto;max-width:none}
  .book-card .btn-stack{align-items:flex-start;margin-top:.5rem}
  .book-promises{display:flex;flex-direction:column;gap:.15rem;
    font-size:.85rem;color:var(--text-muted)}

  .entry{grid-template-columns:minmax(0,13rem) minmax(0,1fr);
    gap:clamp(2rem,5vw,3.5rem)}
  .entry__figure{margin:0}

  .footer-inner{flex-direction:row;justify-content:space-between;text-align:left}

  .page-accent{display:block;position:absolute;top:-2rem;right:-4rem;
    width:12rem;opacity:.35;pointer-events:none;z-index:-1}
}

/* ==========================================================================
   1024px and up
   ========================================================================== */

@media (min-width:1024px){
  .hero{padding-top:clamp(3rem,7vh,4.5rem)}
  .book-figure{max-width:17rem}
  .promises__list{gap:3rem}
}

/* ---------- motion preferences ------------------------------------------ */

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.01ms !important;
    animation-duration:.01ms !important}
  .book-card:hover .book-figure{transform:none}
}


/* ==========================================================================
   Carry-over classes still used by about / newsletter / 404, mapped onto
   the new design tokens so those pages match without being rewritten.
   ========================================================================== */

.kicker{margin:0 0 .75rem;font:500 .72rem/1 var(--font-body);
  text-transform:uppercase;letter-spacing:.16em;color:var(--accent-gold)}

.lede{font-family:var(--font-display);font-weight:600;
  font-size:clamp(1.15rem,2.4vw,1.5rem);line-height:1.35;
  color:var(--text-primary);max-width:36ch}

.action-row{display:flex;flex-wrap:wrap;align-items:center;
  gap:.75rem 1rem;margin-top:1.5rem}

.button-link{display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:.65rem 1.4rem;border-radius:4px;
  font:600 .78rem/1 var(--font-body);letter-spacing:.1em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;
  background:var(--accent-gold);border:1px solid var(--accent-gold);color:#17130a;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease}
.button-link:hover{background:var(--accent-gold-hi);
  border-color:var(--accent-gold-hi);color:#17130a}

.text-link{display:inline-flex;align-items:center;min-height:44px;
  font:500 .82rem/1 var(--font-body);letter-spacing:.06em;
  color:var(--accent-gold);text-decoration:none}
.text-link:hover{color:var(--accent-gold-hi);text-decoration:underline}

.supporting,.book-facts{color:var(--text-muted)}
