/* Layout: sticky top bar, split hero with a level ladder, then stacked sections on a 12-col feel (grid auto-fit). Replace every "Northgate" and [bracketed] value with your own. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --fg: #022396;
  --muted: #3349B0;
  --line: #D6DBEA;
  --accent: #022396;
  --accent-fg: #FFFFFF;
  --mark: #F4C531;
  --mark-fg: #0F1B3D;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
option { color: #0F1B3D; background: #FFFFFF; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  padding-inline: 16px;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1120px; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }

/* top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); margin-inline: -16px; padding-inline: 16px; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand i { width: 26px; height: 26px; border-radius: 6px 6px 6px 0; background: var(--accent); display: inline-block; }
nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 0.95rem; color: var(--muted); }
nav a:hover { color: var(--fg); }
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 0.95rem var(--font-body); background: var(--accent); color: var(--accent-fg); border: 0; padding: 12px 20px; border-radius: 8px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); }
nav .btn { color: var(--accent-fg); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; background: transparent; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.course-btn { margin-top: 12px; }
@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
  nav.open { display: flex; }
  nav a:not(.btn) { display: block; padding: 14px 4px; border-top: 1px solid var(--line); font-size: 1rem; }
  nav .btn { margin-top: 10px; }
}

section { padding-block: 72px; }
.head { display: grid; gap: 12px; margin-bottom: 36px; }

/* hero */
.hero { padding-block: 56px 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; padding-inline: 2px; color: var(--mark); }
.hero .lead { margin-top: 20px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts b { font-family: var(--font-display); font-size: 1.7rem; display: block; line-height: 1.1; }
.facts span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 36px; } }

