/* =====================================================================
   The Hardy Williams Education Fund: "The Legacy" (DRAFT)
   Loaded after la.css. Reuses its nav, footer, buttons, stamps, prints,
   placeholder marks and reveal system (la.js adds .is-in).
   Black and white first; color arrives as each block scrolls into view.
   Page behaviour (album, three-words wall): assets/page-legacy.js
   ===================================================================== */

/* ---------- Official brand kit (same block as the other inner pages) ---------- */
:root {
  --brand-navy: #011F5B;        /* PRIMARY */
  --brand-blue: #002A82;        /* Commonwealth Blue: CTAs, links */
  --brand-gold: #FFCE00;        /* FILL / ACCENT ONLY on light */
  --brand-purple: #6D2077;      /* Royal Purple: heritage moments */
  --brand-beige: #DAD3C1;       /* Misty Beige: soft fills */
  --brand-cheyney: #0C123B;     /* dark sections, footer */

  --hw-navy: var(--brand-navy);
  --hw-navy-deep: var(--brand-navy);
  --hw-blue: var(--brand-blue);
  --hw-gold: var(--brand-gold);
  --hw-purple: var(--brand-purple);
  --hw-beige: var(--brand-beige);
  --ch-cheyney: var(--brand-cheyney);

  --bw: var(--grey-700);        /* the "black and white" state of a text color */
  --bw-fill: #E4DED2;           /* the "black and white" state of a fill */
  --bw-line: #CFC8B8;           /* the "black and white" state of a line */
  --hairline: #DDD6C6;
  --linen: #ECE6D9;             /* album table */
  --album-paper: #F8F4EA;       /* album page */
  --label: #FFFDF7;             /* caption labels */
}

/* current page in the nav + footer (same treatment as the other inner pages) */
.site-nav ul a[aria-current="page"] { background-size: calc(100% - 24px) 4px; font-weight: 800; }
@media (max-width: 1180px) { .site-nav ul a[aria-current="page"] { background-size: 120px 4px; } }
.footer__nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--brand-gold); }
.footer__logo { background: none; padding: 0; }
.footer__logo img { max-width: 200px; }

/* Commonwealth Blue call-to-action button (brand kit: CTAs) */
.btn--cta { background: var(--brand-blue); color: var(--paper); }
.btn--cta:hover, .btn--cta:active { background: var(--brand-navy); }
.btn--big { min-height: 64px; padding: 16px 34px; font-size: 21px; }
.text-link { color: var(--brand-blue); }

/* =====================================================================
   1. HERO
   ===================================================================== */
.lg-hero__title {
  font-size: clamp(64px, 8.6vw, 140px); line-height: .9; letter-spacing: -.035em;
  color: var(--brand-navy); max-width: 7ch;
}
.lg-hero .gold-rule { margin: 32px 0 22px; }
.lg-hero .tagline { margin-bottom: 8px; }
.lg-hero .hero__lede { max-width: 30em; }
/* the stage holds the newspaper, the color wash and the print; the caption sits below it, on plain newsprint */
.lg-hero__print { padding: 0; }
.lg-hero__stage { position: relative; padding: 58px 44px 34px 30px; }
.lg-hero__stage .newspage { height: 82%; }
.lg-hero__stage .wash { top: 30%; bottom: 0; }
.lg-hero__print .print { max-width: 500px; margin: 0 auto; }
.lg-hero__print .hero__caption { max-width: 500px; margin: 18px auto 0; }
@media (max-width: 900px) { .lg-hero__print { max-width: 560px; } .lg-hero__stage { padding: 34px 14px 24px 18px; } }

/* =====================================================================
   2. INTRO + WHAT THE RECORD SHOWS
   ===================================================================== */
.lg-intro { background: var(--paper); padding: clamp(64px, 8vw, 104px) 0; }
.lg-intro__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.lg-intro h2 { color: var(--brand-navy); margin-bottom: 8px; }
.lg-intro__copy p.ph { font-size: 21px; max-width: 32em; }
.lg-record { border-top: 5px solid var(--ink); box-shadow: 0 -9px 0 -7px var(--ink); padding-top: 18px; }
.lg-record__title { font: 700 16px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--grey-700); margin: 0 0 6px; }
.lg-record__list li {
  --c: var(--brand-navy);
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--hairline);
  transition-delay: calc(var(--i) * .18s + .2s);
}
.js .lg-record:not(.is-in) li { --c: var(--bw); }
.lg-record__year { font: 700 48px/1 var(--serif); letter-spacing: -.03em; color: var(--c); transition: color 1s ease; transition-delay: inherit; white-space: nowrap; }
.lg-record__year--word { font-style: italic; font-weight: 400; }
.lg-record__list p { margin: 0; font-size: 21px; line-height: 1.45; }
@media (max-width: 900px) { .lg-intro__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .lg-record__list li { grid-template-columns: 1fr; gap: 6px; }
  .lg-record__year { font-size: 40px; }
}

/* =====================================================================
   3. THE LEGACY TREE
   ===================================================================== */
