/* =========================================================
   AiXin Mandarin Language Centre
   ========================================================= */
:root {
  --ink: #0D1A60;          /* logo navy */
  --ink-2: #1B2C85;
  --royal: #2A47C4;
  --mist: #F3F5FB;
  --line: #E0E5F1;
  --text: #171C38;
  --muted: #5A6184;
  --white: #FFFFFF;
  --marigold: #F29A12;     /* warm accent from the company profile */
  --marigold-soft: #FFF3DF;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;

  --r-lg: 32px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(13, 26, 96, .04), 0 12px 32px -12px rgba(13, 26, 96, .14);
  --shadow-hover: 0 2px 4px rgba(13, 26, 96, .05), 0 24px 48px -18px rgba(13, 26, 96, .28);

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 10vw, 128px);
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--marigold-soft); color: var(--ink); }

.zh { font-family: var(--font-zh); }
.pinyin { font-family: var(--font-zh); font-weight: 400; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: var(--section) 0; }
.section--mist { background: var(--mist); }
.section--tight { padding-top: 0; }

.h2 {
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}
.h2--light { color: #fff; }
.h3 {
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--ink);
}
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.lead--light { color: rgba(255, 255, 255, .78); }

.head { margin-bottom: clamp(32px, 5vw, 56px); display: grid; gap: 14px; }
.head--split { grid-template-columns: 1fr auto; align-items: end; gap: 24px 40px; }
.head--split > div:first-child { display: grid; gap: 14px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn--accent { background: var(--marigold); color: var(--ink); }
.btn--outline-light { color: #fff; border-color: rgba(255, 255, 255, .35); }
/* soft light sweep on filled buttons */
.btn--primary::after, .btn--accent::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%);
}

@media (hover: hover) {
  .btn--primary:hover { background: var(--ink-2); box-shadow: 0 12px 26px -12px rgba(13, 26, 96, .6); transform: translateY(-2px); }
  .btn--accent:hover { background: #FFA826; transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(242, 154, 18, .7); }
  .btn--primary:hover::after, .btn--accent:hover::after { transform: translateX(120%); transition: transform .8s var(--ease-soft); }
  .btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
  .btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
}

/* =========================================================
   Navbar
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(13, 26, 96, .35); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span {
  display: block; height: 100%; background: var(--marigold);
  transform-origin: 0 50%; transform: scaleX(0);
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: height .3s var(--ease); }
.nav.is-scrolled .nav__inner { height: calc(var(--nav-h) - 8px); }
.nav__logo img { height: 54px; width: auto; transition: height .3s var(--ease), transform .3s var(--ease); }
.nav.is-scrolled .nav__logo img { height: 48px; }
.nav__menu { position: relative; display: flex; align-items: center; gap: 4px; }
.nav__menu a:not(.btn) {
  position: relative;
  padding: 8px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--muted);
  transition: color .25s;
}
.nav__menu a:not(.btn):hover, .nav__menu a.is-current { color: var(--ink); }
.nav__indicator {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 18px; border-radius: 3px;
  background: var(--marigold); opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
}
.nav__cta { margin-left: 12px; }

.nav__toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 999px;
  background: var(--mist); position: relative;
  transition: background-color .25s, transform .2s;
}
.nav__toggle:active { transform: scale(.92); }
.nav__toggle span {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] { background: var(--marigold-soft); }
.nav__toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: clamp(32px, 6vw, 88px) 0 var(--section); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(36px, 6vw, 88px); }
.hero__title {
  font-size: clamp(40px, 5.8vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--ink);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .05em; margin-bottom: -.05em; }
.hero__title .line > span { display: block; }
.hero__lead { margin-top: 24px; font-size: clamp(17px, 1.7vw, 21px); color: var(--muted); max-width: 44ch; }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--marigold); }

.hero__visual { position: relative; padding: 48px 0 0 32px; }
.hero__panel {
  position: relative;
  aspect-ratio: 4 / 4.6;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 80% at 80% 0%, #22359A 0%, rgba(34, 53, 154, 0) 60%),
    var(--ink);
  overflow: hidden;
}
.hero__panel::before { /* slow soft light drifting across the panel */
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  left: -20%; top: 30%;
  background: radial-gradient(closest-side, rgba(71, 98, 214, .45), transparent);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero__img {
  position: absolute; left: 50%; bottom: 0;
  width: 86%; max-width: none;
  transform: translate(-50%, 0);
  will-change: transform;
}
.bubble {
  position: absolute; top: 0; left: 0; z-index: 2;
  display: grid; justify-items: start;
  padding: 18px 28px 20px;
  background: var(--marigold);
  color: var(--ink);
  border-radius: 24px 24px 24px 6px;
  box-shadow: 0 20px 40px -18px rgba(13, 26, 96, .45);
  transform-origin: 20% 100%;
}
.bubble::after {
  content: ""; position: absolute; left: 22px; bottom: -16px;
  border-right: 22px solid transparent;
  border-top: 18px solid var(--marigold);
}
.bubble__zh { font-size: clamp(32px, 3.8vw, 48px); font-weight: 700; line-height: 1.1; }
.bubble__py { font-size: 15px; opacity: .8; margin-top: 2px; }

/* =========================================================
   About
   ========================================================= */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.about__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5 / 6; transform: translateZ(0); }
