/* =========================================================================
   POST BOOK CLARITY  ::  "the reading room"
   The New Yorker, run by a 2am Kindle goblin.
   Dark academia, warm candlelight, aged paper, brass, oxblood, forest green.
   You do NOT edit this file. To change reviews, open reviews.js only.
   ========================================================================= */

:root {
  /* the room: deep, warm, dim, never bright-white */
  --bg:        #16241d;          /* deep forest, the bookshop wall */
  --bg-deep:   #0f1a15;
  --panel:     #1d2c24;          /* charcoal-green panel */
  --paper:     #f0e8d4;          /* warm cream paper for "card" surfaces */
  --paper-2:   #e6dabd;

  /* ink */
  --cream:      #ece2cd;
  --cream-soft: #c9bda3;
  --cream-faint:#9b8f78;
  --charcoal:   #211c17;          /* type on cream */
  --charcoal-soft:#4a4036;

  /* jewel + metal */
  --forest:      #1f4536;
  --forest-deep: #143025;
  --forest-light:#5c8a72;
  --oxblood:      #6f1d2b;
  --oxblood-light:#a23545;
  --oxblood-bright:#c14b5a;
  --brass:       #b08d4c;
  --brass-light: #d8b878;
  --rose:        #c98a8f;

  --line:        rgba(176,141,76,.22);   /* brass hairline */
  --line-soft:   rgba(236,226,205,.14);
  --line-strong: rgba(176,141,76,.46);

  --slay: #a23545;  --slay-ink: #f6e9df;   /* oxblood */
  --mid:  #1f4536;  --mid-ink:  #e7f0e6;   /* forest */
  --nay:  #6a6052;  --nay-ink:  #f1ebdf;   /* faded ink */

  --maxw: 1140px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-soft: 0 22px 46px -28px rgba(10,24,17,.55);
  --shadow-lift: 0 30px 62px -30px rgba(10,24,17,.66);

  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-label:   "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.1rem; line-height: 1.76;
  color: var(--cream); background-color: var(--bg);
  /* warm pools of candlelight, not flat */
  background-image:
    radial-gradient(960px 560px at 16% -8%, rgba(47,98,77,.30), transparent 56%),
    radial-gradient(800px 620px at 90% 4%, rgba(150,70,80,.14), transparent 54%),
    radial-gradient(860px 780px at 50% 122%, rgba(31,69,54,.32), transparent 60%),
    radial-gradient(640px 470px at 50% 36%, rgba(201,138,143,.07), transparent 64%);
  background-attachment: fixed; min-height: 100vh; position: relative; overflow-x: hidden;
}
/* paper grain over the whole room for texture/depth */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
/* faint vignette to deepen the corners of the room */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  box-shadow: inset 0 0 180px 10px rgba(12,24,18,.28);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--oxblood-light); color: var(--cream); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); position: relative; z-index: 1; }

/* a reusable brass divider ornament */
.ornament { width: 196px; max-width: 60%; height: 30px; margin: 1.4rem auto; opacity: .9; }
.ornament svg { width: 100%; height: 100%; }

/* header: like a library catalogue header plate */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(15,26,21,.84); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; gap: 1rem; }
.brand { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; }
.brand-mark { font-family: var(--font-display); font-weight: 600; font-size: 1.42rem; line-height: 1; color: var(--cream); letter-spacing: -.01em; }
.brand-mark em { font-style: italic; color: var(--rose); }
.brand-sub { font-family: var(--font-label); font-style: italic; font-size: 1rem; color: var(--brass-light); white-space: nowrap; }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a { text-decoration: none; color: var(--cream-soft); font-family: var(--font-display); font-weight: 500; font-size: 1rem; padding-bottom: 3px; border-bottom: 1px solid transparent; transition: .18s; letter-spacing: .01em; }
.nav a:hover, .nav a.active { color: var(--brass-light); border-color: var(--brass); }

