/* ==========================================================================
   Kate Miriam Loewenthal — Global design system
   "The Scholar's Library": warm ivory paper, deep ink, evergreen + antique gold.
   Change the design from here: tokens first, then components.
   ========================================================================== */

/* ---------------------------------------------------------------- Tokens -- */
:root {
  /* Palette — paper & ink */
  --paper:        #f4efe4;   /* page background, warm ivory      */
  --paper-2:      #ece5d6;   /* alternate section band           */
  --paper-3:      #e6ddca;   /* deeper band / hairline fill      */
  --card:         #fcfaf4;   /* raised surfaces                  */
  --card-2:       #f8f4ea;
  --ink:          #201d18;   /* primary text, warm near-black    */
  --ink-2:        #4b453b;   /* secondary text                   */
  --ink-3:        #7c7364;   /* muted / meta                     */
  --line:         #e0d6c3;   /* hairlines                        */
  --line-2:       #d0c2a8;   /* stronger hairline                */

  /* Palette — accents */
  --pine:         #1f3d34;   /* primary accent, deep evergreen   */
  --pine-2:       #2d5849;   /* links / hover                    */
  --pine-soft:    #eef1ec;   /* faint evergreen wash             */
  --gold:         #a5803a;   /* antique gold, flourishes         */
  --gold-2:       #c2a05a;   /* lighter gold                     */
  --gold-soft:    #f3ead6;   /* faint gold wash                  */
  --claret:       #7c342c;   /* rare tertiary                    */

  /* Dark surfaces (hero, footer) */
  --dark:         #16211c;   /* deep near-black evergreen        */
  --dark-2:       #1d2c25;
  --dark-line:    #33453c;
  --on-dark:      #ece4d3;   /* text on dark                     */
  --on-dark-2:    #a9b3a5;   /* muted text on dark               */

  /* Tier / availability colours (library) */
  --t-full:       #2f7d52;  --t-full-bg:  #e8f3ec;
  --t-abstract:   #9a6a12;  --t-abstract-bg: #f6ecd6;
  --t-book:       #7c342c;  --t-book-bg:  #f3e4e0;

  /* Typography */
  --f-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --f-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --f-ui:      "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;

  /* Fluid type scale */
  --step--2: clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.80rem + 0.14vw, 0.92rem);
  --step-0:  clamp(1.02rem, 0.99rem + 0.16vw, 1.14rem);
  --step-1:  clamp(1.22rem, 1.16rem + 0.32vw, 1.44rem);
  --step-2:  clamp(1.46rem, 1.35rem + 0.55vw, 1.86rem);
  --step-3:  clamp(1.75rem, 1.56rem + 0.95vw, 2.45rem);
  --step-4:  clamp(2.10rem, 1.78rem + 1.60vw, 3.30rem);
  --step-5:  clamp(2.52rem, 1.98rem + 2.70vw, 4.60rem);
  --step-6:  clamp(3.00rem, 2.10rem + 4.30vw, 6.20rem);

  /* Spacing */
  --sp-1: 0.375rem; --sp-2: 0.75rem;  --sp-3: 1.25rem; --sp-4: 2rem;
  --sp-5: 3rem;     --sp-6: 4.5rem;   --sp-7: 7rem;    --sp-8: 10rem;

  /* Structure */
  --measure: 68ch;          /* reading width          */
  --wrap:    1200px;        /* page max width         */
  --wrap-wide: 1360px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-sm: 8px;

  /* Glass + shadow */
  --glass-bg:    rgba(248, 244, 235, 0.66);
  --glass-brd:   rgba(255, 255, 255, 0.55);
  --glass-blur:  blur(18px) saturate(1.4);
  --shadow-1: 0 1px 2px rgba(43, 33, 15, 0.05), 0 2px 8px rgba(43, 33, 15, 0.05);
  --shadow-2: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 24px -12px rgba(43,33,15,.28), 0 2px 6px rgba(43,33,15,.06);
  --shadow-3: 0 1px 0 rgba(255,255,255,.75) inset, 0 22px 48px -20px rgba(43,33,15,.34), 0 4px 12px rgba(43,33,15,.08);
  --shadow-dark: 0 24px 60px -24px rgba(0,0,0,.6);

  --ease: cubic-bezier(.22,.68,.16,1);
}

