/* KSR Akshara Academy - redesign concept
   Palette: logo blue (brand) + uniform red (single accent).
   Shape rule: cards 18px, media 22px, inputs 12px, buttons and chips full pill. */

:root {
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #eaf2f9;
  --ink: #0d1b2b;
  --ink-2: #33475c;
  --muted: #56687c;
  --line: #d6e1eb;
  --brand: #0b5d95;
  --brand-ink: #07406a;
  --brand-soft: #e3eef8;
  --deep: #07406a;
  --accent: #cf3326;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgb(11 61 104 / .06), 0 12px 32px -12px rgb(11 61 104 / .18);
  --r-card: 18px;
  --r-media: 22px;
  --r-input: 12px;
  --maxw: 77.5rem;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09121c; --surface: #0f1b28; --surface-2: #132436; --ink: #e7eef6; --ink-2: #c3d0de;
    --muted: #9aabbe; --line: #1f3347; --brand: #6cb4ea; --brand-ink: #a9d4f5; --brand-soft: #12283d;
    --deep: #0e3a5f; --accent: #d93a2c; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px -16px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09121c; --surface: #0f1b28; --surface-2: #132436; --ink: #e7eef6; --ink-2: #c3d0de;
  --muted: #9aabbe; --line: #1f3347; --brand: #6cb4ea; --brand-ink: #a9d4f5; --brand-soft: #12283d;
  --deep: #0e3a5f; --accent: #d93a2c; --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px -16px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(28px, 3.5vw, 48px) 0; }
/* Two plain sections in a row share one gap instead of doubling it */
.section:not(.section-tint) + .section:not(.section-tint) { padding-top: 0; }
/* The footer's own border is the separator: no extra margin after the last section */
main > .section:last-child:not(.section-tint) { padding-bottom: clamp(28px, 3.5vw, 48px); }
.section-tint { background: var(--surface-2); }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--brand);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 100; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap;
  padding: .85rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s, color .25s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-brand { background: var(--deep); color: #fff; }
.btn-brand:hover { background: color-mix(in srgb, var(--deep) 85%, black); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn i { font-size: 1.15em; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.link-arrow i { transition: transform .25s var(--ease); }
.link-arrow:hover i { transform: translateX(4px); }

/* Utility bar */
.utility { background: var(--brand-ink); color: #eaf3fb; font-size: .86rem; }
:root[data-theme="dark"] .utility { background: #06101a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .utility { background: #06101a; } }
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 38px; }
.utility a { text-decoration: none; }
.utility a:hover { text-decoration: underline; }
.utility .u-left, .utility .u-right { display: flex; gap: 1.25rem; align-items: center; }
.utility i { opacity: .8; margin-right: .3rem; }
@media (max-width: 860px) { .utility .u-left span:nth-child(n+2) { display: none; } }
@media (max-width: 560px) { .utility .u-right a:nth-child(2) { display: none; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 50px; height: 50px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font: 700 1.12rem/1.05 var(--font-display); color: var(--brand-ink); letter-spacing: -.01em; }
.brand-text span { font-size: .74rem; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: .25rem; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button {
  display: inline-flex; align-items: center; gap: .25rem; padding: .55rem .8rem; border-radius: 999px;
  font: 500 .96rem/1 var(--font-body); color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav-links a:hover, .nav-links button:hover, .nav-links a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav-links .caret { font-size: .8rem; transition: transform .2s; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: -8px; min-width: 240px; padding: .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.dropdown a { display: flex; width: 100%; padding: .7rem .85rem; border-radius: 10px; }
.has-dd:hover .dropdown, .has-dd:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.has-dd:hover .caret, .has-dd:focus-within .caret { transform: rotate(180deg); }
/* Hovering another menu closes the one that still holds focus from a click */
.nav-links:hover .has-dd:not(:hover) .dropdown { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.nav-links:hover .has-dd:not(:hover) .caret { transform: none; }
.nav-cta { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; font-size: 1.15rem;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.menu-toggle { display: none; }
@media (max-width: 1240px) {
  .nav-links, .nav-cta .btn { display: none; }
  .menu-toggle { display: inline-grid; }
  .nav-cta { margin-left: auto; }
}
/* site.js adds this when the full menu would not fit (e.g. a large browser font size) */
.site-header.nav-compact .nav-links, .site-header.nav-compact .nav-cta .btn { display: none; }
.site-header.nav-compact .menu-toggle { display: inline-grid; }
.site-header.nav-compact .nav-cta { margin-left: auto; }
@media (max-width: 400px) {
  .nav { gap: .6rem; }
  .brand { flex-shrink: 1; min-width: 0; gap: .5rem; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-text { min-width: 0; }
  .brand-text strong { font-size: 1rem; }
  .brand-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-cta { gap: .35rem; }
  .nav-cta .icon-btn { width: 38px; height: 38px; }
}

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(5 20 35 / .5); opacity: 0; transition: opacity .3s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(380px, 88vw); background: var(--surface);
  padding: 20px 20px 32px; overflow-y: auto; transform: translateX(100%); transition: transform .4s var(--ease);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.drawer .drawer-label { font: 600 .78rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 1.5rem 0 .5rem; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li a { display: block; padding: .7rem 0; text-decoration: none; font: 500 1.15rem/1.2 var(--font-display); }
.drawer .btn { width: 100%; justify-content: center; margin-top: 1.5rem; }

/* Hero */
.hero { padding: clamp(20px, 3vw, 40px) 0 clamp(28px, 3.5vw, 44px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { margin-top: 1.25rem; max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-media { position: relative; display: grid; grid-template-columns: 1fr .62fr; grid-template-rows: 1fr 1fr; gap: 14px; height: clamp(360px, 44vw, 560px); }
.hero-media figure { margin: 0; border-radius: var(--r-media); overflow: hidden; background: var(--surface-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .m1 { grid-row: 1 / 3; }
.hero-media .m2 img { object-position: 30% 40%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { height: 380px; }
}
@media (max-width: 520px) { .hero-media { height: 300px; grid-template-columns: 1fr; grid-template-rows: 1fr; } .hero-media .m2, .hero-media .m3 { display: none; } .hero-media .m1 { grid-row: auto; } }

/* Facts band */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.facts-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fact { padding: 28px 20px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong { display: block; font: 600 clamp(1.8rem, 3vw, 2.4rem)/1 var(--font-display); color: var(--brand-ink); letter-spacing: -.03em; }
:root[data-theme="dark"] .fact strong { color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fact strong { color: var(--brand); } }
.fact span { display: block; margin-top: .5rem; font-size: .92rem; color: var(--muted); line-height: 1.4; }
@media (max-width: 900px) {
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact + .fact { border-left: 0; }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-child(even) { border-left: 1px solid var(--line); }
  .fact:last-child { grid-column: 1 / -1; border-bottom: 0; }
}

/* Stages (tabs) */
.stages { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 48px); margin-top: 2rem; align-items: start; }
.stage-tabs { display: flex; flex-direction: column; gap: 8px; }
.stage-tab {
  text-align: left; padding: 18px 20px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; color: var(--ink); font: inherit; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  transition: border-color .25s, background-color .25s, transform .25s var(--ease);
}
.stage-tab:hover { border-color: var(--brand); }
.stage-tab strong { font: 600 1.2rem/1.2 var(--font-display); }
.stage-tab span { color: var(--muted); font-size: .92rem; grid-column: 1; }
.stage-tab i { grid-row: 1 / 3; grid-column: 2; font-size: 1.3rem; color: var(--muted); transition: transform .25s var(--ease); }
.stage-tab[aria-selected="true"] { background: var(--deep); border-color: var(--deep); color: #fff; }
.stage-tab[aria-selected="true"] span, .stage-tab[aria-selected="true"] i { color: #cfe3f4; }
.stage-tab[aria-selected="true"] i { transform: translateX(4px); }
.stage-panel { display: grid; gap: 22px; }
.stage-panel[hidden] { display: none; }
.stage-panel img { border-radius: var(--r-media); aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.stage-panel h3 { font-size: 1.6rem; }
.stage-panel.is-in { animation: fadeUp .5s var(--ease); }
@media (max-width: 900px) {
  .stages { grid-template-columns: 1fr; }
  .stage-tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .stage-tab { flex: 0 0 auto; scroll-snap-align: start; }
  .stage-tab i { display: none; }
}

/* Bento */
.bento { display: grid; gap: 14px; margin-top: 2rem; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto);
  grid-template-areas: "isa isa atl ted" "isa isa clubs clubs" "robo mun ncc ncc"; }
.tile { text-align: left; align-items: flex-start; position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--surface); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; color: inherit; isolation: isolate; }
.tile h3 { font-size: 1.25rem; }
.tile p { font-size: .95rem; margin-top: .4rem; }
.tile.photo { border: 0; color: #fff; }
.tile.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tile.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(4 20 36 / 0) 35%, rgb(4 20 36 / .82) 100%); }
.tile.photo p { color: #dbe8f4; }
.tile.photo:hover img { transform: scale(1.04); }
.tile.brand { background: var(--deep); color: #fff; border: 0; }
.tile.brand p { color: #cfe3f4; }
.tile.tint { background: var(--brand-soft); border: 0; justify-content: space-between; }
.t-isa { grid-area: isa; } .t-atl { grid-area: atl; } .t-ted { grid-area: ted; } .t-clubs { grid-area: clubs; }
.t-robo { grid-area: robo; } .t-mun { grid-area: mun; } .t-ncc { grid-area: ncc; }
.t-ncc img { object-position: center 12%; }
.t-isa h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.tile .big-icon { font-size: 2rem; margin-bottom: auto; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(200px, auto);
    grid-template-areas: "isa isa" "isa isa" "atl ted" "clubs clubs" "robo mun" "ncc ncc"; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto;
    grid-template-areas: "isa" "atl" "ted" "clubs" "robo" "mun" "ncc"; }
  .tile { min-height: 220px; }
  .t-isa { min-height: 360px; }
}

/* Film */
.film { position: relative; border-radius: var(--r-media); overflow: hidden; aspect-ratio: 16 / 7; background: #06101a; margin-top: 2.5rem; }
.film img, .film iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.film img { opacity: .8; transition: transform 1s var(--ease), opacity .4s; }
.film button { z-index: 1; position: absolute; inset: 0; border: 0; background: linear-gradient(90deg, rgb(4 20 36 / .7), rgb(4 20 36 / .1)); cursor: pointer; color: #fff; display: flex; align-items: center; gap: 1.25rem; padding: clamp(20px, 5vw, 56px); text-align: left; font: inherit; }
.film button:hover + img, .film:hover img { transform: scale(1.03); opacity: .9; }
.play { width: 76px; height: 76px; flex-shrink: 0; border-radius: 999px; background: var(--accent); display: grid; place-items: center; font-size: 1.9rem; transition: transform .3s var(--ease); }
.film button:hover .play { transform: scale(1.08); }
.film strong { display: block; font: 600 clamp(1.3rem, 2.6vw, 2rem)/1.15 var(--font-display); }
.film small { display: block; margin-top: .35rem; color: #cfe0ef; font-size: .95rem; }
@media (max-width: 640px) { .film { aspect-ratio: 4 / 3; } .film button { flex-direction: column; align-items: flex-start; justify-content: flex-end; } .play { width: 60px; height: 60px; } }

/* Why grid */
.why { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.why-aside { position: sticky; top: 110px; }
.why-aside img { border-radius: var(--r-media); aspect-ratio: 4 / 3; object-fit: cover; margin-top: 2rem; }
.why-groups { display: grid; gap: 40px; }
.why-group h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; color: var(--muted); letter-spacing: .02em; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.why-items { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; margin-top: 22px; }
.why-item { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.why-item i { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.35rem; }
.why-item strong { display: block; font: 600 1.08rem/1.3 var(--font-display); }
.why-item p { font-size: .95rem; color: var(--muted); margin-top: .25rem; }
@media (max-width: 900px) { .why { grid-template-columns: 1fr; } .why-aside { position: static; } }
@media (max-width: 560px) { .why-items { grid-template-columns: 1fr; } }

/* Voices carousel */
.voices-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.carousel-btns { display: flex; gap: 8px; }
.carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 20px; margin-top: 2.5rem; scrollbar-width: thin; }
.carousel::-webkit-scrollbar { height: 6px; } .carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }
.quote { margin: 0; flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.quote blockquote { margin: 0; font: 500 1.15rem/1.5 var(--font-display); letter-spacing: -.005em; }
.quote.lead { background: var(--deep); border-color: var(--deep); color: #fff; }
.quote.lead blockquote { font-size: 1.5rem; line-height: 1.3; }
.quote.lead figcaption span { color: #c3dbef; }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote figcaption img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.quote figcaption strong { display: block; font-weight: 600; line-height: 1.25; }
.quote figcaption span { display: block; font-size: .88rem; color: var(--muted); line-height: 1.35; }
.quote .result { display: inline-flex; align-self: flex-start; gap: .4rem; align-items: center; padding: .4rem .8rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: .88rem; }
@media (max-width: 900px) { .carousel .quote { flex-basis: 84%; } }
.grid-auto .quote { flex: none; }
.hero-grid > *, .split > *, .admit > *, .why > *, .stages > *, .program > *, .leader > * { min-width: 0; }

/* Sports marquee */
.marquee { overflow: hidden; margin-top: 2.5rem; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.sport { width: 260px; flex-shrink: 0; margin: 0; }
.sport img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); }
.sport figcaption { margin-top: .6rem; font: 600 1.02rem/1.2 var(--font-display); }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }

/* Admissions block */
.admit { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.ages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 2rem; }
.age { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 16px; }
.age strong { display: block; font: 600 1.1rem/1.2 var(--font-display); color: var(--brand-ink); }
:root[data-theme="dark"] .age strong { color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .age strong { color: var(--brand); } }
.age span { display: block; margin-top: .35rem; font-size: .9rem; color: var(--muted); line-height: 1.35; }
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding-bottom: 22px; position: relative; }
.steps li::before { counter-increment: s; content: counter(s); width: 40px; height: 40px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font: 600 1rem/1 var(--font-display); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 44px; bottom: 4px; width: 1px; background: var(--line); }
.steps strong { display: block; font: 600 1.08rem/1.3 var(--font-display); margin-top: 8px; }
.steps p { color: var(--muted); font-size: .96rem; margin-top: .2rem; }
@media (max-width: 900px) { .admit { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ages { grid-template-columns: 1fr 1fr; } }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.form-card h3, .form-card .form-title { font-size: 1.5rem; }
.form-grid { display: grid; gap: 16px; margin-top: 1.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem; border-radius: var(--r-input); border: 1.5px solid var(--line); background: var(--bg);
  color: var(--ink); font: 400 1rem/1.4 var(--font-body); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field select {
  appearance: none; padding-right: 2.6rem; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='%2356687c' stroke-width='24' stroke-linecap='round' stroke-linejoin='round' d='M208 96l-80 80-80-80'/%3E%3C/svg%3E") no-repeat right .95rem center / 14px;
}
/* Chrome 135+: style the open list too; other browsers keep the native list */
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select { display: flex; align-items: center; background-image: none; padding-right: .95rem; }
  .field select::picker-icon { content: ""; width: 14px; height: 14px; margin-left: auto; background: var(--muted); transition: rotate .2s var(--ease);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='black' stroke-width='24' stroke-linecap='round' stroke-linejoin='round' d='M208 96l-80 80-80-80'/%3E%3C/svg%3E") center / contain no-repeat; }
  .field select:open::picker-icon { rotate: 180deg; }
  .field select::picker(select) {
    margin-top: 6px; padding: .4rem; max-height: min(320px, 50vh); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  }
  .field select option { padding: .6rem .8rem; border-radius: 10px; color: var(--ink-2); font: 400 .98rem/1.3 var(--font-body); cursor: pointer; }
  .field select option:hover, .field select option:focus-visible { background: var(--brand-soft); color: var(--brand); outline: none; }
  .field select option:checked { color: var(--brand); font-weight: 600; }
  .field select option::checkmark { content: ""; }
}
.field input[type="file"] { padding: .5rem; color: var(--muted); font-size: .95rem; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: .9rem; padding: .6rem 1.1rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand-soft); color: var(--brand); font: 600 .92rem/1 var(--font-body); transition: background .2s, color .2s;
}
.field input[type="file"]:hover::file-selector-button { background: var(--brand); color: #fff; }
/* Date picker (site.js swaps the native one on mouse devices) */
.datefield { position: relative; }
.datefield input { padding-right: 2.8rem; cursor: pointer; }
.datefield > i { position: absolute; right: .95rem; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; font-size: 1.15rem; }
.cal {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 300px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head strong { font: 600 1rem/1 var(--font-display); color: var(--ink); }
.cal-head button { width: 34px; height: 34px; border-radius: 999px; border: 0; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.cal-head button:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid span { font-size: .75rem; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-grid button { aspect-ratio: 1; border: 0; border-radius: 999px; background: none; color: var(--ink); font: 500 .9rem/1 var(--font-body); cursor: pointer; }
.cal-grid button:hover:not(:disabled), .cal-grid button:focus-visible { background: var(--brand-soft); color: var(--brand); outline: none; }
.cal-grid button.today { box-shadow: inset 0 0 0 1.5px var(--line); }
.cal-grid button[aria-selected="true"] { background: var(--brand); color: #fff; }
.cal-grid button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.field .help { font-size: .84rem; color: var(--muted); }
.field .err { font-size: .84rem; color: var(--accent); font-weight: 600; display: none; }
:root[data-theme="dark"] .field .err { color: #ff8a7f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field .err { color: #ff8a7f; } }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--accent); }
.field.invalid .err { display: block; }
.form-card .btn { justify-content: center; }
.form-success { display: none; text-align: center; padding: 2rem 0 1rem; }
.form-success i { font-size: 3rem; color: var(--brand); }
.form-success h3 { margin-top: .75rem; }
.form-success p { color: var(--muted); margin-top: .5rem; }
form.is-sent .form-grid { display: none; }
form.is-sent .form-success { display: block; animation: fadeUp .5s var(--ease); }
.btn.is-loading { opacity: .75; pointer-events: none; }
.note { font-size: .82rem; color: var(--muted); }

/* Page header (inner pages) */
.page-head { padding: clamp(28px, 4vw, 56px) 0 0; }
.crumbs { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); list-style: none; padding: 0; margin: 0 0 1.25rem; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.page-head .lede { margin-top: 1rem; }
.page-banner { margin-top: clamp(22px, 3vw, 36px); border-radius: var(--r-media); overflow: hidden; aspect-ratio: 21 / 8; background: var(--surface-2); }
.page-banner img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .page-banner { aspect-ratio: 16 / 9; } }

/* Generic content layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.top { align-items: start; }
.split img.media { border-radius: var(--r-media); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.prose { max-width: 68ch; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--ink-2); }
.pull { font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.3 var(--font-display); letter-spacing: -.015em; max-width: 30ch; }
.pull span { color: var(--brand); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
:is(.stack, .stack-lg) > * + .checklist { margin-top: 1.25rem; }
.checklist.cols-2 { grid-template-columns: 1fr 1fr; column-gap: 40px; }
@media (max-width: 640px) { .checklist.cols-2 { grid-template-columns: 1fr; } }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--ink-2); }
.checklist li i { color: var(--brand); font-size: 1.25rem; margin-top: 2px; }
.cols-2 { columns: 2; column-gap: 40px; } .cols-2 li { break-inside: avoid; margin-bottom: 12px; }
@media (max-width: 640px) { .cols-2 { columns: 1; } }

/* Leader cards */
.leader { display: grid; grid-template-columns: 320px 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(22px, 2.5vw, 32px) 0; }
.leader + .leader { border-top: 1px solid var(--line); }
.leader img { border-radius: var(--r-media); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); }
.leader .role { color: var(--brand); font-weight: 600; margin-bottom: .5rem; display: block; }
.leader h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.leader .prose { margin-top: 1.25rem; }
@media (max-width: 760px) { .leader { grid-template-columns: 1fr; } .leader img { max-width: 320px; } }

/* Feature rows (life page) */
.program { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(22px, 2.5vw, 32px) 0; }
.program + .program { border-top: 1px solid var(--line); }
.program img { border-radius: var(--r-media); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.program:nth-child(even) > figure { order: 2; }
.program figure { margin: 0; }
@media (max-width: 900px) { .program { grid-template-columns: 1fr; } .program:nth-child(even) > figure { order: 0; } }
.toc { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; position: sticky; top: 72px; background: var(--bg); z-index: 5; scrollbar-width: none; }
/* fade an edge only while more chips sit beyond it (site.js sets the classes) */
.toc.more-r { mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.toc.more-l { mask-image: linear-gradient(90deg, transparent, #000 56px); }
.toc.more-l.more-r { mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.toc a { flex-shrink: 0; text-decoration: none; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: .92rem; background: var(--surface); }
.toc a:hover, .toc a.is-active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* Card grids */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
@media (max-width: 400px) { .btn { white-space: normal; text-align: center; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; }
.card h3 { font-size: 1.12rem; }
.card p { color: var(--muted); font-size: .95rem; margin-top: .4rem; }
.doc-link { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
.doc-link:hover { border-color: var(--brand); transform: translateY(-2px); }
.doc-link > i:first-child { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; }
.doc-link > i:last-child { color: var(--muted); }
.doc-link span { font-weight: 500; line-height: 1.35; font-size: .96rem; }
.sport-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sport-grid figure { margin: 0; }
.sport-grid img { border-radius: var(--r-card); aspect-ratio: 1; object-fit: cover; width: 100%; }
.sport-grid figcaption { margin-top: .55rem; font: 600 1rem/1.2 var(--font-display); }
@media (max-width: 760px) { .sport-grid { grid-template-columns: 1fr 1fr; } }
.stat-row { display: flex; flex-wrap: wrap; gap: 36px; }
.stat-row strong { display: block; font: 600 2.4rem/1 var(--font-display); color: var(--brand); letter-spacing: -.03em; }
.stat-row span { color: var(--muted); font-size: .92rem; }
.houses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 1.25rem; }
.house { border-radius: var(--r-card); padding: 16px; font: 600 1rem/1.2 var(--font-display); color: #fff; }
@media (max-width: 560px) { .houses { grid-template-columns: 1fr 1fr; } }
.contact-list { display: grid; gap: 20px; }
.contact-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.contact-item > i { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.4rem; }
.contact-item strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.contact-item a { text-decoration: none; } .contact-item a:hover { color: var(--brand); }
.map { border-radius: var(--r-media); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 21 / 8; margin-top: 3rem; background: var(--surface-2); }
.map iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .map { aspect-ratio: 1; } }

/* CTA band */
.cta-band { background: var(--brand-ink); color: #fff; border-radius: var(--r-media); padding: clamp(24px, 3.5vw, 44px); display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center; position: relative; overflow: hidden; }
:root[data-theme="dark"] .cta-band { background: #0e2c47; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: #0e2c47; } }
.cta-band p { color: #cfe3f4; margin-top: .8rem; max-width: 52ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .4); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { margin-top: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 24px; font-size: .96rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid .foot-title { font: 600 .95rem/1 var(--font-body); margin-bottom: 1rem; color: var(--ink); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.foot-grid a { color: var(--muted); text-decoration: none; } .foot-grid a:hover { color: var(--brand); }
.foot-grid address { font-style: normal; color: var(--muted); margin-top: 1rem; line-height: 1.6; }
.socials { display: flex; gap: 8px; margin-top: 1.25rem; }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; color: var(--muted); font-size: .88rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
/* phones: brand block full width, link groups two-up */
@media (max-width: 520px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Floating WhatsApp */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 999px; background: #1f9d55; color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 10px 30px -8px rgb(16 90 50 / .6); text-decoration: none; transition: transform .25s var(--ease); }
.fab:hover { transform: translateY(-2px) scale(1.04); }

/* Motion */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .reveal.in { opacity: 1; transform: none; }
  .hero .intro > * { animation: fadeUp .9s var(--ease) both; }
  .hero .intro > :nth-child(2) { animation-delay: .08s; }
  .hero .intro > :nth-child(3) { animation-delay: .16s; }
  .hero .intro > :nth-child(4) { animation-delay: .24s; }
  .hero-media figure { animation: fadeUp 1s var(--ease) both; }
  .hero-media .m2 { animation-delay: .12s; } .hero-media .m3 { animation-delay: .22s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee { mask-image: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- Akshara tree (interactive emblem) */
/* this page is a full-screen piece: no utility bar, and the stage fills the window below the header */
.immersive .utility { display: none; }
.immersive .site-header { background: color-mix(in srgb, var(--bg) 72%, transparent); }
.tree-hero {
  position: relative; overflow: hidden; isolation: isolate;
  /* grows with its content, so a large browser font never clips the text */
  min-height: calc(100dvh - 72px);
  /* same content edges as the header and every other page */
  padding: 32px max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  display: grid; grid-template-columns: min(360px, 30%) minmax(0, 1fr); column-gap: 3vw; align-items: center;
  --sky-1: #ffffff; --sky-2: #e3effa; --sky-3: #c9def2; --ray: rgb(255 255 255 / .55); --vignette: rgb(7 64 106 / .16); --spot: rgb(255 255 255 / .55);
  background: radial-gradient(70% 80% at 50% 38%, var(--sky-1) 0%, var(--sky-2) 42%, var(--sky-3) 100%);
}
:root[data-theme="dark"] .tree-hero { --sky-1: #1d5585; --sky-2: #0d2640; --sky-3: #050d16; --ray: rgb(120 190 245 / .10); --vignette: rgb(0 0 0 / .55); --spot: rgb(110 180 240 / .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tree-hero { --sky-1: #1d5585; --sky-2: #0d2640; --sky-3: #050d16; --ray: rgb(120 190 245 / .10); --vignette: rgb(0 0 0 / .55); --spot: rgb(110 180 240 / .16); } }
.tree-hero::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 180px 40px var(--vignette); }

/* slow light rays behind the crown, and a soft light that follows the pointer (plain layers: no SVG repaint) */
.tree-rays { position: absolute; z-index: 0; left: 50%; top: 42%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgb(0 0 0 / .5) 30%, transparent 62%); mask-image: radial-gradient(closest-side, #000 0%, rgb(0 0 0 / .5) 30%, transparent 62%);
  opacity: .9; }
@media (prefers-reduced-motion: no-preference) { .tree-rays { animation: rays 160s linear infinite; } }
@keyframes rays { to { transform: rotate(360deg); } }
.tree-spot { position: absolute; z-index: 1; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--spot), transparent); opacity: 0; transition: opacity .6s var(--ease); will-change: transform; }
.tree-hero.lit .tree-spot { opacity: 1; }
.wind-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* the tree: as tall as the window allows */
.tree-stage { position: relative; z-index: 2; height: min(calc(100dvh - 136px), 900px); max-width: 100%; justify-self: center; touch-action: manipulation; }
.tree-svg { width: 100%; height: 100%; display: block; overflow: visible; -webkit-tap-highlight-color: transparent; }

/* left column: title, wind switch and every leaf */
.tree-intro { position: relative; z-index: 5; display: grid; gap: .85rem; }
.tree-intro .crumbs { margin: 0 0 .4rem; }
.tree-intro h1 { font-size: clamp(2rem, 2.8vw, 2.9rem); letter-spacing: -.035em; }
.tree-intro .lede { font-size: 1.05rem; margin: 0; }
.tree-intro .more { color: var(--muted); font-size: .94rem; }
.tree-meta { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 0 2px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); margin-top: .3rem; }
.wind-toggle { width: 38px; height: 38px; flex-shrink: 0; }
.wind-label { font: 600 .92rem/1.3 var(--font-body); color: var(--brand); }
.wind-toggle[aria-pressed="true"] { background: var(--deep); color: #fff; border-color: var(--deep); }
.leaf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.leaf-chips button { cursor: pointer; font: 500 .8rem/1 var(--font-body); color: var(--ink-2); padding: .45rem .7rem; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.leaf-chips button i { font-size: .95em; }
.leaf-chips button:hover { border-color: var(--brand); color: var(--brand); }
.leaf-chips button[aria-pressed="true"] { background: var(--deep); color: #fff; border-color: var(--deep); }
.leaf-chips button.seen:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }

/* story card */
.tree-card {
  position: absolute; z-index: 6; right: max(var(--gutter), 2.5vw); top: 50%; width: min(360px, 24vw);
  border-radius: 24px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 40px 80px -30px rgb(4 30 56 / .45);
  opacity: 0; transform: translate(24px, -50%) scale(.98); pointer-events: none;
  transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.tree-card[hidden] { display: block; }
.tree-card:not(.open) { visibility: hidden; transition: opacity .35s var(--ease), transform .5s var(--ease), visibility 0s .5s; }
.tree-card.open { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.tree-card figure { margin: 0; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.tree-card figure img { width: 100%; height: 100%; object-fit: cover; }
.tree-card .icon-hero { display: grid; place-items: center; height: 100%; font-size: 4.5rem; color: var(--brand); background: var(--brand-soft); }
.tree-card .body { padding: 20px 22px 22px; display: grid; gap: .6rem; }
.tree-card .kicker { display: inline-flex; align-items: center; gap: .45rem; color: var(--brand); font-weight: 600; font-size: .88rem; }
.tree-card h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.tree-card p { color: var(--ink-2); font-size: .98rem; }
.tree-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 36px; height: 36px; background: var(--surface); }
.tree-card.swap figure img { animation: photoIn .7s var(--ease) both; }
.tree-card.swap .body > * { animation: fadeUp .55s var(--ease) both; }
.tree-card.swap .body > :nth-child(2) { animation-delay: .05s; } .tree-card.swap .body > :nth-child(3) { animation-delay: .1s; } .tree-card.swap .body > :nth-child(4) { animation-delay: .15s; }
@keyframes photoIn { from { clip-path: inset(0 0 100% 0); transform: scale(1.08); } to { clip-path: inset(0 0 0 0); transform: none; } }

/* tooltip that follows the pointer */
.tree-tip { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 5; padding: .45rem .75rem; border-radius: 999px;
  background: var(--deep); color: #fff; font: 600 .88rem/1 var(--font-body); white-space: nowrap;
  opacity: 0; transform: translate(-50%, calc(-100% - 14px)) scale(.9); transition: opacity .2s, transform .25s var(--ease); }
.tree-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }

/* the tree itself */
.tree-svg { --leaf-edge: #eef5fc; }
:root[data-theme="dark"] .tree-svg { --leaf-edge: #0b1d30; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tree-svg { --leaf-edge: #0b1d30; } }
.leaf, .leaf-in, .trunk-in, .drawing, .lift { transform-box: view-box; }
.trunk-in { transform-origin: 253px 720px; }
.leaf { cursor: pointer; outline: none; --fill: var(--base); }
/* colours come from custom properties so the lifted copies (<use>) inherit them */
.leaf-shape { fill: var(--fill); }
.leaf-edge { fill: none; stroke: var(--leaf-edge); stroke-width: 5; stroke-linejoin: round; pointer-events: none; }
.drawing { fill: var(--icon, #fff); pointer-events: none; }
.pic { stroke: var(--icon, #fff); stroke-linecap: round; stroke-linejoin: round; }
.figure { stroke: var(--icon, #fff); stroke-linecap: round; stroke-linejoin: round; }
.leaf:focus-visible .leaf-edge { stroke: var(--brand); stroke-width: 5; }
/* lifted copies: the real leaves never move, so nothing can end up hidden */
.lift { pointer-events: none; opacity: 0; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), opacity .18s var(--ease); }
.lift.on { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1.08); }
.lift-sel { --fill: url(#g-sel); --icon: #07406a; }
.lift-sel.on { transform: translate(var(--dx), var(--dy)) scale(1.12); }

/* narrower screens: title and chips above the tree, story card as a bottom sheet */
@media (max-width: 1180px) {
  .tree-hero { min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; place-items: center; gap: 8px; padding-top: 20px; padding-bottom: 28px; }
  .tree-intro { width: 100%; max-width: 680px; text-align: center; justify-items: center; }
  .tree-intro .crumbs { justify-content: center; }
  .tree-intro .more { display: none; }
  .tree-meta { justify-content: center; border: 0; padding: 0; }
  .leaf-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); padding: 0 16px; }
  .leaf-chips::-webkit-scrollbar { display: none; }
  .leaf-chips button { flex-shrink: 0; }
  .tree-stage { height: min(calc(100dvh - 120px), 900px); }
  .tree-card { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: 520px; margin: 0 auto; max-height: 62dvh; overflow-y: auto; transform: translateY(24px); }
  .tree-card.open { transform: none; }
  .tree-card figure { aspect-ratio: 16 / 7; }
}
@media (max-width: 640px) {
  .tree-stage { height: auto; width: min(100%, 460px); }
  .tree-hero::after { box-shadow: inset 0 0 90px 10px var(--vignette); }
}

/* ---------------------------------------------------------------- homepage: notice bar and emblem tree */
.notice-bar { background: var(--brand-soft); border-bottom: 1px solid var(--line); font-size: .94rem; }
.notice-bar .wrap { display: flex; align-items: center; gap: .6rem; min-height: 46px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.notice-bar i.ph-megaphone-simple { color: var(--brand); font-size: 1.2rem; }
.notice-bar a { margin-left: auto; font-weight: 600; color: var(--brand); text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; }
.notice-bar a:hover { text-decoration: underline; }
@media (max-width: 640px) { .notice-bar a { margin-left: 0; } }
.hero-tree { position: relative; display: grid; justify-items: center; gap: 14px; }
.hero-tree::before { content: ""; position: absolute; z-index: 0; left: 50%; top: 44%; width: 118%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 24%, transparent), transparent 72%); pointer-events: none; }
.hero-tree .tree-stage { height: clamp(440px, 76vh, 720px); max-width: 100%; }
.hero-tree-link { position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-tree .tree-stage { height: auto; width: min(100%, 420px); } }

/* ---------------------------------------------------------------- news and events */
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.news-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2rem; }
@media (max-width: 900px) { .news-grid-3 { grid-template-columns: 1fr 1fr; } .news-grid-3 > :last-child { display: none; } }
@media (max-width: 640px) { .news-grid, .news-grid-3 { grid-template-columns: 1fr; } .news-grid-3 > :last-child { display: grid; } }
.news-card { display: grid; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.news-card .film.news-media { margin: 0; border-radius: 0; aspect-ratio: 16 / 9; }
.news-media img { opacity: 1; }
.news-media button { background: linear-gradient(180deg, transparent 50%, rgb(4 20 36 / .35)); justify-content: center; padding: 0; }
.news-media .play { width: 58px; height: 58px; font-size: 1.4rem; box-shadow: 0 10px 30px -8px rgb(0 0 0 / .5); }
.news-body { padding: 18px 20px 22px; display: grid; gap: .45rem; }
.news-body time { font-size: .84rem; font-weight: 600; color: var(--brand); }
.news-body h2, .news-body h3 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.01em; }
.news-body p { color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.big { grid-template-columns: 1.25fr 1fr; align-items: center; }
.news-card.big .news-body { padding: 26px 30px; gap: .7rem; }
.news-card.big h2, .news-card.big h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.news-card.big p { -webkit-line-clamp: 5; font-size: 1rem; }
@media (max-width: 900px) { .news-card.big { grid-template-columns: 1fr; } }
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.notices { position: sticky; top: 96px; display: grid; gap: 12px; }
.notices h2 { font-size: 1.4rem; margin-bottom: .2rem; }
.notice { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .25s var(--ease); }
.notice:hover { border-color: var(--brand); transform: translateY(-2px); }
.notice > i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; }
.notice strong { display: block; font-family: var(--font-display); font-weight: 600; }
.notice p { color: var(--muted); font-size: .9rem; margin: .2rem 0 .4rem; }
.notice .link-arrow { font-size: .9rem; }
.notices .btn { justify-content: center; }
@media (max-width: 1000px) { .news-layout { grid-template-columns: 1fr; } .notices { position: static; } }
.hero { overflow-x: clip; }
.notice-bar .wrap > span { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) { .notice-bar .wrap { flex-wrap: nowrap; align-items: flex-start; font-size: .9rem; } .notice-bar .wrap > span { flex-basis: 0; } .notice-bar a { white-space: nowrap; } }

/* homepage hero: give the tree the larger share */
.hero-grid:has(.hero-tree) { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 900px) { .hero-grid:has(.hero-tree) { grid-template-columns: 1fr; } }
.hero-grid:has(.hero-tree) h1 { font-size: clamp(2.2rem, 3.9vw, 3.4rem); }