.tree-sec {
  background-color: var(--newsprint); background-image: var(--grain);
  padding: clamp(64px, 8vw, 110px) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.tree-head h2 { color: var(--brand-navy); }
.tree-flag {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 26px;
  padding: 12px 18px; background: var(--paper); border: 2px solid var(--brand-navy); border-radius: 4px;
  font-size: 20px; line-height: 1.35; color: var(--ink);
  box-shadow: 5px 5px 0 var(--brand-gold);
}
.tree-flag svg { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--brand-navy); stroke-width: 2.4; stroke-linecap: round; }

/* ---------- the picture (desktop) ---------- */
.tree { position: relative; margin: 0 auto; max-width: 1120px; }
.tree__canvas { position: relative; aspect-ratio: 1000 / 880; margin-bottom: 170px; }
.tree__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tree__svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tree__ground { fill: var(--brand-beige); opacity: .8; }
.tree__roots path { stroke: #B9B1A0; stroke-width: 7; }
.b-trunk { stroke-width: 20; }
.b-major { stroke-width: 11; }
.b-leaf  { stroke-width: 6; }
.tree__bare path { stroke: var(--bw-line); }
.tree__lit path {
  stroke: var(--brand-navy); stroke-dasharray: 1 2; stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.1s cubic-bezier(.45,.05,.3,1) var(--d, 0s);
}
.js .tree:not(.is-in) .tree__lit path { stroke-dashoffset: 1.02; }

.tnode { position: absolute; left: calc(var(--x) * .1%); top: calc(var(--y) / 880 * 100%); width: 0; height: 0; }
.tnode__dot {
  position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-gold); border: 5px solid var(--brand-navy);
  box-shadow: 0 0 0 5px var(--newsprint), 0 6px 14px -4px rgba(0,0,0,.35);
  transition: background-color .7s ease var(--d, 0s), border-color .7s ease var(--d, 0s), transform .7s var(--ease) var(--d, 0s);
}
.tnode__card {
  position: absolute; bottom: 32px; left: 0; transform: translateX(-50%);
  width: 232px; padding: 14px 16px 16px; text-align: center;
  background: var(--paper); border-top: 6px solid var(--brand-navy); border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 12px 24px -14px rgba(0,0,0,.45);
  transition: border-color .7s ease var(--d, 0s), background-color .7s ease var(--d, 0s);
}
.tnode__card p { margin: 0; }
.tnode__office { font: 700 21px/1.2 var(--serif); color: var(--brand-navy); transition: color .7s ease var(--d, 0s); }
.tnode__name { font-size: 18px; line-height: 1.35; color: var(--grey-700); margin-top: 6px !important; font-style: italic; }
.tnode__note { font-size: 17px; line-height: 1.35; color: var(--ink); margin-top: 6px !important; }

/* the seat: his son (the only confirmed name) */
.tnode--seat .tnode__card { width: 280px; background: var(--brand-navy); border-top-color: var(--brand-gold); }
.tnode--seat .tnode__office { color: var(--paper); }
.tnode--seat .tnode__name { color: var(--paper); font-style: normal; font-weight: 700; font-size: 19px; }
.tnode--seat .tnode__dot { left: -23px; top: -23px; width: 46px; height: 46px; }

/* leaves: smaller, dashed, clearly "to confirm" */
.tnode--leaf .tnode__card { width: 160px; padding: 10px 10px 12px; border-top-width: 4px; background: rgba(255,255,255,.86); outline: 2px dashed #A8A08F; outline-offset: -2px; }
.tnode--leaf .tnode__office { font: 600 17px/1.25 var(--sans); color: var(--ink); }
.tnode--leaf .tnode__name { font-size: 16px; margin-top: 2px !important; }
.tnode--leaf .tnode__dot { left: -14px; top: -14px; width: 28px; height: 28px; border-width: 4px; }

/* the root */
.tnode--root .tnode__dot {
  left: -38px; top: -38px; width: 76px; height: 76px; border-width: 6px;
  display: grid; place-items: center; background: var(--brand-navy); border-color: var(--brand-gold);
}
.tnode--root .tnode__dot span { font: 700 26px/1 var(--serif); color: var(--brand-gold); letter-spacing: .02em; transition: color .7s ease var(--d, 0s); }
.tnode--root .tnode__card { bottom: auto; top: 52px; width: 360px; border-top: 0; border-bottom: 6px solid var(--brand-gold); padding: 16px 20px 18px; }
.tnode--root .tnode__office { font-size: 30px; }
.tnode--root .tnode__name { font-style: normal; color: var(--ink); }

/* black-and-white state (before it scrolls in) */
.js .tree:not(.is-in) .tnode__dot { background: var(--bw-fill); border-color: var(--bw-line); transform: scale(.8); }
.js .tree:not(.is-in) .tnode__card { border-color: var(--bw-line); }
.js .tree:not(.is-in) .tnode__office { color: var(--bw); }
.js .tree:not(.is-in) .tnode--seat .tnode__card { background: var(--grey-700); }
.js .tree:not(.is-in) .tnode--seat .tnode__office { color: var(--paper); }
.js .tree:not(.is-in) .tnode--root .tnode__dot { background: var(--grey-700); border-color: var(--bw-line); transform: none; }
.js .tree:not(.is-in) .tnode--root .tnode__dot span { color: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.static) .tree.is-in .tnode__dot { animation: node-glow 1.2s ease var(--d, 0s) both; }
}
@keyframes node-glow {
  0% { box-shadow: 0 0 0 5px var(--newsprint), 0 0 0 5px rgba(255,206,0,0); }
  45% { box-shadow: 0 0 0 5px var(--newsprint), 0 0 0 18px rgba(255,206,0,.45); }
  100% { box-shadow: 0 0 0 5px var(--newsprint), 0 6px 14px -4px rgba(0,0,0,.35); }
}
.tree__cap { text-align: center; font-size: 18px; line-height: 1.5; color: var(--grey-700); font-style: italic; margin: 0 auto 40px; max-width: 40em; }