/* ------------------------------------------------------------- Base reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Atmospheric background: warm gradient mesh + faint grain, fixed */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60vw 55vh at 8% -6%,  rgba(197, 160, 90, 0.16), transparent 60%),
    radial-gradient(58vw 60vh at 104% 8%, rgba(45, 88, 73, 0.13),  transparent 62%),
    radial-gradient(70vw 70vh at 50% 118%, rgba(124, 52, 44, 0.06), transparent 60%),
    var(--paper);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(165, 128, 58, 0.22); color: var(--ink); }

/* ---------------------------------------------------------- Typography -- */
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.08;
  letter-spacing: -0.015em; color: var(--ink); margin: 0 0 0.5em; }
h1 { font-size: var(--step-5); font-weight: 400; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p  { margin: 0 0 1.1em; }
a  { color: var(--pine-2); text-decoration: none; }
strong { font-weight: 600; }
em { font-style: italic; }

/* Eyebrow / kicker */
.eyebrow {
  font-family: var(--f-ui); font-weight: 600;
  font-size: var(--step--2); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); display: block; margin: 0 0 1rem; line-height: 1.5;
}
.eyebrow::before { content: ""; display: inline-block; width: 26px; height: 1px; background: currentColor;
  opacity: .7; vertical-align: middle; margin-right: 0.7em; }
.eyebrow.center { text-align: center; }
.eyebrow.on-dark { color: var(--gold-2); }
@media (max-width: 480px) { .eyebrow { letter-spacing: 0.14em; } }

/* Fancy link underline (draw on hover) */
.ulink {
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat; background-position: 0 100%;
  background-size: 0% 1.5px; transition: background-size .4s var(--ease);
  padding-bottom: 1px;
}
.ulink:hover { background-size: 100% 1.5px; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); font-weight: 380; }

/* --------------------------------------------------------------- Layout -- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem); }
.wrap-wide { max-width: var(--wrap-wide); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem); }
.section { padding-block: clamp(3.5rem, 8vw, var(--sp-7)); position: relative; }
.band { background: var(--paper-2); }
.band-3 { background: var(--paper-3); }
.hr-rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-2) 18%, var(--line-2) 82%, transparent); margin: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* Section heading block */
.sec-head { max-width: 40ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: var(--step-4); margin-bottom: .35em; }
.sec-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }

/* --------------------------------------------------------------- Header -- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom-color: rgba(208,194,168,.5);
  box-shadow: 0 6px 24px -18px rgba(43,33,15,.5);
}
/* While the mobile menu is open, remove the header's backdrop-filter and shadow.
   backdrop-filter turns the header into a containing block for position:fixed
   descendants, which would otherwise trap the full-screen menu inside the header's
   ~78px box and let the page show through below it. */
.site-header.menu-open {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background: transparent !important; box-shadow: none !important; border-bottom-color: transparent !important;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: 78px; }
.brand { font-family: var(--f-display); font-weight: 500; font-size: 1.32rem; letter-spacing: -.01em;
  color: var(--ink); display: inline-flex; align-items: baseline; gap: .5rem; line-height: 1; }
.brand .brand-sub { font-family: var(--f-ui); font-weight: 500; font-size: .62rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--gold); }
.site-header.on-dark-top:not(.scrolled) .brand { color: var(--on-dark); }
.site-header.on-dark-top:not(.scrolled) .nav-links a { color: var(--on-dark-2); }
.site-header.on-dark-top:not(.scrolled) .nav-links a:hover,
.site-header.on-dark-top:not(.scrolled) .nav-links a.active { color: var(--on-dark); }
.site-header.on-dark-top:not(.scrolled) .burger span { background: var(--on-dark); }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--f-ui); font-size: .78rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2); position: relative; padding: .4rem 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1.5px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s 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); }