/* level ladder */
.ladder { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.ladder .label { margin-bottom: 14px; display: block; }
.rung { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.rung:first-of-type { border-top: 0; }
.rung strong { font-family: var(--font-mono); font-weight: 500; font-size: 0.95rem; }
.rung span { font-size: 0.92rem; color: var(--muted); min-width: 0; }
.rung em { font-style: normal; font-family: var(--font-mono); font-size: 0.78rem; padding: 3px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.rung.on em { background: var(--mark); color: var(--mark-fg); border-color: var(--mark); }

/* courses */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.course p { color: var(--muted); font-size: 0.95rem; }
.course ul { margin: 4px 0 0; padding-left: 18px; font-size: 0.92rem; color: var(--muted); display: grid; gap: 4px; }
.course .price { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price b { font-family: var(--font-display); font-size: 1.35rem; }
.price span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.course.main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* approach */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 56px; }
.points { display: grid; gap: 22px; }
.points div { display: grid; gap: 4px; }
.points p { color: var(--muted); }

/* teachers */
.teachers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.teacher { display: grid; gap: 8px; min-width: 0; }
.avatar { aspect-ratio: 4 / 3; max-width: 100%; border-radius: 10px; background: var(--line); display: grid; place-items: center; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--accent); border: 1px dashed var(--muted); }
.teacher p { font-size: 0.9rem; color: var(--muted); }
.tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }

/* schedule */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.t { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.seats { font-family: var(--font-mono); font-size: 0.8rem; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.seats.open { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.seats.few { background: var(--mark); color: var(--mark-fg); border-color: var(--mark); }
a.seats { display: inline-block; text-decoration: none; cursor: pointer; }
a.seats::after { content: " →"; }
a.seats:hover, a.seats:focus-visible { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(2, 35, 150, 0.18); }
tbody tr:hover td { background: var(--bg); }
tbody tr:hover td:first-child { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  a.seats { transition: transform .15s, box-shadow .15s, filter .15s; }
  tbody td { transition: background .15s, color .15s; }
}

/* online lessons question in FAQ */
.online-form { margin-top: 18px; max-width: 62ch; }
.online-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
textarea { font: 400 1rem var(--font-body); color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%; min-width: 0; resize: vertical; min-height: 100px; }
textarea:focus-visible { border-color: var(--accent); }
.online-form .btn { justify-self: start; }

/* selected group in the form */
.group-pick { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--accent); border-radius: 8px; background: var(--bg); }
.group-pick[hidden] { display: none; }
.group-pick p { font-size: 0.92rem; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.group-pick button { flex: none; width: 32px; height: 32px; border: 1.5px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.group-pick button:hover { color: var(--fg); border-color: var(--muted); }

/* course cards hover */
.course:hover { border-color: var(--accent); box-shadow: 0 12px 28px rgba(2, 35, 150, 0.18); transform: translateY(-4px); }
.course.main:hover { box-shadow: 0 0 0 1px var(--accent), 0 12px 28px rgba(2, 35, 150, 0.18); }
.course:hover h3 { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .course { transition: transform .2s, box-shadow .2s, border-color .2s; }
  .course h3 { transition: color .2s; }
}

/* branches */
.branch { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 6px; min-width: 0; }
.branch p { font-size: 0.92rem; color: var(--muted); overflow-wrap: anywhere; }
.branch .label { color: var(--accent); }

/* faq */
details { border-top: 1px solid var(--line); padding-block: 18px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); }
details[open] summary::after { content: "–"; }
summary::-webkit-details-marker { display: none; }
details p { margin-top: 10px; color: var(--muted); max-width: 62ch; }

/* enrol */
.enrol { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 4vw, 44px); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 36px; }
form { display: grid; gap: 14px; min-width: 0; }
label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; }
input, select { font: 400 1rem var(--font-body); color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible { border-color: var(--accent); }
.note { font-size: 0.85rem; color: var(--muted); min-height: 1.3em; }
.note.ok { color: var(--accent); font-weight: 600; }
.contact-lines { display: grid; gap: 10px; margin-top: 20px; font-family: var(--font-mono); font-size: 0.9rem; }

footer { border-top: 1px solid var(--line); padding-block: 32px 40px; margin-inline: -16px; padding-inline: 16px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.social { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.social a, .contact-link { color: inherit; text-decoration: none; border-bottom: 1.5px solid transparent; padding-block: 2px; }
.social a:hover, .social a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); transform: translateY(-2px); }
.contact-link { color: var(--accent); border-bottom-color: var(--accent); }
.contact-link:hover, .contact-link:focus-visible { filter: brightness(1.15); border-bottom-width: 2.5px; }
@media (prefers-reduced-motion: no-preference) { .social a { display: inline-block; transition: color .15s, border-color .15s, transform .15s; } .contact-link { transition: filter .15s; } }
.tpl { background: var(--mark); color: var(--mark-fg); font-family: var(--font-mono); font-size: 0.78rem; text-align: center; padding: 8px 16px; margin-inline: -16px; }
@media (prefers-reduced-motion: no-preference) { .btn, nav a { transition: filter .15s, color .15s; } }

/* clickable teacher cards */
a.teacher { text-decoration: none; color: inherit; padding: 12px; border: 1.5px solid transparent; border-radius: 14px; align-content: start; cursor: pointer; }
a.teacher:hover, a.teacher:focus-visible { background: var(--surface); border-color: var(--accent); box-shadow: 0 10px 24px rgba(2, 35, 150, 0.18); transform: translateY(-4px); }
a.teacher:hover .avatar, a.teacher:focus-visible .avatar { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); border-style: solid; }
a.teacher h3 { transition: color .2s; }
a.teacher:hover h3 { color: var(--accent); }
.teacher .more { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); margin-top: 2px; }
@media (prefers-reduced-motion: no-preference) {
  a.teacher { transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
  .avatar { transition: background .2s, color .2s, border-color .2s; }
}

/* teacher profile pages */
.bar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar-actions .btn { padding: 10px 16px; }
.profile { padding-block: 48px 72px; }
.back { display: inline-block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); text-decoration: none; margin-bottom: 28px; }
.back:hover { text-decoration: underline; }
.profile-top { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.profile .avatar { font-size: 4rem; }
.profile h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 10px; }
.profile .tag { font-size: 0.9rem; }
.profile .lead { margin-top: 18px; }
.pfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.pfacts div { min-width: 0; }
.pfacts b { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.pfacts span { font-size: 0.85rem; color: var(--muted); }
.pblocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 56px; }
.pblock { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.pblock p, .pblock li { color: var(--muted); font-size: 0.95rem; }
.pblock ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.profile .cta { margin-top: 56px; }
@media (max-width: 860px) { .profile-top { grid-template-columns: 1fr; gap: 28px; } .profile .avatar { max-width: 320px; } }

/* white cells on the blue page: inside them the palette is light (dark text, blue accent) */
.course, .ladder, .tablewrap, .enrol, .branch, .pblock, a.teacher {
  --bg: #F3F5FB; --surface: #FFFFFF; --fg: #022396; --muted: #3349B0; --line: #D6DBEA;
  --accent: #022396; --accent-fg: #FFFFFF;
  background: #FFFFFF; color: var(--fg); color-scheme: light;
}
option { color: #0F1B3D; background: #FFFFFF; }

/* brand logo in the header */
.brand-logo { width: 44px; height: 44px; border-radius: 50%; display: block; flex: none; box-shadow: 0 0 0 2px #FFFFFF; }
.brand { gap: 12px; }

/* intro splash: logo and name appear, then the page fades in */
.splash { position: fixed; inset: 0; z-index: 100; background: #022396; display: grid; place-items: center; padding: 24px; animation: splashOut .8s ease 3.1s forwards; cursor: pointer; }
.splash.skip { animation: splashOut .4s ease 0s forwards; }
.no-splash .splash { display: none; }
.splash-inner { display: grid; justify-items: center; gap: 24px; text-align: center; }
.splash-logo { width: 140px; height: 140px; border-radius: 50%; box-shadow: 0 0 0 3px #FFFFFF; opacity: 0; transform: scale(0.6); animation: splashLogo .9s cubic-bezier(.2, .8, .2, 1) .2s forwards; }
.splash-name { position: relative; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 6.5vw, 2.6rem); letter-spacing: -0.02em; color: #FFFFFF; opacity: 0; transform: translateY(16px); animation: splashText .8s ease .9s forwards; }
.splash-name .ghost { visibility: hidden; }
.splash-name .typed-wrap { position: absolute; left: 0; top: 0; }
.splash-name .caret { display: none; width: 3px; height: 1em; margin-left: 4px; background: #FFFFFF; vertical-align: -0.1em; animation: splashCaret .8s steps(1) infinite; }
.splash-name.typing { opacity: 1; transform: none; animation: none; }
.splash-name.typing .caret { display: inline-block; }
@keyframes splashCaret { 50% { opacity: 0; } }
@keyframes splashLogo { to { opacity: 1; transform: scale(1); } }
@keyframes splashText { to { opacity: 1; transform: none; } }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .splash { animation: splashOut .4s ease 1s forwards; }
  .splash-logo, .splash-name { animation: none; opacity: 1; transform: none; }
}

/* blue bands (header, hero, Method, Schedule, enrol form, footer) alternate with white sections */
.bar, .hero, #approach, #schedule, #enrol, footer {
  --bg: #022396; --fg: #FFFFFF; --muted: #C5CFF7; --line: #2F4DC4;
  --accent: #FFFFFF; --accent-fg: #022396;
  background: #022396; color: #FFFFFF; color-scheme: dark;
}
.hero, #approach, #schedule, #enrol { margin-inline: -16px; padding-inline: 16px; }
#approach { border-block: 0; }

/* cards on white sections need a visible edge */
.course, .branch, .pblock { box-shadow: 0 1px 3px rgba(2, 35, 150, 0.08); }
a.teacher { border-color: var(--line); }

.seats.locked,
.seats.full { opacity: .4; cursor: not-allowed; }

.tgroups { margin-top: 40px; }
.tgroup-list { display: grid; gap: 12px; margin-top: 14px; }
.tgroup {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border: 1px solid var(--line, #ddd); border-radius: 12px;
}
.tgroup b { display: block; }
.tgroup span { display: block; font-size: .92em; opacity: .75; }