/* ---------- the same tree in words ---------- */
.lineage-wrap {
  max-width: 1120px; margin: 0 auto; background: var(--paper); padding: 30px clamp(20px, 3vw, 40px) 22px;
  border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 28px -18px rgba(0,0,0,.4);
}
.lineage__title { font: 700 26px/1.2 var(--serif); color: var(--brand-navy); margin: 0 0 18px; }
.lineage__flag { display: block; font: italic 400 19px/1.4 var(--sans); color: var(--grey-700); margin-top: 6px; }
.lineage p { margin: 0; }
.ln__office { font: 700 21px/1.3 var(--serif); color: var(--ink); }
.ln__years { font: 600 18px/1 var(--sans); color: var(--grey-700); margin-left: 6px; }
.ln__name { font-size: 20px; line-height: 1.45; color: var(--grey-700); }
.ln--root > .ln__name { color: var(--ink); }
.ln--seat > .ln__name { color: var(--ink); font-weight: 600; }
.lineage-wrap .text-link { margin-top: 12px; }

/* desktop: a tidy two-column key under the picture */
@media (min-width: 1180px) {
  .lineage > .ln--root > ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
  .lineage > .ln--root > ul > li { padding-left: 16px; border-left: 4px solid var(--brand-navy); }
  .lineage > .ln--root > ul > li.ln--seat { border-left-color: var(--brand-gold); }
  .lineage > .ln--root > ul > li.ln--leaf { grid-column: 1 / -1; border-left-color: var(--bw-line); }
  .ln--leaf > ul { display: flex; flex-wrap: wrap; gap: 4px 28px; }
  .ln--leaf .ln__office { font-size: 19px; }
}

/* phones + tablets: the picture goes; the list becomes the tree (vertical, indented) */
@media (max-width: 1179.98px) {
  .tree { display: none; }
  .tree-flag { display: flex; }
  .lineage-wrap { padding: 26px 20px 18px; }
  .lineage__title .lineage__flag { display: none; }  /* the flag above already says it */
  .lineage ul { position: relative; margin: 10px 0 0 18px; padding-left: 30px; }
  .lineage ul::before { /* the branch line: grey, then navy when it scrolls in */
    content: ""; position: absolute; left: 0; top: 0; bottom: 26px; width: 5px; border-radius: 3px; background: var(--bw-line);
  }
  .lineage ul::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 26px; width: 5px; border-radius: 3px; background: var(--brand-navy);
    transform-origin: top; transition: transform 1.6s cubic-bezier(.45,.05,.3,1) .2s;
  }
  .js .lineage-wrap:not(.is-in) .lineage ul::after { transform: scaleY(0); }
  .ln { position: relative; padding: 12px 0 10px; }
  .lineage ul > .ln::before { /* twig from the line to the node */
    content: ""; position: absolute; left: -30px; top: 27px; width: 22px; height: 5px; border-radius: 3px; background: var(--brand-navy);
    transition: background-color .5s ease; transition-delay: calc(var(--i) * .12s + .4s);
  }
  .ln > .ln__office, .ln--leaf > .ln__name { position: relative; }
  .ln > .ln__office::before, .ln--leaf > .ln__name::before { /* the node: lights up gold */
    content: ""; position: absolute; left: -14px; top: 5px; width: 22px; height: 22px; margin-left: -8px; border-radius: 50%;
    background: var(--brand-gold); border: 4px solid var(--brand-navy); box-sizing: border-box;
    transform: translateX(-100%); transition: background-color .6s ease, border-color .6s ease; transition-delay: calc(var(--i) * .12s + .4s);
    display: none;
  }
  .lineage ul > .ln > .ln__office::before, .lineage ul > .ln--leaf > .ln__name::before { display: block; left: -8px; }
  .ln--root > .ln__office { font-size: 28px; color: var(--brand-navy); }
  .ln--root { padding-top: 0; }
  .ln--seat > .ln__office { color: var(--brand-navy); }
  .ln--seat { background: linear-gradient(90deg, rgba(255,206,0,.28), rgba(255,206,0,0) 85%); padding-left: 10px; margin-left: -10px; border-radius: 3px; }
  .ln--seat::before { left: -20px !important; }
  .ln--leaf > .ln__office { font: 700 16px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--grey-700); }
  .ln--leaf ul { margin-left: 4px; }
  .js .lineage-wrap:not(.is-in) .lineage ul > .ln::before { background: var(--bw-line); }
  .js .lineage-wrap:not(.is-in) .ln > .ln__office::before,
  .js .lineage-wrap:not(.is-in) .ln--leaf > .ln__name::before { background: var(--bw-fill); border-color: var(--bw-line); }
}
@media (max-width: 480px) {
  .lineage ul { margin-left: 8px; padding-left: 26px; }
  .lineage ul > .ln::before { left: -26px; width: 18px; }
  .ln__office { font-size: 20px; }
  .ln--root > .ln__office { font-size: 26px; }
  .tree-flag { font-size: 19px; padding: 12px 14px; }
}

