:root {
  --paper: #f3eee3;
  --paper-light: #fbf8f1;
  --ink: #17211e;
  --muted: #68716d;
  --forest: #163f37;
  --forest-dark: #0c2924;
  --rust: #a84d2d;
  --gold: #bd9652;
  --line: rgba(23, 33, 30, .18);
  --shadow: 0 22px 70px rgba(29, 37, 32, .13);
  --accent: var(--rust);
  --accent-dark: #7d261f;
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "EB Garamond", Georgia, serif;
}

.cat-mystery { --accent: #8f1f18; --accent-dark: #3a1010; }
.cat-russian { --accent: #486b82; --accent-dark: #182d3b; }
.cat-philosophy { --accent: #9c7438; --accent-dark: #35230d; }
.cat-faith { --accent: #8b5d3b; --accent-dark: #352317; }
.cat-history { --accent: #536d3c; --accent-dark: #1d2d17; }
.cat-adventure { --accent: #1d6b68; --accent-dark: #0d3431; }
.cat-classic { --accent: var(--rust); --accent-dark: var(--forest-dark); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .26; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E"); }
a { color: inherit; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 30; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 20; width: min(1180px, calc(100% - 3rem)); min-height: 82px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(243, 238, 227, .92); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand > span { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--serif); font-size: .9rem; }
.brand strong { font-size: .88rem; letter-spacing: .03em; }
nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
nav a { color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }

.eyebrow { margin: 0 0 1rem; color: var(--rust); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: var(--serif); font-weight: 400; line-height: 1.05; }
h1 { font-size: clamp(3.7rem, 7vw, 7.2rem); letter-spacing: -.04em; }
h2 { font-size: clamp(2.6rem, 5vw, 5rem); letter-spacing: -.035em; }
h3 { font-size: 1.65rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: .72rem 1rem; border: 1px solid var(--ink); font-size: .78rem; font-weight: 600; text-decoration: none; transition: transform 160ms ease, background-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--ink); color: white; }
.button.light { border-color: white; background: white; color: var(--forest); }
.text-link { font-size: .8rem; font-weight: 600; }

.home-hero { display: grid; grid-template-columns: 1.06fr .94fr; gap: 7vw; min-height: 740px; padding-block: 6rem 7rem; align-items: center; }
.hero-copy h1 { max-width: 760px; }
.hero-copy .lede { max-width: 680px; margin: 1.8rem 0 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.cover-stack { position: relative; min-height: 590px; }
.stack-book { position: absolute; width: min(310px, 72%); aspect-ratio: 2 / 3; overflow: hidden; border: 8px solid var(--paper-light); background: var(--forest); box-shadow: var(--shadow); color: white; text-decoration: none; transition: transform 220ms ease; }
.stack-book:hover { z-index: 5; transform: rotate(0deg) translateY(-8px) !important; }
.stack-book img { width: 100%; height: 100%; object-fit: cover; }
.stack-book div { display: none; }
.stack-book.one { top: 0; left: 4%; transform: rotate(-5deg); }
.stack-book.two { top: 74px; right: 0; transform: rotate(5deg); }
.stack-book.three { bottom: 0; left: 22%; transform: rotate(-1deg); }

.stat-band { background: var(--forest); color: white; }
.stat-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); min-height: 170px; align-items: stretch; }
.stat-intro, .stat { padding: 2.5rem 2rem; border-right: 1px solid rgba(255,255,255,.18); display: flex; flex-direction: column; justify-content: center; }
.stat-intro { padding-left: 0; }
.stat-intro p { max-width: 300px; margin: 0; color: #b9cac4; font-size: .86rem; }
.stat strong { font-family: var(--serif); font-size: 3.4rem; font-weight: 400; line-height: 1; }
.stat span { margin-top: .45rem; color: #b9cac4; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }

.section { padding-block: 7rem; }
.section-heading { display: grid; grid-template-columns: 1fr .75fr; gap: 5rem; align-items: end; margin-bottom: 4rem; }
.section-heading h2 { max-width: 740px; margin-bottom: 0; }
.section-heading > p { max-width: 560px; margin: 0 0 .5rem; color: var(--muted); }
.purpose-section { background: var(--paper-light); }
.house-standard { display: grid; grid-template-columns: .9fr 1.1fr; gap: 5rem; align-items: start; }
.standard-intro { position: sticky; top: 112px; }
.standard-intro h2 { margin-bottom: 1.4rem; }
.standard-intro p:not(.eyebrow) { max-width: 560px; color: var(--muted); }
.standard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); box-shadow: 0 18px 70px rgba(29,37,32,.08); }
.standard-grid article { min-height: 270px; padding: 2rem; background: linear-gradient(180deg, var(--paper-light), #f6f0e4); }
.standard-grid span { display: inline-grid; width: 2.4rem; height: 2.4rem; place-items: center; margin-bottom: 1.4rem; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: .68rem; font-weight: 600; }
.standard-grid h3 { font-size: 2.25rem; }
.standard-grid p { color: var(--muted); font-size: .88rem; }
.purpose-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.purpose-card { min-height: 330px; padding: clamp(2rem, 5vw, 4rem); background: var(--paper-light); }
.purpose-card h3 { font-size: clamp(2rem, 3vw, 3.2rem); }
.purpose-card p { color: var(--muted); }
.purpose-card.dark { background: var(--forest-dark); color: white; }
.purpose-card.dark p { color: #b9cac4; }
.purpose-card.dark .eyebrow { color: #e69d79; }

.featured-grid, .catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.book-card { min-width: 0; border: 1px solid var(--line); border-top: 6px solid var(--accent); background: var(--paper-light); box-shadow: 0 12px 40px rgba(30,38,34,.07); }
.book-card > a { display: block; text-decoration: none; }
.card-cover { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--forest); color: white; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.book-card:hover .card-cover img { transform: scale(1.025); }
.card-heading { min-height: 7rem; padding: 1.3rem 1.35rem .2rem; }
.card-heading small { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .58rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.card-heading strong { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; line-height: 1.05; }
.card-fallback { display: grid; height: 100%; place-items: center; padding: 1.5rem; background: linear-gradient(145deg, var(--forest), #256355); text-align: center; }
.card-fallback b { max-width: 240px; font-family: var(--serif); font-size: 2rem; font-weight: 400; line-height: 1.05; }
.card-copy { padding: .6rem 1.35rem 1.5rem; }
.card-copy p { min-height: 3.9em; margin: 0; color: var(--muted); font-size: .79rem; }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; color: var(--muted); font-size: .62rem; text-transform: uppercase; }

.collections { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.collection-link { min-height: 155px; padding: 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; }
.collection-link:hover { background: var(--paper-light); }
.collection-link strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.collection-link span { color: var(--muted); font-size: .68rem; }

.process-promo { background: var(--rust); color: white; }
.process-promo .section-heading > p { color: #f5d4c5; }
.process-promo .eyebrow { color: #ffe0d2; }
.process-promo .button { border-color: white; }
.process-line { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 3.5rem; border-block: 1px solid rgba(255,255,255,.25); }
.process-line div { padding: 1.6rem 1rem; border-right: 1px solid rgba(255,255,255,.25); }
.process-line span { display: block; margin-bottom: .45rem; color: #ffd5c2; font-size: .58rem; letter-spacing: .1em; }
.process-line strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }

.page-hero { padding-block: 6rem; }
.page-hero h1 { max-width: 980px; margin-bottom: 1.8rem; }
.page-hero .lede { max-width: 720px; color: var(--muted); font-size: 1.2rem; }
.page-hero.dark { width: 100%; padding-inline: max(1.5rem, calc((100% - 1180px) / 2)); background: var(--forest); color: white; }
.page-hero.dark .lede { color: #bfd0ca; }
.page-hero.dark .eyebrow { color: #e69d79; }

.catalog-tools { position: sticky; top: 81px; z-index: 10; padding-block: 1rem; border-block: 1px solid var(--line); background: rgba(243,238,227,.95); backdrop-filter: blur(14px); }
.tool-grid { display: grid; grid-template-columns: 1fr 260px 180px; gap: .8rem; }
.tool-grid input, .tool-grid select { width: 100%; min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 0; background: var(--paper-light); color: var(--ink); }
.catalog-status { display: flex; align-items: center; justify-content: flex-end; color: var(--muted); font-size: .75rem; }
.catalog-section { min-height: 700px; padding-block: 3rem 7rem; }
.empty-state { grid-column: 1 / -1; padding: 5rem 1rem; color: var(--muted); text-align: center; }

.manifesto { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; padding-block: 7rem; }
.manifesto aside { padding-top: .5rem; }
.manifesto aside p { color: var(--muted); font-size: .82rem; }
.manifesto article p { margin-top: 0; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.25; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--line); gap: 1px; border: 1px solid var(--line); }
.principle { min-height: 310px; padding: 2.2rem; background: var(--paper-light); }
.principle span { color: var(--rust); font-size: .65rem; }
.principle h2 { margin: 1.4rem 0 1rem; font-size: 2.1rem; }
.principle p { color: var(--muted); font-size: .86rem; }
.pricing-note { padding-block: 7rem; background: var(--forest-dark); color: white; }
.pricing-note .split { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; }
.pricing-note p { color: #b9cac4; }
.pricing-note .eyebrow { color: #e69d79; }

.workflow { padding-block: 7rem; }
.workflow-list { margin: 4rem 0 0; border-top: 1px solid var(--line); }
.workflow-step { display: grid; grid-template-columns: 90px .8fr 1.2fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.workflow-step > span { color: var(--rust); font-size: .72rem; }
.workflow-step h2 { margin: 0; font-size: 2rem; }
.workflow-step p { margin: 0; color: var(--muted); }
.structure-section { padding-block: 7rem; background: var(--paper-light); }
.structure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.structure-grid article { min-height: 280px; padding: 2.2rem; background: var(--paper-light); }
.structure-grid h3 { font-size: 2rem; }
.structure-grid article > p:last-child { color: var(--muted); font-size: .86rem; }
.tooling-note { padding-block: 7rem; background: var(--forest-dark); color: white; }
.tooling-note .shell { display: grid; grid-template-columns: 1fr 1fr; gap: 7vw; align-items: end; }
.tooling-note h2 { margin-bottom: 0; }
.tooling-note .eyebrow { color: #e69d79; }
.tooling-note .shell > p { margin: 0; color: #bfd0ca; }

.book-detail { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(360px, 1fr); gap: 6vw; align-items: center; padding-block: 6rem 4rem; }
.detail-cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--forest); box-shadow: var(--shadow); color: white; }
.detail-cover::after { content: ""; position: absolute; inset: 0; border-top: 12px solid var(--accent); pointer-events: none; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback-mark { display: grid; height: 100%; place-items: center; color: rgba(255,255,255,.16); font-family: var(--serif); font-size: 9rem; }
.detail-copy h1 { max-width: 760px; margin-bottom: .5rem; }
.book-subtitle { color: var(--muted); font-family: var(--serif); font-size: 1.6rem; }
.detail-author { margin: 1rem 0 0; font-size: 1.05rem; font-weight: 600; }
.detail-tagline { max-width: 650px; margin-top: 2rem; color: var(--muted); font-family: var(--serif); font-size: 1.45rem; line-height: 1.35; }
.category-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem; }
.category-links a, .keywords li { padding: .28rem .6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .66rem; text-decoration: none; }
.book-facts { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; color: var(--muted); font-size: .77rem; }
.book-facts p { margin: 0; }
.edition-record { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr; gap: 2rem; align-items: start; margin-top: 1rem; padding: 1.5rem 0 0; border-top: 1px solid var(--line); }
.record-label { margin: 0; color: var(--accent); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.edition-record dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
.edition-record dl div { min-height: 82px; padding: 1rem; background: var(--paper-light); }
.edition-record dt { margin-bottom: .35rem; color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.edition-record dd { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.05; }
.book-content { display: grid; grid-template-columns: 1.15fr .85fr; gap: 8vw; padding-block: 7rem; border-top: 1px solid var(--line); }
.section-heading.compact { margin-bottom: 3rem; }
.section-heading.compact h2 { font-size: clamp(2.5rem, 4vw, 4rem); }
.description h2 { font-size: clamp(2.5rem, 4vw, 4rem); }
.description > p:not(.eyebrow) { color: var(--muted); }
.editions { align-self: start; }
.edition-card { margin-bottom: .8rem; padding: 1.5rem; border: 1px solid var(--line); background: var(--paper-light); }
.edition-label { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.55rem; }
.edition-card dl { margin: 0; }
.edition-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .72rem; }
.edition-card dt { color: var(--muted); }
.edition-card dd { margin: 0; }
.purchase-link { margin-top: 1.2rem; }
.purchase-link span { color: var(--muted); font-size: .72rem; }
.purchase-link a { display: block; padding: .65rem .8rem; background: var(--ink); color: white; font-size: .72rem; font-weight: 600; text-align: center; text-decoration: none; }
.keywords { padding-bottom: 6rem; }
.keywords ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.related-books { padding-block: 7rem; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.related-card a { display: block; text-decoration: none; }
.related-image { aspect-ratio: 1 / 1; overflow: hidden; background: var(--forest); }
.related-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.related-card:hover .related-image img { transform: scale(1.025); }
.related-card > a > p { margin: 1rem 0 .25rem; color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.related-card h3 { margin: 0; font-size: 1.45rem; }
.related-fallback { display: grid; height: 100%; place-items: center; color: rgba(255,255,255,.2); font-family: var(--serif); font-size: 4rem; }
.book-cta { padding-block: 6rem; background: linear-gradient(135deg, var(--accent-dark), var(--forest)); color: white; }
.book-cta .shell { max-width: 900px; margin-left: max(1.5rem, calc((100% - 1180px) / 2)); }
.book-cta h2 { margin-bottom: 1.4rem; }
.book-cta p:not(.eyebrow) { max-width: 700px; color: #bfd0ca; }
.book-cta .eyebrow { color: #e69d79; }

.qr-notice { position: fixed; z-index: 40; right: 1rem; bottom: 1rem; max-width: 420px; padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--paper-light); box-shadow: var(--shadow); font-size: .8rem; }
footer { padding-block: 2rem; }
footer .shell { display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); font-size: .72rem; }

:focus-visible { outline: 3px solid #d47c56; outline-offset: 4px; }
@media (max-width: 900px) {
  .home-hero, .section-heading, .purpose-grid, .manifesto, .pricing-note .split, .book-detail, .book-content, .house-standard { grid-template-columns: 1fr; }
  .standard-intro { position: static; }
  .home-hero { padding-top: 4rem; }
  .cover-stack { min-height: 570px; max-width: 640px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-intro { grid-column: 1 / -1; padding-left: 2rem; border-bottom: 1px solid rgba(255,255,255,.18); }
  .featured-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .collections { grid-template-columns: repeat(2, 1fr); }
  .process-line { grid-template-columns: repeat(2, 1fr); }
  .principles, .structure-grid { grid-template-columns: 1fr; }
  .tooling-note .shell { grid-template-columns: 1fr; }
  .workflow-step { grid-template-columns: 60px 1fr; }
  .workflow-step p { grid-column: 2; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .book-detail { max-width: 760px; }
  .detail-cover { max-width: 460px; }
  .edition-record { grid-template-columns: 1fr; }
  .edition-record dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .shell, .site-header { width: calc(100% - 2rem); }
  .site-header { min-height: 70px; }
  .brand strong { display: none; }
  nav { gap: .7rem; }
  nav a { font-size: .72rem; }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .home-hero { min-height: auto; padding-block: 4rem; }
  .cover-stack { min-height: 440px; }
  .stack-book { width: 58%; border-width: 5px; }
  .stack-book.two { top: 50px; }
  .stack-book.three { left: 20%; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-intro, .stat { padding: 1.8rem 1rem; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .section, .manifesto, .workflow { padding-block: 5rem; }
  .section-heading { gap: 1.5rem; margin-bottom: 2.5rem; }
  .featured-grid, .catalog-grid, .collections { grid-template-columns: 1fr; }
  .standard-grid, .edition-record dl { grid-template-columns: 1fr; }
  .process-line { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .catalog-tools { top: 69px; }
  .catalog-status { justify-content: flex-start; }
  .page-hero { padding-block: 4rem; }
  .workflow-step { grid-template-columns: 1fr; gap: .6rem; }
  .workflow-step p { grid-column: 1; }
  .related-books { padding-block: 5rem; }
  .book-detail { padding-block: 3.5rem 5rem; }
  .detail-cover { max-width: 100%; }
  .book-content { padding-block: 5rem; }
  footer .shell { flex-direction: column; gap: .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
