/* Kenari International School: concept build. Tokens first. */
@font-face { font-family: "Bespoke Serif"; src: url(fonts/BespokeSerif-300.woff2) format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Bespoke Serif"; src: url(fonts/BespokeSerif-300i.woff2) format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Bespoke Serif"; src: url(fonts/BespokeSerif-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bespoke Serif"; src: url(fonts/BespokeSerif-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bespoke Serif"; src: url(fonts/BespokeSerif-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(fonts/PlusJakartaSans-var.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
/* metric-matched fallbacks so the swap does not shift the layout */
@font-face { font-family: "Bespoke fb"; src: local("Georgia"), local("Times New Roman"); size-adjust: 96%; ascent-override: 96%; descent-override: 26%; line-gap-override: 0%; }
@font-face { font-family: "Jakarta fb"; src: local("Arial"), local("Helvetica Neue"); size-adjust: 103%; ascent-override: 93%; descent-override: 24%; line-gap-override: 0%; }

:root {
  --dusk: #182A55;          /* ink + evening sky */
  --dusk-deep: #101E42;
  --night: #0B1533;
  --paper: #F2F3F6;         /* morning paper */
  --sky: #E2E8F3;           /* pale morning band (paper tinted with dusk) */
  --peach: #FFB08A;         /* accent: CTA + lantern glow only */
  --peach-hi: #FFC4A6;
  --muted: #4A5679;         /* 6.9:1 on paper */
  --muted-dk: #AEB8D4;      /* on dusk */
  --line: rgba(24, 42, 85, .16);
  --line-dk: rgba(242, 243, 246, .16);
  --f-d: "Bespoke Serif", "Bespoke fb", Georgia, serif;
  --f-b: "Plus Jakarta Sans", "Jakarta fb", Arial, sans-serif;
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.4, .64, 1);
  --t-fast: .22s; --t-mid: .5s; --t-slow: 1.1s;
  --r: 14px;               /* one radius: paper with soft corners */
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--dusk); font: 400 17px/1.6 var(--f-b); font-feature-settings: "ss01"; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--peach); color: var(--dusk); }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; border-radius: 4px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--peach); color: var(--dusk); border-radius: 8px; font-weight: 600; text-decoration: none; transition: top var(--t-fast); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.h2 { font: 300 clamp(44px, 6.4vw, 104px)/.98 var(--f-d); letter-spacing: -.025em; margin: 0; }
.h2 em, .hero-h em, .foot-line em { font-style: italic; font-weight: 300; }
.label { font: italic 300 22px/1.2 var(--f-d); margin: 0; color: var(--muted); }

