/* Achiever's Hub — design tokens
   Colours sampled from the logo (navy + teal) and the flyer (sky ground, chalk yellow). */
:root {
  --navy: #0a3361;
  --navy-deep: #072748;
  --teal: #075452;
  --teal-soft: #d5ecea;
  --sky: #eaf7fa;
  --sky-line: #cfe6ec;
  --paper: #ffffff;
  --chalk: #f4eca2;
  --ink: #13253d;
  --muted: #475a70;
  --wa: #25d366;

  --font-head: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --step-4: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 16px;
  --shadow-card: 0 1px 2px rgba(10, 51, 97, 0.06), 0 8px 24px -12px rgba(10, 51, 97, 0.18);
  --shadow-lift: 0 2px 4px rgba(10, 51, 97, 0.08), 0 16px 32px -14px rgba(10, 51, 97, 0.28);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 6rem; -webkit-tap-highlight-color: rgba(7, 84, 82, 0.12); }
@media (max-width: 34rem) { html { scroll-padding-top: 8rem; } }
a, button { touch-action: manipulation; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--teal); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--chalk); color: var(--navy); }
html { scrollbar-color: #a9cbd3 var(--sky); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--navy); color: #fff; padding: 0.75rem 1rem; border-radius: var(--radius-s);
}
.skip:focus { top: 0.75rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(234, 247, 250, 0.9);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
  view-transition-name: site-header;
}
.site-header.is-scrolled { border-bottom-color: var(--sky-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--navy); min-height: 44px; }
.brand img { width: 44px; height: auto; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 0.25rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem;
  color: var(--ink); text-decoration: none; border-radius: 999px; font-size: var(--step--1);
  transition: background-color 180ms ease, color 180ms ease;
}
.nav a[aria-current="page"] { background: var(--paper); color: var(--navy); font-weight: 700; box-shadow: inset 0 0 0 1px var(--sky-line); }
@media (hover: hover) and (pointer: fine) {
  .nav a:not([aria-current="page"]):hover { background: rgba(255, 255, 255, 0.7); }
}
@media (max-width: 34rem) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; padding-block: 0.4rem 0.5rem; }
  .nav { width: 100%; justify-content: space-between; background: rgba(255,255,255,0.6); border-radius: 999px; padding: 3px; }
  .nav a { flex: 1; justify-content: center; padding: 0 0.5rem; min-height: 40px; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--navy); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0.8rem 1.4rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 var(--step-0)/1.2 var(--font-body);
  text-decoration: none; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 2px 6px -2px rgba(19, 37, 61, 0.28);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.btn:active { transform: scale(0.97); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--navy); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); border: 1.5px solid var(--navy); box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); background-color: var(--navy-deep); }
  .btn--light:hover { background-color: var(--chalk); }
  .btn--ghost:hover { background-color: rgba(10, 51, 97, 0.06); }
  .btn:active { transform: scale(0.97); }
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
@media (max-width: 34rem) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--paper { background: var(--paper); }
.section-head { max-width: 40rem; margin-bottom: var(--space-4); }
.section-head p { margin-top: var(--space-2); color: var(--muted); font-size: var(--step-1); line-height: 1.55; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-5) var(--space-6); }
.hero .wrap { display: grid; gap: var(--space-5); align-items: center; }
@media (min-width: 60rem) {
  .hero { padding-block: var(--space-6) var(--space-7); }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-6); }
}
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: var(--space-3); max-width: 34rem; }
.hero .btn-row { margin-top: var(--space-4); }
.hero-note { margin-top: var(--space-2); font-size: var(--step--1); color: var(--muted); }