/* =====================================================================
   4. HARDY, IN THREE WORDS
   ===================================================================== */
.words-sec { background: var(--paper); padding: clamp(64px, 8vw, 110px) 0; }
.words-head h2 { color: var(--brand-navy); }
.wall3 {
  position: relative; max-width: 1100px; margin: 0 auto;
  background-color: var(--newsprint); background-image: var(--grain);
  border-top: 5px solid var(--ink); box-shadow: 0 -9px 0 -7px var(--ink);
  padding: 22px clamp(18px, 4vw, 56px) 34px;
}
.wall3__preview { text-align: center; font: 700 15px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--grey-700); margin: 0 0 16px; }
.wall3__words {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px;
  padding: 12px 0 26px; border-bottom: 1px solid var(--rule);
}
.wall3__words li { display: flex; }
.w {
  --c: var(--brand-navy);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 4px 12px 6px; margin: 0;
  background: transparent; border: 0; border-radius: 6px; cursor: pointer;
  font-family: var(--serif); font-weight: 700; line-height: 1; color: var(--c);
  background-image: linear-gradient(var(--brand-gold), var(--brand-gold));
  background-repeat: no-repeat; background-position: 12px calc(100% - 4px); background-size: 0 7px;
  transition: color .9s ease, background-size .35s var(--ease), transform .25s var(--ease), background-color .25s ease;
  transition-delay: calc(var(--i) * .06s + .2s), 0s, 0s, 0s;
  -webkit-tap-highlight-color: transparent;
}
.js .wall3:not(.is-in) .w { --c: var(--bw); }
.w--s   { font-size: 26px; }
.w--m   { font-size: 36px; }
.w--l   { font-size: 50px; }
.w--xl  { font-size: 64px; letter-spacing: -.02em; }
.w--xxl { font-size: 84px; letter-spacing: -.03em; }
.w--serif  { font-family: var(--serif); font-weight: 700; }
.w--italic { font-family: var(--serif); font-weight: 400; font-style: italic; }
.w--sans   { font-family: var(--sans); font-weight: 800; letter-spacing: -.02em; }
.w--caps   { font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 20px; }
.w--caps.w--m { font-size: 24px; }
.c-purple { --c: var(--brand-purple); }
.c-blue   { --c: var(--brand-blue); }
/* grey pill placeholders */
.w--pill { width: var(--pw, 150px); padding: 0; border-radius: 999px; background-color: #DCD5C6; background-position: 50% calc(100% + 2px); }
.w--pill.w--s { height: 48px; } .w--pill.w--m { height: 58px; } .w--pill.w--l { height: 72px; }
.w--pill::after { content: ""; width: 46%; height: 8px; border-radius: 4px; background: #C4BCAB; }
.js .wall3:not(.is-in) .w--pill { background-color: #E6E1D6; }
/* tapped / focused word, and the respondent's other two words */
.w:hover, .w:active { transform: translateY(-2px); }
.w.is-set { background-size: calc(100% - 24px) 7px; }
.w[aria-pressed="true"] { background-color: var(--paper); box-shadow: 0 0 0 3px var(--brand-navy); background-size: calc(100% - 24px) 7px; }
.w--pill.is-set, .w--pill[aria-pressed="true"] { background-color: var(--brand-gold); background-size: 0 0; }
.w--pill[aria-pressed="true"]::after, .w--pill.is-set::after { background: rgba(1,31,91,.35); }

.wall3__who { min-height: 164px; display: grid; place-items: center; text-align: center; padding-top: 24px; }
.wall3__hint { margin: 0; font: italic 400 24px/1.4 var(--serif); color: var(--grey-700); }
.wall3__said[hidden] { display: none; }
.wall3__word { font: italic 400 clamp(34px, 4vw, 48px)/1.1 var(--serif); color: var(--brand-navy); margin: 0 0 8px; }
.wall3__attr { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.wall3__set { font-size: 18px; color: var(--grey-700); margin: 0; }

.words-how { max-width: 1100px; margin: 44px auto 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 48px; align-items: end; }
.words-how__title { grid-column: 1 / -1; font: 700 16px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--grey-700); margin: 0; }
.words-how__steps { display: grid; gap: 12px; }
.words-how__steps li { display: flex; align-items: flex-start; gap: 14px; font-size: 20px; line-height: 1.45; }
.words-how__n {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-navy); color: var(--paper); font: 700 18px/1 var(--sans);
}
@media (max-width: 900px) {
  .words-how { grid-template-columns: 1fr; }
  .words-how .btn { justify-self: start; }
}
@media (max-width: 560px) {
  .wall3 { margin: 0 calc(-1 * var(--gutter)); padding: 18px 14px 26px; }
  .wall3__words { gap: 2px 6px; }
  .w { padding: 4px 8px 6px; background-position: 8px calc(100% - 4px); }
  .w--s { font-size: 22px; } .w--m { font-size: 28px; } .w--l { font-size: 36px; }
  .w--xl { font-size: 44px; } .w--xxl { font-size: 54px; }
  .w--caps { font-size: 17px; } .w--caps.w--m { font-size: 19px; }
  .w--pill { width: calc(var(--pw, 150px) * .62); }
  .w--pill.w--m { height: 52px; } .w--pill.w--l { height: 60px; }
  .w.is-set, .w[aria-pressed="true"] { background-size: calc(100% - 16px) 6px; }
  .wall3__hint { font-size: 21px; }
  .words-how .btn { width: 100%; }
}

/* =====================================================================
   5. THE ALBUM (CSS 3D page turning; JS in page-legacy.js)
   ===================================================================== */
.album-sec {
  background-color: var(--linen); background-image: var(--grain);
  padding: clamp(64px, 8vw, 110px) 0 clamp(56px, 7vw, 90px);
  border-top: 1px solid var(--hairline); overflow: hidden;
}
.album-head h2 { color: var(--brand-navy); }
.album { max-width: 1120px; margin: 0 auto; }
.album__stage { display: flex; justify-content: center; padding: 10px 0 34px; }

.book {
  --board: 12px;
  position: relative; width: min(100%, 1080px); aspect-ratio: 2 / 1.3;
  perspective: 3000px; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .9s var(--ease);
  border-radius: 6px; outline-offset: 10px;
}
.book.is-closed { transform: translateX(-25%); }
.book.is-end { transform: none; }

.sheet {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.45,.05,.25,1);
}
.sheet--leaf { top: var(--board); height: calc(100% - 2 * var(--board)); width: calc(50% - var(--board)); }
.sheet.is-turned { transform: rotateY(-180deg); }
.page { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.page--back { transform: rotateY(180deg); }
.page--base { left: 50%; width: 50%; z-index: 0; }

/* the boards: navy book-cloth */
.board, .cover {
  position: absolute; inset: 0; border-radius: 3px 8px 8px 3px;
  background-color: var(--brand-navy);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.10) 0 1px, transparent 1px 3px),
    var(--grain);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 26px 40px -22px rgba(0,0,0,.65), 0 3px 6px rgba(0,0,0,.25);
}
.board--left { border-radius: 8px 3px 3px 8px; }