/* ---------- buttons ---------- */
.btn { --bg: var(--dusk); --fg: var(--paper); position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--bg); color: var(--fg); font: 600 15px/1 var(--f-b); letter-spacing: .005em; text-decoration: none; transition: background var(--t-fast), transform var(--t-mid) var(--e-out), box-shadow var(--t-mid); will-change: transform; }
.btn .ic { transition: transform var(--t-mid) var(--e-out); }
.btn:hover .ic { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn-peach { --bg: var(--peach); --fg: var(--dusk); box-shadow: 0 0 0 0 rgba(255, 176, 138, 0); }
.btn-peach:hover { --bg: var(--peach-hi); box-shadow: 0 0 40px -6px rgba(255, 176, 138, .65); }
.btn-ink:hover { --bg: var(--dusk-deep); }
.btn-line { --bg: transparent; --fg: var(--dusk); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--dusk); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--pad); color: var(--paper); transition: background var(--t-mid), color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid) var(--e-out); }
.nav[data-theme="paper"] { background: rgba(242, 243, 246, .9); color: var(--dusk); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.nav.is-hidden { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { width: 20px; height: 27px; flex: none; }
.brand-mark rect { fill: currentColor; }
.brand-mark .bm-body { fill: var(--peach); }
.brand-mark .bm-rib { fill: none; stroke: var(--dusk); stroke-opacity: .35; stroke-width: 1; }
.brand-name { font: 400 26px/1 var(--f-d); letter-spacing: -.02em; }
.brand-sub { display: none; font-size: 12px; line-height: 1.15; max-width: 7.5em; opacity: .75; }
.nav-links { display: none; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a { text-decoration: none; position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--t-mid) var(--e-out); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; opacity: .92; }
.lang button { min-width: 40px; height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; transition: background var(--t-fast), color var(--t-fast); }
.lang button[aria-pressed="true"] { background: currentColor; }
.nav[data-theme="dusk"] .lang button[aria-pressed="true"] { background: var(--paper); color: var(--dusk); }
.nav[data-theme="paper"] .lang button[aria-pressed="true"] { background: var(--dusk); color: var(--paper); }
.nav .btn-sm { display: none; }

/* ---------- 1. the lantern sky ---------- */
.sky { position: relative; height: 240svh; background: var(--night); }
.sky-stage { position: sticky; top: 0; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; touch-action: pan-y; }
.sky-bg { position: absolute; inset: 0; background:
  radial-gradient(120% 60% at 50% 112%, #5B4F86 0%, rgba(91, 79, 134, 0) 60%),
  radial-gradient(80% 40% at 78% 100%, rgba(255, 176, 138, .22) 0%, rgba(255, 176, 138, 0) 70%),
  linear-gradient(180deg, #0A1431 0%, #132453 46%, #24386E 78%, #3A4680 100%); }
.sky-stars { position: absolute; inset: 0 0 35%; opacity: .7; background-image:
  radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 8%, #fff 50%, transparent 51%),
  radial-gradient(1.4px 1.4px at 41% 26%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 12%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 73% 30%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 86% 9%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 94% 36%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 35% 44%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 65% 48%, #fff 50%, transparent 51%);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.l-back, .l-front { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.l-back { z-index: 1; }
.hero-h { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); top: auto; bottom: calc(100% - var(--ui-top, 62%) + clamp(18px, 4svh, 44px)); margin: 0; color: var(--paper); font: 300 clamp(60px, 16.4vw, 260px)/.86 var(--f-d); letter-spacing: -.045em; pointer-events: none; will-change: transform, opacity; }
.hh-line { display: block; overflow: hidden; padding-bottom: .06em; }
.hh-in { display: block; }
.hh-2 { padding-left: .32em; }
.hh-2 em { color: #FFE3D4; }
.l-front { z-index: 5; }
.canopy { position: absolute; z-index: 3; left: 0; right: 0; bottom: -2px; width: 100%; height: 22svh; min-height: 120px; fill: var(--night); pointer-events: none; will-change: transform; }
.morning { position: absolute; left: 0; right: 0; top: -45%; bottom: 0; z-index: 4; transform: translate3d(0, 100%, 0); pointer-events: none; background:
  radial-gradient(70% 26% at 50% 100%, rgba(255, 190, 160, .9) 0%, rgba(255, 190, 160, 0) 100%),
  linear-gradient(180deg, rgba(201, 214, 238, 0) 0%, rgba(201, 214, 238, .9) 18%, #D3DEF1 34%, #E6EBF5 70%, #F2F3F6 100%); }
.morning-line { position: absolute; z-index: 6; left: var(--pad); right: var(--pad); top: 42%; margin: 0; opacity: 0; text-align: center; font: italic 300 clamp(40px, 7.4vw, 120px)/1 var(--f-d); letter-spacing: -.03em; color: var(--dusk); pointer-events: none; text-wrap: balance; }
.hero-ui { position: absolute; z-index: 7; left: var(--pad); right: var(--pad); bottom: calc(58px + env(safe-area-inset-bottom)); display: grid; gap: 18px; color: var(--paper); will-change: opacity; }
.hero-lede { margin: 0; max-width: 30em; font-size: 15.5px; line-height: 1.55; color: #DDE3F2; text-wrap: pretty; }
.hero-actions { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 16px 22px; }
.hero-hint { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: #C9D1E6; }
.hint-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 0 rgba(255, 176, 138, .6); animation: ping 2.4s var(--e-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 176, 138, .55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 176, 138, 0); } }
.sky-stage.is-pointing { cursor: pointer; }
.lantern-tip { position: absolute; z-index: 8; left: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 999px; background: var(--paper); color: var(--dusk); font-size: 13px; font-weight: 600; white-space: nowrap; translate: -50% -100%; opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
.lantern-tip.on { opacity: 1; }
.tip-open { padding: 4px 10px; border-radius: 999px; background: var(--peach); font-size: 12px; }
.sr-lanterns { position: absolute; z-index: 9; left: var(--pad); top: calc(var(--nav-h) + 8px); display: flex; flex-wrap: wrap; gap: 6px; max-width: 640px; clip-path: inset(50%); }
.sr-lanterns:focus-within { clip-path: none; }
.sr-lanterns button { padding: 8px 12px; border: 0; border-radius: 999px; background: var(--paper); color: var(--dusk); font-size: 13px; font-weight: 600; }

/* ---------- 2. thesis ---------- */
.thesis { padding: clamp(96px, 14vw, 200px) 0 clamp(72px, 9vw, 140px); }
.thesis-grid { display: grid; gap: 28px; }
.thesis-p { margin: 0; font: 300 clamp(30px, 3.9vw, 60px)/1.12 var(--f-d); letter-spacing: -.02em; text-wrap: pretty; }
.thesis-p .w { display: inline-block; opacity: .14; transition: opacity .5s; }
.thesis-p .w.on { opacity: 1; }
.thesis-facts { display: grid; gap: 0; margin-top: clamp(24px, 4vw, 56px); border-top: 1px solid var(--line); }
.thesis-facts p { display: grid; gap: 6px; margin: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
.thesis-facts b { font: 400 22px/1.2 var(--f-d); letter-spacing: -.01em; }
.thesis-facts span { color: var(--muted); font-size: 15px; }

/* ---------- 3. the lanterns: subjects ---------- */
.learning { padding: clamp(56px, 8vw, 120px) 0 clamp(96px, 12vw, 180px); }
.learning-head { display: grid; gap: 20px; align-items: end; margin-bottom: clamp(36px, 6vw, 80px); }
.learning-intro { margin: 0; max-width: 28em; color: var(--muted); }
.subjects { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.subjects li { border-bottom: 1px solid var(--line); }
.subj { position: relative; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 18px; width: 100%; padding: 22px 4px; border: 0; background: none; text-align: left; overflow: hidden; }
.subj::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 176, 138, .22), rgba(255, 176, 138, 0) 70%); opacity: 0; transition: opacity var(--t-mid); }
.subj:hover::before, .subj:focus-visible::before { opacity: 1; }
.subj svg.lan { position: relative; width: 40px; height: 54px; overflow: visible; transition: transform var(--t-mid) var(--e-spring), filter var(--t-mid); }
.subj:hover svg.lan, .subj:focus-visible svg.lan { transform: translateY(-4px) rotate(-6deg); filter: drop-shadow(0 0 12px rgba(255, 176, 138, .9)); }
.subj-t { position: relative; display: grid; gap: 2px; min-width: 0; }
.subj-n { font: 300 clamp(30px, 4vw, 52px)/1.05 var(--f-d); letter-spacing: -.02em; }
.subj-y { font-size: 13.5px; color: var(--muted); }
.subj-go { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-mid) var(--e-out); }
.subj:hover .subj-go { background: var(--dusk); color: var(--paper); box-shadow: none; transform: rotate(90deg); }

/* ---------- 4. stages ---------- */
.stages { background: var(--dusk); color: var(--paper); overflow: hidden; }
.stages-pin { padding: clamp(80px, 10vw, 140px) 0; }
.stages-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.stages-note { margin: 0; max-width: 26em; color: var(--muted-dk); }
.stages-track { display: flex; gap: 16px; padding: 0 var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.stages-track::-webkit-scrollbar { display: none; }
.stage { flex: none; width: min(84vw, 520px); scroll-snap-align: start; display: grid; align-content: start; gap: 20px; padding: 28px; border-radius: var(--r); background: rgba(242, 243, 246, .05); box-shadow: inset 0 0 0 1px var(--line-dk); }
.stage-age { margin: 0; font: 300 clamp(96px, 15vw, 200px)/.8 var(--f-d); letter-spacing: -.05em; color: var(--peach-hi); }
.stage-age span { font-style: italic; color: var(--muted-dk); margin: 0 .02em; }
.stage-body h3 { margin: 0 0 4px; font: 400 32px/1.1 var(--f-d); letter-spacing: -.015em; }
.stage-yrs { margin: 0 0 14px; font-size: 13.5px; color: var(--muted-dk); }
.stage-body > p:not(.stage-yrs) { margin: 0; color: #DDE3F2; font-size: 16px; text-wrap: pretty; }
.stage-day { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--line-dk); }
.stage-day li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-dk); font-size: 14.5px; }
.stage-day b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--peach-hi); }

/* ---------- 5. campus ---------- */
.campus { padding: clamp(96px, 12vw, 180px) 0; }
.campus .h2 { margin-bottom: clamp(36px, 6vw, 80px); max-width: 9em; }
.rooms { display: grid; gap: 40px 24px; }
.room { margin: 0; }
.room img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); filter: saturate(.86) contrast(1.02); }
.room figcaption { display: grid; gap: 4px; margin-top: 14px; max-width: 30em; }
.room figcaption b { font: 400 24px/1.15 var(--f-d); }
.room figcaption span { color: var(--muted); font-size: 15px; }
.ph { overflow: hidden; }
.ph img { clip-path: inset(0 0 100% 0 round var(--r)); transform: scale(1.12); transition: clip-path 1.3s var(--e-io), transform 1.8s var(--e-out); }
.ph.in img { clip-path: inset(0 0 0 0 round var(--r)); transform: none; }
.room.ph { overflow: visible; }

/* ---------- 6. governance ---------- */
.gov { background: var(--sky); padding: clamp(96px, 12vw, 170px) 0; }
.gov-grid { display: grid; gap: 48px; }
.gov-lead p { max-width: 30em; margin: 22px 0 0; text-wrap: pretty; }
.gov-note { color: var(--muted); font-size: 14.5px; font-style: italic; }
.gov-cols { display: grid; gap: 36px; }
.gov-col h3 { margin: 0 0 12px; font: 400 22px/1.2 var(--f-d); }
.gov-col ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gov-col li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; font-weight: 500; }
.gov-col li em { font-style: normal; color: var(--muted); font-size: 13.5px; text-align: right; }
.gov-policies li { justify-content: flex-start; align-items: center; gap: 12px; }
.gov-policies .ic { color: var(--muted); }

/* ---------- 7. admissions + estimator ---------- */
.adm { padding: clamp(96px, 12vw, 180px) 0 clamp(64px, 8vw, 120px); }
.adm-head { display: grid; gap: 40px; margin-bottom: clamp(40px, 6vw, 80px); }
.adm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.adm-steps li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.adm-steps li > b { font: italic 300 40px/1 var(--f-d); color: var(--muted); }
.adm-steps li > span { display: grid; gap: 2px; }
.adm-steps strong { font: 400 22px/1.2 var(--f-d); }
.adm-steps li > span > span { color: var(--muted); font-size: 15px; }
.est { position: relative; display: grid; border-radius: calc(var(--r) * 1.6); background: var(--dusk); color: var(--paper); overflow: hidden; isolation: isolate; }
.est::before { content: ""; position: absolute; z-index: -1; right: -10%; top: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 176, 138, .22), rgba(255, 176, 138, 0)); transition: transform 1.2s var(--e-out); transform: scale(var(--glow, .8)); }
.est-in { padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; align-content: start; }
.est-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.est-h { margin: 0; font: 300 clamp(32px, 3.4vw, 48px)/1 var(--f-d); letter-spacing: -.02em; }
.est-sample { margin: 0; font-size: 13px; color: var(--muted-dk); }
.est-children { display: grid; gap: 10px; }
.child { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: var(--r); background: rgba(242, 243, 246, .06); box-shadow: inset 0 0 0 1px var(--line-dk); animation: childIn .5s var(--e-out); }
@keyframes childIn { from { opacity: 0; transform: translateY(8px); } }
.child-k { font: italic 300 20px/1 var(--f-d); color: var(--peach-hi); white-space: nowrap; }
.child select { width: 100%; min-height: 46px; padding: 0 40px 0 14px; border: 0; border-radius: 10px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23182A55' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; color: var(--dusk); font-weight: 600; font-size: 15px; -webkit-appearance: none; appearance: none; }
.child-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted-dk); display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); }
.child-x:hover { background: rgba(242, 243, 246, .1); color: var(--paper); }
.child-x:disabled { opacity: .3; cursor: default; background: none; }
.est-add { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-dk); font-size: 14px; font-weight: 600; transition: box-shadow var(--t-fast); }
.est-add:hover { box-shadow: inset 0 0 0 1px var(--paper); }
.est-add:disabled { opacity: .4; cursor: default; }
.est-opts { display: grid; gap: 10px; margin-top: 6px; }
.tog { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; cursor: pointer; }
.tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tog-ui { width: 44px; height: 26px; border-radius: 999px; background: rgba(242, 243, 246, .16); position: relative; transition: background var(--t-fast); }
.tog-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); transition: transform var(--t-mid) var(--e-spring); }
.tog input:checked + .tog-ui { background: var(--peach); }
.tog input:checked + .tog-ui::after { transform: translateX(18px); background: var(--dusk); }
.tog input:focus-visible + .tog-ui { outline: 2px solid var(--peach); outline-offset: 3px; }
.tog > span:last-child { display: grid; font-size: 14px; color: var(--muted-dk); }
.tog b { color: var(--paper); font-weight: 600; font-size: 15px; }
.est-out { padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; align-content: start; background: rgba(11, 21, 51, .45); border-top: 1px solid var(--line-dk); }
.eo-k { margin: 0; font-size: 14px; color: var(--muted-dk); }
.eo-big { margin: -6px 0 0; display: flex; align-items: baseline; gap: 10px; font: 300 clamp(64px, 8vw, 120px)/.9 var(--f-d); letter-spacing: -.04em; font-variant-numeric: tabular-nums lining-nums; }
.eo-cur { font: 600 18px/1 var(--f-b); letter-spacing: .04em; color: var(--peach-hi); }
.eo-rows { margin: 0; display: grid; border-top: 1px solid var(--line-dk); }
.eo-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-dk); font-size: 14.5px; }
.eo-rows dt { color: var(--muted-dk); }
.eo-rows dd { margin: 0; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.eo-fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted-dk); }
.est-out .btn { justify-self: start; }