/* The notebook page — the one signature element */
.notebook {
  --rule: 2.5rem;
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.25rem 1.75rem 3rem;
}
@media (min-width: 60rem) { .notebook { padding: 1.75rem 2rem 2.25rem 3.75rem; } }
.notebook::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 2rem;
  width: 2px; background: rgba(7, 84, 82, 0.35);
}
@media (min-width: 60rem) { .notebook::before { left: 2.5rem; } }
.notebook-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 0.75rem; }
.notebook-top p { font-family: var(--font-head); font-style: italic; color: var(--teal); font-size: var(--step-1); line-height: 1.3; }
.notebook-top img { width: 46px; flex: none; }
.notebook h2 { font-size: var(--step-1); line-height: var(--rule); margin-top: 0.75rem; border-bottom: 1px solid var(--sky-line); }
.notebook h2 mark { background: linear-gradient(transparent 24%, var(--chalk) 24%, var(--chalk) 86%, transparent 86%); color: inherit; padding: 0 0.25em; margin-left: -0.25em; }
.notebook ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
.notebook li { line-height: var(--rule); border-bottom: 1px solid var(--sky-line); white-space: nowrap; font-size: var(--step--1); }
@media (min-width: 26rem) { .notebook li { font-size: var(--step-0); } }
.notebook li::before { content: "—"; color: var(--teal); margin-right: 0.5rem; }

/* ---------- About ---------- */
.about { display: grid; gap: var(--space-4); }
@media (min-width: 52rem) { .about { grid-template-columns: 0.9fr 1.1fr; gap: var(--space-6); align-items: start; } }
.about-body p + p { margin-top: var(--space-2); }
.about-body p { font-size: var(--step-1); line-height: 1.6; }
.about-sign { margin-top: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--sky-line); color: var(--muted); font-size: var(--step-0) !important; }
.about-sign strong { color: var(--navy); font-family: var(--font-head); font-size: var(--step-1); font-weight: 600; display: block; }

/* ---------- Why us ---------- */
.reasons { display: grid; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
@media (min-width: 48rem) { .reasons { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); } }
.reason { padding-top: var(--space-3); border-top: 2px solid var(--navy); }
.reason-head { display: flex; align-items: center; gap: 0.6rem; }
.reason-head svg { flex: none; color: var(--teal); width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.reason p { margin-top: 0.5rem; color: var(--muted); }

/* ---------- Class groups ---------- */
.groups { display: grid; gap: var(--space-3); }
@media (min-width: 48rem) { .groups { grid-template-columns: 1fr 1fr; } }
.group-card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4) var(--space-3); border-radius: var(--radius-l);
  color: #fff; text-decoration: none;
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease;
}
.group-card--teal { background: var(--teal); }
.group-card--navy { background: var(--navy); }
.group-card h3 { color: #fff; font-size: var(--step-2); }
.group-card .subjects { color: var(--chalk); font-size: var(--step-1); line-height: 1.5; }
.group-card .go { margin-top: auto; padding-top: var(--space-2); font-weight: 700; display: inline-flex; align-items: center; gap: 0.4rem; }
.group-card .go svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .group-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .group-card:hover .go svg { transform: translateX(3px); }
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-l); padding: var(--space-5) var(--space-3); display: grid; gap: var(--space-3); }
@media (min-width: 52rem) { .cta-band { grid-template-columns: 1.3fr auto; align-items: center; padding: var(--space-5); } }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d4e2f0; margin-top: var(--space-2); font-size: var(--step-1); max-width: 34rem; }

/* ---------- Page head (inner pages) ---------- */
.page-head { padding-block: var(--space-5) var(--space-4); }
.page-head h1 { font-size: var(--step-4); max-width: 18ch; }
.page-head .lede { margin-top: var(--space-2); max-width: 36rem; }

