/* =============================================================
   CHROME: navigation, iPad floating bar, iPhone tab bar, sheets,
   page heads, home page, school page, next-chapter card, footer.
   Loaded after style.css.
   ============================================================= */

/* ---------- chrome colours follow the section under the nav ---------- */
:root, [data-chrome="dark"] {
  --c-ink: var(--glint);
  --c-bg: rgba(2, 26, 33, .62);
  --c-pill-ink: var(--abyss);
  --c-line: rgba(207, 239, 230, .16);
  --c-accent: var(--plastron);
}
[data-chrome="murk"] { --c-bg: rgba(10, 23, 22, .66); --c-pill-ink: var(--murk); }
[data-chrome="light"] { --c-ink: var(--shell); --c-bg: rgba(222, 202, 162, .7); --c-pill-ink: #E2CDA4; --c-line: rgba(91, 46, 22, .18); --c-accent: var(--female); }
[data-chrome="night"] { --c-ink: var(--moon); --c-bg: rgba(10, 15, 36, .66); --c-pill-ink: var(--night); --c-line: rgba(244, 238, 220, .16); }
[data-chrome="school"] { --c-ink: var(--ks-ink); --c-bg: rgba(243, 234, 219, .74); --c-pill-ink: var(--ks-paper); --c-line: rgba(27, 23, 18, .14); --c-accent: var(--ks-orange); }

html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
::selection { background: var(--plastron); color: #22160A; }

/* ---------- type: Piazzolla needs slightly different tuning ---------- */
.h1, .h2, .h3, .page-title, .hero__title, .stage__t, .threat__t, .step__t, .odds__title, .symbol__text,
.intro__text, .chap__title, .stat__num, .tsd__temp, .kpi dd, .poster__t, .footer__word, .logo-reveal__word,
.part__t, .next__title, .tl__year {
  font-family: var(--serif);
  font-optical-sizing: auto;
}
.h2 { font-weight: 500; letter-spacing: -.02em; line-height: 1; }
.h3 { font-weight: 500; letter-spacing: -.01em; }
.hero__title { font-weight: 500; font-size: clamp(4.6rem, 14.5vw, 15rem); letter-spacing: -.045em; line-height: .84; }
.symbol__text, .intro__text { font-weight: 400; letter-spacing: -.012em; }
.stat__num { font-weight: 400; letter-spacing: -.05em; }
.stage__t, .threat__t, .step__t, .part__t { font-weight: 500; letter-spacing: -.015em; }
.poster__t { font-weight: 600; letter-spacing: -.025em; }
.footer__word { font-weight: 500; letter-spacing: -.06em; }
.odds__title { font-weight: 500; letter-spacing: -.03em; }
.tsd__temp, .kpi dd { font-weight: 400; letter-spacing: -.03em; }

.chapter-label {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2;
  color: var(--c-accent, var(--plastron)); margin-bottom: .9rem;
}
.sand .chapter-label, .method .chapter-label, .results .chapter-label { color: var(--female); }
.page-title {
  font-weight: 500; letter-spacing: -.04em;
  font-size: clamp(3.4rem, 9.5vw, 9rem); line-height: .88;
  text-wrap: balance;
}
.page-lead { margin-top: 1.3rem; max-width: 30em; font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.5; text-wrap: pretty; }
.symbol .chapter-label { grid-column: 1 / -1; }

/* ---------- loader (first visit) & quick page reveal ---------- */
.loader { background: var(--loader-bg, var(--abyss)); color: var(--loader-ink, var(--glint)); }
.loader__mark { color: inherit; }
.loader__word {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  text-align: center; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(2.8rem, 9vw, 7rem); letter-spacing: -.03em; line-height: 1;
  opacity: 0;
}
.loader.is-quick .loader__mark { display: none; }
.loader.is-quick .loader__word { opacity: 1; }
.curtain { background: var(--curtain-bg, var(--plastron)); }
.curtain__word { color: var(--curtain-ink, #22160A); letter-spacing: -.03em; }

/* =============================================================
   NAV (desktop + iPad): floating pill in the middle
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: calc(var(--nav-h) + var(--safe-t));
  padding: var(--safe-t) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  color: var(--c-ink);
  transition: color .5s, transform .6s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; position: relative; z-index: 1; }
.nav__mark { width: 30px; }
.nav__word { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.6rem; line-height: 1; letter-spacing: -.03em; padding-bottom: .1em; }
.nav__links {
  position: absolute; left: 50%; top: calc(var(--safe-t) + var(--nav-h) / 2);
  transform: translate(-50%, -50%);
  display: flex; gap: 2px; padding: 5px;
  border-radius: 99px;
  background: var(--c-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: inset 0 0 0 1px var(--c-line), 0 10px 30px -18px rgba(0, 0, 0, .5);
  transition: background .5s, box-shadow .5s;
}
.nav__links a {
  position: relative; display: flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem; border-radius: 99px;
  font-size: .875rem; font-weight: 500; text-decoration: none; white-space: nowrap;
  color: inherit; opacity: .82;
  transition: background .35s, color .35s, opacity .35s;
}
.nav__links a:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.nav__links a[aria-current="page"] { opacity: 1; background: var(--c-ink); color: var(--c-pill-ink); }
.nav__links .l-short { display: none; }
.nav__num {
  display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  font-family: var(--serif); font-style: italic; font-size: .8rem;
  box-shadow: inset 0 0 0 1px currentColor; opacity: .7;
}
.nav__right { display: flex; align-items: center; gap: .7rem; position: relative; z-index: 1; }
.nav__school {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--c-ink);
  background: var(--c-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--c-line);
  transition: transform .4s var(--ease-out);
}
.nav__school:hover { transform: scale(1.06); }
.nav__school .ks-icon { width: 28px; height: 28px; }
.lang {
  position: relative; display: flex; padding: 3px; border-radius: 99px;
  background: var(--c-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--c-line);
}
.lang button { position: relative; z-index: 1; font-size: .75rem; font-weight: 600; letter-spacing: .05em; padding: .5rem .72rem; border-radius: 99px; transition: color .4s; }
.lang button[aria-pressed="true"] { color: var(--c-pill-ink); }
.lang__pill { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 99px; background: currentColor; transition: transform .55s var(--ease-out), width .55s var(--ease-out); }
.nav__lang {
  display: none; align-items: center; gap: .4rem; height: 40px; padding: 0 .85rem; border-radius: 99px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .04em;
  background: var(--c-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--c-line);
}
.nav__lang svg { width: 18px; height: 18px; }

/* ---------- ks logo ---------- */
.ks-logo { width: 100%; height: auto; overflow: visible; color: var(--ks-ink); }
.ks-word { font: 700 25px/1 var(--sans); letter-spacing: .02em; fill: currentColor; }
.ks-sub { font: 500 9.6px/1 var(--sans); letter-spacing: .32em; fill: currentColor; opacity: .8; }
.ks-icon { overflow: visible; }

/* =============================================================
   iPHONE TAB BAR
   ============================================================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: none;
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + var(--safe-b)) max(8px, env(safe-area-inset-right));
  background: var(--c-bg);
  -webkit-backdrop-filter: saturate(1.8) blur(22px); backdrop-filter: saturate(1.8) blur(22px);
  box-shadow: inset 0 1px 0 var(--c-line);
  color: var(--c-ink);
  transition: background .5s, color .5s, transform .5s var(--ease-out);
}
.tabbar a {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 2px 3px; border-radius: 14px;
  font-size: .656rem; font-weight: 500; letter-spacing: .01em; line-height: 1.15; text-align: center;
  text-decoration: none; color: inherit; opacity: .62;
  transition: opacity .3s, transform .25s var(--ease-out);
}
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar svg { width: 26px; height: 26px; }
.tabbar a[aria-current="page"] { opacity: 1; color: var(--c-accent); }
.tabbar a:active { transform: scale(.9); }

/* =============================================================
   BOTTOM SHEET
   ============================================================= */
.bsheet { position: fixed; inset: 0; z-index: 180; }
.bsheet[hidden] { display: none; }
.bsheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .35s; }
.bsheet.is-open .bsheet__scrim { opacity: 1; }
.bsheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 86vh; overflow: auto; overscroll-behavior: contain;
  background: #F7F1E6; color: #1E1A14;
  border-radius: 22px 22px 0 0;
  padding: 6px 20px calc(24px + var(--safe-b));
  transform: translateY(104%);
  transition: transform .5s cubic-bezier(.2, .9, .25, 1);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .5);
}
.bsheet.is-open .bsheet__panel { transform: translateY(0); }
.bsheet.is-dragging .bsheet__panel { transition: none; }
.bsheet__grip { display: grid; place-items: center; height: 22px; cursor: grab; touch-action: none; }
.bsheet__grip span { width: 38px; height: 5px; border-radius: 3px; background: rgba(30, 26, 20, .2); }
.bsheet__title { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.02em; margin: .4rem 0 1rem; }
.bsheet__options { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #fff; }
.bsheet__options button {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.1rem; min-height: 56px; font-size: 1.05rem; text-align: left;
  border-bottom: 1px solid rgba(30, 26, 20, .08);
}
.bsheet__options button:last-child { border-bottom: 0; }
.bsheet__options button:active { background: rgba(30, 26, 20, .05); }
.bsheet__options svg { width: 22px; height: 22px; color: var(--ks-orange); opacity: 0; }
.bsheet__options [aria-pressed="true"] svg { opacity: 1; }
.bsheet__options small { display: block; font-size: .8125rem; color: rgba(30, 26, 20, .55); }
.bsheet .map-sheet h3 { font-family: var(--serif); font-weight: 500; font-size: 2rem; letter-spacing: -.02em; margin: .3rem 0 .6rem; }
.bsheet .map-sheet dl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.bsheet .map-sheet dt { font-size: .8125rem; color: rgba(30, 26, 20, .6); }
.bsheet .map-sheet dd { font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; }
.bsheet .map-sheet .chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px; background: rgba(192, 80, 26, .16); color: #8A3510; }
.bsheet .map-sheet .demo { margin-top: 1rem; font-size: .8125rem; color: rgba(30, 26, 20, .55); }

/* =============================================================
   HERO variants
   ============================================================= */
.hero--plate .page-head {
  position: absolute; left: var(--gutter); top: calc(var(--nav-h) + var(--safe-t) + 4vh); z-index: 3;
  max-width: 34rem; pointer-events: none;
}
.hero--plate .page-title { font-size: clamp(3.2rem, 7.5vw, 7rem); }
.hero--plate .hero__copy { bottom: auto; }

/* =============================================================
   HOME
   ============================================================= */
.intro {
  position: relative;
  padding: clamp(110px, 18vh, 200px) calc(var(--gutter) + 20px) clamp(100px, 16vh, 180px) var(--gutter);
  background: linear-gradient(var(--abyss), var(--abyss-2));
}
.intro__text { max-width: 22em; font-size: clamp(2rem, 4vw, 3.9rem); line-height: 1.1; text-wrap: pretty; }
.motion .intro__text .w { opacity: .16; }

.chapters { position: relative; background: var(--murk); }
.chapters__title {
  position: relative; z-index: 2;
  padding: clamp(60px, 10vh, 110px) var(--gutter) clamp(24px, 4vh, 40px);
  background: linear-gradient(var(--murk), var(--abyss-2) 0%, var(--abyss-2));
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 5vw, 4.4rem); letter-spacing: -.03em; line-height: 1;
}
.chap { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.chap__link {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center; gap: clamp(24px, 4vw, 72px);
  height: 100%;
  padding: calc(var(--nav-h) + var(--safe-t) + 3vh) calc(var(--gutter) + 20px) calc(6vh + var(--tab-h)) var(--gutter);
  text-decoration: none; color: inherit;
  transform-origin: 50% 0%;
}
.chap--sea .chap__link { background: radial-gradient(120% 90% at 30% 10%, #0C4650 0%, var(--abyss) 55%, var(--abyss-2)); color: var(--glint); }
.chap--murk .chap__link { background: radial-gradient(120% 90% at 30% 10%, #17302B 0%, var(--murk) 55%, var(--murk-2)); color: var(--glint); }
.chap--sand .chap__link { background-color: var(--sand); background-image: var(--sand-noise); background-size: 260px; color: var(--shell); }
.chap--night .chap__link { background: radial-gradient(100% 80% at 70% 0%, #1B2552 0%, var(--night) 60%); color: var(--moon); }
.chap__visual { position: relative; height: min(64vh, 560px); display: grid; place-items: center; }
.chap__label { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.3rem; color: var(--plastron); }
.chap--sand .chap__label { color: var(--female); }
.chap__title { font-weight: 500; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .9; letter-spacing: -.04em; margin: .6rem 0 1.2rem; text-wrap: balance; }
.chap__text { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.5; max-width: 26em; opacity: .85; }
.chap__cta {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem;
  padding: .95rem 1.5rem; border-radius: 99px;
  font-weight: 600; font-size: .9375rem;
  background: currentColor;
  transition: transform .4s var(--ease-out);
}
.chap__cta > * { color: var(--cta-ink, var(--abyss)); }
.chap--murk .chap__cta { --cta-ink: var(--murk); }
.chap--sand .chap__cta { --cta-ink: var(--sand); }
.chap--night .chap__cta { --cta-ink: var(--night); }
.chap__cta svg { width: 18px; height: 18px; transition: transform .4s var(--ease-out); }
.chap__link:hover .chap__cta svg { transform: translateX(4px); }
.chap__link:active .chap__cta { transform: scale(.97); }

.chap__cycle { width: 100%; height: 100%; overflow: visible; }
.chap__cycle .route { fill: none; stroke: rgba(242, 181, 58, .55); stroke-width: 1.4; stroke-dasharray: 2 8; stroke-linecap: round; }
.chap__cycle .eggs circle { fill: rgba(244, 238, 220, .9); }
.chap__cycle use { fill: var(--glint); }

.chap__pair { display: flex; gap: clamp(24px, 5vw, 80px); align-items: flex-end; }
.chap__form { width: clamp(120px, 15vw, 210px); text-align: center; }
.chap__form svg { width: 100%; height: auto; overflow: visible; }
.chap__form path { fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.chap__form--jelly path { stroke: var(--glint); }
.chap__form--jelly .bell path { fill: rgba(207, 239, 230, .08); }
.chap__form--bag path { stroke: var(--synthetic); }
.chap__form--bag .body { fill: rgba(255, 77, 141, .12); }
.chap__form .bell { transform-box: fill-box; transform-origin: 50% 0%; }
.chap__form--jelly .bell { animation: pulse 2.6s ease-in-out infinite; }
.chap__form > div { animation: bob 7s ease-in-out infinite; }
.chap__form--bag > div { animation-duration: 9s; animation-delay: -2s; }
.chap__form figcaption { margin-top: 1.2rem; display: inline-block; font-size: .8125rem; font-weight: 500; padding: .25rem .7rem; border-radius: 99px; border: 1px solid currentColor; }
.chap__form--bag figcaption { color: #FFC2D7; }

.chap__thermo { width: min(100%, 460px); }
.chap__temp { font-family: var(--serif); font-weight: 400; font-size: clamp(6rem, 13vw, 11rem); line-height: .9; letter-spacing: -.05em; font-variant-numeric: lining-nums tabular-nums; display: flex; align-items: flex-start; }
.chap__temp-u { font-size: .32em; margin: .25em 0 0 .1em; letter-spacing: 0; }
.chap__ratio { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; margin-top: 1.6rem; }
.chap__ratio-m { background: var(--male); flex: 0 0 50%; }
.chap__ratio-f { background: var(--female); flex: 1; }
.chap__ratio-legend { display: flex; justify-content: space-between; margin-top: .6rem; font-size: .875rem; }
.chap__ratio-legend > span { display: inline-flex; align-items: center; }
.chap__core { width: 100%; margin-top: 2rem; overflow: visible; }
.chap__core path { fill: none; stroke: rgba(91, 46, 22, .35); stroke-width: 1.2; }
.chap__core .eggs circle { fill: #F7F0E0; stroke: var(--shell); stroke-width: 1; }

.chap__fan { position: relative; width: min(100%, 520px); height: min(56vh, 460px); }
.mini-poster {
  position: absolute; left: 50%; top: 50%;
  width: clamp(150px, 15vw, 210px); aspect-ratio: 3 / 4; padding: 7%;
  border-radius: 6px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
  transition: transform .8s var(--ease-out);
}
.mini-poster p { font-family: var(--serif); font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: .98; letter-spacing: -.02em; }
.mini-poster [data-mark] { width: 26px; align-self: flex-end; }
.mini-poster--1 { background: linear-gradient(170deg, #0C3D47, #03222B 70%); color: var(--glint); transform: translate(-115%, -48%) rotate(-9deg); }
.mini-poster--3 { background: linear-gradient(180deg, #0D1433 0%, #182352 40%, #2A2740 41%, #1E1C30); color: var(--moon); transform: translate(-50%, -54%) rotate(1deg); z-index: 1; }
.mini-poster--4 { background: var(--plastron); color: #2A1607; transform: translate(14%, -46%) rotate(10deg); }
.chap__link:hover .mini-poster--1 { transform: translate(-128%, -50%) rotate(-13deg); }
.chap__link:hover .mini-poster--4 { transform: translate(28%, -44%) rotate(14deg); }

.kschool {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 100px); align-items: center;
  padding: clamp(80px, 14vh, 160px) calc(var(--gutter) + 20px) clamp(80px, 14vh, 160px) var(--gutter);
  background: var(--ks-paper); color: var(--ks-ink);
}
.kschool__logo { max-width: 460px; }
.kschool__text { margin-top: 1.2rem; font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 30em; line-height: 1.55; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem;
  padding: .95rem 1.5rem; border-radius: 99px; min-height: 48px;
  font-weight: 600; font-size: .9375rem; text-decoration: none;
  transition: transform .4s var(--ease-out), background .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn--school { background: var(--ks-ink); color: var(--ks-paper); }
.btn--school:hover { background: var(--ks-orange); }
.btn:active { transform: scale(.97); }

/* =============================================================
   NEXT CHAPTER CARD
   ============================================================= */
.next {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: end; column-gap: 1.6rem;
  padding: clamp(48px, 9vh, 100px) calc(var(--gutter) + 20px) clamp(48px, 9vh, 100px) var(--gutter);
  background: var(--env); color: var(--env-ink);
  text-decoration: none; overflow: hidden;
}
.next__label { grid-column: 1 / -1; font-size: .875rem; font-weight: 500; opacity: .7; margin-bottom: .6rem; }
.next__ch { font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.7rem); align-self: baseline; opacity: .8; }
.next__title { font-weight: 500; font-size: clamp(3rem, 9vw, 8.5rem); line-height: .88; letter-spacing: -.045em; transition: transform .8s var(--ease-out); }
.next__arrow {
  width: clamp(56px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px currentColor; transition: background .4s, color .4s, transform .6s var(--ease-out);
}
.next__arrow svg { width: 38%; height: 38%; }
.next:hover .next__title { transform: translateX(14px); }
.next:hover .next__arrow { background: var(--env-ink); color: var(--env); transform: rotate(-45deg); }
.next:active .next__arrow { transform: scale(.94); }

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  position: relative; overflow: hidden;
  background: #070B1A; color: var(--moon);
  padding: clamp(56px, 9vh, 110px) calc(var(--gutter) + 20px) calc(28px + var(--tab-h)) var(--gutter);
}
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer__school {
  display: block; width: min(300px, 70vw); padding: 14px 18px; border-radius: 16px;
  background: var(--ks-paper); color: var(--ks-ink);
  transition: transform .5s var(--ease-out);
}
.footer__school:hover { transform: rotate(-1.5deg) scale(1.02); }
.footer__back {
  display: inline-flex; gap: .6rem; align-items: center; font-size: .9375rem; min-height: 48px;
  padding: .75rem 1.2rem; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(244, 238, 220, .28);
  transition: background .3s;
}
.footer__back:hover { background: rgba(244, 238, 220, .08); }
.footer__back svg { width: 18px; height: 18px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-top: clamp(40px, 7vh, 72px); font-size: .9375rem; color: var(--moon-dim); }
.footer__project { color: var(--moon); }
.footer__help { color: var(--plastron); }
.footer__h { color: var(--moon); font-weight: 500; margin-bottom: .6rem; }
.lang--footer { display: inline-flex; --c-pill-ink: #070B1A; --c-bg: transparent; --c-line: rgba(244, 238, 220, .28); color: var(--moon); }
.footer__word {
  font-style: italic; font-size: 26vw; line-height: .8;
  margin: clamp(40px, 8vh, 90px) 0 0 -.03em; white-space: nowrap; color: rgba(244, 238, 220, .92);
}
.footer__rights { font-size: .8125rem; color: var(--moon-dim); margin-top: 1.2rem; }

/* =============================================================
   RESEARCH page top: the tide goes out
   ============================================================= */
.shore--top { height: clamp(180px, 32vh, 340px); }
.sand__head .chapter-label { grid-column: 1 / -1; }

/* =============================================================
   CAMPAIGN page top: sunset
   ============================================================= */
.dusk--top {
  height: auto; min-height: 100vh; min-height: 100svh;
  background: linear-gradient(180deg, #E6C39A 0%, #D9A07A 22%, #B9786A 42%, #7E5A72 58%, #3D3A62 74%, #1A2146 88%, var(--night) 100%);
}
.dusk--top .dusk__sun { top: 30%; z-index: 0; }
.dusk--top .dusk__sea { z-index: 1; height: 34%; }
.dusk__head {
  position: relative; z-index: 2;
  padding: calc(var(--nav-h) + var(--safe-t) + 8vh) calc(var(--gutter) + 20px) 0 var(--gutter);
  color: #3A1B10;
}
.dusk__head .chapter-label { color: #8A3510; }
.dusk__head .page-lead { color: #4A2414; max-width: 26em; }

/* ---------- co-branding lockup ---------- */
.lockup { margin: clamp(56px, 10vh, 110px) auto 0; text-align: center; }
.lockup__row {
  display: inline-flex; align-items: center; gap: clamp(18px, 3vw, 40px);
  padding: clamp(18px, 2.4vw, 30px) clamp(22px, 3vw, 44px); border-radius: 20px;
  background: var(--ks-paper); color: var(--ks-ink);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.lockup__caretta { display: inline-flex; align-items: center; gap: .6rem; color: var(--abyss); }
.lockup__mark { width: clamp(36px, 4vw, 52px); }
.lockup__word { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.8rem); letter-spacing: -.03em; line-height: 1; padding-bottom: .1em; }
.lockup__rule { width: 1px; align-self: stretch; background: rgba(27, 23, 18, .25); }
.lockup__school { width: clamp(170px, 20vw, 250px); }
.lockup figcaption { margin-top: 1rem; font-size: .875rem; color: var(--moon-dim); }
.lockup--light { margin: 0; }
.lockup--light .lockup__row { background: #fff; box-shadow: 0 30px 70px -40px rgba(27, 23, 18, .45); }

.poster__marks { position: absolute; right: 8%; bottom: 7%; display: flex; align-items: center; gap: 8px; }
.poster__marks .poster__mark { position: static; width: 34px; }
.poster__ks { width: 30px; display: block; }
.poster__ks .ks-icon { width: 100%; height: auto; }
.poster--3 .poster__ks, .poster--1 .poster__ks { color: var(--moon); }
.poster__s { padding-right: 96px; }
.posters__dots { display: none; justify-content: center; gap: 8px; margin-top: 4px; }
.posters__dots i, .cycle__dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; transition: opacity .3s, width .3s; }
.posters__dots i.on, .cycle__dots i.on { opacity: 1; width: 20px; border-radius: 4px; }
.cycle__dots { display: none; justify-content: center; gap: 8px; color: var(--glint); }

/* =============================================================
   SCHOOL PAGE
   ============================================================= */
.school-page { background: var(--ks-paper); color: var(--ks-ink); }
.school-page .chapter-label { color: var(--ks-orange); }
.school-hero {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  padding: calc(var(--nav-h) + var(--safe-t) + 4vh) calc(var(--gutter) + 20px) calc(8vh + var(--tab-h)) var(--gutter);
}
.school-hero__sun {
  position: absolute; right: -14vw; top: -18vw; width: 64vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FF9A52 0%, #F05A22 55%, #D9441A 100%);
  opacity: .92;
}
.school-hero__text, .school-hero__logo { position: relative; z-index: 1; }
.school-hero .page-title { font-size: clamp(3.2rem, 8vw, 8rem); }
.school-hero__logo {
  justify-self: center; width: min(100%, 440px);
  padding: clamp(20px, 3vw, 36px) clamp(22px, 3.4vw, 42px); border-radius: 24px;
  background: #fff; box-shadow: 0 50px 90px -50px rgba(27, 23, 18, .55);
}
.school-about { padding: clamp(80px, 14vh, 160px) calc(var(--gutter) + 20px) clamp(60px, 10vh, 120px) var(--gutter); }
.school-about__text { max-width: 22em; font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 3.5rem); line-height: 1.12; letter-spacing: -.015em; text-wrap: pretty; }
.motion .school-about__text .w { opacity: .16; }
.school-emblem {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 90px); align-items: center;
  padding: clamp(40px, 8vh, 100px) calc(var(--gutter) + 20px) clamp(60px, 10vh, 120px) var(--gutter);
}
.school-emblem__copy p { margin-top: 1rem; font-size: 1.1rem; line-height: 1.55; max-width: 28em; }
.timeline { padding: clamp(60px, 10vh, 120px) calc(var(--gutter) + 20px) clamp(60px, 10vh, 120px) var(--gutter); border-top: 1px solid rgba(27, 23, 18, .12); }
.timeline__list { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(32px, 6vh, 64px); }
.timeline__list::before { content: ''; position: absolute; left: 0; right: 0; top: calc(clamp(3rem, 6vw, 5.4rem) + 18px); height: 1px; background: rgba(27, 23, 18, .2); transform-origin: left; transform: scaleX(var(--tl, 1)); }
.tl__year { font-weight: 400; font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; letter-spacing: -.05em; font-variant-numeric: lining-nums; }
.tl__dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--ks-ink); margin: 11px 0 18px; position: relative; z-index: 1; }
.tl--now .tl__dot { width: 34px; height: 34px; margin: 1px 0 8px; background: var(--ks-orange); display: grid; place-items: center; }
.tl--now .tl__dot svg { width: 22px; height: 22px; fill: #fff; }
.tl--now .tl__year { color: var(--ks-orange); }
.tl__text { max-width: 22em; font-size: 1.05rem; line-height: 1.5; }
.subjects { padding: clamp(60px, 10vh, 120px) calc(var(--gutter) + 20px) clamp(60px, 10vh, 120px) var(--gutter); background: #EFE3CE; }
.subjects__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 5vh, 48px); }
.subject {
  position: relative; padding: 24px 24px 64px; border-radius: 20px; background: var(--ks-paper);
  box-shadow: inset 0 0 0 1px rgba(27, 23, 18, .08);
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.subject h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.05; }
.subject p { margin-top: .6rem; font-size: .975rem; line-height: 1.5; opacity: .8; }
.subject__link { position: absolute; left: 24px; bottom: 20px; width: 30px; height: 30px; color: var(--ks-orange); }
.subject__link svg { width: 100%; height: 100%; }
.subject:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(27, 23, 18, .14), 0 24px 40px -30px rgba(27, 23, 18, .5); }
.team { padding: clamp(60px, 10vh, 120px) calc(var(--gutter) + 20px) clamp(40px, 8vh, 90px) var(--gutter); }
.team__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.team__head p { max-width: 26em; opacity: .75; }
.team__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 5vh, 48px); }
.slot--school .slot__frame {
  color: rgba(27, 23, 18, .55);
  background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .7), transparent 60%), repeating-linear-gradient(135deg, rgba(27, 23, 18, .05) 0 1px, transparent 1px 11px), #EADDC6;
  box-shadow: inset 0 0 0 1px rgba(27, 23, 18, .12); border-radius: 18px;
}
.slot--school .slot__frame::before { border-color: rgba(27, 23, 18, .12); border-radius: 12px; }
.slot--school .slot__frame::after { background: radial-gradient(30% 30% at 50% 50%, rgba(255, 255, 255, .5), transparent 70%); }
.slot--school figcaption { color: rgba(27, 23, 18, .6); }
.contacts { padding: 0 calc(var(--gutter) + 20px) clamp(80px, 12vh, 140px) var(--gutter); }
.contacts__card { padding: clamp(24px, 3vw, 40px); border-radius: 22px; background: #fff; display: grid; gap: .6rem; max-width: 640px; box-shadow: 0 30px 60px -40px rgba(27, 23, 18, .4); }
.contacts__card .slot__later { color: var(--ks-orange); }

/* =============================================================
   TOUCH: every tappable thing answers the finger
   ============================================================= */
.is-touch .round-btn:active, .is-touch .pledge__btn:active, .is-touch .pin:active, .is-touch .lang button:active,
.is-touch .chart__toggle:active, .is-touch .subject:active, .is-touch .footer__back:active, .is-touch .nav__school:active, .is-touch .nav__lang:active {
  transform: scale(.94);
}
.is-touch .threat:hover .threat__t { transform: none; }
.is-touch .chap__link:hover .mini-poster--1 { transform: translate(-115%, -48%) rotate(-9deg); }
.is-touch .chap__link:hover .mini-poster--4 { transform: translate(14%, -46%) rotate(10deg); }
.is-touch .grain { display: none; }

/* posters: native swipe with snapping on touch screens */
.is-touch .posters__rail { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: auto; touch-action: auto; }
.is-touch .posters__rail::-webkit-scrollbar { display: none; }
.is-touch .posters__track { transform: none !important; }
.is-touch .poster { scroll-snap-align: start; }
.is-touch .posters__dots { display: flex; color: var(--moon); }

/* =============================================================
   iPAD (701–1100px)
   ============================================================= */
@media (max-width: 1100px) {
  .nav__num { display: none; }
  .nav__links .l-full { display: none; }
  .nav__links .l-short { display: inline; }
  .nav__links .nav__link--school { display: none; }
  .nav__links a { padding: .55rem .8rem; }
  .nav__right .lang--nav { display: none; }
  .nav__lang { display: inline-flex; }
  .nav__word { display: none; }
  .chap__link { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .subjects__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* iPad portrait: chapter cards stack vertically, hero turtle centred above text */
@media (min-width: 701px) and (max-width: 1100px) and (orientation: portrait) {
  .chap__link { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: end; }
  .chap__visual { height: 100%; max-height: 46vh; }
  .school-hero { grid-template-columns: 1fr; align-content: center; }
  .school-hero__logo { justify-self: start; }
  .kschool { grid-template-columns: 1fr; }
  .hero--cover .turtle-wrap { top: 44%; }
}

/* =============================================================
   iPHONE (≤700px)
   ============================================================= */
@media (max-width: 700px) {
  :root { --nav-h: 56px; --tab-h: calc(62px + var(--safe-b)); }
  body { padding-bottom: 0; }
  .tabbar { display: flex; }
  .nav { padding-left: 16px; padding-right: 12px; gap: .5rem; }
  .nav.is-scrolled { background: var(--c-bg); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); box-shadow: inset 0 -1px 0 var(--c-line); }
  .nav.is-hidden { transform: none; }
  .nav__links { display: none; }
  .nav__word { display: inline; font-size: 1.4rem; }
  .nav__mark { width: 26px; }
  .nav__school { width: 38px; height: 38px; }
  .nav__lang { height: 38px; padding: 0 .75rem; }

  .page-title { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero--plate .page-head { top: calc(var(--nav-h) + var(--safe-t) + 14px); right: var(--gutter); }
  .hero--plate .page-title { font-size: clamp(2.8rem, 13vw, 4rem); }
  .hero--plate .page-lead { font-size: .95rem; margin-top: .6rem; }
  .hero__title { font-size: clamp(4.2rem, 21vw, 7rem); }
  .hero__sub { bottom: calc(var(--tab-h) + 64px); }
  .hero__scroll { bottom: calc(var(--tab-h) + 22px); }
  .plate__parts .part, .part[data-part] { bottom: calc(var(--tab-h) + 18px); }

  .intro__text { font-size: clamp(1.7rem, 7.4vw, 2.3rem); }
  .chapters__title { font-size: 2.4rem; }
  .chap__link { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding-top: calc(var(--nav-h) + var(--safe-t) + 8px); padding-bottom: calc(var(--tab-h) + 22px); }
  .chap__visual { height: 100%; max-height: 40svh; }
  .chap__title { font-size: clamp(2.8rem, 13vw, 3.6rem); margin: .3rem 0 .6rem; }
  .chap__text { font-size: 1rem; }
  .chap__cta { display: flex; justify-content: center; margin-top: 1.2rem; min-height: 52px; }
  .chap__pair .chap__form { width: 34vw; }
  .chap__temp { font-size: 26vw; }
  .chap__core { margin-top: 1rem; }
  .mini-poster { width: 38vw; }
  .chap__fan { height: 38svh; }

  .kschool { grid-template-columns: 1fr; padding-bottom: calc(80px + var(--tab-h)); }
  .next { grid-template-columns: 1fr auto; padding-top: 48px; padding-bottom: 48px; }
  .next__ch { grid-column: 1 / -1; }
  .next__title { font-size: clamp(2.6rem, 13vw, 4rem); }

  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__word { font-size: 30vw; }

  /* life cycle: swipe through the stages */
  .cycle__pin { padding: 72px 0 40px; }
  .cycle__viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cycle__viewport::-webkit-scrollbar { display: none; }
  .cycle__track { width: max-content; padding: 0 var(--gutter); }
  .cycle__list { flex-direction: row; gap: 14px; }
  .stage {
    width: calc(100vw - 2 * var(--gutter) - 24px); scroll-snap-align: center;
    padding: 20px; border-radius: 22px; background: rgba(207, 239, 230, .06); box-shadow: inset 0 0 0 1px var(--glint-line);
  }
  .stage__art { height: 150px; }
  .cycle__dots { display: flex; margin-top: 18px; }

  /* plastic scene */
  .plastic__head .page-title { font-size: clamp(2.8rem, 14vw, 4rem); }
  .plastic__after { bottom: calc(var(--tab-h) + 24px); }

  /* sand lab */
  .tsd__panel { border-radius: 22px; }
  .thermo input[type="range"] { height: 44px; }
  .thermo input[type="range"]::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: -12px; }
  .map__card { display: none; }
  .map__scroll { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; scroll-snap-type: x proximity; }
  .map__wrap { min-width: 860px; border-radius: 0; }
  .pin { width: 44px; height: 44px; margin: -22px 0 0 -22px; }

  /* posters */
  .posters__nav { display: none; }
  .poster { width: 80vw; }
  .posters__rail { padding-bottom: 20px; }

  /* school */
  .school-hero { grid-template-columns: 1fr; align-content: end; }
  .school-hero__sun { width: 120vw; right: -50vw; top: -40vw; }
  .school-hero__logo { justify-self: stretch; width: auto; }
  .school-emblem { grid-template-columns: 1fr; }
  .lockup__row { flex-direction: column; gap: 14px; width: 100%; }
  .lockup__rule { width: 60%; height: 1px; align-self: center; }
  .timeline__list { grid-template-columns: 1fr; gap: 28px; }
  .timeline__list::before { left: 6px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .tl { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; }
  .tl__dot { grid-row: 1 / span 2; margin: 14px 0 0 0; }
  .tl--now .tl__dot { margin: 6px 0 0 -10px; }
  .tl__year { font-size: 3rem; }
  .subjects__list { grid-template-columns: 1fr; }
  .subjects__list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 28px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); scrollbar-width: none; }
  .subjects__list::-webkit-scrollbar { display: none; }
  .subject { flex: 0 0 78vw; scroll-snap-align: center; }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts { padding-bottom: calc(60px + var(--tab-h)); }
}