/* hero: stepping into the reading room */
.hero { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.6rem,4vw,2.4rem); position: relative; }
.hero .eyebrow { font-family: var(--font-label); font-style: italic; letter-spacing: .06em; font-size: 1.06rem; color: var(--brass-light); margin: 0 0 1.1rem; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(3rem, 9.5vw, 6.4rem); line-height: .92; letter-spacing: -.025em; margin: 0; color: var(--cream); text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.hero h1 .clarity { font-style: italic; color: var(--rose); }
.hero .motto { font-family: var(--font-display); font-style: italic; font-size: clamp(1rem,2vw,1.2rem); letter-spacing: .12em; color: var(--brass); margin: 1rem 0 0; text-transform: lowercase; }
.hero .tagline { font-size: clamp(1.16rem, 2.5vw, 1.46rem); max-width: 38ch; margin: 1.5rem auto 0; color: var(--cream); font-weight: 500; }
.hero .ethos { max-width: 60ch; margin: 1.1rem auto 0; color: var(--cream-soft); font-size: 1.05rem; }
.hero .scribble { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--rose); display: inline-block; margin-top: 1.3rem; }

/* controls: like the date-stamp row on a library card */
.controls { display: flex; flex-wrap: wrap; gap: .9rem 1.1rem; align-items: center; margin: .4rem 0 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.search { flex: 1 1 220px; min-width: 180px; display: flex; align-items: center; gap: .55rem; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .6rem 1rem; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--oxblood-light); box-shadow: 0 0 0 3px rgba(162,53,69,.16); }
.search input { border: 0; background: transparent; outline: none; font-family: var(--font-body); font-size: 1.02rem; color: var(--charcoal); width: 100%; }
.search input::placeholder { color: var(--charcoal-soft); font-style: italic; opacity: .7; }
.search svg { flex: none; color: var(--oxblood); opacity: .85; }
.pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill { border: 1px solid var(--line-strong); background: transparent; color: var(--cream-soft); border-radius: var(--radius); padding: .42rem 1rem; font-family: var(--font-display); font-style: italic; font-size: .98rem; transition: .15s; }
.pill:hover { color: var(--brass-light); border-color: var(--brass); }
.pill[aria-pressed="true"] { background: var(--oxblood); color: var(--cream); border-color: var(--oxblood-light); }

/* grid + cards (Kindle-library style: small cover thumbnail beside the text) */
.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { position: relative; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: row; align-items: stretch; overflow: hidden; box-shadow: var(--shadow-soft); transition: transform .22s ease, box-shadow .22s ease; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.cover { position: relative; width: 92px; flex: none; aspect-ratio: 2 / 3; overflow: hidden; border-right: 1px solid var(--line); box-shadow: 2px 0 8px -4px rgba(10,24,17,.4); }
.cover-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .25rem; padding: .6rem; background: linear-gradient(165deg, var(--forest-deep) 0%, var(--forest) 55%, #2a5644 100%); }
.cover-ph::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(216,184,120,.4); border-radius: 2px; }
.cover-ph::after { content: "❦"; position: absolute; top: 7px; right: 8px; color: var(--brass-light); font-size: .8rem; opacity: .85; }
.cover-ph .ph-title { font-family: var(--font-display); font-weight: 600; font-size: .82rem; line-height: 1.05; color: var(--cream); position: relative; }
.cover-ph .ph-author { font-family: var(--font-display); font-style: italic; color: rgba(236,226,205,.8); font-size: .66rem; position: relative; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-info { padding: 1rem 1.15rem 1.05rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; background: var(--paper); }
.card-info .meta { font-family: var(--font-label); font-style: italic; font-size: .9rem; color: var(--oxblood); }
.card-info h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.08; margin: 0; color: var(--charcoal); }
.card-info .author { color: var(--charcoal-soft); font-style: italic; margin: 0; font-size: .95rem; }
.card-info .card-foot { margin-top: auto; padding-top: .6rem; display: flex; }

/* verdict stamp: like an ink library stamp */
.stamp { font-family: var(--font-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .74rem; padding: .36rem .8rem .32rem; border-radius: 2px; border: 1.5px solid currentColor; display: inline-block; white-space: nowrap; }
.stamp.slay { color: var(--oxblood-light); } .stamp.mid { color: var(--forest-light); } .stamp.nay { color: var(--cream-faint); }
.stamp.solid { border-color: transparent; }
.stamp.solid.slay { background: var(--slay); color: var(--slay-ink); }
.stamp.solid.mid  { background: var(--mid);  color: var(--mid-ink); }
.stamp.solid.nay  { background: var(--nay);  color: var(--nay-ink); }
.stamp.big { font-size: .86rem; padding: .5rem 1.05rem; }
.empty { text-align: center; color: var(--cream-faint); font-style: italic; padding: 3rem 0; grid-column: 1 / -1; }

/* review page: a page from a literary journal */
.review { padding: clamp(1.5rem, 4vw, 2.6rem) 0 4rem; max-width: 740px; }
.back { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--brass-light); font-family: var(--font-display); font-style: italic; font-size: 1rem; margin-bottom: 1.8rem; }
.back:hover { color: var(--rose); }
.review-head { display: flex; flex-wrap: wrap; gap: 1.4rem 1.9rem; align-items: flex-start; }
.review-cover { width: 172px; flex: none; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-soft); align-self: flex-start; }
.review-head .titles { flex: 1 1 50%; min-width: 240px; }
.review .kicker { font-family: var(--font-label); font-style: italic; letter-spacing: .04em; color: var(--brass-light); font-size: 1.02rem; margin: 0 0 .5rem; }
.review h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.3rem, 6vw, 3.6rem); line-height: 1; margin: 0; color: var(--cream); letter-spacing: -.02em; }
.review .by { font-style: italic; color: var(--cream-soft); font-size: 1.2rem; margin: .6rem 0 0; }
.review-head .titles .stamp.big { margin-top: 1.1rem; }

