@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ===== Tokens — the Archival direction ===== */
:root {
  --paper: #f1efe6;
  --paper-raised: #ece7d8;
  --ink: #241f18;
  --ink-soft: #5c5648;
  --ink-faint: #8b8471;
  --rule: #d9d3c1;
  --rule-strong: #b7ae95;
  --wine: #6b2737;
  --brass: #8a6a2c;
  --brass-bright: #d3ad64;
  --near-black: #1c1812;
  --shadow: 0 10px 30px rgba(36, 31, 24, 0.18);
  --shadow-sm: 0 8px 20px rgba(36, 31, 24, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: 'Newsreader', Georgia, serif; font-style: italic; font-weight: 500; }
p { margin: 0; }

.wrap { max-width: 1312px; margin: 0 auto; padding: 0 64px; }

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ===== Nav ===== */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 64px;
  border-bottom: 1px solid var(--rule);
}
.site-nav .wordmark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-nav .links {
  display: flex;
  gap: 36px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-nav .links a { transition: color 0.15s ease; }
.site-nav .links a:hover { color: var(--ink); }
.site-nav .links a[aria-current="page"] { color: var(--wine); }

/* mobile nav */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .site-nav { padding: 20px 24px; flex-wrap: wrap; }
  .site-nav .links { gap: 20px; flex-wrap: wrap; row-gap: 10px; }
  .wrap { padding: 0 24px; }
}

/* ===== Footer ===== */
.site-footer {
  padding: 36px 64px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-faint);
}
@media (max-width: 560px) {
  .site-footer { padding: 28px 24px; flex-direction: column; gap: 8px; }
}

/* ===== Page hero (interior pages) ===== */
.page-hero { padding: 80px 64px 60px; max-width: 820px; }
.page-hero h1 { font-size: 64px; line-height: 1.05; color: var(--ink); text-wrap: balance; margin-top: 22px; }
.page-hero .dek { font-size: 18px; line-height: 1.65; color: var(--ink-soft); max-width: 620px; margin-top: 24px; }
@media (max-width: 760px) {
  .page-hero { padding: 56px 24px 40px; }
  .page-hero h1 { font-size: 42px; }
}

