/*
Theme Name: Notari Editorial
Theme URI: https://editionsnotari.ch/
Author: Pixel Informatique
Description: Thème éditorial contemporain pour les Éditions Notari. Conçu pour le catalogue migré depuis MODX.
Version: 2.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: notari-editorial
*/

:root {
  --paper: #f3f0e9;
  --paper-deep: #e8e2d8;
  --white: #fffdfa;
  --ink: #161616;
  --ink-soft: #625e57;
  --line: rgba(22, 22, 22, .16);
  --red: #d53a2f;
  --red-dark: #a9231f;
  --night: #191817;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shell: 1320px;
  --shadow-book: 0 24px 55px rgba(18, 16, 13, .17), 0 4px 12px rgba(18, 16, 13, .10);
  --shadow-soft: 0 18px 60px rgba(18, 16, 13, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
::selection { background: var(--red); color: #fff; }

.notari-shell { width: min(calc(100% - 64px), var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; left: 18px; top: 18px; transform: translateY(-180%); padding: 10px 16px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--red);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .16em;
  line-height: 1.25;
  text-transform: uppercase;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 760;
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button--dark { background: var(--ink); color: #fff; }
.button--dark:hover { background: var(--red); color: #fff; }
.button--outline { border-color: rgba(255,255,255,.42); color: #fff; }
.button--outline:hover { border-color: #fff; background: #fff; color: var(--night); }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: .85rem; font-weight: 760; text-decoration: none; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translate(3px, -3px); }

/* Header */
.site-header {
  position: sticky;
  z-index: 200;
  top: 0;
  background: rgba(243, 240, 233, .92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(22,22,22,.035); }
.header-inner { min-height: 88px; display: flex; align-items: center; gap: 36px; }
.site-branding { flex: 0 0 auto; }
.brand-link, .custom-logo-link { display: block; }
.brand-link > img, .custom-logo { width: 150px; max-height: 62px; object-fit: contain; object-position: left center; }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.primary-nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 25px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; font-size: .82rem; font-weight: 720; text-decoration: none; }
.primary-nav .current-menu-item > a::after, .primary-nav .current_page_item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--red);
}
.nav-search { display: inline-flex; align-items: center; gap: 8px; padding-left: 24px; border-left: 1px solid var(--line); }
.nav-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; padding: 10px 0 10px 14px; cursor: pointer; }
.menu-toggle__label { font-size: .78rem; font-weight: 760; }
.menu-toggle__icon { position: relative; display: inline-block; width: 25px; height: 12px; margin-left: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }

.site-main { min-height: 65vh; }

/* Homepage hero */
.home-hero { overflow: hidden; padding: clamp(68px, 8vw, 120px) 0 0; }
.home-hero__grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr); gap: clamp(45px, 7vw, 112px); align-items: center; }
.home-hero__content { position: relative; z-index: 2; padding-bottom: 80px; }
.home-hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 8.25vw, 8.75rem);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .82;
}
.home-hero h1 em { color: var(--red); font-style: italic; font-weight: 400; }
.home-hero__intro { max-width: 590px; margin: 34px 0 0; color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.22rem); line-height: 1.65; }
.home-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 36px; }
.hero-books { position: relative; min-height: 650px; }
.hero-book { position: absolute; display: block; text-decoration: none; transition: transform .35s ease; }
.hero-book img { width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow-book); }
.hero-book span { position: absolute; left: 50%; bottom: -30px; width: max-content; max-width: 240px; transform: translateX(-50%); color: var(--ink-soft); font-size: .72rem; font-weight: 680; line-height: 1.35; text-align: center; opacity: 0; transition: opacity .25s ease, bottom .25s ease; }
.hero-book:hover { z-index: 8; transform: translateY(-10px) rotate(0deg); color: inherit; }
.hero-book:hover span { bottom: -38px; opacity: 1; }
.hero-book--1 { z-index: 3; width: min(47%, 315px); height: 490px; left: 10%; top: 65px; transform: rotate(-4deg); }
.hero-book--2 { z-index: 2; width: min(43%, 290px); height: 445px; right: 4%; top: 10px; transform: rotate(5deg); }
.hero-book--3 { z-index: 4; width: min(36%, 240px); height: 360px; right: 20%; bottom: 6px; transform: rotate(1.5deg); }
.hero-books::before, .hero-books::after { content: ""; position: absolute; border-radius: 50%; }
.hero-books::before { width: 470px; height: 470px; right: 2%; top: 60px; background: #dfd5c5; }
.hero-books::after { width: 190px; height: 190px; left: 2%; bottom: 18px; border: 1px solid rgba(22,22,22,.2); }
.hero-marquee { display: flex; width: max-content; margin-top: 36px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .66rem; font-weight: 720; letter-spacing: .16em; white-space: nowrap; animation: notari-marquee 34s linear infinite; }
.hero-marquee span { padding-right: 2rem; }
@keyframes notari-marquee { to { transform: translateX(-50%); } }

/* Common sections */
.home-section, .archive-content { padding: clamp(76px, 9vw, 130px) 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(3.2rem, 6vw, 6.7rem); font-weight: 400; letter-spacing: -.065em; line-height: .87; }
.section-heading--light { color: #fff; }
.section-heading--light .eyebrow { color: #f36a5c; }
.books-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(22px, 2.5vw, 38px); row-gap: clamp(50px, 6vw, 86px); }
.books-grid--coming { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Book cards */
.book-card { min-width: 0; }
.book-card__cover { position: relative; display: block; aspect-ratio: .73; background: #e6e0d6; text-decoration: none; overflow: visible; }
.book-card__cover::after { content: ""; position: absolute; inset: auto 5% -16px 5%; z-index: -1; height: 28px; border-radius: 50%; background: rgba(0,0,0,.16); filter: blur(16px); opacity: .45; transition: opacity .3s ease, transform .3s ease; }
.book-card__cover img { width: 100%; height: 100%; object-fit: contain; background: transparent; transition: transform .34s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 12px 18px rgba(18,16,13,.13)); }
.book-card:hover .book-card__cover img { transform: translateY(-9px); }
.book-card:hover .book-card__cover::after { opacity: .7; transform: scale(.92); }
.book-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(145deg, #e6ded2, #f7f3ec); }
.book-card__placeholder span { font-family: var(--serif); font-size: 5rem; color: rgba(22,22,22,.32); }
.book-card__badge { position: absolute; z-index: 3; top: 14px; left: 14px; padding: 7px 11px; border-radius: 999px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.book-card__body { padding-top: 23px; }
.book-card__meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--ink-soft); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.book-card__title { margin: 0; font-family: var(--serif); font-size: clamp(1.23rem, 1.6vw, 1.7rem); font-weight: 400; letter-spacing: -.025em; line-height: 1.06; }
.book-card__title a { text-decoration: none; }
.book-card__authors { margin: 12px 0 0; color: var(--ink-soft); font-size: .82rem; line-height: 1.45; }
.book-card__authors a { text-decoration: none; }
.book-card--dark .book-card__meta, .book-card--dark .book-card__authors { color: rgba(255,255,255,.62); }
.book-card--dark .book-card__title { color: #fff; }

/* Worlds */
.home-worlds { padding: clamp(86px, 10vw, 145px) 0; background: var(--night); }
.world-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.world-card { position: relative; min-height: 610px; overflow: hidden; padding: clamp(32px, 4vw, 58px); border-radius: 4px; }
.world-card--art { background: #d9d0bf; }
.world-card--jeunesse { background: #b8473e; color: #fff; }
.world-card__copy { position: relative; z-index: 3; max-width: 68%; }
.world-card--jeunesse .eyebrow { color: #fff1eb; }
.world-card__copy h3 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 3.7vw, 4.6rem); font-weight: 400; letter-spacing: -.05em; line-height: .98; }
.world-card__copy a { display: inline-flex; gap: 8px; margin-top: 30px; font-size: .8rem; font-weight: 780; text-decoration: none; }
.world-card__covers { position: absolute; inset: 0; }
.world-cover { position: absolute; display: block; width: 31%; aspect-ratio: .73; transition: transform .3s ease; }
.world-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 25px rgba(0,0,0,.20)); }
.world-cover--1 { right: 7%; bottom: 5%; transform: rotate(4deg); }
.world-cover--2 { right: 29%; bottom: -7%; transform: rotate(-7deg); }
.world-cover:hover { z-index: 4; transform: translateY(-10px) rotate(0); }

/* Collections */
.collection-list { border-top: 1px solid var(--line); }
.collection-row { display: grid; grid-template-columns: 50px minmax(200px, .8fr) minmax(260px, 1.4fr) 90px 30px; gap: 22px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .25s ease, color .25s ease, background .25s ease; }
.collection-row:hover { padding-inline: 18px; color: var(--ink); background: rgba(255,255,255,.38); }
.collection-row__number, .collection-row__count { color: var(--ink-soft); font-size: .69rem; font-weight: 730; letter-spacing: .08em; text-transform: uppercase; }
.collection-row__name { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 3.3rem); letter-spacing: -.045em; line-height: 1; }
.collection-row__description { color: var(--ink-soft); font-size: .88rem; }
.collection-row__arrow { font-size: 1.35rem; transition: transform .2s ease; }
.collection-row:hover .collection-row__arrow { transform: translate(4px, -4px); color: var(--red); }

/* Coming */
.home-coming { padding: clamp(86px, 10vw, 145px) 0; background: var(--night); color: #fff; }
.home-coming__inner { display: grid; grid-template-columns: minmax(250px, .38fr) minmax(0, 1fr); gap: clamp(45px, 7vw, 100px); align-items: start; }
.home-coming__heading { position: sticky; top: 130px; }
.home-coming__heading .eyebrow { color: #f36a5c; }
.home-coming__heading h2 { margin: 0 0 35px; font-family: var(--serif); font-size: clamp(3.5rem, 6vw, 6.4rem); font-weight: 400; letter-spacing: -.06em; line-height: .87; }

/* Archive/page heroes */
.archive-hero, .page-hero, .collection-hero { padding: clamp(74px, 9vw, 135px) 0 clamp(60px, 7vw, 105px); border-bottom: 1px solid var(--line); }
.archive-hero--dark { background: var(--night); color: #fff; border-bottom-color: rgba(255,255,255,.15); }
.archive-hero--dark .eyebrow { color: #f36a5c; }
.archive-hero__line { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: clamp(40px, 7vw, 100px); align-items: end; }
.archive-hero h1, .page-hero h1, .collection-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(4.3rem, 9vw, 9.6rem); font-weight: 400; letter-spacing: -.08em; line-height: .78; }
.archive-hero__line > p, .archive-hero__line > div { max-width: 560px; margin: 0 0 .5rem; color: var(--ink-soft); font-size: clamp(1.02rem, 1.5vw, 1.25rem); }
.archive-hero--dark .archive-hero__line > p { color: rgba(255,255,255,.7); }

/* Catalogue */
.catalogue-layout { padding: 50px 0 120px; }
.catalogue-filters { display: grid; grid-template-columns: minmax(320px, 1.35fr) repeat(3, minmax(145px, .55fr)) auto; gap: 18px; align-items: end; padding: 25px; background: rgba(255,255,255,.52); border: 1px solid var(--line); }
.catalogue-filters label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: .66rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.filter-search > div { display: flex; }
.catalogue-filters input, .catalogue-filters select { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; outline: none; background: var(--white); color: var(--ink); }
.catalogue-filters input:focus, .catalogue-filters select:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(213,58,47,.10); }
.filter-search button { min-width: 105px; border: 0; background: var(--ink); color: #fff; font-size: .76rem; font-weight: 760; cursor: pointer; }
.filter-actions { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.filter-actions .button { min-height: 49px; border-radius: 0; cursor: pointer; }
.filter-actions a { color: var(--ink-soft); font-size: .69rem; }
.catalogue-result { display: flex; justify-content: flex-end; padding: 24px 0 30px; color: var(--ink-soft); font-size: .72rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }

/* Authors directory */
.author-directory { padding: 50px 0 120px; }
.alphabet { position: sticky; z-index: 5; top: 88px; display: flex; flex-wrap: wrap; gap: 5px; padding: 13px 0; background: rgba(243,240,233,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.alphabet a { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; font-size: .72rem; font-weight: 750; text-decoration: none; }
.alphabet a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.author-groups { margin-top: 50px; }
.author-group { display: grid; grid-template-columns: 120px 1fr; gap: 30px; padding: 34px 0; border-top: 1px solid var(--line); scroll-margin-top: 150px; }
.author-group h2 { margin: 0; color: var(--red); font-family: var(--serif); font-size: 4rem; font-weight: 400; line-height: .9; }
.author-group > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 35px; }
.author-group a { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(22,22,22,.09); font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; text-decoration: none; }
.author-group a span { color: var(--red); font-family: var(--sans); font-size: .8rem; opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.author-group a:hover span { opacity: 1; transform: translate(2px,-2px); }

/* Book page */
.book-page { background: var(--paper); }
.book-hero { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(0, 1.18fr); gap: clamp(55px, 8vw, 125px); align-items: start; padding: clamp(55px, 7vw, 100px) 0 clamp(85px, 10vw, 145px); }
.book-cover-panel { position: sticky; top: 118px; display: grid; place-items: center; min-height: 660px; padding: clamp(35px, 5vw, 70px); background: #e4ddd2; }
.book-cover-wrap { width: min(100%, 440px); }
.book-cover-wrap img { width: 100%; max-height: 610px; object-fit: contain; filter: drop-shadow(0 26px 28px rgba(17,15,12,.22)); }
.book-main { padding-top: 18px; }
.book-kicker { display: flex; gap: 12px; margin-bottom: 24px; color: var(--red); font-size: .68rem; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.book-kicker span + span::before { content: "·"; margin-right: 12px; color: var(--ink-soft); }
.book-main h1 { max-width: 800px; margin: 0; font-family: var(--serif); font-size: clamp(3.5rem, 6.2vw, 7rem); font-weight: 400; letter-spacing: -.067em; line-height: .88; }
.book-authors { margin: 29px 0 0; font-size: clamp(1.02rem, 1.4vw, 1.22rem); }
.book-authors a { font-weight: 730; text-decoration: none; }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 27px; }
.book-tags a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: .67rem; font-weight: 740; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }
.book-tags a:hover { border-color: var(--red); color: var(--red); }
.book-description { max-width: 750px; margin-top: 48px; }
.book-description > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.book-description p { font-size: clamp(1rem, 1.2vw, 1.13rem); line-height: 1.78; }
.book-description p:first-child { font-size: clamp(1.15rem, 1.55vw, 1.36rem); line-height: 1.62; }
.book-details { margin-top: 45px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-details summary { display: flex; justify-content: space-between; align-items: center; padding: 19px 0; font-size: .78rem; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; list-style: none; }
.book-details summary::-webkit-details-marker { display: none; }
.book-details summary span { font-size: 1.4rem; font-weight: 400; transition: transform .2s ease; }
.book-details[open] summary span { transform: rotate(45deg); }
.book-details > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 25px; padding: 0 0 25px; color: var(--ink-soft); font-size: .92rem; }
.book-details p { margin: 5px 0; }
.book-gallery-section { padding: clamp(75px, 9vw, 135px) 0; background: var(--white); }
.book-gallery { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.gallery-item { overflow: hidden; min-height: 250px; padding: 0; border: 0; background: #eae5dc; cursor: zoom-in; }
.gallery-item:first-child { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; min-height: 270px; object-fit: cover; transition: transform .4s ease; }
.gallery-item:first-child img { min-height: 560px; }
.gallery-item:hover img { transform: scale(1.025); }
.related-books, .author-books { padding: clamp(75px, 9vw, 135px) 0; }
.books-grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Author page */
.author-hero { display: grid; grid-template-columns: minmax(260px, .55fr) minmax(0, 1.45fr); gap: clamp(50px, 8vw, 120px); align-items: start; padding: clamp(70px, 9vw, 135px) 0; }
.author-portrait { position: sticky; top: 120px; }
.author-portrait img { width: 100%; max-height: 650px; object-fit: cover; filter: grayscale(12%); }
.author-main h1 { max-width: 960px; margin: 0; font-family: var(--serif); font-size: clamp(4rem, 8.5vw, 9.2rem); font-weight: 400; letter-spacing: -.078em; line-height: .82; }
.author-count { margin: 25px 0 0; color: var(--ink-soft); font-size: .74rem; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; }
.author-bio { max-width: 800px; margin-top: 44px; }
.author-bio > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.author-page--compact .author-hero { grid-template-columns: 1fr; }
.author-page--compact .author-main { max-width: 1100px; }
.author-books { background: var(--white); }

/* Collection */
.collection-hero__grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr); gap: clamp(45px, 8vw, 115px); align-items: end; }
.collection-count { margin: 0 0 18px; color: var(--red); font-size: .7rem; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.collection-description { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.2rem); }
.collection-description p { margin: 0; }
.empty-state { margin: 30px 0 90px; padding: clamp(45px, 7vw, 90px); border: 1px solid var(--line); text-align: center; }
.empty-state h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 4rem); font-weight: 400; }
.empty-state p { color: var(--ink-soft); }

/* Collections directory */
.collections-directory { padding: 40px 0 120px; }
.collection-directory-card { border-bottom: 1px solid var(--line); }
.collection-directory-card__main { display: grid; grid-template-columns: 50px minmax(0, 1fr) 100px 35px; gap: 25px; align-items: center; padding: 34px 0; text-decoration: none; }
.collection-directory-card__number, .collection-directory-card__count { color: var(--ink-soft); font-size: .7rem; font-weight: 740; letter-spacing: .08em; text-transform: uppercase; }
.collection-directory-card h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.3rem, 4.5vw, 5.5rem); font-weight: 400; letter-spacing: -.06em; line-height: .9; }
.collection-directory-card p { max-width: 700px; margin: 12px 0 0; color: var(--ink-soft); font-size: .9rem; }
.collection-directory-card__arrow { font-size: 1.4rem; transition: transform .2s ease; }
.collection-directory-card__main:hover .collection-directory-card__arrow { transform: translate(4px,-4px); color: var(--red); }
.collection-children { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 27px 75px; }
.collection-children a { display: inline-flex; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; text-decoration: none; }
.collection-children a span { color: var(--ink-soft); }

/* Standard pages */
.page-hero { padding-bottom: 75px; }
.page-content { padding: 65px 0 120px; }
.entry-content { font-size: 1.04rem; }
.entry-content > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide, .entry-content > .wp-block-columns { max-width: 1140px; }
.entry-content > .alignfull { max-width: none; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; line-height: 1.05; }
.entry-content h2 { margin-top: 2.2em; font-size: clamp(2.3rem, 4vw, 4.2rem); }
.entry-content h3 { margin-top: 1.8em; font-size: clamp(1.7rem, 2.5vw, 2.7rem); }
.entry-content p { margin-top: 0; margin-bottom: 1.35em; }
.entry-content figure { margin-top: 2.4em; margin-bottom: 2.4em; }
.entry-content img { width: auto; max-height: 700px; object-fit: contain; }
.entry-content blockquote { padding-left: 30px; border-left: 2px solid var(--red); font-family: var(--serif); font-size: 1.45rem; }
.entry-content a { color: var(--red-dark); }
.notari-legacy-columns, .wp-block-columns.notari-legacy-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; max-width: 1140px !important; }
.notari-legacy-columns > * { padding: 26px; border: 1px solid var(--line); background: rgba(255,255,255,.42); }

/* Search, journal, errors */
.large-search { display: flex; max-width: 650px; }
.large-search input { flex: 1; min-width: 0; min-height: 54px; padding: 0 16px; border: 1px solid var(--line); background: var(--white); }
.large-search button { border: 0; padding: 0 20px; background: var(--ink); color: #fff; font-weight: 740; }
.search-results { max-width: 1000px; margin: auto; }
.search-results article { padding: 34px 0; border-bottom: 1px solid var(--line); }
.search-results h2, .journal-card h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 3vw, 3.2rem); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.search-results h2 a, .journal-card h2 a { text-decoration: none; }
.search-results article > a { font-size: .75rem; font-weight: 760; text-decoration: none; }
.journal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 25px; }
.journal-card { padding: 35px; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.error-page { min-height: 72vh; display: grid; align-items: center; padding: 90px 0; }
.error-page h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(4rem, 9vw, 9rem); font-weight: 400; letter-spacing: -.08em; line-height: .82; }
.error-page p { max-width: 600px; color: var(--ink-soft); font-size: 1.15rem; }
.error-page > div > div { display: flex; gap: 25px; align-items: center; margin-top: 30px; }

/* Pagination */
.pagination, .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 75px; }
.page-numbers { display: grid; place-items: center; min-width: 43px; height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 50%; font-size: .75rem; font-weight: 740; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Lightbox */
.notari-lightbox { width: min(94vw, 1400px); max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.notari-lightbox::backdrop { background: rgba(16,15,14,.92); backdrop-filter: blur(7px); }
.notari-lightbox img { max-width: 100%; max-height: 88vh; margin: auto; object-fit: contain; }
.lightbox-close { position: fixed; z-index: 3; top: 18px; right: 24px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: transparent; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: end; padding: 72px 0; }
.footer-statement > p:last-child { max-width: 780px; margin: 0; font-family: var(--serif); font-size: clamp(2.5rem, 4.8vw, 5.6rem); letter-spacing: -.06em; line-height: .92; }
.footer-contact { display: grid; gap: 15px; min-width: 240px; color: var(--ink-soft); font-size: .82rem; }
.footer-contact a { color: var(--ink); font-weight: 740; }
.footer-bottom { display: grid; grid-template-columns: 180px 1fr auto; gap: 35px; align-items: center; padding: 25px 0 36px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .72rem; }
.footer-brand img { width: 125px; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; margin: 0; padding: 0; list-style: none; }
.footer-nav a { text-decoration: none; }
.footer-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 1180px) {
  .primary-nav ul { gap: 8px 17px; }
  .primary-nav a { font-size: .76rem; }
  .nav-search span { display: none; }
  .catalogue-filters { grid-template-columns: repeat(3, 1fr); }
  .filter-search { grid-column: 1 / -1; }
  .filter-actions { flex-direction: row; justify-content: flex-end; }
  .author-group > div { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 980px) {
  .notari-shell { width: min(calc(100% - 38px), var(--shell)); }
  .header-inner { min-height: 76px; }
  .brand-link > img, .custom-logo { width: 130px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .primary-nav { position: fixed; inset: 76px 0 0; display: block; padding: 42px 24px 60px; background: var(--paper); clip-path: inset(0 0 0 100%); visibility: hidden; opacity: 0; pointer-events: none; overflow-y: auto; transition: clip-path .3s ease, opacity .3s ease, visibility .3s; }
  .primary-nav.is-open { clip-path: inset(0); visibility: visible; opacity: 1; pointer-events: auto; }
  .primary-nav ul { display: block; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a { display: block; padding: 15px 0; font-family: var(--serif); font-size: 2rem; font-weight: 400; letter-spacing: -.035em; }
  .primary-nav .current-menu-item > a::after, .primary-nav .current_page_item > a::after { display: none; }
  .nav-search { margin-top: 25px; padding: 15px 0; border-left: 0; font-family: var(--sans) !important; font-size: .9rem !important; }
  .nav-search span { display: inline; }
  .home-hero__grid { grid-template-columns: 1fr; }
  .home-hero__content { padding-bottom: 15px; }
  .home-hero h1 { max-width: 720px; }
  .hero-books { min-height: 570px; max-width: 700px; width: 100%; margin: 15px auto 0; }
  .books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .world-grid { grid-template-columns: 1fr; }
  .world-card { min-height: 520px; }
  .home-coming__inner { grid-template-columns: 1fr; }
  .home-coming__heading { position: static; }
  .archive-hero__line, .collection-hero__grid { grid-template-columns: 1fr; }
  .archive-hero__line > p, .archive-hero__line > div { margin-top: 20px; }
  .book-hero { grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 45px; }
  .book-cover-panel { min-height: 540px; padding: 35px; }
  .book-details > div { grid-template-columns: 1fr; }
  .author-hero { grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr); gap: 45px; }
  .collection-row { grid-template-columns: 42px minmax(190px, .9fr) minmax(210px, 1.2fr) 70px 20px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { grid-template-columns: 150px 1fr; }
  .footer-bottom > p { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .notari-shell { width: min(calc(100% - 28px), var(--shell)); }
  .home-hero { padding-top: 48px; }
  .home-hero h1 { font-size: clamp(3.8rem, 19vw, 6.2rem); line-height: .84; }
  .home-hero__intro { margin-top: 25px; }
  .home-hero__actions { align-items: flex-start; flex-direction: column; gap: 17px; }
  .hero-books { min-height: 475px; }
  .hero-books::before { width: 330px; height: 330px; }
  .hero-books::after { width: 120px; height: 120px; }
  .hero-book--1 { width: 42%; height: 355px; left: 9%; top: 55px; }
  .hero-book--2 { width: 40%; height: 330px; right: 5%; }
  .hero-book--3 { width: 32%; height: 255px; right: 22%; bottom: 10px; }
  .hero-book span { display: none; }
  .home-section, .archive-content { padding: 72px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 34px; }
  .section-heading h2 { font-size: clamp(3.1rem, 15vw, 5.2rem); }
  .books-grid, .books-grid--coming, .books-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 16px; }
  .book-card__body { padding-top: 16px; }
  .book-card__meta { display: block; font-size: .58rem; }
  .book-card__meta span + span { display: none; }
  .book-card__title { font-size: 1.12rem; }
  .book-card__authors { font-size: .72rem; }
  .book-card__badge { top: 8px; left: 8px; padding: 5px 7px; font-size: .52rem; }
  .world-card { min-height: 500px; padding: 30px; }
  .world-card__copy { max-width: 86%; }
  .world-card__copy h3 { font-size: clamp(2.2rem, 10vw, 3.8rem); }
  .world-cover { width: 36%; }
  .world-cover--2 { right: 33%; }
  .collection-row { grid-template-columns: 35px 1fr 24px; gap: 13px; padding: 20px 0; }
  .collection-row__description, .collection-row__count { display: none; }
  .collection-row__name { font-size: 2.1rem; }
  .archive-hero, .page-hero, .collection-hero { padding: 60px 0; }
  .archive-hero h1, .page-hero h1, .collection-hero h1 { font-size: clamp(4rem, 20vw, 7rem); }
  .catalogue-layout { padding-top: 25px; }
  .catalogue-filters { display: grid; grid-template-columns: 1fr; padding: 17px; }
  .filter-search { grid-column: auto; }
  .filter-actions { justify-content: flex-start; }
  .catalogue-result { justify-content: flex-start; }
  .author-group { grid-template-columns: 55px 1fr; gap: 18px; }
  .author-group h2 { font-size: 2.7rem; }
  .author-group > div { grid-template-columns: 1fr; }
  .alphabet { top: 76px; overflow-x: auto; flex-wrap: nowrap; }
  .book-hero { grid-template-columns: 1fr; padding-top: 35px; }
  .book-cover-panel { position: static; min-height: 0; padding: 35px; }
  .book-cover-wrap { max-width: 350px; }
  .book-main h1 { font-size: clamp(3.2rem, 15vw, 5.4rem); }
  .book-gallery { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-row: auto; }
  .gallery-item:first-child img, .gallery-item img { min-height: 260px; }
  .author-hero { grid-template-columns: 1fr; padding: 60px 0; }
  .author-portrait { position: static; max-width: 380px; }
  .author-main h1 { font-size: clamp(4rem, 18vw, 7rem); }
  .collection-directory-card__main { grid-template-columns: 35px 1fr 25px; gap: 14px; }
  .collection-directory-card__count { display: none; }
  .collection-directory-card h2 { font-size: clamp(2.5rem, 13vw, 4.2rem); }
  .collection-children { padding-left: 48px; }
  .journal-grid { grid-template-columns: 1fr; }
  .footer-statement > p:last-child { font-size: clamp(2.7rem, 13vw, 4.6rem); }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-nav ul { justify-content: flex-start; }
  .footer-bottom > p { grid-column: auto; }
}

@media (max-width: 430px) {
  .hero-books { min-height: 395px; }
  .hero-book--1 { height: 295px; }
  .hero-book--2 { height: 275px; }
  .hero-book--3 { height: 210px; }
  .world-card { min-height: 455px; }
  .large-search { display: block; }
  .large-search button { width: 100%; min-height: 48px; }
  .book-details > div { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Contact */
.contact-content > p:first-child { max-width: 900px; margin-bottom: 45px; padding: 25px 28px; border-left: 3px solid var(--red); background: rgba(255,255,255,.48); font-size: 1.05rem; }
.contact-content .notari-legacy-columns { grid-template-columns: repeat(3, minmax(0,1fr)); }
.contact-content .notari-legacy-columns > * { min-height: 100%; }
.contact-content .notari-legacy-columns h3 { margin-top: 0; font-size: 2rem; }
.contact-content .notari-legacy-columns p { color: var(--ink-soft); font-size: .91rem; }
.contact-content .notari-legacy-columns a { word-break: break-word; }
@media (max-width: 900px) { .contact-content .notari-legacy-columns { grid-template-columns: 1fr; } }