.review-body { margin-top: 2.2rem; background: var(--paper); color: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1.4rem, 4vw, 2.6rem); box-shadow: var(--shadow-soft); }
.section { position: relative; padding-left: 1.8rem; margin: 2.1rem 0; }
.section:first-child { margin-top: .4rem; }
.section::before { content: ""; position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 2px; background: var(--brass); opacity: .9; }
.section h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--oxblood); margin: 0 0 .5rem; letter-spacing: -.01em; }
.section p { margin: .5rem 0; color: var(--charcoal); }
.review-body > div.section:first-of-type > p:first-of-type::first-letter { font-family: var(--font-display); font-weight: 600; float: left; font-size: 4rem; line-height: .68; padding: .3rem .55rem 0 0; color: var(--oxblood); }

.tropes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; padding-left: 1.8rem; }
.trope { font-family: var(--font-label); font-style: italic; font-size: .94rem; color: var(--forest-deep); background: rgba(31,69,54,.08); border: 1px solid rgba(31,69,54,.3); border-radius: 999px; padding: .26rem .9rem; }

.lovebounce { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; margin: 2.3rem 0; }
.lb { border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-soft); }
.lb.love   { border-left: 3px solid var(--oxblood-light); }
.lb.bounce { border-left: 3px solid var(--forest-light); }
.lb h3 { font-family: var(--font-display); font-style: italic; margin: 0 0 .45rem; font-size: 1.14rem; color: var(--oxblood); }
.lb p { margin: 0; color: var(--charcoal-soft); font-size: 1.01rem; }

.tldr { margin: 2.6rem 0; padding: 1.7rem 1.8rem; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--oxblood) 0%, var(--oxblood-light) 100%); color: var(--cream); border: 1px solid var(--line-strong); position: relative; }
.tldr::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(236,226,205,.22); border-radius: 4px; pointer-events: none; }
.tldr .lab { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--brass-light); display: inline-block; margin-bottom: .3rem; position: relative; }
.tldr p { margin: 0; font-size: 1.32rem; font-family: var(--font-display); color: var(--cream); line-height: 1.42; position: relative; }