/* paper pages */
.paper {
  position: absolute; inset: 0; overflow: hidden;
  background-color: var(--album-paper); background-image: var(--grain);
  display: flex; align-items: center; justify-content: center; padding: 8% 9% 11%;
}
.board--right > .paper { inset: var(--board) var(--board) var(--board) 0; }
.board--left > .paper { inset: var(--board) 0 var(--board) var(--board); }
.page--front .paper, .page--base .paper { box-shadow: inset 26px 0 30px -24px rgba(0,0,0,.4); }          /* spine shade, right pages */
.page--back .paper { box-shadow: inset -26px 0 30px -24px rgba(0,0,0,.4); }                               /* spine shade, left pages */
.sheet--leaf .page { box-shadow: 0 2px 4px rgba(0,0,0,.15); }

/* the cover */
.cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8%; cursor: pointer; transition: filter 1.6s ease .2s; }
.js .album:not(.is-in) .cover { filter: grayscale(1) brightness(1.15); }
.cover__rule { position: absolute; inset: 22px; border: 2px solid rgba(255,206,0,.75); border-radius: 4px; pointer-events: none; }
.cover__rule::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255,206,0,.5); border-radius: 2px; }
.cover__label {
  width: 62%; max-width: 300px; aspect-ratio: 1; padding: 6%;
  background: var(--label); border-radius: 4px; transform: rotate(-1deg);
  box-shadow: 0 2px 3px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.06), inset 0 0 0 8px var(--label), inset 0 0 0 9px #D8CFB8;
}
.cover__label img { width: 100%; height: 100%; object-fit: contain; }
.cover__title { margin: 22px 0 0; font: 700 clamp(26px, 2.6vw, 36px)/1.1 var(--serif); color: var(--brand-gold); letter-spacing: .01em; }
.cover__dates { margin: 0; font: 700 17px/1.2 var(--sans); letter-spacing: .3em; color: var(--brand-gold); }

