/* The Forestbook — site. Cut-paper register: matte cardstock, one soft shadow, no gloss.
   Colours are the project charter; nothing here may invent a new one. */
@font-face { font-family: "Cormorant"; font-weight: 500; font-style: normal; src: url("../assets/fonts/cormorant-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant"; font-weight: 600; font-style: normal; src: url("../assets/fonts/cormorant-600.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Manrope"; font-weight: 500; src: url("../assets/fonts/manrope-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Manrope"; font-weight: 600; src: url("../assets/fonts/manrope-600.woff2") format("woff2"); font-display: swap; }

:root {
  --red: #d90b1c;
  --red-deep: #b90d1c;
  --fold: #790f19;
  --cream: #f2e9d8;
  --ivory: #fff8e9;
  --grey: #a49f99;
  --crease: #69635f;
  --ink: #292522;
  --serif: "Cormorant", Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --page: 1180px;
  --gut: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--red);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { width: min(100% - 2 * var(--gut), var(--page)); margin-inline: auto; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--red);
  border-bottom: 1px solid rgba(255, 248, 233, 0.16);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ivory); margin-right: auto; }
.mark .the { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 0.4em; opacity: 0.8; }
.mark .name { font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: -0.01em; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a { color: var(--ivory); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 999px; opacity: 0.9; }
.top nav a:hover { background: rgba(255, 248, 233, 0.14); opacity: 1; }

/* ---------- paper buttons ---------- */
.tab {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 26px 0 30px; height: 56px;
  background: var(--cream); color: var(--ink);
  font-family: var(--sans); font-weight: 600; font-size: 16px;
  text-decoration: none; border: 0; cursor: pointer;
  border-radius: 8px 30px 30px 8px;
  box-shadow: 0 10px 22px rgba(60, 4, 10, 0.3), inset 0 -3px 0 rgba(121, 15, 25, 0.14);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s;
}
.tab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(60, 4, 10, 0.34), inset 0 -3px 0 rgba(121, 15, 25, 0.14); }
.tab .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--fold); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35); }
.tab.dark { background: var(--ink); color: var(--ivory); }
.tab.dark .dot { background: var(--red); }
.tab.ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1.5px rgba(255, 248, 233, 0.5); }
.tab.ghost .dot { background: var(--ivory); }
/* Not a link: the book is not open yet. Reads as a paper tab still tucked into the page. */
.tab.soon { cursor: default; background: rgba(255, 248, 233, 0.14); color: var(--ivory); box-shadow: inset 0 0 0 1.5px rgba(255, 248, 233, 0.34); }
.tab.soon:hover { transform: none; box-shadow: inset 0 0 0 1.5px rgba(255, 248, 233, 0.34); }
.tab.soon .dot { background: rgba(255, 248, 233, 0.5); box-shadow: none; }
.tab.soon .why { font-weight: 500; opacity: 0.72; font-size: 13.5px; margin-left: -4px; }
.sheet .tab.soon { background: rgba(41, 37, 34, 0.07); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(41, 37, 34, 0.22); }
.sheet .tab.soon:hover { box-shadow: inset 0 0 0 1.5px rgba(41, 37, 34, 0.22); }
.sheet .tab.soon .dot { background: rgba(41, 37, 34, 0.3); }