/* spoiler zone: a sealed envelope in the room */
.spoiler { margin: 2.8rem 0 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--oxblood-light); }
.spoiler-bar { background: var(--oxblood); color: var(--cream); padding: .95rem 1.2rem; display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-style: italic; font-size: 1.08rem; letter-spacing: .01em; }
.spoiler-bar .warn { font-style: normal; }
.spoiler-inner { position: relative; padding: 1.6rem 1.6rem 1.8rem; background: var(--paper); }
.spoiler-inner .content { transition: filter .4s ease; color: var(--charcoal); }
.spoiler.locked .content { filter: blur(11px); user-select: none; pointer-events: none; }
.spoiler .reveal-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .85rem; text-align: center; background: rgba(239,230,208,.78); backdrop-filter: blur(3px); padding: 1.2rem; }
.spoiler:not(.locked) .reveal-overlay { display: none; }
.reveal-btn { background: var(--oxblood); color: var(--cream); border: 1px solid var(--brass); font-family: var(--font-display); font-style: italic; font-size: 1.04rem; padding: .8rem 1.7rem; border-radius: var(--radius); box-shadow: var(--shadow-soft); transition: transform .15s, background .2s; }
.reveal-btn:hover { transform: translateY(-2px); background: var(--oxblood-light); }
.reveal-note { font-family: var(--font-display); font-style: italic; color: var(--charcoal-soft); font-size: 1.12rem; }
.spoiler .content p { margin: .6rem 0; }
.spoiler .content .margin-note { color: var(--oxblood); border-left-color: var(--brass); }
.margin-note { font-family: var(--font-display); font-style: italic; font-size: 1.22rem; color: var(--rose); line-height: 1.42; margin: 1.6rem 0; padding-left: 1.8rem; border-left: 2px solid var(--brass); }

/* about */
.prose { max-width: 680px; padding: clamp(1.5rem,4vw,2.6rem) 0 4rem; }
.prose h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem,6vw,3.4rem); color: var(--cream); margin: 0 0 1rem; line-height: 1.02; letter-spacing: -.02em; }
.prose h2 { font-family: var(--font-display); font-style: italic; color: var(--rose); font-size: 1.55rem; margin: 2.2rem 0 .5rem; }
.prose p { color: var(--cream-soft); }
.prose em { color: var(--brass-light); font-style: italic; }
.prose .verdict-key { display: grid; gap: .85rem; margin: 1.3rem 0; }
.prose .vk { display: flex; gap: .9rem; align-items: center; }
.prose .vk span { color: var(--cream-soft); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2.6rem 0 3rem; color: var(--cream-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.site-footer .f-brand { font-family: var(--font-display); color: var(--cream); font-size: 1.18rem; }
.site-footer .f-brand b { color: var(--rose); font-weight: 600; }
.site-footer .f-note { font-family: var(--font-display); font-style: italic; font-size: 1.16rem; color: var(--brass-light); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero h1, .hero .motto, .hero .ornament, .hero .tagline, .hero .ethos, .hero .scribble { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 { animation-delay: .05s; } .hero .motto { animation-delay: .12s; } .hero .ornament { animation-delay: .18s; } .hero .tagline { animation-delay: .24s; } .hero .ethos { animation-delay: .3s; } .hero .scribble { animation-delay: .36s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 620px) {
  .lovebounce { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .nav { gap: 1.2rem; }
  .review-cover { width: 140px; }
  body { font-size: 1.05rem; }
}

/* ----------------------------------------------- warmth pass: genre ribbon */
/* a quiet brass marquee proving she reads across every genre */
.genre-ribbon {
  position: relative; margin: 2.2rem auto 0; max-width: 760px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .7rem 0;
}
.genre-ribbon::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(47,98,77,.07), transparent 40%, transparent 60%, rgba(201,138,143,.06));
}
.genre-ribbon span {
  display: inline-block; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-size: 1.04rem; color: var(--brass-light);
  padding: 0 1.1rem; position: relative;
}
.genre-ribbon span:not(:last-child)::after { content: "❧"; position: absolute; right: -.35rem; color: var(--oxblood-light); font-style: normal; font-size: .8rem; opacity: .8; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.genre-inner { display: flex; width: max-content; animation: drift 42s linear infinite; }
.genre-inner span { flex: none; }

/* aged-paper "currently devouring" / general light panel helper, available for later */
.paper-panel { background: var(--paper); color: var(--charcoal); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }

/* warm the cover placeholder a touch (less inky, more forest-at-dusk) */
.cover-ph { background: linear-gradient(165deg, #1d4233 0%, #285340 55%, #356a52 100%); }

@media (prefers-reduced-motion: reduce) { .genre-inner { animation: none !important; flex-wrap: wrap; justify-content: center; } }