/* ---------- 8. visit booking ---------- */
.visit { padding: clamp(64px, 8vw, 120px) 0 clamp(96px, 12vw, 180px); }
.visit-grid { display: grid; gap: 40px; }
.visit-lead p { max-width: 26em; margin: 22px 0 0; text-wrap: pretty; }
.visit-fri { color: var(--muted); font-size: 15px; }
.book { position: relative; display: grid; gap: 28px; padding: clamp(20px, 3.4vw, 40px); border-radius: calc(var(--r) * 1.6); background: #FBFBFD; box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px rgba(24, 42, 85, .35); }
.bk-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.bk-step legend { display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 14px; font: 400 22px/1.2 var(--f-d); }
.bk-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--dusk); color: var(--paper); font: 600 13px/1 var(--f-b); }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 10px; margin: -4px -4px 0; scroll-snap-type: x proximity; scrollbar-width: thin; }
.day, .slot, .seg label { position: relative; flex: none; }
.day input, .slot input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day span { display: grid; justify-items: center; gap: 2px; width: 66px; padding: 12px 0 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; scroll-snap-align: start; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.day small { font-size: 12px; font-weight: 600; color: var(--muted); }
.day b { font: 300 30px/1 var(--f-d); }
.day i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.day:hover span { box-shadow: inset 0 0 0 1.5px var(--dusk); }
.day input:checked + span { background: var(--dusk); color: var(--paper); box-shadow: none; }
.day input:checked + span small, .day input:checked + span i { color: var(--peach-hi); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.slot span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.slot:hover span { box-shadow: inset 0 0 0 1.5px var(--dusk); }
.slot input:checked + span { background: var(--dusk); color: var(--paper); box-shadow: none; }
.slot input:disabled + span { color: var(--muted); opacity: .55; cursor: not-allowed; text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line); background: none; }
.slot em { font-style: normal; font-size: 12px; font-weight: 500; text-decoration: none; }
.slots-empty { margin: 0; color: var(--muted); font-size: 15px; align-self: center; }
.day input:focus-visible + span, .slot input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--dusk); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 26px; box-shadow: inset 0 0 0 1px var(--line); }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.seg input:checked + span { background: var(--dusk); color: var(--paper); }
.fields { display: grid; gap: 14px; }
.fld { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.fld input, .fld select { min-height: 50px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--dusk); font-size: 16px; font-weight: 500; -webkit-appearance: none; appearance: none; transition: box-shadow var(--t-fast); }
.fld select { padding-right: 40px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23182A55' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; }
.fld input:focus, .fld select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--dusk); }
.fld input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #B3261E; }
.bk-err { margin: -10px 0 0; color: #9E1F18; font-size: 14.5px; font-weight: 600; }
.bk-foot { display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.bk-sum { margin: 0; font: italic 300 22px/1.25 var(--f-d); }
.bk-foot .btn { justify-self: start; }
.bk-done { position: absolute; inset: 0; z-index: 2; display: grid; align-content: start; padding-top: clamp(40px, 8vw, 96px) !important; justify-items: start; gap: 14px; padding: clamp(24px, 5vw, 56px); border-radius: inherit; background: var(--dusk); color: var(--paper); outline: none; animation: doneIn .7s var(--e-out); }
@keyframes doneIn { from { clip-path: circle(0 at 50% 100%); } to { clip-path: circle(150% at 50% 100%); } }
.bk-lantern { width: 64px; height: 86px; margin-bottom: 8px; overflow: visible; animation: floatUp 3.2s var(--e-io) infinite alternate; filter: drop-shadow(0 0 22px rgba(255, 176, 138, .8)); }
.bk-lantern rect { fill: var(--paper); }
.bk-lantern .bl-body { fill: var(--peach); }
.bk-lantern .bl-rib { fill: none; stroke: var(--dusk); stroke-opacity: .3; }
@keyframes floatUp { to { transform: translateY(-10px) rotate(3deg); } }
.bk-done h3 { margin: 0; font: 300 clamp(34px, 4vw, 52px)/1.02 var(--f-d); letter-spacing: -.02em; }
.bk-done p { margin: 0; max-width: 34em; color: #DDE3F2; }
.bk-ref b { font-variant-numeric: tabular-nums; letter-spacing: .06em; color: var(--peach-hi); }
.bk-done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.bk-done .btn-ink { --bg: var(--paper); --fg: var(--dusk); }
.bk-done .btn-line { --fg: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-dk); }
.bk-done .eo-fine { margin-top: 4px; }

/* ---------- footer ---------- */
.foot { position: relative; background: var(--night); color: var(--paper); padding: clamp(96px, 14vw, 200px) 0 120px; overflow: hidden; isolation: isolate; }
.foot::before { content: ""; position: absolute; z-index: -1; inset: auto -20% -40% -20%; height: 80%; background: radial-gradient(closest-side, rgba(255, 176, 138, .18), rgba(255, 176, 138, 0)); }
.foot-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.foot-sky span { position: absolute; width: 26px; height: 32px; border-radius: 48% 48% 44% 44%; background: radial-gradient(circle at 50% 55%, #FFF4EA 0%, var(--peach) 55%, #E48C69 100%); box-shadow: 0 0 40px 10px rgba(255, 176, 138, .35); animation: drift 9s var(--e-io) infinite alternate; }
.foot-sky span::before, .foot-sky span::after { content: ""; position: absolute; left: 30%; right: 30%; height: 3px; border-radius: 1px; background: #22315C; }
.foot-sky span::before { top: -3px; } .foot-sky span::after { bottom: -3px; }
.foot-sky span:nth-child(1) { right: 12%; top: 16%; }
.foot-sky span:nth-child(2) { right: 26%; top: 34%; transform: scale(.6); animation-delay: -3s; opacity: .8; }
.foot-sky span:nth-child(3) { right: 6%; top: 46%; transform: scale(.42); animation-delay: -6s; opacity: .6; }
@keyframes drift { to { translate: -14px -18px; } }
.foot-top { display: grid; gap: 32px; justify-items: start; padding-bottom: clamp(64px, 9vw, 120px); }
.foot-line { margin: 0; font: 300 clamp(54px, 9.4vw, 156px)/.92 var(--f-d); letter-spacing: -.04em; }
.foot-line em { color: #FFE3D4; }
.foot-grid { position: relative; display: grid; gap: 32px; padding-top: 40px; font-size: 15px; color: #DDE3F2; }
.foot-grid::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: var(--line-dk); }
.foot-grid p { margin: 0; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-grid nav { display: grid; gap: 6px; align-content: start; }
.foot-k { margin: 0 0 8px !important; font: italic 300 18px/1.2 var(--f-d); color: var(--muted-dk); }
.foot-brand { display: grid; gap: 6px; align-content: start; }
.fb-name { font: 300 56px/.9 var(--f-d); letter-spacing: -.03em; color: var(--paper); }
.fb-ms { font-size: 13px; color: var(--muted-dk); }
.foot-legal { display: grid; gap: 8px; margin-top: 48px; font-size: 13px; color: var(--muted-dk); }
.foot-legal p { margin: 0; max-width: 72em; }
.foot-concept { color: #DDE3F2; }

/* ---------- lesson scene (a lantern unfolds into paper) ---------- */
.scene { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; overflow: hidden; color: var(--dusk); }
.scene::backdrop { background: rgba(11, 21, 51, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.scene[open] { display: grid; place-items: center; }
.scene-paper { --tint: #FFCDB2; --tint-hi: #FFF3EA; position: relative; width: min(92vw, 600px); max-height: 92svh; overflow: auto; display: grid; grid-template-rows: auto auto auto; border-radius: calc(var(--r) * 1.6); background: radial-gradient(120% 80% at 50% 30%, var(--tint-hi) 0%, var(--tint) 100%); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55), 0 0 120px -20px rgba(255, 176, 138, .5); clip-path: circle(var(--r0, 30px) at var(--ox, 50%) var(--oy, 50%)); opacity: .2; transition: clip-path .75s var(--e-io), opacity .3s; }
.scene-paper.is-open { clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%)); opacity: 1; }
.scene-ribs { position: absolute; inset: 0; display: flex; justify-content: space-evenly; pointer-events: none; }
.scene-ribs i { width: 1px; background: linear-gradient(180deg, rgba(24, 42, 85, 0), rgba(24, 42, 85, .1) 20%, rgba(24, 42, 85, .1) 80%, rgba(24, 42, 85, 0)); }
.scene-x { position: absolute; z-index: 2; right: 14px; top: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--dusk); color: var(--paper); display: grid; place-items: center; transition: transform var(--t-mid) var(--e-out); }
.scene-x:hover { transform: rotate(90deg); }
.scene-canvas { position: relative; display: block; width: 100%; height: clamp(220px, 38svh, 320px); }
.scene-text { position: relative; padding: 4px clamp(22px, 5vw, 44px) 8px; }
.scene-yrs { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.scene-text h3 { margin: 0 0 10px; font: 300 clamp(40px, 6vw, 64px)/1 var(--f-d); letter-spacing: -.03em; }
.scene-text p:last-child { margin: 0; font-size: 16.5px; text-wrap: pretty; }
.scene-nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(14px, 4vw, 30px) 22px; }
.scene-nav button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(24, 42, 85, .08); display: grid; place-items: center; transition: background var(--t-fast); }
.scene-nav button:hover { background: rgba(24, 42, 85, .16); }
.scene-nav span { font: italic 300 18px/1 var(--f-d); color: var(--muted); }

/* ---------- concept badge ---------- */
.concept-badge { position: fixed; left: 12px; bottom: 12px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--dusk); color: var(--paper); font: 500 12px/1.2 var(--f-b); text-decoration: none; box-shadow: 0 0 0 1px rgba(242, 243, 246, .16), 0 8px 24px -12px rgba(11, 21, 51, .6); transition: transform var(--t-fast); }
.concept-badge:hover { transform: translateY(-1px); }

/* ---------- hero intro (CSS keyframes, so it never waits for a script) ---------- */
@keyframes hhRise { from { transform: translateY(112%); } }
@keyframes uiIn { from { opacity: 0; transform: translateY(14px); } }
.hh-in { animation: hhRise 1.3s var(--e-out) .05s both; }
.hh-2 .hh-in { animation-delay: .16s; }
.hero-ui > * { animation: uiIn 1s var(--e-out) .45s both; }
.hero-ui > * + * { animation-delay: .56s; }

/* ---------- reveals (headings only) ---------- */
.js .rv { clip-path: inset(-10% -100vw 100% -100vw); transform: translateY(30px); transition: clip-path 1.1s var(--e-out), transform 1.1s var(--e-out); }
.js .rv.in { clip-path: inset(-10% -100vw -20% -100vw); transform: none; }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .brand-sub { display: block; }
}
@media (min-width: 760px) {
  .thesis-facts { grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 0; }
  .thesis-facts p { border-top: 1px solid var(--line); border-bottom: 0; }
  .learning-head { grid-template-columns: 1.3fr 1fr; }
  .subjects { grid-template-columns: 1fr 1fr; column-gap: 48px; border-top: 0; }
  .subjects li:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .rooms { grid-template-columns: repeat(12, 1fr); }
  .r-lib { grid-column: 1 / 8; }
  .r-studio { grid-column: 9 / 13; margin-top: 18vw; }
  .r-studio img { aspect-ratio: 3 / 4; }
  .r-lab { grid-column: 2 / 6; margin-top: -10vw; }
  .r-lab img { aspect-ratio: 1; }
  .r-maths { grid-column: 7 / 13; }
  .gov-cols { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .gov-policies { grid-column: 1 / -1; }
  .gov-policies ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; border-top: 0; }
  .gov-policies li { border-top: 1px solid var(--line); border-bottom: 0; }
  .adm-steps { grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 0; }
  .adm-steps li { grid-template-columns: 1fr; border-top: 1px solid var(--line); border-bottom: 0; padding-top: 22px; }
  .fields { grid-template-columns: 1fr 1fr; }
  .bk-foot { grid-template-columns: 1fr auto; align-items: center; }
  .bk-foot .btn { justify-self: end; }
  .foot-grid { grid-template-columns: repeat(3, 1fr) 1.2fr; }
  .stage { padding: 36px; }
}
@media (min-width: 1024px) {
  :root { --nav-h: 78px; }
  .nav-links { display: flex; }
  .nav .btn-sm { display: inline-flex; }
  .hero-h { top: 24%; bottom: auto; font-size: clamp(120px, 15.6vw, 270px); }
  .hh-2 { padding-left: 1.05em; }
  .hero-ui { grid-template-columns: minmax(0, 30em) 1fr; align-items: end; bottom: 40px; }
  .hero-actions { justify-self: end; }
  .hero-actions { flex-direction: row-reverse; align-items: center; justify-content: flex-start; }
  .thesis-grid { grid-template-columns: 3fr 9fr; column-gap: 32px; }
  .thesis-facts { grid-column: 2; }
  .gov-grid { grid-template-columns: 4fr 8fr; gap: 64px; }
  .adm-head { grid-template-columns: 5fr 7fr; align-items: end; }
  .adm-steps { grid-template-columns: 1fr 1fr; row-gap: 8px; }
  .est { grid-template-columns: 7fr 5fr; }
  .est-out { border-top: 0; border-left: 1px solid var(--line-dk); }
  .visit-grid { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
  .visit-lead { position: sticky; top: calc(var(--nav-h) + 40px); }
  /* pinned horizontal stages */
  .stages-pin { height: 100svh; min-height: 720px; padding: calc(var(--nav-h) + 24px) 0 48px; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); align-content: center; }
  .stages-head { grid-template-columns: 1.3fr 1fr; align-items: end; margin-bottom: 40px; }
  .stages-track { overflow: visible; scroll-snap-type: none; gap: 24px; align-items: stretch; will-change: transform; }
  .stage { width: 46vw; max-width: 660px; grid-template-columns: auto 1fr; align-content: start; align-items: start; gap: 36px; align-self: start; }
  .stage-age { font-size: clamp(120px, 11vw, 190px); }
}
@media (min-width: 1440px) {
  body { font-size: 18px; }
}
@media (hover: none) {
  .lantern-tip { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .sky { height: auto; }
  .sky-stage { position: relative; }
  .js .rv, .ph img { clip-path: none; transform: none; }
  .thesis-p .w { opacity: 1; }
  .scene-paper { clip-path: none; opacity: 1; }
}

/* root clip: stops a few stray pixels widening the phone layout viewport (portfolio fixes 24 Nov) */
html{overflow-x:clip}