.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.about__copy { display: grid; gap: 24px; }
.purpose { display: grid; gap: 14px; margin-top: 4px; }
.purpose li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; }
.purpose strong { display: block; color: var(--ink); font-size: 17px; line-height: 1.35; }
.purpose__icon, .feature__icon, .eval__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--mist); color: var(--ink);
  transition: transform .4s var(--ease), background-color .3s, color .3s;
}
.purpose__icon svg, .feature__icon svg, .eval__icon svg, .action__list svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.quote { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.quote__zh { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.quote__py { font-size: 15px; color: var(--muted); margin-top: 2px; }
.quote__en { font-size: 15px; color: var(--text); margin-top: 8px; font-style: italic; }
.quote__zh::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px 3px 3px 0;
  background: var(--marigold); margin-right: 12px; vertical-align: middle; transform: translateY(-2px);
}

/* =========================================================
   Features
   ========================================================= */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature {
  background: #fff; border-radius: var(--r-md); padding: clamp(24px, 3.4vw, 44px);
  display: grid; gap: 12px; align-content: start;
  box-shadow: var(--shadow);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feature .feature__icon { background: var(--ink); color: #fff; margin-bottom: 12px; }
.feature p { color: var(--muted); max-width: 42ch; }

/* =========================================================
   Programs
   ========================================================= */
.filter { position: relative; display: inline-flex; padding: 4px; background: var(--mist); border-radius: 999px; }
.filter__pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px;
  background: #fff; box-shadow: 0 2px 8px -2px rgba(13, 26, 96, .18);
  transition: transform .45s var(--ease), width .45s var(--ease);
}
.filter__btn {
  position: relative; z-index: 1;
  border: 0; background: transparent; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .3s;
}
.filter__btn:hover, .filter__btn.is-active { color: var(--ink); }
.no-pill .filter__btn.is-active { background: #fff; box-shadow: 0 2px 8px -2px rgba(13, 26, 96, .18); }

.programs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.program {
  grid-column: span 2;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.program::before { /* accent line that grows on hover */
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--marigold); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .5s var(--ease);
}
.programs .program:nth-child(4) { grid-column: 2 / span 2; }
.programs .program:nth-child(5) { grid-column: 4 / span 2; }
.programs.is-filtered .program { grid-column: span 2 !important; }
.program[hidden] { display: none; }
.program.is-entering { animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.program__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.program__stage { font-size: 13px; font-weight: 600; color: var(--muted); }
.program__time {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--marigold-soft); padding: 5px 10px; border-radius: 999px;
}
.program__time svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.program__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.program__focus { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.program__focus li {
  display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--text);
  transition: transform .35s var(--ease);
}
.program__focus li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--ink); transform: translateY(-2px); }
.program--high { background: var(--ink); border-color: var(--ink); }
.program--high .program__title,
.program--high .program__focus li { color: #fff; }
.program--high .program__stage { color: rgba(255, 255, 255, .66); }
.program--high .program__focus { border-color: rgba(255, 255, 255, .14); }
.program--high .program__focus li::before { background: var(--marigold); }

@media (hover: hover) {
  .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
  .feature:hover .feature__icon, .eval:hover .eval__icon { transform: rotate(-8deg) scale(1.06); }
  .program:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
  .program:hover::before { transform: scaleX(1); }
  .program:hover .program__focus li { transform: translateX(3px); }
  .program:hover .program__focus li:nth-child(2) { transition-delay: .03s; }
  .program:hover .program__focus li:nth-child(3) { transition-delay: .06s; }
  .program:hover .program__focus li:nth-child(4) { transition-delay: .09s; }
  .program:hover .program__focus li:nth-child(5) { transition-delay: .12s; }
  .program:hover .program__focus li:nth-child(6) { transition-delay: .15s; }
}

/* =========================================================
   Learning approach
   ========================================================= */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill {
  position: relative; overflow: hidden;
  background: #fff; border-radius: var(--r-md); padding: 28px 24px 24px;
  display: grid; gap: 2px; justify-items: start;
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.skill::after { /* soft wash that rises on hover */
  content: ""; position: absolute; inset: auto 0 0 0; height: 0;
  background: linear-gradient(to top, var(--marigold-soft), transparent);
  transition: height .5s var(--ease); z-index: 0;
}
.skill > * { position: relative; z-index: 1; }
.skill__zh {
  font-size: clamp(52px, 6vw, 76px); line-height: 1; font-weight: 700; color: var(--ink);
  transition: transform .5s var(--ease);
  transform-origin: 0 100%;
}
.skill__py { font-size: 15px; color: var(--muted); margin-top: 14px; }
.skill__en { font-size: 18px; font-weight: 700; color: var(--ink); }
@media (hover: hover) {
  .skill:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
  .skill:hover::after { height: 60%; }
  .skill:hover .skill__zh { transform: scale(1.08) rotate(-3deg); }
}

.action {
  margin-top: 16px; background: #fff; border-radius: var(--r-md); padding: 28px;
  display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; align-items: center;
  box-shadow: var(--shadow);
}
.action__list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.action__list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  background: var(--mist); color: var(--ink); font-weight: 600; font-size: 15px;
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.action__list svg { width: 20px; height: 20px; transition: transform .4s var(--ease); }
@media (hover: hover) {
  .action__list li:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
  .action__list li:hover svg { transform: scale(1.15) rotate(-6deg); }
}

/* =========================================================
   HSK
   ========================================================= */
.hsk {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: var(--section) 0;
}
.hsk::before {
  content: ""; position: absolute; right: -10%; top: -30%; width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(52, 80, 200, .45), transparent);
  animation: drift 16s ease-in-out infinite alternate;
}
.hsk__grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.hsk__copy { display: grid; gap: 18px; }
.hsk__mark {
  font-size: clamp(90px, 15vw, 190px); font-weight: 800; line-height: .82; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .28);
  margin-bottom: 8px; will-change: transform; white-space: nowrap;
}
.hsk__skills { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 10px; margin-top: 12px; }
.hsk__skills li {
  padding: 12px 22px; border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 14px;
  font-weight: 600; text-align: center;
  transition: border-color .3s, background-color .3s, transform .3s var(--ease);
}
@media (hover: hover) {
  .hsk__skills li:hover { border-color: var(--marigold); background: rgba(242, 154, 18, .1); transform: translateY(-2px); }
}
.hsk__badge {
  position: relative;
  width: clamp(200px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%;
  background: var(--marigold); color: var(--ink);
  display: grid; place-content: center; text-align: center; gap: 2px;
}
.hsk__badge::before { /* slow orbit ring */
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 1.5px dashed rgba(242, 154, 18, .45);
  animation: spin 40s linear infinite;
}
.hsk__num { font-size: clamp(64px, 8vw, 100px); font-weight: 800; line-height: .9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.hsk__unit { font-weight: 700; font-size: 16px; }

/* =========================================================
   Levels
   ========================================================= */
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stage { border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(22px, 3vw, 36px); }
.stage--inter { background: var(--mist); border-color: var(--mist); }
.stage__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.stage__head span { font-size: 14px; font-weight: 600; color: var(--muted); }
.ladder { display: grid; gap: 18px; }
.ladder li { display: grid; grid-template-columns: 70px 1fr 112px; align-items: center; gap: 16px; }
.ladder__lv { font-size: 14px; font-weight: 600; color: var(--muted); }
.ladder__bar { height: 10px; border-radius: 999px; background: rgba(13, 26, 96, .08); overflow: hidden; }
.ladder__bar i {
  position: relative; overflow: hidden;
  display: block; height: 100%; border-radius: inherit; background: var(--ink);
  width: calc(var(--fill, 0) * 1%);
  transition: width 1.3s var(--ease);
}
.ladder li:nth-child(2) .ladder__bar i { transition-delay: .12s; }
.ladder li:nth-child(3) .ladder__bar i { transition-delay: .24s; }
.ladder__bar i::after { /* one gentle shimmer after filling */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-100%);
}
.is-filled .ladder__bar i::after { animation: shimmer 1.2s 1.2s var(--ease) both; }
.stage:not(.stage--inter) .ladder__bar i { background: var(--marigold); }
.ladder__n { text-align: right; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ladder__n b { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.levels__for { margin-top: 24px; font-size: 15px; color: var(--muted); }

/* =========================================================
   Class format
   ========================================================= */
.format { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.format__media {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 5 / 4; background: var(--ink);
}
.format__media img { position: absolute; left: 0; bottom: 0; width: 100%; }
.format__copy { display: grid; gap: 28px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact {
  background: #fff; border-radius: var(--r-sm); padding: 20px 22px; display: grid; gap: 4px; align-content: start;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
@media (hover: hover) { .fact:hover { transform: translateY(-3px); box-shadow: var(--shadow); } }
.fact dt { font-size: clamp(26px, 3vw, 36px); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact dd { font-size: 15px; color: var(--muted); line-height: 1.45; }

/* =========================================================
   Evaluation
   ========================================================= */
.evals { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 20px; }
.eval {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px;
  display: grid; gap: 16px; align-content: start;
  transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease);
}
@media (hover: hover) { .eval:hover { border-color: transparent; box-shadow: var(--shadow-hover); transform: translateY(-4px); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 14px; border-radius: 999px; background: var(--mist); font-size: 14px; font-weight: 600; color: var(--ink); }

/* =========================================================
   CTA
   ========================================================= */
.cta {
  position: relative;
  background: var(--ink); color: #fff;
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 8px;
  padding: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: 1fr auto; gap: 28px 48px; align-items: center;
}
.cta::after {
  content: ""; position: absolute; left: 0; bottom: -26px;
  border-right: 34px solid transparent; border-top: 28px solid var(--ink);
}
.cta__glow {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
}
.cta__glow::before {
  content: ""; position: absolute; width: 55%; aspect-ratio: 1; border-radius: 50%;
  right: -10%; top: -60%;
  background: radial-gradient(closest-side, rgba(242, 154, 18, .22), transparent);
  animation: drift 12s ease-in-out infinite alternate;
}
.cta__copy, .cta__actions { position: relative; }
.cta__copy { display: grid; gap: 16px; }
.cta__copy .h2 { max-width: 18ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   Footer
   ========================================================= */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; align-items: start; }
.footer__brand img { width: 260px; }
.footer__nav { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 32px; }
.footer__nav a, .footer__contact a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .25s; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--ink); }
.footer__contact { display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.footer__bottom {
  margin-top: 48px; padding-top: 24px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - var(--gutter) * 2) 1px no-repeat;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--muted);
}
.footer__thanks .zh { color: var(--ink); font-weight: 700; margin-right: 6px; }

/* =========================================================
   Mobile quick-action bar
   ========================================================= */
.mbar {
  display: none;
  position: fixed; z-index: 40; left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-b));
  padding: 8px; gap: 8px;
  grid-template-columns: auto 1fr;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 16px 40px -16px rgba(13, 26, 96, .35);
  transform: translateY(calc(100% + 24px)); opacity: 0;
  transition: transform .5s var(--ease), opacity .3s;
}
.mbar.is-show { transform: none; opacity: 1; }
.mbar .btn { min-height: 48px; }

/* =========================================================
   Motion
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes panelIn {
  from { opacity: 0; clip-path: inset(14% 0 0 0 round var(--r-lg)); }
  to { opacity: 1; clip-path: inset(0 0 0 0 round var(--r-lg)); }
}
@keyframes imgUp { from { translate: 0 60px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: translateY(10px) scale(.6) rotate(-6deg); } 70% { opacity: 1; transform: scale(1.04) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -7px; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(18%, -12%) scale(1.15); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes linkIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Hero load sequence (CSS only) */
.js .hero__title .line > span { animation: lineUp .9s var(--ease) both; animation-delay: var(--d, 0s); }
.js .load { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0s); }
.js .hero__panel { animation: panelIn 1.1s .15s var(--ease) both; }
.js .hero__img { animation: imgUp 1.1s .35s var(--ease) backwards; }
.js .bubble {
  animation: pop .7s .75s var(--ease) both, bob 3.2s 1.6s ease-in-out infinite alternate;
}

/* Scroll reveals */
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(24px); }
.js .reveal.is-in:not(.is-done) {
  transition: opacity .7s var(--ease), transform .8s var(--ease);
  transition-delay: var(--rd, 0ms);
}
.js .reveal--zoom:not(.is-in) { transform: none; clip-path: inset(10% 6% 0 6% round var(--r-lg)); }
.js .reveal--zoom.is-in:not(.is-done) { transition: opacity .8s var(--ease), clip-path 1.1s var(--ease); }
.reveal--zoom img { transition: transform 1.6s var(--ease); }
.js .reveal--zoom:not(.is-in) img { transform: scale(1.12); }

/* Staggered children */
.js .stagger:not(.is-in) > * { opacity: 0; transform: translateY(16px); }
.js .stagger.is-in:not(.is-done) > * {
  transition: opacity .55s var(--ease), transform .65s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .nav__menu a:not(.btn) { padding: 8px 9px; font-size: 14px; }
  .programs { grid-template-columns: repeat(2, 1fr); }
  .program, .programs .program:nth-child(4), .programs .program:nth-child(5),
  .programs.is-filtered .program { grid-column: auto !important; }
  .evals { grid-template-columns: 1fr 1fr; }
  .evals .eval:first-child { grid-column: 1 / -1; }
  .action { grid-template-columns: 1fr; }
  .action__list { justify-content: flex-start; }
}

@media (max-width: 920px) {
  :root { --nav-h: 66px; }
  .nav__logo img, .nav.is-scrolled .nav__logo img { height: 42px; }
  .nav.is-scrolled .nav__inner { height: var(--nav-h); }
  .nav__indicator { display: none; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px var(--gutter) calc(24px + var(--safe-b));
    background: #fff;
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .45s var(--ease), opacity .3s, visibility 0s .45s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path .45s var(--ease), opacity .2s; }
  .nav__menu a:not(.btn) {
    padding: 16px 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
    border-radius: 0; border-bottom: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
  }
  .nav__menu a:not(.btn)::after {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line);
    transition: background-color .25s, transform .25s;
  }
  .nav__menu a.is-current::after { background: var(--marigold); transform: scale(1.3); }
  .nav__menu.is-open > a { animation: linkIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
  .nav__cta { margin: auto 0 0; min-height: 56px; font-size: 16px; }

  .hero__grid, .about, .format, .levels { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; width: 100%; margin: 0 auto; padding-left: 20px; }
  .about__media { aspect-ratio: 16 / 11; }
  .format__media { order: -1; aspect-ratio: 16 / 11; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .hsk__grid { grid-template-columns: 1fr; gap: 36px; }
  .hsk__badge { justify-self: start; }
  .head--split { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .section--tight { padding: 8px 0 72px; }
  .head { margin-bottom: 28px; gap: 10px; }

  /* Hero */
  .hero { padding: 24px 0 8px; }
  .hero__title { font-size: clamp(38px, 11.2vw, 48px); letter-spacing: -0.035em; }
  .hero__lead { margin-top: 16px; }
  .hero__actions { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { margin-top: 24px; gap: 8px; }
  .hero__facts li {
    padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--mist);
    font-size: 13px; color: var(--ink);
  }
  .hero__visual { padding: 36px 0 0 16px; max-width: 360px; }
  .hero__panel { aspect-ratio: 1 / 1.08; }
  .bubble { padding: 12px 18px 14px; border-radius: 18px 18px 18px 5px; }
  .bubble::after { left: 16px; bottom: -12px; border-right-width: 16px; border-top-width: 14px; }
  .bubble__zh { font-size: 30px; }
  .bubble__py { font-size: 13px; }

  /* About */
  .about { gap: 28px; }
  .about__copy { gap: 20px; }
  .about__media { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .quote__zh { font-size: 22px; }

  /* Features */
  .features { grid-template-columns: 1fr; gap: 12px; }
  .feature { grid-template-columns: 44px 1fr; column-gap: 16px; row-gap: 6px; padding: 22px; }
  .feature .feature__icon { grid-row: span 2; margin: 0; }

  /* Programs */
  .programs { grid-template-columns: 1fr; gap: 12px; }
  .program { padding: 22px; gap: 16px; }
  .program__focus { gap: 8px; padding-top: 14px; }
  .program:active { transform: scale(.985); }
  .filter { display: flex; width: 100%; }
  .filter__btn { flex: 1 1 auto; padding: 10px 8px; font-size: 13px; }

  /* Learning */
  .skills { gap: 10px; }
  .skill { padding: 20px 18px 18px; }
  .skill__zh { font-size: 48px; }
  .skill__py { margin-top: 10px; font-size: 14px; }
  .skill__en { font-size: 16px; }
  .action { padding: 22px; gap: 14px; margin-top: 10px; }
  .action__list { gap: 8px; }
  .action__list li { padding: 8px 14px 8px 11px; font-size: 14px; }

  /* HSK */
  .hsk { padding: 64px 0; }
  .hsk__mark { font-size: 96px; }
  .hsk__skills { grid-template-columns: 1fr 1fr; }
  .hsk__badge { width: 150px; justify-self: start; }
  .hsk__badge::before { inset: -8px; }
  .hsk__num { font-size: 56px; }
  .hsk__unit { font-size: 13px; }

  /* Levels */
  .levels { gap: 12px; }
  .stage { padding: 20px; }
  .stage__head { margin-bottom: 18px; }
  .ladder { gap: 14px; }
  .ladder li { grid-template-columns: 1fr auto; grid-template-areas: "lv n" "bar bar"; gap: 6px 12px; }
  .ladder__lv { grid-area: lv; }
  .ladder__n { grid-area: n; }
  .ladder__bar { grid-area: bar; height: 8px; }
  .ladder__n b { font-size: 20px; }
  .levels__for { margin-top: 16px; font-size: 14px; }

  /* Format */
  .format { gap: 28px; }
  .format__media { border-radius: var(--r-md); }
  .format__copy { gap: 20px; }
  .facts { gap: 10px; }
  .fact { padding: 16px; }
  .fact dd { font-size: 14px; }

  /* Evaluation */
  .evals { grid-template-columns: 1fr; gap: 12px; }
  .evals .eval:first-child { grid-column: auto; }
  .eval { padding: 22px; gap: 12px; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
  .eval .tags { grid-column: 1 / -1; }

  /* CTA */
  .cta { padding: 32px 24px; border-radius: 24px 24px 24px 6px; }
  .cta::after { bottom: -20px; border-right-width: 26px; border-top-width: 22px; }
  .cta__actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cta__actions .btn { width: 100%; }

  /* Footer */
  .footer { padding: 40px 0 calc(96px + var(--safe-b)); }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__brand img { width: 210px; }
  .footer__bottom { margin-top: 32px; flex-direction: column; gap: 6px; }

  /* Quick-action bar */
  .mbar { display: grid; }
  .mbar .btn--ghost { padding: 0 18px; }
}

@media (max-width: 360px) {
  .skills { grid-template-columns: 1fr 1fr; }
  .skill__zh { font-size: 40px; }
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .stagger > * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .js .reveal--zoom img { transform: none !important; }
}