/* endpapers: a quiet navy lattice, decorative */
.paper--end {
  background-color: #0B2766;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,206,0,.22) 0 1.6px, transparent 2.2px),
    repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(255,255,255,.06), transparent 70%);
  background-size: 31.1px 31.1px, auto, auto, auto;
  background-position: 15.5px 15.5px, 0 0, 0 0, 0 0;
  flex-direction: column; gap: 28px; padding: 9%;
}
.bookplate {
  width: 82%; max-width: 360px; padding: 26px 22px 24px; text-align: center; background: var(--label);
  border-radius: 3px; box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 0 0 7px var(--label), inset 0 0 0 9px var(--brand-navy);
}
.bookplate p { margin: 0; }
.bookplate__kicker { font: italic 400 20px/1.3 var(--serif); color: var(--grey-700); }
.bookplate__name { font: 700 clamp(28px, 2.8vw, 38px)/1.1 var(--serif); color: var(--brand-navy); margin-top: 6px !important; }
.bookplate__dates { font: 600 17px/1.4 var(--sans); color: var(--ink); margin-top: 8px !important; }
.bookplate__rule { display: block; width: 70px; height: 5px; background: var(--brand-gold); margin: 16px auto 14px; }
.bookplate__fund { font: 700 14px/1.45 var(--sans) !important; letter-spacing: .12em; text-wrap: balance; text-transform: uppercase; color: var(--brand-blue); }