.burger { display: none; background: none; border: 0; width: 34px; height: 34px; cursor: pointer;
  position: relative; z-index: 110; }
.burger span { display: block; width: 24px; height: 1.6px; background: var(--ink); margin: 5px auto;
  transition: transform .35s var(--ease), opacity .25s var(--ease); }
.burger.open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 820px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center; gap: 2.2rem;
    /* fully OPAQUE panel — the page must never show through the menu */
    background: linear-gradient(165deg, #f8f3ea 0%, #efe7d6 100%);
    transform: translateY(-100%); transition: transform .45s var(--ease), opacity .45s var(--ease);
    opacity: 0; pointer-events: none;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { font-family: var(--f-display); font-size: 1.7rem; text-transform: none;
    color: var(--ink) !important; letter-spacing: .01em; padding: .3rem 0; }
  .nav-links a::after { height: 2px; bottom: -2px; }
  .site-header.on-dark-top:not(.scrolled) .nav-links a { color: var(--ink); }
}

/* --------------------------------------------------------------- Buttons -- */
.btn {
  font-family: var(--f-ui); font-weight: 600; font-size: .82rem; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: .55rem; padding: .82em 1.5em; border-radius: 100px;
  cursor: pointer; border: 1px solid transparent; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease); text-decoration: none;
}
.btn svg { width: 1em; height: 1em; }
.btn-primary { background: var(--pine); color: var(--on-dark); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 24px -12px rgba(31,61,52,.7); }
.btn-primary:hover { background: var(--pine-2); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 16px 30px -12px rgba(31,61,52,.7); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: rgba(252,250,244,.5); }
.btn-ghost:hover { border-color: var(--gold); color: var(--pine); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); transform: translateY(-2px); }
.btn.on-dark.btn-ghost { border-color: rgba(236,228,211,.3); color: var(--on-dark); background: rgba(255,255,255,.04); }
.btn.on-dark.btn-ghost:hover { border-color: var(--gold-2); color: #fff; }
.btn-sm { padding: .55em 1.05em; font-size: .74rem; }

.arrow-link { font-family: var(--f-ui); font-weight: 600; font-size: .84rem; letter-spacing: .05em;
  color: var(--pine); display: inline-flex; align-items: center; gap: .5rem; }
.arrow-link .a { transition: transform .3s var(--ease); }
.arrow-link:hover .a { transform: translateX(5px); }

/* --------------------------------------------------------------- Glass card -- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(252,250,244,.35));
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid var(--glass-brd); border-radius: var(--radius);
  box-shadow: var(--shadow-2); position: relative; overflow: hidden;
}
.glass::before { content: ""; position: absolute; inset: 0 0 auto; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.5), transparent); pointer-events: none; }

/* ----------------------------------------------------- Publication card -- */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.pub-card {
  display: flex; flex-direction: column; gap: .75rem; padding: 1.6rem 1.7rem 1.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1); position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  text-decoration: none; color: inherit;
}
.pub-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--gold-2), var(--gold)); transform: scaleY(0); transform-origin: top;
  transition: transform .45s var(--ease); }
.pub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--line-2); }
.pub-card:hover::after { transform: scaleY(1); }
.pub-card .pc-year { font-family: var(--f-display); font-size: 1.05rem; color: var(--gold); font-weight: 500; }
.pub-card .pc-title { font-family: var(--f-display); font-size: var(--step-1); line-height: 1.16; color: var(--ink);
  font-weight: 500; margin: 0; }
.pub-card .pc-venue { font-family: var(--f-ui); font-size: .8rem; color: var(--ink-3); font-style: normal; letter-spacing: .01em;
  margin-top: auto; }
.pub-card .pc-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .3rem; }

