/* ═══════════════════════════════════════════════════════════════════
   about.html · "The story behind the name" · split-flap board
   Loaded by about.html only. Uses the thca.css tokens.
   Desktop with a fine pointer: the navy band is as tall as its content
   and pins centred while the board flips through the three horizons.
   Touch, narrow or reduced motion: no pin, the board changes as the
   band passes through the window.
   ═══════════════════════════════════════════════════════════════════ */

/* Archivo with the width axis, used only for the flap letters */
@font-face {
  font-family: 'Archivo Flap';
  src: url('../fonts/archivo-wdth-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

.nb { position: relative; margin-bottom: clamp(84px, 5.5vw + 48px, 136px); }
.nb.is-pin { height: calc(var(--nb-bandh, 520px) + var(--nb-extra, 180vh)); }
.nb-band { padding-block: clamp(56px, 4.6vw, 76px); overflow: hidden; }
.nb.is-pin .nb-band { position: sticky; top: var(--nb-top, 0px); }

.nb-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px); align-items: center;
}
.nb-left { grid-column: 1 / 5; min-width: 0; }
.nb-left h2 { font-size: var(--t-h2); margin-top: 18px; max-width: 14ch; text-wrap: balance; }
.nb-left p { font-size: var(--t-body); color: var(--mist); max-width: 46ch; margin-top: 20px; }
.nb-left p + p { margin-top: 1em; }

.nb-right {
  grid-column: 5 / 13; min-width: 0; text-align: center;
  padding-left: clamp(16px, 3.2vw, 56px);
  display: grid; justify-items: center;
}

/* boards */
.nb-board {
  display: grid; gap: var(--tg); padding: var(--tg);
  background: #060D1A; border-radius: calc(var(--tw) * .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .35);
}
.nb-gate { margin-bottom: calc(var(--tw-main, 48px) * .32); }
.nb-t {
  position: relative; width: var(--tw); height: calc(var(--tw) * 1.6);
  perspective: calc(var(--tw) * 6);
  font-family: 'Archivo Flap', var(--f-sans); font-weight: 700; font-stretch: 72%;
  font-variation-settings: 'wdth' 72;
  color: #F4F2EC; font-size: calc(var(--tw) * 1.26); line-height: calc(var(--tw) * 1.6); text-align: center;
}
.nb-gate .nb-t { color: var(--orange); }
.nb-t .h, .nb-t .f {
  position: absolute; left: 0; right: 0; height: 50%; overflow: hidden;
  background: linear-gradient(#1A2A47, #15233D); backface-visibility: hidden;
}
.nb-t .top, .nb-t .ft { top: 0; border-radius: calc(var(--tw) * .09) calc(var(--tw) * .09) 0 0; }
.nb-t .bot, .nb-t .fb { bottom: 0; border-radius: 0 0 calc(var(--tw) * .09) calc(var(--tw) * .09); background: linear-gradient(#132039, #101C33); }
.nb-t .ft { background: linear-gradient(#1D2E4D, #17263F); transform-origin: 50% 100%; z-index: 3; visibility: hidden; }
.nb-t .fb { transform-origin: 50% 0%; z-index: 3; visibility: hidden; }
.nb-t .h span, .nb-t .f span { position: absolute; left: 0; right: 0; height: calc(var(--tw) * 1.6); }
.nb-t .top span, .nb-t .ft span { top: 0; }
.nb-t .bot span, .nb-t .fb span { bottom: 0; }
.nb-t::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: max(1px, calc(var(--tw) * .035)); transform: translateY(-50%); background: #060D1A; z-index: 5;
}
.nb-t::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: calc(50% - var(--tw) * .09);
  height: calc(var(--tw) * .18); z-index: 6; opacity: .7;
  background: linear-gradient(90deg, #3A4964 0 6%, transparent 6% 94%, #3A4964 94%);
}

.nb-deck { position: relative; width: 100%; margin-top: clamp(18px, 2.2vw, 30px); font-size: var(--t-lead); min-height: 4.4em; }
.nb-deck p {
  position: absolute; left: 0; right: 0; top: 0; margin: 0 auto; max-width: 34ch;
  line-height: 1.42; color: rgba(255, 255, 255, .88); text-wrap: balance; opacity: 0;
}
.nb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 980px) {
  .nb-grid { display: block; }
  .nb-right { padding-left: 0; margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-deck p { transition: none !important; }
}