/* ---------- hero ---------- */
.hero { padding: 84px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1.28fr; gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; color: var(--ivory);
  font-size: clamp(54px, 6.4vw, 96px); line-height: 1.04; letter-spacing: -0.02em;
}
.hero .kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.4em; color: var(--ivory); opacity: 0.82; margin-bottom: 18px; }
.hero .lede { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.45; color: var(--ivory); opacity: 0.94; margin-top: 22px; max-width: 30ch; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .note { margin-top: 20px; font-size: 13.5px; color: var(--ivory); opacity: 0.72; }
.film { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(60, 4, 10, 0.4); background: var(--red-deep); }
.film video { width: 100%; height: auto; }
.film .cap {
  position: absolute; left: 0; bottom: 18px;
  background: var(--cream); color: var(--ink);
  font-family: var(--serif); font-weight: 600; font-size: 18px;
  padding: 9px 22px 9px 20px; border-radius: 0 999px 999px 0;
  box-shadow: 0 8px 18px rgba(60, 4, 10, 0.3);
}

/* ---------- paper sheet sections ---------- */
.sheet {
  background: var(--cream);
  border-radius: 20px;
  padding: 64px 58px;
  box-shadow: 0 26px 54px rgba(60, 4, 10, 0.3);
  position: relative;
}
.sheet + .sheet { margin-top: 30px; }
section.band { padding: 34px 0; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.34em; color: var(--red-deep); }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.015em; margin-top: 10px; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.2; }
.sheet p { max-width: 68ch; }
.lead { font-size: 19px; margin-top: 16px; color: #3a352f; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 38px; }
.card { background: var(--ivory); border-radius: 14px; padding: 26px 24px 28px; box-shadow: inset 0 -3px 0 rgba(121, 15, 25, 0.1), 0 8px 16px rgba(60, 4, 10, 0.08); }
.card .n { font-family: var(--sans); font-weight: 600; font-size: 11.5px; letter-spacing: 0.3em; color: var(--red-deep); }
.card h3 { margin: 8px 0 10px; }
.card p { font-size: 15.5px; color: #433d37; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 38px; }
.role { background: var(--ivory); border-radius: 14px; padding: 30px 28px; box-shadow: inset 0 -3px 0 rgba(121, 15, 25, 0.1); }
.role.lion { background: var(--ink); color: var(--ivory); }
.role.lion .k { color: #ff9aa2; }
.role .k { font-size: 11.5px; font-weight: 600; letter-spacing: 0.3em; color: var(--red-deep); }
.role h3 { margin: 8px 0 12px; font-size: 34px; }
.role ul { list-style: none; margin-top: 14px; display: grid; gap: 9px; }
.role li { position: relative; padding-left: 22px; font-size: 15.5px; }
.role li::before { content: ""; position: absolute; left: 0; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red-deep); }
.role.lion li::before { background: var(--red); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.fact { border-top: 2px solid var(--ink); padding-top: 14px; }
.fact .v { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.05; }
.fact .l { font-size: 13.5px; color: #55504a; margin-top: 4px; }

/* ---------- X card ---------- */
.xcard { display: grid; grid-template-columns: 96px 1fr auto; gap: 22px; align-items: center; }
.xcard .pic { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; box-shadow: 0 8px 18px rgba(60, 4, 10, 0.25); }
.xcard .handle { font-family: var(--serif); font-weight: 600; font-size: 30px; }
.xcard .bio { font-size: 15.5px; color: #4a453f; margin-top: 4px; }
.xglyph { width: 19px; height: 19px; fill: currentColor; }

/* ---------- footer ---------- */
footer { padding: 54px 0 70px; color: var(--ivory); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
footer a { text-decoration: none; opacity: 0.86; font-size: 14.5px; }
footer a:hover { opacity: 1; text-decoration: underline; }
.small { font-size: 13.5px; opacity: 0.86; max-width: 62ch; }

/* ---------- docs: a printed document lying on the floor ---------- */
.doc { padding: 40px 0 90px; }
.doc .sheetpage {
  background: var(--cream); color: var(--ink);
  border-radius: 6px; padding: 76px 92px 86px;
  box-shadow: 0 30px 60px rgba(60, 4, 10, 0.34);
  max-width: 900px; margin-inline: auto;
}
.doc .sheetpage + .sheetpage { margin-top: 34px; }
.docgrid { display: grid; grid-template-columns: 236px 1fr; gap: 34px; align-items: start; }
.docgrid > * { min-width: 0; } /* a grid track is minmax(auto,1fr): without this the widest child sets the width */
.toc { position: sticky; top: 92px; background: var(--cream); border-radius: 14px; padding: 24px 22px; box-shadow: 0 14px 30px rgba(60, 4, 10, 0.26); }
.toc .t { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; color: var(--red-deep); }
summary.t { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary.t::-webkit-details-marker { display: none; }
summary.t::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--red-deep); border-bottom: 2px solid var(--red-deep); transform: rotate(45deg); margin-bottom: 3px; transition: transform 0.2s; }
details[open] > summary.t::after { transform: rotate(-135deg); margin-bottom: -3px; }
.toc .tab.pdf { margin-top: 18px; height: 46px; font-size: 14px; width: 100%; justify-content: space-between; padding: 0 20px 0 22px; }
.toc ol { list-style: none; counter-reset: s; margin-top: 12px; display: grid; gap: 2px; }
.toc li { counter-increment: s; }
.toc a { display: block; text-decoration: none; font-size: 14px; padding: 5px 8px; border-radius: 7px; color: #443f39; }
.toc ol a::before { content: counter(s) "."; display: inline-block; width: 22px; color: var(--red-deep); font-weight: 600; }
.toc a:hover, .toc a.on { background: var(--ivory); color: var(--ink); }
.docmeta { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-bottom: 26px; margin-bottom: 34px; border-bottom: 1.5px solid rgba(41, 37, 34, 0.25); font-size: 13px; color: #55504a; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: 52px; line-height: 1.06; letter-spacing: -0.015em; }
.doc h2 { font-size: 32px; margin-top: 46px; scroll-margin-top: 92px; }
.doc h2 .num { color: var(--red-deep); margin-right: 12px; }
.doc h3 { font-size: 22px; margin-top: 26px; }
.doc p { margin-top: 13px; font-size: 16.5px; line-height: 1.68; max-width: 70ch; }
.doc ul, .doc ol.body { margin: 13px 0 0 20px; }
.doc li { margin-top: 7px; font-size: 16.5px; line-height: 1.6; }
.doc table { width: 100%; max-width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(41, 37, 34, 0.16); }
.doc th { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #55504a; font-weight: 600; }
.doc td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc .callout { margin-top: 20px; background: var(--ivory); border-left: 4px solid var(--red-deep); border-radius: 0 12px 12px 0; padding: 18px 22px; }
.doc .callout p { margin-top: 0; font-size: 16px; }
.doc .callout p + p { margin-top: 10px; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; background: var(--ivory); padding: 2px 6px; border-radius: 5px; }
.doc figure { margin-top: 22px; background: var(--ivory); border-radius: 12px; padding: 24px; }
.doc figcaption { margin-top: 12px; font-size: 13.5px; color: #55504a; }
.loopsvg { width: 100%; height: auto; display: block; }
.pagefoot { margin-top: 44px; padding-top: 16px; border-top: 1.5px solid rgba(41, 37, 34, 0.2); display: flex; justify-content: space-between; font-size: 12.5px; color: #6a645e; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 54px 0 64px; }
  .three, .facts { grid-template-columns: 1fr 1fr; }
  .docgrid { grid-template-columns: 1fr; }
  .toc { position: static; }
  details[open] > summary.t { margin-bottom: 10px; }
  .doc .sheetpage { padding: 54px 30px 60px; }
}
@media (max-width: 680px) {
  :root { --gut: 18px; }
  .sheet { padding: 40px 24px; }
  .three, .two, .facts { grid-template-columns: 1fr; }
  .top nav a:not(.tab) { display: none; }
  .xcard { grid-template-columns: 64px 1fr; }
  .xcard .pic { width: 64px; height: 64px; }
  .xcard .tab { grid-column: 1 / -1; }
  .doc table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .doc h1 { font-size: 38px; }
  .doc h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tab { transition: none; } }

/* ---------- print: the docs page becomes the PDF ---------- */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  body { background: #fff; font-size: 11pt; }
  .top, .toc, footer, .noprint { display: none !important; }
  .doc { padding: 0; }
  .docgrid { display: block; }
  .doc .sheetpage { box-shadow: none; border-radius: 0; padding: 0; max-width: none; margin: 0; background: #fff; }
  .doc .sheetpage + .sheetpage { margin-top: 0; page-break-before: always; }
  .doc h2 { page-break-after: avoid; margin-top: 22pt; }
  .doc table, .doc figure, .doc .callout { page-break-inside: avoid; }
  .doc code, .doc .callout, .doc figure { background: #f4f1ea; }
}
