/* =========================================================
   MITstem International School — main stylesheet
   Brand colours taken from the logo.
   To change a colour site-wide, edit the variables below.
   ========================================================= */
:root {
  --red: #e82428;          /* logo red (decorative, large text) */
  --red-dark: #c4161c;     /* AA-contrast red for buttons and small text */
  --charcoal: #232322;     /* logo dark bar */
  --ink: #2b2b2a;
  --grey: #6e6e70;         /* logo grey "stem" */
  --muted: #5d5d60;
  --line: #e6e6e8;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 20, 20, .08);
  --shadow-lg: 0 18px 45px rgba(20, 20, 20, .14);
  --max: 1200px;
  --head: "Exo 2", "Segoe UI", Arial, sans-serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .6em; color: var(--charcoal); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--charcoal); color: #e9e9ea; }
.section--dark h2, .section--dark h3 { color: #fff; }
.eyebrow {
  display: inline-block; font-family: var(--head); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; font-size: .8rem; color: var(--red-dark); margin-bottom: .7rem;
}
.section--dark .eyebrow { color: #ff6b6e; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }
.section--dark .lead { color: #c9c9cc; }
.todo { background: #fff4c2; color: #6b5200; padding: 0 .35em; border-radius: 4px; font-size: .85em; font-weight: 600; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--charcoal); color: #fff; padding: .6rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px;
  font-family: var(--head); font-weight: 700; letter-spacing: .02em; text-decoration: none;
  border: 2px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, color .2s; cursor: pointer; font-size: 1rem;
}
.btn--primary { background: var(--red-dark); color: #fff; box-shadow: 0 8px 20px rgba(196, 22, 28, .3); }
.btn--primary:hover { background: #a91217; transform: translateY(-2px); }
.btn--ghost { border-color: currentColor; color: var(--charcoal); background: transparent; }
.btn--ghost:hover { background: var(--charcoal); color: #fff; }
.section--dark .btn--ghost, .hero .btn--ghost { color: #fff; }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { background: #fff; color: var(--charcoal); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .07); border-color: var(--line); }
.topbar { background: var(--charcoal); color: #ddd; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; gap: 1rem; }
.brand img { height: 52px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  display: block; padding: .55rem .85rem; border-radius: 8px; text-decoration: none; color: var(--charcoal);
  font-family: var(--head); font-weight: 600; font-size: .98rem; position: relative;
}
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 2px;
  background: var(--red); transform: scaleX(0); transition: transform .25s; transform-origin: left;
}
.nav-menu a:not(.btn):hover::after, .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }
.nav-menu a[aria-current="page"] { color: var(--red-dark); }
.nav-menu .btn { padding: .6rem 1.2rem; margin-left: .4rem; color: #fff; }
.nav-toggle {
  display: none; background: none; border: 0; width: 46px; height: 46px; border-radius: 10px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 24px; height: 2.5px; background: var(--charcoal); border-radius: 2px; content: ""; transition: .3s;
}
.nav-toggle span { top: 22px; }
.nav-toggle span::before { left: 0; top: -8px; }
.nav-toggle span::after { left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); background: #fff; flex-direction: column; align-items: stretch;
    padding: 6rem 1.4rem 2rem; gap: .2rem; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .3s ease; z-index: -1;
    overflow-y: auto; visibility: hidden; transition: transform .3s ease, visibility 0s .3s;
  }
  .nav-menu.open { transform: none; visibility: visible; transition: transform .3s ease; }
  .nav-menu a { font-size: 1.1rem; padding: .85rem 1rem; }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-menu .btn { margin: 1rem 0 0; justify-content: center; }
  .brand img { height: 44px; }
  .topbar .hide-sm { display: none; }
}
.nav-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 90; }
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(232, 36, 40, .35), transparent 60%),
    linear-gradient(135deg, #171717 0%, #2a2a29 55%, #3a1214 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.4) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.hero h1 { color: #fff; }
.hero h1 .accent { color: #ff4d51; }
.hero p.lead { color: #d6d6d8; max-width: 560px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; margin-bottom: 1.3rem; font-weight: 600;
}
.hero-tag i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d51; box-shadow: 0 0 0 4px rgba(255, 77, 81, .25); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); transform: perspective(1200px) rotateY(-8deg) rotateX(2deg); transition: transform .6s; }
.hero-visual:hover img { transform: perspective(1200px) rotateY(0) rotateX(0); }
.hero-visual::after {
  content: ""; position: absolute; inset: auto -12px -12px auto; width: 60%; height: 60%; border: 3px solid var(--red); border-radius: 18px; z-index: -1;
}
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; } .hero-visual img { transform: none; } }

.page-hero {
  background: linear-gradient(135deg, #1b1b1b, #2c2c2b 60%, #461417); color: #fff; padding: clamp(3rem, 7vw, 5rem) 0; position: relative; overflow: hidden;
}
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(232, 36, 40, .25); }
.page-hero h1 { color: #fff; margin-bottom: .4rem; }
.page-hero p { color: #d0d0d3; max-width: 640px; margin: 0; font-size: 1.1rem; }
.breadcrumb { font-size: .85rem; margin-bottom: 1rem; color: #bbb; }
.breadcrumb a { color: #fff; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); margin-top: -3rem; position: relative; z-index: 2; }
.stat { padding: 1.6rem 1.2rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--head); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--red-dark); font-weight: 800; }
.stat span { font-size: .92rem; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; position: relative;
  transition: transform .3s, box-shadow .3s, border-color .3s; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: var(--red); transition: width .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { width: 100%; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(135deg, var(--red), #b0141a); color: #fff; box-shadow: 0 8px 18px rgba(232, 36, 40, .3);
}
.icon svg { width: 26px; height: 26px; }
.section--dark .card { background: #2e2e2d; border-color: #3b3b3a; color: #ddd; }
.section--dark .card p { color: #c4c4c7; }

.media-card { padding: 0; }
.media-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .5s; }
.media-card:hover img { transform: scale(1.05); }
.media-card .body { padding: 1.4rem 1.5rem 1.6rem; }
.media-card .media { overflow: hidden; position: relative; }
.badge {
  position: absolute; left: 1rem; top: 1rem; background: var(--red-dark); color: #fff; font-family: var(--head); font-weight: 800;
  padding: .3rem .75rem; border-radius: 8px; font-size: .9rem; z-index: 1;
}
.tagline { font-size: .85rem; font-weight: 600; color: var(--red-dark); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.img-stack { position: relative; padding-bottom: 3rem; }
.img-stack img:nth-child(2) { position: absolute; width: 55%; right: -4%; bottom: 0; border: 6px solid #fff; }

.checklist { list-style: none; padding: 0; margin: 1.2rem 0; }
.checklist li { padding-left: 2rem; position: relative; margin-bottom: .7rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red-dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- Pathway ---------- */
.pathway { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: yr; }
.pathway .media-card img { aspect-ratio: 4/3; }
.pathway h3 { font-size: 1.02rem; }
.pathway p { font-size: .9rem; }
@media (max-width: 1024px) { .pathway { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .pathway { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .pathway { grid-template-columns: 1fr; } }
.flow { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: center; margin-top: 2rem; }
.flow span { background: #fff; border: 1px solid var(--line); padding: .55rem 1.1rem; border-radius: 999px; font-family: var(--head); font-weight: 700; }
.section--dark .flow span { background: #2e2e2d; border-color: #444; color: #fff; }
.flow b { color: var(--red); font-size: 1.2rem; }

/* ---------- Tabs / filters ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tabs.center { justify-content: center; }
.tab {
  border: 2px solid var(--line); background: #fff; padding: .55rem 1.15rem; border-radius: 999px; cursor: pointer;
  font-family: var(--head); font-weight: 700; color: var(--charcoal); font-size: .95rem; transition: .2s;
}
.tab:hover { border-color: var(--red); }
.tab[aria-selected="true"] { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.is-hidden { display: none !important; }

.subject-list { columns: 2; list-style: none; padding: 0; margin: 0; }
.subject-list li { padding: .35rem 0 .35rem 1.1rem; position: relative; break-inside: avoid; }
.subject-list li::before { content: ""; position: absolute; left: 0; top: .9em; width: 7px; height: 7px; background: var(--red); border-radius: 2px; }
.stem-tag { font-size: .7rem; background: #ffe5e6; color: var(--red-dark); padding: .1rem .4rem; border-radius: 4px; font-weight: 700; margin-left: .3rem; vertical-align: middle; }

/* ---------- Accordion ---------- */
.accordion details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
.accordion summary {
  cursor: pointer; padding: 1.2rem 1.5rem; font-family: var(--head); font-weight: 700; font-size: 1.1rem; list-style: none;
  display: flex; align-items: center; gap: 1rem; color: var(--charcoal);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .yr { background: var(--red-dark); color: #fff; border-radius: 8px; padding: .25rem .6rem; font-size: .9rem; flex: none; }
.accordion summary::after { content: "+"; margin-left: auto; font-size: 1.6rem; color: var(--red-dark); transition: transform .3s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 1.5rem 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.accordion .acc-body h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--red-dark); }
.accordion .acc-body ul { margin: 0; color: var(--muted); }
.accordion .acc-body li { margin-bottom: .35rem; }
@media (max-width: 700px) { .accordion .acc-body { grid-template-columns: 1fr; } }

/* ---------- Levels ---------- */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: end; }
.level { border-radius: var(--radius); padding: 1.4rem; color: #fff; }
.level h3 { color: #fff; font-size: 1.05rem; }
.level .age { font-family: var(--head); font-size: 1.6rem; font-weight: 800; }
.level ul { margin: .5rem 0 0; padding-left: 1.1em; font-size: .9rem; }
.level:nth-child(1) { background: #4a4a4c; min-height: 210px; }
.level:nth-child(2) { background: #3a3a3b; min-height: 240px; }
.level:nth-child(3) { background: #8f1418; min-height: 270px; }
.level:nth-child(4) { background: var(--red-dark); min-height: 300px; }
@media (max-width: 860px) { .levels { grid-template-columns: 1fr 1fr; } .level { min-height: 0 !important; } }
@media (max-width: 480px) { .levels { grid-template-columns: 1fr; } }

/* ---------- Bars (assessment) ---------- */
.bars { display: grid; gap: 1rem; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 50px; align-items: center; gap: 1rem; }
.bar { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red-dark), var(--red)); border-radius: inherit; width: 0; transition: width 1.2s ease; }
.bar-row strong { font-family: var(--head); text-align: right; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr 44px; } .bar-row .bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--red), var(--charcoal)); transform: translateX(-50%); }
.timeline li { position: relative; width: 50%; padding: 0 2.5rem 2rem 0; text-align: right; }
.timeline li:nth-child(even) { margin-left: 50%; padding: 0 0 2rem 2.5rem; text-align: left; }
.timeline li::before { content: ""; position: absolute; right: -9px; top: .3rem; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--red-dark); }
.timeline li:nth-child(even)::before { right: auto; left: -9px; }
.timeline .yr { font-family: var(--head); font-weight: 800; font-size: 1.4rem; color: var(--red-dark); }
.timeline p { margin: 0; color: var(--muted); }
@media (max-width: 700px) {
  .timeline::before { left: 9px; }
  .timeline li, .timeline li:nth-child(even) { width: 100%; margin: 0; padding: 0 0 1.8rem 2.6rem; text-align: left; }
  .timeline li::before, .timeline li:nth-child(even)::before { left: 0; right: auto; }
}

/* ---------- Highlight / achievement ---------- */
.highlight { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.highlight .num { font-family: var(--head); font-weight: 800; font-size: 2.6rem; color: var(--red); line-height: 1; }
.partners { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.partners span {
  font-family: var(--head); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--grey); padding: .8rem 1.6rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; letter-spacing: .02em; transition: .25s;
}
.partners span:hover { color: var(--red-dark); border-color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-weight: 600; font-size: .92rem; }
.section--dark .chips span { background: #2e2e2d; border-color: #444; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--red-dark), #8b1014); color: #fff; border-radius: 22px; padding: clamp(2rem, 5vw, 3.5rem); display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, .12); }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { margin: 0; color: #ffe0e1; }
.cta-band .btn--light { background: #fff; color: var(--red-dark); position: relative; z-index: 1; }
.cta-band .btn--light:hover { transform: translateY(-2px); }
.cta-band .btn--ghost { color: #fff; position: relative; z-index: 1; }
.cta-band .btn--ghost:hover { background: #fff; color: var(--red-dark); }

/* ---------- Gallery & lightbox ---------- */
.gallery { columns: 3 280px; column-gap: 1rem; }
.gallery figure { margin: 0 0 1rem; break-inside: avoid; border-radius: 12px; overflow: hidden; position: relative; cursor: zoom-in; background: #eee; }
.gallery button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.gallery button:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }
.gallery img { width: 100%; transition: transform .5s, filter .5s; }
.gallery figure:hover img { transform: scale(1.06); filter: brightness(.8); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .8rem; color: #fff; font-weight: 600; font-size: .92rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); opacity: 0; transform: translateY(8px); transition: .3s; pointer-events: none;
}
.gallery figure:hover figcaption, .gallery figure:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .gallery figcaption { opacity: 1; transform: none; } }

.lightbox { position: fixed; inset: 0; background: rgba(10, 10, 10, .93); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 4rem 1rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 80vh; max-width: min(1100px, 100%); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox p { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: #eee; margin: 0; padding: 0 1rem; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: var(--red-dark); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; margin-bottom: 1.4rem; align-items: start; }
.info-list .icon { width: 46px; height: 46px; margin: 0; border-radius: 12px; }
.info-list .icon svg { width: 20px; height: 20px; }
.info-list strong { display: block; font-family: var(--head); }
.info-list a { text-decoration: none; }
.form { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .93rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border: 1.5px solid #cfcfd3; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red-dark); box-shadow: 0 0 0 4px rgba(232, 36, 40, .15); }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -5000px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }
.map { border: 0; width: 100%; height: 380px; border-radius: var(--radius); display: block; filter: grayscale(.2); }

/* ---------- Footer ---------- */
.site-footer { background: #181818; color: #b9b9bc; padding: 4rem 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #e2e2e4; text-decoration: none; }
.site-footer a:hover { color: #ff6b6e; }
.footer-logo { width: 200px; margin-bottom: 1rem; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #2a2a2a; }
.social a:hover { background: var(--red-dark); }
.social svg { width: 18px; height: 18px; fill: #fff; }
.footer-bottom { border-top: 1px solid #2c2c2c; margin-top: 3rem; padding: 1.3rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Floating buttons ---------- */
.whatsapp {
  position: fixed; right: 1.2rem; bottom: 1.2rem; width: 58px; height: 58px; border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, .45); z-index: 200; transition: transform .2s;
}
.whatsapp:hover { transform: scale(1.08); }
.whatsapp svg { width: 30px; height: 30px; fill: #fff; }
.whatsapp::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: pulse 2s infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }
.to-top {
  position: fixed; right: 1.55rem; bottom: 5.4rem; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--charcoal); color: #fff;
  display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .3s; z-index: 200;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--red-dark); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Contact: Plan your visit ---------- */
.visit {
  color: #e9e9ea; position: relative; overflow: hidden;
  background: radial-gradient(800px 400px at 0% 100%, rgba(232, 36, 40, .3), transparent 60%), linear-gradient(135deg, #1b1b1b, #2c2c2b 60%, #3a1214);
}
.visit::before {
  content: ""; position: absolute; inset: 0; opacity: .1;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px;
}
.visit h2 { color: #fff; }
.visit .eyebrow { color: #ff6b6e; }
.visit .lead { color: #cfcfd2; }
.visit-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .visit-grid { grid-template-columns: 1fr; } }
.visit-media { position: relative; padding-bottom: 2.5rem; }
.visit-media img { width: 100%; border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); background: #fff; }
.visit-media::after { content: ""; position: absolute; left: -12px; top: -12px; width: 55%; height: 55%; border: 3px solid var(--red); border-radius: 18px; z-index: -1; }
.visit-pin {
  position: absolute; right: 1rem; bottom: 0; left: 1rem; max-width: 380px; margin-left: auto; display: flex; gap: .9rem; align-items: center;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--shadow-lg);
}
.visit-pin .icon { margin: 0; width: 46px; height: 46px; flex: none; animation: bob 2.4s ease-in-out infinite; }
.visit-pin strong { display: block; font-family: var(--head); color: var(--charcoal); }
.visit-pin span { font-size: .88rem; color: var(--muted); }
@keyframes bob { 50% { transform: translateY(-4px); } }
.visit-steps { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .9rem; }
.visit-steps li { display: flex; gap: 1rem; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: .9rem 1.1rem; }
.visit-steps li > span { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red-dark); color: #fff; display: grid; place-items: center; font-family: var(--head); font-weight: 800; }
.visit-steps strong { display: block; color: #fff; font-family: var(--head); }
.visit .btn--ghost { color: #fff; }
.visit .btn--ghost:hover { background: #fff; color: var(--charcoal); }

/* ---------- Top bar LMS / MOOC button ---------- */
.topbar .container { align-items: center; }
.topbar-right { display: inline-flex; align-items: center; gap: .9rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar .lms-btn {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--red-dark); color: #fff; font-family: var(--head); font-weight: 700;
  font-size: .82rem; letter-spacing: .02em; padding: .3rem .85rem; border-radius: 999px; transition: background .2s, transform .2s;
}
.topbar .lms-btn:hover { background: #fff; color: var(--red-dark); transform: translateY(-1px); }
@media (max-width: 960px) { .topbar .container { justify-content: center; } }

/* ---------- Form status message ---------- */
.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.ok { color: #13703a; background: #e7f7ee; border: 1px solid #b6e4c8; padding: .8rem 1rem; border-radius: 10px; }
.form-status.err { color: #8f1418; background: #fdecec; border: 1px solid #f3c2c3; padding: .8rem 1rem; border-radius: 10px; }
input.hp { position: absolute; left: -5000px; }

/* ---------- Intake banner (home, under menu bar) ---------- */
.intake-banner { background: #fff; border-bottom: 1px solid var(--line); }
.intake-banner a { display: block; }
.intake-banner img { width: 100%; height: auto; display: block; }
/* Smaller screens: show the banner taller, keeping the logo + "INTAKE 2027" + phone numbers readable */
@media (max-width: 1100px) {
  .intake-banner img { height: clamp(150px, 46vw, 400px); object-fit: cover; object-position: 0% 50%; }
}
/* Laptop screens: a little taller, trimming only the decorative edges */
@media (min-width: 1101px) and (max-width: 1700px) {
  .intake-banner img { height: 340px; object-fit: cover; object-position: 15% 50%; }
}

/* ---------- Intake popup ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.promo { position: fixed; inset: 0; z-index: 1100; background: rgba(10, 10, 10, .75); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.promo[hidden] { display: none; }
.promo-box { position: relative; background: #fff; border-radius: 16px; padding: .6rem; width: max-content; max-width: 96vw; max-height: 98vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: promoIn .35s ease; }
/* Flyer fills about three-quarters of the screen height (limited by width on narrow phones) */
.promo-box img { display: block; height: min(85vh, calc(92vw * 1.416)); width: auto; max-width: 100%; border-radius: 10px; }
.promo-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; padding: .7rem 0 .2rem; }
.promo-actions .btn { padding: .7rem 1.3rem; }
.promo-close { position: absolute; top: .4rem; right: .4rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--charcoal); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 1; }
.promo-close:hover { background: var(--red-dark); }
@keyframes promoIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- Home: full-width video stack ---------- */
.videos { background: #111; color: #fff; padding: clamp(3rem, 7vw, 5rem) 0 0; }
.videos h2 { color: #fff; }
.videos .eyebrow { color: #ff6b6e; }
.video-item { margin: 0; position: relative; }
.video-item + .video-item { border-top: 4px solid var(--red); }
.video-item video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 92vh; background: #000; object-fit: contain; }
.video-item figcaption {
  position: absolute; left: 1.2rem; top: 1.2rem; z-index: 1; pointer-events: none;
  background: rgba(196, 22, 28, .92); color: #fff; font-family: var(--head); font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; font-size: clamp(.85rem, 1.6vw, 1.1rem); padding: .45rem 1rem; border-radius: 8px;
}

/* ---------- STEM subject cards + detail popups ---------- */
.subj-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.subj-card .media img { aspect-ratio: 4 / 3; }
.subj-more { display: inline-block; margin-top: .6rem; font-family: var(--head); font-weight: 700; color: var(--red-dark); }
.subj-link:hover .subj-more { text-decoration: underline; }
.subj-link:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: var(--radius); }

.subject-dialog { width: min(980px, 94vw); max-height: 92vh; padding: 0; border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: auto; color: var(--ink); }
.subject-dialog::backdrop { background: rgba(10,10,10,.72); }
.subject-dialog[open] { animation: promoIn .3s ease; }
.sd-head { position: sticky; top: 0; z-index: 2; background: linear-gradient(120deg, var(--charcoal), #3a1214); color: #fff; padding: 1.5rem 4rem 1.3rem 1.8rem; }
.sd-head h2 { color: #fff; margin: .4rem 0 .2rem; font-size: clamp(1.3rem, 3vw, 1.9rem); }
.sd-head p { margin: 0; color: #d8d8db; }
.sd-year { display: inline-block; background: var(--red-dark); color: #fff; font-family: var(--head); font-weight: 800; padding: .2rem .7rem; border-radius: 6px; font-size: .9rem; }
.sd-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.sd-close:hover { background: var(--red-dark); }
.sd-body { padding: 1.6rem 1.8rem 2rem; }
.sd-focus { font-family: var(--head); font-weight: 700; color: var(--red-dark); font-size: 1.1rem; margin-top: 0; }
.sd-block { margin-top: 1.6rem; }
.sd-block h3 { font-size: 1.1rem; }
.sd-block h3 small { display: block; font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.sd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.sd-cols ul:not(.checklist) { color: var(--muted); padding-left: 1.1em; }
.sd-cols li { margin-bottom: .4rem; }
.bloom { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.bloom li { display: grid; grid-template-columns: 130px 1fr; align-items: stretch; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.bloom li span { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--head); font-weight: 800; font-size: .95rem; padding: .6rem; }
.bloom li p { margin: 0; padding: .65rem 1rem; color: var(--ink); }
.bloom .bl-1 span { background: #6e6e70; } .bloom .bl-2 span { background: #55555a; } .bloom .bl-3 span { background: #3a3a3b; }
.bloom .bl-4 span { background: #8f1418; } .bloom .bl-5 span { background: #b3161c; } .bloom .bl-6 span { background: var(--red); }
.sd-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sd-pill { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red-dark); border-radius: 10px; padding: 1rem 1.2rem; }
.sd-pill h4 { margin: 0 0 .3rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--red-dark); }
.sd-pill p { margin: 0; }
.sd-demo { grid-column: 1 / -1; border-left-color: var(--charcoal); }
.sd-evidence { background: var(--bg-soft); border-radius: 12px; padding: 1rem 1.2rem; }
.sd-evidence h4 { margin: 0 0 .3rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sd-evidence p { margin: 0; }
.sd-cta { margin: 1.6rem 0 0; text-align: center; }
@media (max-width: 700px) {
  .sd-cols, .sd-links { grid-template-columns: 1fr; }
  .bloom li { grid-template-columns: 1fr; }
  .bloom li span { justify-content: flex-start; padding: .4rem 1rem; }
  .sd-head { padding: 1.2rem 3.5rem 1rem 1.2rem; }
  .sd-body { padding: 1.2rem; }
}

/* ---------- Fee structure page ---------- */
.fee-sub { margin: .2rem 0 .4rem; font-weight: 700; color: var(--charcoal); }
.fee-curr .card:first-child .tagline { color: var(--red-dark); }
.fee-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; max-width: 820px; margin: 0 auto; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.fee-table th, .fee-table td { padding: .9rem 1.2rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fee-table th:first-child { text-align: left; }
.fee-table thead th { background: var(--charcoal); color: #fff; font-family: var(--head); font-weight: 700; }
.fee-table thead th:last-child { background: var(--red-dark); }
.fee-table tbody th { font-family: var(--head); font-weight: 700; color: var(--charcoal); }
.fee-table tbody td:last-child { font-weight: 700; color: var(--red-dark); background: #fff5f5; }
.fee-table tbody tr:hover td, .fee-table tbody tr:hover th { background: #fafafa; }
.fee-waiver { background: #e7f7ee; border: 1px solid #b6e4c8; color: #13502c; border-radius: 12px; padding: 1rem 1.3rem; margin-bottom: 1.5rem; }
.fee-cards .card { position: relative; }
.fee-letter { position: absolute; top: 1rem; right: 1.2rem; width: 34px; height: 34px; border-radius: 50%; background: var(--charcoal); color: #fff; display: grid; place-items: center; font-family: var(--head); font-weight: 800; }
.fee-amt { font-family: var(--head); font-weight: 800; font-size: 1.35rem; color: var(--red-dark) !important; margin: .2rem 0; }
.fee-amt small { font-family: var(--body); font-weight: 600; font-size: .8rem; color: var(--muted); margin-left: .3rem; }
.fee-notes { margin-top: 2rem; background: var(--bg-soft); border-radius: 12px; padding: 1.3rem 1.5rem; }
.fee-notes h3 { font-size: 1.05rem; }
.fee-notes ul { margin: 0; color: var(--muted); }
.fee-notes li { margin-bottom: .5rem; }
/* menu now has 7 items: tighten spacing on mid-size screens */
@media (min-width: 961px) and (max-width: 1240px) {
  .nav-menu a { padding: .55rem .55rem; font-size: .92rem; }
  .nav-menu a:not(.btn)::after { left: .55rem; right: .55rem; }
  .brand img { height: 44px; }
}
.fee-cards .card h3 { padding-right: 2.4rem; }