/* ---------- Courses ---------- */
.course-group + .course-group { margin-top: var(--space-6); }
.course-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; padding-bottom: var(--space-2); margin-bottom: var(--space-3); border-bottom: 2px solid var(--navy); }
.course-group-head p { color: var(--muted); }
.subject-grid { display: grid; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
@media (min-width: 40rem) { .subject-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); } }
@media (min-width: 64rem) { .subject-grid { grid-template-columns: repeat(4, 1fr); } }
.subject {
  position: relative; background: var(--paper); border-radius: var(--radius-m);
  padding: var(--space-3);
  box-shadow: var(--shadow-card); height: 100%;
}
.subject h3 { display: inline; background: linear-gradient(transparent 58%, var(--teal-soft) 58%, var(--teal-soft) 92%, transparent 92%); padding: 0 0.15em; margin-left: -0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.subject p { margin-top: 0.6rem; color: var(--muted); }
.courses-note { margin-top: var(--space-6); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--space-3); }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; } }
.contact-card { background: var(--paper); border-radius: var(--radius-l); padding: var(--space-4) var(--space-3); box-shadow: var(--shadow-card); }
@media (min-width: 40rem) { .contact-card { padding: var(--space-4); } }
.contact-card h2 { font-size: var(--step-2); }
.contact-card > p { margin-top: var(--space-1); color: var(--muted); }
.contact-card .btn-row { margin-top: var(--space-3); }
.btn--wa { --btn-bg: var(--wa); --btn-fg: #0b3d22; }
@media (hover: hover) and (pointer: fine) { .btn--wa:hover { background-color: #1fbf5b; } }
.details { margin: var(--space-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--space-3); font-style: normal; }
.details li, .details .detail { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0 0.75rem; align-items: start; }
.details strong { grid-column: 2; color: var(--navy); }
.details .val { grid-column: 2; color: var(--muted); overflow-wrap: anywhere; }
.details .ico { grid-row: span 2; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; }
.details .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.details .ico svg.fill { fill: currentColor; stroke: none; }
.map { margin-top: var(--space-3); border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sky-line); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--space-6); padding-block: var(--space-5) calc(var(--space-6) + 1rem); border-top: 1px solid var(--sky-line); font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: var(--space-4); }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.site-footer ul a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; }
.site-footer ul a:hover { color: var(--teal); text-decoration: underline; }
.footer-brand .brand { margin-bottom: 0.5rem; }
.footer-hours { margin-top: 0.5rem; }
.footer-tag { font-family: var(--font-head); font-style: italic; color: var(--teal); font-size: var(--step-1); }
.footer-copy { grid-column: 1 / -1; padding-top: var(--space-3); border-top: 1px solid var(--sky-line); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 50;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 10px 24px -8px rgba(7, 39, 72, 0.5), 0 2px 6px rgba(7, 39, 72, 0.18);
  transition: transform 180ms var(--ease-out), box-shadow 200ms ease;
  view-transition-name: wa-float;
}
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.wa-float:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { transform: translateY(-2px); } }

/* ---------- Motion: scroll reveal (only when JS is running) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.hero-in { animation: hero-in 700ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes hero-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Smooth page transitions between the three pages (supported browsers only) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 160ms ease-out both; }
::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; }
  .js [data-reveal].is-in { transition: opacity 200ms ease; transition-delay: 0ms; }
  .hero-in { animation: hero-fade 200ms ease both; }
  @keyframes hero-fade { from { opacity: 0; } }
  ::view-transition-old(root) { animation: vt-out 120ms ease both; }
  ::view-transition-new(root) { animation: vt-fade 160ms ease both; }
  @keyframes vt-fade { from { opacity: 0; } }
  .btn, .group-card, .wa-float, .group-card .go svg { transition: background-color 200ms ease; }
  .btn:active, .wa-float:active { transform: none; }
  html { scroll-behavior: auto; }
}

/* Larger tap area for inline contact links without changing layout */
.details .val a { display: inline-block; padding-block: 11px; margin-block: -11px; }

/* ---------- Headline highlighter ----------
   A chalk-yellow marker band under every page and section headline, echoing the flyer.
   It sweeps in once when the headline appears; without JS it is simply there. */
.hl {
  --hl: var(--chalk);
  background-image: linear-gradient(var(--hl), var(--hl));
  background-repeat: no-repeat;
  background-position: 0 86%;
  background-size: 100% 0.38em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: 0.1em;
  margin-inline: -0.1em;
}
.cta-band .hl { --hl: #127a72; }
.js .hl { background-size: 0% 0.38em; transition: background-size 900ms var(--ease-out) 150ms; }
.js .hl.is-on, .js .is-in .hl { background-size: 100% 0.38em; }
@media (prefers-reduced-motion: reduce) {
  .js .hl { transition: none; background-size: 100% 0.38em; }
}