/* ===== Homepage hero ===== */
.home-hero { position: relative; width: 100%; height: 760px; overflow: hidden; }
.home-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: saturate(0.55) contrast(1.03); }
.home-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,31,24,0.12) 0%, rgba(36,31,24,0.30) 55%, rgba(30,25,19,0.86) 100%);
}
.home-hero .home-hero-copy { position: absolute; left: 64px; right: 64px; bottom: 64px; max-width: 760px; z-index: 1; }
.home-hero .eyebrow { color: var(--brass-bright); margin-bottom: 18px; }
.home-hero h1 { font-size: 88px; line-height: 0.98; color: #f8f6ee; }
.home-hero .subtitle { font-family: 'IBM Plex Mono', monospace; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #cdc6b2; margin-top: 20px; }
.home-hero p.dek { font-size: 18px; line-height: 1.6; color: #ded8c6; max-width: 600px; margin-top: 22px; }
@media (max-width: 760px) {
  .home-hero { height: 560px; }
  .home-hero h1 { font-size: 52px; }
  .home-hero .home-hero-copy { left: 24px; right: 24px; bottom: 32px; }
}

/* ===== Three-tile section grid ===== */
.tiles-section { padding: 96px 64px 80px; }
.tiles-section .eyebrow { margin-bottom: 44px; display: block; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.tile { display: block; background: var(--paper); padding: 44px 38px; transition: background 0.15s ease, border-color 0.15s ease; }
.tile:hover { background: var(--paper-raised); }
.tile .eyebrow { font-size: 11px; margin-bottom: 22px; display: block; }
.tile h3 { font-size: 30px; color: var(--ink); margin-bottom: 16px; }
.tile p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 900px) {
  .tiles-section { padding: 56px 24px; }
  .tiles { grid-template-columns: 1fr; }
}

/* ===== Saw feature band ===== */
.saw-band { display: block; margin: 0 64px 96px; background: var(--near-black); border-radius: 2px; overflow: hidden; transition: background 0.15s ease; }
.saw-band:hover { background: var(--ink); }
.saw-band .grid { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.saw-band .copy { padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.saw-band .eyebrow { color: var(--brass-bright); margin-bottom: 20px; }
.saw-band h3 { font-size: 38px; color: var(--paper); margin-bottom: 18px; }
.saw-band p { font-size: 17px; line-height: 1.65; color: #c8c1ac; max-width: 440px; margin-bottom: 26px; }
.saw-band .initials { display: flex; gap: 14px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.04em; color: var(--brass-bright); }
.saw-band .initials .sep { color: var(--ink-soft); }
.saw-band .cta { margin-top: 32px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper); }
.saw-band .figure { position: relative; min-height: 340px; overflow: hidden; background: #111; }
.saw-band .figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .saw-band { margin: 0 24px 64px; }
  .saw-band .grid { grid-template-columns: 1fr; }
  .saw-band .figure { min-height: 260px; }
}

/* ===== Editorial note (dashed callout) ===== */
.note {
  padding: 14px 16px;
  border: 1px dashed var(--rule-strong);
  background: var(--paper-raised);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ===== Long-form article (Our Story) ===== */
.article { padding: 0 64px 40px; }
.article-section { max-width: 700px; padding: 56px 0; border-top: 1px solid var(--rule); }
.article-section:first-child { border-top: none; padding-top: 8px; }
.article-section h2 { font-size: 36px; line-height: 1.15; color: var(--ink); margin-bottom: 22px; }
.article-section p { font-size: 18px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 18px; }
.article-section p:last-child { margin-bottom: 0; }
.article-section p strong { color: var(--ink); font-weight: 600; }
.article-section blockquote {
  margin: 28px 0; padding: 4px 0 4px 24px;
  border-left: 3px solid var(--wine);
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-size: 19px; line-height: 1.7; color: var(--ink);
}
.article-section .see-also {
  margin-top: 24px; display: inline-block;
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--wine); border-bottom: 1px solid transparent;
}
.article-section .see-also:hover { border-bottom-color: var(--wine); }
.open-questions { max-width: 760px; padding: 56px 0; border-top: 1px solid var(--rule); }
.open-questions h2 { font-size: 30px; margin-bottom: 8px; }
.open-questions .dek { font-size: 16px; color: var(--ink-soft); margin-bottom: 28px; max-width: 60ch; }
.oq-list { display: flex; flex-direction: column; gap: 18px; }
.oq-item { display: grid; grid-template-columns: 20px 1fr; gap: 12px; }
.oq-item .mark { color: var(--brass); font-family: 'IBM Plex Mono', monospace; font-size: 15px; }
.oq-item p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 0; }
.oq-item p strong { color: var(--ink); }
@media (max-width: 760px) {
  .article { padding: 0 24px 24px; }
  .article-section h2 { font-size: 28px; }
  .article-section p { font-size: 17px; }
}

/* ===== Family tree timeline ===== */
.timeline { padding: 20px 64px 0; position: relative; }
.tl-row { display: flex; gap: 40px; padding: 30px 0; border-top: 1px solid var(--rule); }
.tl-row:first-child { border-top: none; }
.tl-year { width: 120px; flex-shrink: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--brass); padding-top: 4px; text-align: right; }
.tl-main { flex: 1; }
.tl-main-inner { display: flex; gap: 32px; align-items: flex-start; cursor: pointer; }
.tl-text { flex: 1; }
.tl-name { font-size: 26px; color: var(--ink); margin-bottom: 6px; display: flex; align-items: baseline; gap: 10px; }
.tl-role { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.tl-summary { font-size: 16px; line-height: 1.65; color: var(--ink-soft); max-width: 560px; margin-top: 8px; }
.tl-thumb { width: 88px; height: 110px; flex-shrink: 0; border-radius: 2px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-toggle { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wine); flex-shrink: 0; padding-top: 4px; white-space: nowrap; }
.tl-detail {
  margin: 20px 0 0 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 28px 32px;
}
/* Without JS, every detail panel stays visible — nothing is hidden from
   anyone. With JS (see js/tree.js), panels collapse and the row becomes
   a click-to-expand toggle. */
.js .tl-detail { display: none; }
.js .tl-row.is-open .tl-detail { display: block; }
.js .tl-row.is-open .tl-toggle::after { content: " \2013 close"; }
.js .tl-row:not(.is-open) .tl-toggle::after { content: " +"; }
.tl-detail-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.tl-detail-photos { display: flex; gap: 16px; flex-wrap: wrap; }
.tl-detail-photos img { width: 100px; border-radius: 2px; box-shadow: var(--shadow-sm); }
.tl-detail-text { flex: 1; min-width: 240px; }
.tl-detail-text p { font-size: 15px; line-height: 1.7; color: #3a352b; }
.tl-detail-text p + p { margin-top: 12px; }
.tl-detail-text .eyebrow { display: block; margin: 18px 0 6px; }
.tl-detail-text .eyebrow:first-child { margin-top: 0; }
.tl-detail-text ul { margin: 6px 0 0 0; padding-left: 18px; }
.tl-detail-text li { font-size: 15px; line-height: 1.6; color: #3a352b; margin-bottom: 5px; }
.tl-detail-text li + li { margin-top: 0; }
.tl-detail-text blockquote {
  margin: 14px 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--wine);
  font-family: 'Newsreader', Georgia, serif; font-style: italic;
  font-size: 15px; line-height: 1.65; color: #3a352b;
}
@media (max-width: 760px) {
  .timeline { padding: 8px 24px 0; }
  .tl-row { flex-direction: column; gap: 8px; }
  .tl-year { width: auto; text-align: left; }
  .tl-main-inner { flex-direction: column; }
  .tl-thumb { width: 80px; height: 100px; }
}

/* ===== Photo grid ===== */
.era-block { padding: 64px 64px 0; }
.era-block:first-child { padding-top: 16px; }
.era-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.era-head h2 { font-size: 28px; color: var(--ink); }
.era-head .range { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--brass); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.photo-card { display: block; }
.photo-card .frame {
  border-radius: 2px; overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 3/4;
  background: var(--near-black); transition: transform 0.15s ease;
}
.photo-card:hover .frame { transform: translateY(-3px); }
.photo-card .frame img { width: 100%; height: 100%; object-fit: contain; }
.js .photo-card .frame { cursor: zoom-in; }
.photo-card .caption { margin-top: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.photo-card .caption .when { color: var(--brass); }

/* ===== Photo lightbox ===== */
.lightbox-overlay {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(18, 15, 10, 0.92);
  align-items: center; justify-content: center;
  padding: 40px 24px;
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-inner { max-width: min(1100px, 92vw); max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.lightbox-inner img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto;
  object-fit: contain; border-radius: 2px; box-shadow: var(--shadow);
}
.lightbox-caption {
  margin-top: 18px; text-align: center; color: var(--paper);
  font-family: 'IBM Plex Mono', monospace; font-size: 13px; line-height: 1.6; max-width: 60ch;
}
.lightbox-caption .when { color: var(--brass-bright); display: block; margin-top: 4px; }
.lightbox-close {
  position: fixed; top: 24px; right: 28px; z-index: 101;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(241, 239, 230, 0.35);
  background: rgba(18, 15, 10, 0.6); color: var(--paper);
  font-family: 'IBM Plex Mono', monospace; font-size: 20px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(241, 239, 230, 0.12); }
@media (max-width: 760px) {
  .lightbox-close { top: 14px; right: 14px; }
}
.placeholder-tile {
  border-radius: 2px; border: 1px dashed var(--rule-strong); background: var(--paper-raised);
  aspect-ratio: 3/4; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
}
.placeholder-tile span { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 900px) {
  .era-block { padding: 48px 24px 0; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: 1fr; }
}

/* ===== Object page (The Saw) sections ===== */
.object-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 720px; }
.object-hero .copy { padding: 80px 64px 60px; display: flex; flex-direction: column; justify-content: center; }
.object-hero h1 { font-size: 76px; line-height: 1.0; }
.object-hero p { font-size: 18px; line-height: 1.65; color: var(--ink-soft); max-width: 480px; margin-top: 26px; }
.object-hero .figure { position: relative; overflow: hidden; background: #111; }
.object-hero .figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip-row { display: flex; gap: 16px; margin-top: 34px; font-family: 'IBM Plex Mono', monospace; font-size: 15px; letter-spacing: 0.03em; }
.chip { border: 1px solid var(--rule); padding: 8px 14px; border-radius: 2px; }
.chip.mine { border-color: var(--wine); color: var(--wine); }
@media (max-width: 900px) {
  .object-hero { grid-template-columns: 1fr; min-height: auto; }
  .object-hero .copy { padding: 48px 24px; }
  .object-hero h1 { font-size: 48px; }
  .object-hero .figure { height: 320px; }
}

.obj-section { padding: 80px 64px; }
.obj-section .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.obj-section .grid.reverse { grid-template-columns: 0.85fr 1.15fr; }
.obj-section .figure { border-radius: 2px; overflow: hidden; box-shadow: var(--shadow); }
.obj-section h2 { font-size: 32px; margin-bottom: 18px; }
.obj-section p { font-size: 17px; line-height: 1.7; color: var(--ink-soft); max-width: 460px; margin-bottom: 18px; }
.obj-section .note { max-width: 460px; }
@media (max-width: 900px) {
  .obj-section { padding: 48px 24px; }
  .obj-section .grid, .obj-section .grid.reverse { grid-template-columns: 1fr; }
}

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.two-up .cell { background: #111; }
.two-up img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
  .two-up { grid-template-columns: 1fr; }
}
