:root {
  --paper: #f3ecdc;
  --paper-deep: #e6d8bf;
  --ink: #24231f;
  --ink-soft: #5f5a4e;
  --red: #8e3f2d;
  --red-dark: #6f2f22;
  --ochre: #b4863d;
  --olive: #6d7251;
  --line: rgba(36, 35, 31, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1180px;
  --shadow: 0 28px 70px rgba(51, 37, 20, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 2%, rgba(180, 134, 61, .12), transparent 28rem),
    linear-gradient(90deg, rgba(70, 52, 30, .025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 34px 34px, auto;
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 99;
  padding: .65rem .9rem;
  color: white;
  background: var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header,
.gateway-header {
  width: min(calc(100% - 2rem), var(--max));
  margin: 1rem auto 0;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  border: 1px solid var(--line);
  background: rgba(243, 236, 220, .88);
  backdrop-filter: blur(14px);
}

.site-header {
  position: sticky;
  top: .75rem;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: .7rem; min-width: max-content; }
.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--red);
  border-radius: 50%;
  font: 700 .73rem/1 var(--serif);
  letter-spacing: .08em;
}
.brand strong { display: block; font: 700 1rem/1.1 var(--serif); }
.brand small { display: block; margin-top: .18rem; color: var(--ink-soft); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }

.site-header nav { display: flex; gap: 1.3rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.site-header nav a { border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a:focus-visible { border-color: currentColor; }

.language-switch { display: flex; gap: .25rem; }
.language-switch a {
  min-width: 2.2rem;
  padding: .38rem .45rem;
  border: 1px solid transparent;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
}
.language-switch a[aria-current="page"] { color: var(--paper); background: var(--ink); }
.language-switch a:not([aria-current="page"]):hover { border-color: var(--line); }

.hero,
.section,
.languages-section,
.site-footer,
.gateway-hero,
.gateway-choices,
.gateway-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.hero {
  min-height: 760px;
  padding: clamp(5rem, 11vw, 9rem) 0 5rem;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.eyebrow, .kicker {
  margin: 0 0 1.2rem;
  color: var(--red);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.eyebrow span { margin-right: .55rem; }

h1, h2, h3, p { text-wrap: pretty; }
h1, h2, h3 { margin-top: 0; }
h1 {
  max-width: 800px;
  margin-bottom: 1.6rem;
  font: 500 clamp(3.5rem, 7.2vw, 7.2rem)/.91 var(--serif);
  letter-spacing: -.055em;
}
h1 em, h2 em { color: var(--red); font-weight: 400; }
.hero-lede { max-width: 650px; color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.18rem); }

.hero-actions, .final-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.button {
  min-height: 3.1rem;
  padding: .85rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 1px solid currentColor;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button--primary { color: var(--paper); background: var(--red); border-color: var(--red); }
.button--text { padding-inline: .3rem; border-color: transparent transparent var(--ink) transparent; }
.button--paper { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.button--ghost { color: var(--paper); border-color: rgba(243,236,220,.5); }

.hero-status { margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; color: var(--ink-soft); font-size: .78rem; }
.hero-status strong { color: var(--ink); letter-spacing: .1em; }
.status-dot { width: .5rem; height: .5rem; background: var(--ochre); border-radius: 50%; box-shadow: 0 0 0 .3rem rgba(180,134,61,.13); }

.hero-library { position: relative; min-height: 500px; display: flex; flex-direction: column; justify-content: center; }
.library-caption { color: var(--ink-soft); font: italic 1rem var(--serif); text-align: right; }
.library-rule { position: absolute; inset: 6% auto 6% 8%; width: 1px; background: var(--line); }
.book-stack { width: min(100%, 500px); margin-left: auto; display: flex; flex-direction: column; gap: .7rem; perspective: 900px; }
.book-spine {
  min-height: 66px;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: .8rem;
  align-items: center;
  color: var(--paper);
  box-shadow: var(--shadow);
  transform: rotateY(-4deg);
}
.book-spine:nth-child(even) { margin-left: 1.5rem; }
.book-spine span { font: 700 .8rem var(--serif); opacity: .72; }
.book-spine strong { font: 600 clamp(1.05rem, 2vw, 1.45rem) var(--serif); }
.book-spine small { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.spine-one { background: #803e32; }
.spine-two { background: #343d39; }
.spine-three { background: #8b6b39; }
.spine-four { background: #4f513c; }
.spine-five { background: #5c3c34; }
.library-seal {
  position: absolute;
  right: -1rem;
  bottom: 1.2rem;
  width: 7.2rem;
  height: 7.2rem;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--red);
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 .35rem var(--paper), 0 0 0 .42rem var(--red);
  transform: rotate(8deg);
}
.library-seal span { font: 500 2.5rem/1 var(--serif); }
.library-seal small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }

.manifesto {
  padding: clamp(3rem, 7vw, 5.5rem) max(1rem, calc((100vw - var(--max)) / 2));
  color: var(--paper);
  background: var(--ink);
  text-align: center;
}
.manifesto p, .manifesto strong { display: block; margin: 0; font: 400 clamp(1.8rem, 4.3vw, 4.2rem)/1.1 var(--serif); }
.manifesto strong { color: #d3b274; font-style: italic; }

.section { padding-block: clamp(5rem, 10vw, 9rem); }
.section-heading { max-width: 760px; }
.section-heading--wide { display: grid; grid-template-columns: 1fr minmax(240px, .55fr); gap: 1rem 4rem; align-items: end; max-width: none; }
.section-heading--wide .kicker { grid-column: 1 / -1; }
.section-heading h2, .method-intro h2, .languages-section h2, .provenance-copy h2, .faq-heading h2 {
  margin-bottom: 1.3rem;
  font: 500 clamp(2.4rem, 5vw, 5rem)/.98 var(--serif);
  letter-spacing: -.04em;
}
.section-heading > p:last-child, .method-intro > p:last-child, .sample-heading > p:last-child, .provenance-copy > p { color: var(--ink-soft); }

.value-grid { margin-top: 4rem; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.value-grid article { padding: 2rem; border-right: 1px solid var(--line); }
.value-grid article:first-child { padding-left: 0; }
.value-grid article:last-child { border-right: 0; }
.value-grid article > span { color: var(--red); font: 700 .72rem var(--serif); }
.value-grid h3 { margin: 2.5rem 0 .65rem; font: 600 1.55rem var(--serif); }
.value-grid p { color: var(--ink-soft); font-size: .92rem; }

.collection-section { border-top: 1px solid var(--line); }
.collection-grid { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.volume-card {
  min-height: 330px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.14);
  color: #f6efe1;
  box-shadow: 0 18px 40px rgba(40,30,20,.12);
}
.volume-card:nth-child(1), .volume-card:nth-child(2), .volume-card:nth-child(3) { grid-column: span 4; }
.volume-card:nth-child(4), .volume-card:nth-child(5) { grid-column: span 6; min-height: 280px; }
.volume-card--one { background: #803e32; }
.volume-card--two { background: #343d39; }
.volume-card--three { background: #8b6b39; }
.volume-card--four { background: #4f513c; }
.volume-card--five { background: #5c3c34; }
.volume-topline { display: flex; justify-content: space-between; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.volume-number { font: 700 .82rem var(--serif); }
.volume-card h3 { max-width: 12ch; margin: .3rem 0; font: 500 clamp(1.8rem, 3vw, 3rem)/1 var(--serif); }
.volume-card div > p { margin: 0; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.volume-note { max-width: 34rem; font-size: .86rem; opacity: .82; }
.volume-status { width: max-content; padding: .3rem .45rem; border: 1px solid rgba(255,255,255,.34); font-size: .58rem; letter-spacing: .09em; text-transform: uppercase; }

.method-section {
  padding: clamp(5rem, 10vw, 9rem) max(1rem, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(3rem, 8vw, 8rem);
  color: var(--paper);
  background: var(--red-dark);
}
.kicker--light { color: #d9b474; }
.method-intro > p:last-child { color: rgba(243,236,220,.72); }
.method-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.25); }
.method-list li { padding: 1.5rem 0; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.2); }
.method-list li > span { color: #d9b474; font: 700 .75rem var(--serif); }
.method-list h3 { margin-bottom: .25rem; font: 500 1.35rem var(--serif); }
.method-list p { margin: 0; color: rgba(243,236,220,.72); font-size: .9rem; }

.sample-heading { max-width: 740px; }
.sample-layout { margin-top: 3.5rem; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.passage-card {
  position: sticky;
  top: 7rem;
  min-height: 390px;
  margin: 0;
  padding: 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
  background: var(--ink);
}
.passage-meta { display: flex; justify-content: space-between; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.passage-card > p { position: relative; z-index: 1; max-width: 14ch; margin: 4rem 0; font: italic 500 clamp(1.7rem, 3.5vw, 3rem)/1.12 var(--serif); }
.passage-card footer { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.passage-orbit { position: absolute; border: 1px solid rgba(211,178,116,.28); border-radius: 50%; }
.orbit-one { width: 320px; height: 320px; right: -110px; bottom: -150px; }
.orbit-two { width: 210px; height: 210px; right: -50px; bottom: -95px; }
.layers-list { border-top: 1px solid var(--line); }
.layers-list article { padding: 1.3rem 0; display: grid; grid-template-columns: 2.8rem 1fr; gap: 1rem; border-bottom: 1px solid var(--line); }
.layers-list article > span { color: var(--red); font: 700 .72rem var(--serif); }
.layers-list h3 { margin: 0 0 .25rem; font: 600 1.25rem var(--serif); }
.layers-list p { margin: 0; color: var(--ink-soft); font-size: .9rem; }

.languages-section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 4rem;
  align-items: end;
  border-top: 1px solid var(--line);
}
.language-cards { display: grid; grid-template-columns: repeat(3, 1fr); }
.language-cards article { min-height: 170px; padding: 1.2rem; border: 1px solid var(--line); border-right: 0; }
.language-cards article:last-child { border-right: 1px solid var(--line); }
.language-cards article.active { color: var(--paper); background: var(--red); border-color: var(--red); }
.language-cards span { font: 700 .7rem var(--serif); }
.language-cards h3 { margin: 2.4rem 0 .3rem; font: 600 1.25rem var(--serif); }
.language-cards p { margin: 0; font-size: .75rem; opacity: .75; }

.provenance-section { display: grid; grid-template-columns: .35fr 1fr .7fr; gap: 3rem; align-items: center; border-top: 1px solid var(--line); }
.provenance-mark {
  width: 9rem; height: 9rem; display: grid; place-content: center; text-align: center;
  border: 1px solid var(--red); border-radius: 50%; color: var(--red); transform: rotate(-8deg);
}
.provenance-mark span { font: 500 3rem/1 var(--serif); }
.provenance-mark small { font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }
.modern-note { padding: 1.5rem; color: var(--paper); background: var(--olive); }
.modern-note span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.modern-note p { margin-bottom: 0; font: italic 1rem/1.5 var(--serif); }

.faq-section { border-top: 1px solid var(--line); }
.faq-list { margin-top: 3rem; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 2rem; cursor: pointer; list-style: none; font: 600 1.25rem var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { color: var(--red); transition: transform .15s ease; }
.faq-list details > p { max-width: 800px; margin: 0; padding: 0 0 1.4rem; color: var(--ink-soft); }

.final-cta {
  padding: clamp(5rem, 10vw, 9rem) max(1rem, calc((100vw - var(--max)) / 2));
  color: var(--paper); background: var(--ink); text-align: center;
}
.final-cta h2 { margin-bottom: 1.2rem; font: 500 clamp(3rem, 7vw, 7rem)/.95 var(--serif); letter-spacing: -.045em; }
.final-cta > p:not(.kicker) { max-width: 620px; margin-inline: auto; color: rgba(243,236,220,.72); }
.final-actions { justify-content: center; }
.site-footer { padding: 2rem 0; display: grid; grid-template-columns: 1fr auto auto; gap: 2rem; align-items: center; font-size: .72rem; }
.site-footer > p { margin: 0; color: var(--ink-soft); }

/* Language gateway */
.gateway { min-height: 100vh; display: flex; flex-direction: column; }
.gateway-header { margin-top: 1rem; }
.gateway-header > p { margin: 0; font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.gateway-hero { padding: clamp(4rem, 10vw, 8rem) 0 3rem; }
.gateway-hero h1 { max-width: 900px; }
.gateway-intro { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; color: var(--ink-soft); }
.gateway-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gateway-card {
  min-height: 330px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.16);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.gateway-card:hover { color: var(--paper); background: var(--red); transform: translateY(-4px); }
.gateway-index, .gateway-card small { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.gateway-code { font: 500 clamp(3rem, 7vw, 6rem)/1 var(--serif); }
.gateway-card h2 { margin: 0 0 .4rem; font: 600 1.5rem var(--serif); }
.gateway-card p { margin: 0; font-size: .86rem; opacity: .76; }
.gateway-action { display: flex; justify-content: space-between; padding-top: 1rem; border-top: 1px solid currentColor; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.gateway-footer { margin-top: auto; padding: 2rem 0; display: flex; justify-content: space-between; gap: 2rem; color: var(--ink-soft); font-size: .72rem; }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero, .method-section, .sample-layout, .languages-section, .provenance-section { grid-template-columns: 1fr; }
  .hero { padding-top: 5rem; }
  .hero-library { min-height: 420px; }
  .section-heading--wide { grid-template-columns: 1fr; }
  .section-heading--wide .kicker { grid-column: auto; }
  .value-grid { grid-template-columns: 1fr; }
  .value-grid article { padding-inline: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .collection-grid { grid-template-columns: 1fr 1fr; }
  .volume-card:nth-child(n) { grid-column: span 1; }
  .volume-card:last-child { grid-column: 1 / -1; }
  .passage-card { position: relative; top: 0; }
  .site-footer { grid-template-columns: 1fr; }
  .gateway-choices { grid-template-columns: 1fr; }
  .gateway-card { min-height: 240px; }
}

@media (max-width: 620px) {
  .site-header { top: .25rem; padding: .6rem; }
  .brand small { display: none; }
  .language-switch a { min-width: 1.95rem; padding-inline: .3rem; }
  .hero { min-height: 0; padding-top: 4rem; }
  h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .book-spine { grid-template-columns: 1.7rem 1fr; }
  .book-spine small { display: none; }
  .library-seal { right: .3rem; bottom: 0; width: 6rem; height: 6rem; }
  .collection-grid, .language-cards, .gateway-intro { grid-template-columns: 1fr; }
  .volume-card:nth-child(n) { grid-column: auto; min-height: 270px; }
  .language-cards article { border-right: 1px solid var(--line); border-bottom: 0; }
  .language-cards article:last-child { border-bottom: 1px solid var(--line); }
  .provenance-mark { width: 7rem; height: 7rem; }
  .gateway-footer { flex-direction: column; }
}

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