/* Numbered showcase item (home selected works) */
.showcase-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.showcase-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: baseline;
  padding: clamp(1.5rem, 3vw, 2.3rem) 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative;
  transition: transform .6s cubic-bezier(.22,.61,.2,1);
  will-change: transform;
}
.showcase-item:hover { transform: translateX(10px); }
.showcase-item .si-num { font-family: var(--f-ui); font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  color: var(--gold); padding-top: .55rem; }
.showcase-item .si-main { max-width: 60ch; }
.showcase-item .si-title { font-family: var(--f-display); font-size: var(--step-2); line-height: 1.13; font-weight: 500;
  color: var(--ink); margin: 0 0 .5rem; transition: color .3s var(--ease); }
.showcase-item:hover .si-title { color: var(--pine-2); }
.showcase-item .si-note { color: var(--ink-2); font-size: var(--step-0); line-height: 1.5; margin: 0; }
.showcase-item .si-side { text-align: right; font-family: var(--f-ui); font-size: .82rem; color: var(--ink-3);
  white-space: nowrap; padding-top: .3rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; }
.showcase-item .si-side .si-year { font-family: var(--f-display); font-size: 1.4rem; color: var(--gold); font-weight: 500; }
.showcase-item .si-arrow { position: absolute; right: 0; bottom: 1.4rem; opacity: 0; transform: translateX(-8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease); color: var(--gold); }
@media (max-width: 720px) {
  .showcase-item { grid-template-columns: auto 1fr; }
  .showcase-item .si-side { display: none; }
}

/* --------------------------------------------------------------- Pills -- */
.pill {
  font-family: var(--f-ui); font-weight: 600; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .3em .75em; border-radius: 100px; display: inline-flex; align-items: center; gap: .4em; white-space: nowrap;
}
.pill-theme { background: var(--pine-soft); color: var(--pine); border: 1px solid rgba(45,88,73,.16); }
.pill-full { background: var(--t-full-bg); color: var(--t-full); }
.pill-abstract { background: var(--t-abstract-bg); color: var(--t-abstract); }
.pill-book { background: var(--t-book-bg); color: var(--t-book); }
.pill-type { background: var(--card-2); color: var(--ink-3); border: 1px solid var(--line); }

/* --------------------------------------------------------- Theme cards -- */
.theme-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.15rem; }
.theme-card {
  padding: 1.7rem 1.6rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); display: flex; flex-direction: column; min-height: 190px;
  flex: 1 1 260px; max-width: 360px;
}
@media (min-width: 940px) { .theme-card { flex-basis: calc(33.333% - 0.78rem); max-width: none; } }
.theme-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }
.theme-card .tc-idx { font-family: var(--f-display); font-size: 2.6rem; color: var(--gold-soft); font-weight: 500;
  line-height: 1; position: absolute; top: .8rem; right: 1.1rem; }
.theme-card .tc-name { font-family: var(--f-display); font-size: var(--step-1); font-weight: 500; color: var(--ink);
  margin: 0 0 .5rem; max-width: 12ch; line-height: 1.12; }
.theme-card .tc-desc { color: var(--ink-2); font-size: .92rem; line-height: 1.5; margin: 0; }
.theme-card .tc-count { margin-top: auto; padding-top: 1rem; font-family: var(--f-ui); font-size: .78rem;
  letter-spacing: .04em; color: var(--pine); font-weight: 600; }

/* --------------------------------------------------------------- Footer -- */
.site-footer { background: var(--dark); color: var(--on-dark-2); position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(50vw 40vh at 12% -10%, rgba(165,128,58,.14), transparent 60%); }
.footer-inner { position: relative; padding-block: clamp(3.5rem, 6vw, 5.5rem) 2.5rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.footer-brand .fb-name { font-family: var(--f-display); font-size: 1.7rem; color: var(--on-dark); font-weight: 400; margin: 0 0 .4rem; }
.footer-brand p { max-width: 34ch; font-size: .95rem; line-height: 1.6; }
.footer-col h4 { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600; margin: 0 0 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer-col a { color: var(--on-dark-2); font-size: .94rem; transition: color .3s var(--ease); }
.footer-col a:hover { color: var(--on-dark); }
.footer-bottom { position: relative; border-top: 1px solid var(--dark-line); padding-block: 1.6rem 2.2rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--f-ui); font-size: .78rem; color: var(--on-dark-2); letter-spacing: .02em; }
.footer-bottom a { color: var(--on-dark-2); }
.footer-bottom a:hover { color: var(--gold-2); }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Monogram */
.monogram { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-display);
  font-size: 1.15rem; letter-spacing: .02em; font-weight: 500; flex: none; }