/* mounted prints with photo corners */
.mount { margin: 0; display: flex; flex-direction: column; align-items: center; width: 100%; }
.mount__print {
  position: relative; background: var(--paper); padding: 12px; transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 12px 22px -12px rgba(0,0,0,.5);
}
.mount__print img { width: 100%; filter: grayscale(1) contrast(1.05); }
.mount .corner { width: 30px; height: 30px; background: #1E1B17; }
.mount .corner--tl { top: -3px; left: -3px; } .mount .corner--tr { top: -3px; right: -3px; }
.mount .corner--bl { bottom: -3px; left: -3px; } .mount .corner--br { bottom: -3px; right: -3px; }
.mount--land .mount__print { width: min(100%, 420px); }
.mount--wide .mount__print { width: 100%; }
.mount--tall .mount__print { width: min(78%, 330px); }
.mount--portrait .mount__print { width: min(70%, 300px); }
.mount__label {
  position: relative; margin-top: 22px; max-width: 94%; padding: 10px 16px 11px;
  background: var(--label); transform: rotate(var(--lr, 0deg));
  font: italic 400 20px/1.35 var(--serif); color: var(--ink); text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 6px 10px -8px rgba(0,0,0,.4);
}
.mount__note { display: block; font: normal 500 16px/1.4 var(--sans); color: var(--grey-700); margin-top: 4px; }
/* yearbook portrait: CSS crop inside the scan (same numbers as The Man page) */
.crop { position: relative; display: block; overflow: hidden; }
.crop--portrait { aspect-ratio: 387 / 487; }
.crop--portrait img { position: absolute; max-width: none; height: auto; width: 361.76% !important; left: -7.235%; top: -9.856%; }

.folio { position: absolute; bottom: 4.5%; font: italic 400 18px/1 var(--serif); color: var(--grey-700); }
.folio--r { right: 7%; } .folio--l { left: 7%; }

/* empty slots on the last pages */
.paper--slots { flex-direction: column; gap: 7%; }
.slot {
  position: relative; width: 78%; flex: 1 1 0; max-height: 240px; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 16px; background: rgba(255,255,255,.55); border: 3px dashed #948C7C; transform: rotate(var(--r, 0deg));
}
.slot::before { /* photo corners waiting for a print */
  content: ""; position: absolute; inset: -6px; pointer-events: none;
  background:
    linear-gradient(135deg, #1E1B17 0 16px, transparent 16px) top left / 28px 28px no-repeat,
    linear-gradient(225deg, #1E1B17 0 16px, transparent 16px) top right / 28px 28px no-repeat,
    linear-gradient(45deg, #1E1B17 0 16px, transparent 16px) bottom left / 28px 28px no-repeat,
    linear-gradient(315deg, #1E1B17 0 16px, transparent 16px) bottom right / 28px 28px no-repeat;
}
.slot__icon { width: 40px; height: 40px; fill: none; stroke: var(--grey-700); stroke-width: 2.4; stroke-linejoin: round; }
.slot__title { margin: 0; font: italic 400 22px/1.25 var(--serif); color: var(--ink); }
.slot .text-link { min-height: 48px; }
.slot--small { flex: none; width: 70%; min-height: 150px; background: rgba(255,253,247,.9); border-color: #B9B1A0; }
.pocket {
  width: 86%; padding: 24px 22px 26px; text-align: center; background: var(--label); border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.pocket p { margin: 0; }
.pocket__kicker { font: 700 15px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--grey-700); }
.pocket__title { font: 700 26px/1.2 var(--serif); color: var(--brand-navy); margin: 8px 0 16px !important; }
.pocket .btn { white-space: nowrap; padding: 14px 24px; }
.nowrap { white-space: nowrap; }

/* controls */
.album__controls { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.ctl-page {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; min-width: 210px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  font: 700 21px/1 var(--sans); color: var(--paper); background: var(--brand-blue); border: 2px solid var(--brand-blue);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.ctl-page--prev { background: var(--paper); color: var(--brand-blue); }
.ctl-page:hover, .ctl-page:active { background: var(--brand-navy); border-color: var(--brand-navy); color: var(--paper); }
.ctl-page[aria-disabled="true"] { background: transparent; color: var(--grey-700); border-color: #B9B1A0; border-style: dashed; cursor: default; }
.ctl-page .arrow { font-size: 24px; }
.album__status {
  order: 0; min-width: 300px; margin: 0; text-align: center;
  font: 700 22px/1.3 var(--serif); color: var(--ink);
}
.album__help { text-align: center; font-size: 18px; color: var(--grey-700); margin: 14px 0 0; }
.album__credit { text-align: center; font-size: 16px; line-height: 1.5; color: var(--grey-700); margin: 10px auto 0; max-width: 52em; }

/* ---------- one page at a time (phones, narrow tablets) ---------- */
.album--single .book { width: min(100%, 440px); aspect-ratio: 1 / 1.34; transform: none !important; perspective: none; }
.album--single .book::before { /* the back board shows around each page */
  content: ""; position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; background: var(--brand-navy);
  box-shadow: 0 22px 34px -20px rgba(0,0,0,.65);
}
.album--single .sheet { display: contents; }
.album--single .page {
  left: 0; right: 0; width: auto; transform: none; backface-visibility: visible; -webkit-backface-visibility: visible;
  visibility: hidden; z-index: 1; transform-origin: left center;
  transition: transform .75s cubic-bezier(.45,.05,.3,1), opacity .75s ease;
}
.album--single .sheet--leaf .page, .album--single .page--base .paper { inset: 10px 10px 10px 0; }
.album--single .page--back .board--left > .paper { inset: 10px 10px 10px 0; }
.album--single .page--back .paper { box-shadow: inset 22px 0 26px -22px rgba(0,0,0,.4); }
.album--single .board--left { border-radius: 3px 8px 8px 3px; }
.album--single .page.is-current { visibility: visible; z-index: 3; }
.album--single .page.is-turning { visibility: visible; z-index: 4; }
.album--single .page.is-away { transform: perspective(1800px) rotateY(-96deg); opacity: 0; }
.album--single .paper { padding: 9% 8% 12%; }
.album--single .mount__label { font-size: 19px; padding: 8px 12px 9px; }
.album--single .mount .corner { width: 24px; height: 24px; }

@media (max-width: 819.98px) {
  .ctl-page { min-width: 0; flex: 1 1 0; padding: 0 12px; font-size: 19px; gap: 8px; white-space: nowrap; }
  .album__status { order: -1; flex-basis: 100%; min-width: 0; }
}
@media (max-width: 480px) { .ctl-page .arrow { display: none; } }
@media (max-width: 400px) {
  .pocket { width: 92%; padding: 18px 14px 20px; }
  .pocket .btn { font-size: 18px; padding: 12px 18px; min-height: 52px; }
  .slot--small { width: 80%; }
  .slot .text-link { font-size: 18px; }
  .mount__note { font-size: 15px; }
  .album--single .paper { padding: 8% 7% 12%; }
  .slot__title { font-size: 20px; }
  .pocket__title { font-size: 23px; }
  .cover__dates { font-size: 15px; }
}

/* =====================================================================
   6. THE FUND TODAY (navy band)
   ===================================================================== */
.fund-today {
  background-color: var(--brand-navy); background-image: var(--grain);
  color: var(--paper); padding: clamp(64px, 8vw, 104px) 0; --focus: var(--brand-gold);
}
.fund-today__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(40px, 6vw, 88px); align-items: center; }
.fund-today h2 { font-size: clamp(38px, 4.6vw, 60px); color: var(--paper); margin-bottom: 20px; }
.fund-today__fact { font-size: 22px; line-height: 1.5; color: var(--paper); margin-bottom: 0; }
.fund-today__tag { display: block; font: italic 400 30px/1.3 var(--serif); color: var(--brand-gold); margin-top: 6px; }
.fund-today p.ph { color: var(--on-dark); font-size: 21px; max-width: 34em; }
.fund-today__links { display: grid; gap: 16px; }
.fund-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 120px;
  padding: 22px 70px 22px 26px; text-decoration: none; color: var(--paper);
  border: 2px solid rgba(255,255,255,.75); border-radius: 6px; border-left: 8px solid var(--brand-gold);
  transition: background-color .25s ease, color .25s ease;
}
.fund-card__kicker { font: 700 15px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--brand-gold); }
.fund-card__title { font: 700 26px/1.2 var(--serif); }
.fund-card__go { position: absolute; right: 24px; top: 50%; margin-top: -18px; font-size: 30px; line-height: 36px; transition: transform .25s ease; }
.fund-card:hover, .fund-card:focus-visible, .fund-card:active { background: var(--paper); color: var(--brand-navy); }
.fund-card:hover .fund-card__kicker, .fund-card:focus-visible .fund-card__kicker, .fund-card:active .fund-card__kicker { color: var(--brand-blue); }
.fund-card:hover .fund-card__go, .fund-card:focus-visible .fund-card__go, .fund-card:active .fund-card__go { transform: translateX(4px); }
@media (max-width: 900px) { .fund-today__grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Reduced motion: la.css already stops transitions. Page turns become instant.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sheet, .book, .album--single .page { transition: none !important; }
  .tnode__dot { animation: none !important; }
}
.static .tnode__dot { animation: none !important; }

/* =====================================================================
   SEATS AT THE TABLE (Oct 26) — replaces the Legacy Tree (Lynette: the tree read as a "mafia" family tree)
   A long table: Hardy at the head, officeholders in seats, one open seat. No hierarchy, no lines between people.
   ===================================================================== */
.table-sec { background: var(--newsprint, #EFE8D6); background-image: var(--grain, none); padding: clamp(64px, 8vw, 110px) 0; }
.table-head { max-width: 46em; }
.table { position: relative; display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 0; align-items: stretch; margin-top: clamp(28px, 4vw, 48px); }
.table__head {
  position: relative; z-index: 2; display: flex; gap: 18px; align-items: center; padding: 28px 26px;
  background: #011F5B; color: #fff; border-radius: 14px 0 0 14px; box-shadow: 0 18px 40px -20px rgba(1,31,91,.7);
}
.table__mono { flex: none; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #FFCE00; color: #011F5B; font: 700 28px/1 var(--serif); box-shadow: 0 0 0 4px #011F5B, 0 0 0 7px #FFCE00; }
.table__label { margin: 0 0 4px; font: 700 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #FFCE00; }
.table__who { margin: 0 0 6px; font: 700 28px/1.1 var(--serif); color: #fff; }
.table__note { margin: 0; font-size: 16px; line-height: 1.45; color: #DCE2EF; }
.table__note .to-confirm { color: #fff; font-style: italic; }
.table__board {
  position: absolute; z-index: 0; left: 260px; right: 0; top: 50%; height: 64px; margin-top: -32px;
  background: linear-gradient(180deg, #8A5A34, #6E4425); border-radius: 0 40px 40px 0;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.18), 0 16px 30px -16px rgba(0,0,0,.55);
}
.table__seats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: auto auto; row-gap: 104px; column-gap: 14px; padding: 0 0 0 30px; counter-reset: seat; }
.seat {
  position: relative; background: var(--paper); border-radius: 10px; padding: 34px 14px 16px; text-align: center;
  border-top: 6px solid #6D2077; box-shadow: 0 10px 24px -14px rgba(0,0,0,.45);
}
.seat:nth-child(odd) { border-top-color: #002A82; }
.seat:nth-child(3n) { border-top-color: #1E547C; }
.seat__chair { position: absolute; left: 50%; top: -26px; width: 46px; height: 34px; margin-left: -23px; border-radius: 10px 10px 4px 4px; background: #011F5B; box-shadow: inset 0 -6px 0 rgba(255,255,255,.12); }
.seat__office { margin: 0 0 6px; font: 700 15px/1.3 var(--sans); letter-spacing: .02em; color: var(--ink); }
.seat__name { margin: 0; font: 400 17px/1.35 var(--serif); color: var(--grey-700); }
.seat .to-confirm { font-style: italic; color: var(--grey-700); }
.seat--open { background: transparent; border: 3px dashed #6D2077; border-top-width: 6px; box-shadow: none; }
.seat--open .seat__chair { background: transparent; border: 3px dashed #6D2077; }
.seat--open a { color: #6D2077; font-family: var(--sans); font-weight: 700; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.seat--open a:hover, .seat--open a:focus-visible { color: #011F5B; }
.table__cap { margin: 26px 0 0; font-size: 16px; color: var(--grey-700); }
.js .table:not(.is-in) .seat { opacity: 0; transform: translateY(10px); }
.table.is-in .seat { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i) * 70ms); }
@media (max-width: 1100px) {
  .table { grid-template-columns: 1fr; }
  .table__head { border-radius: 14px 14px 0 0; }
  .table__board { left: 50%; right: auto; top: 120px; bottom: 0; width: 46px; height: auto; margin: 0 0 0 -23px; border-radius: 0 0 30px 30px; }
  .table__seats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 46px; column-gap: 76px; padding: 52px 0 0; }
}
@media (max-width: 560px) {
  .table__board { display: none; }
  .table__seats { grid-template-columns: 1fr; row-gap: 40px; }
}
@media (prefers-reduced-motion: reduce) { .table.is-in .seat { transition: none; } .js .table:not(.is-in) .seat { opacity: 1; transform: none; } }