.monogram.lg { width: 92px; height: 92px; font-size: 1.9rem; }

/* --------------------------------------------------------- Reveal motion -- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal[style*="--d"] { transition-delay: var(--d); }
.reveal.in { transition-delay: var(--d, 0s); }

/* --------------------------------------------------------- Book covers -- */
.bookcover { aspect-ratio: 2 / 3; border-radius: 5px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 1.25rem 1.15rem;
  color: var(--on-dark); box-shadow: var(--shadow-3); border: 1px solid rgba(255,255,255,.08);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.bookcover::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(130% 80% at 18% -5%, rgba(197,160,90,.28), transparent 58%); }
.bookcover::after { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.02)); }
.bookcover.cover-a { background: linear-gradient(160deg, #234034, #16211c); }
.bookcover.cover-b { background: linear-gradient(160deg, #3a2020, #1c1512); }
.bookcover.cover-c { background: linear-gradient(160deg, #23303f, #141c25); }
.bookcover .bc-top { position: relative; font-family: var(--f-ui); font-size: .56rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-2); }
.bookcover .bc-title { position: relative; font-family: var(--f-display); font-size: .92rem; line-height: 1.14;
  font-weight: 500; color: #f4ecdb; overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.bookcover .bc-foot { position: relative; font-family: var(--f-ui); font-size: .54rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--on-dark-2); overflow-wrap: anywhere; }
.bookcover.bc-lg { padding: 2rem 1.7rem; border-radius: 6px; }
.bookcover.bc-lg .bc-title { font-size: 1.7rem; }
.bookcover.bc-lg .bc-top { font-size: .66rem; }
.bookcover.bc-lg .bc-foot { font-size: .66rem; }
a:hover > .bookcover { transform: translateY(-5px); box-shadow: var(--shadow-3), 0 30px 50px -24px rgba(43,33,15,.5); }

/* Real cover images */
.bookcover-img { border-radius: 5px; overflow: hidden; box-shadow: var(--shadow-3); position: relative;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); background: var(--card-2); }
.bookcover-img img { width: 100%; height: auto; display: block; }
.bookcover-img.bc-lg { border-radius: 6px; }
a:hover > .bookcover-img { transform: translateY(-5px); box-shadow: var(--shadow-3), 0 30px 50px -24px rgba(43,33,15,.5); }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem); }
.book-card { display: grid; grid-template-columns: 120px 1fr; gap: 1.4rem; text-decoration: none; color: inherit;
  align-items: start; }
.book-card .bc-cover { width: 120px; }
.book-card .bc-h { font-family: var(--f-display); font-size: var(--step-1); font-weight: 500; margin: 0 0 .35rem; line-height: 1.14;
  transition: color .3s var(--ease); }
.book-card:hover .bc-h { color: var(--pine-2); }
.book-card .bc-pub { font-family: var(--f-ui); font-size: .78rem; color: var(--gold); margin: 0 0 .7rem; letter-spacing: .01em; }
.book-card .bc-blurb { font-size: .95rem; color: var(--ink-2); line-height: 1.55; margin: 0 0 .9rem; }

/* --------------------------------------------------------------- Utility -- */
.muted { color: var(--ink-3); }
.gold  { color: var(--gold); }
.small { font-size: var(--step--1); }
.ui    { font-family: var(--f-ui); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--pine); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
