/* ==========================================================================
   Alpha Academy Cambodia — Design System
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */
:root {
  /* Brand — taken from the logo gradient */
  --brand-700: #0740a8;
  --brand-600: #0b57d0;
  --brand-500: #1273e6;
  --brand-400: #2c9bf5;
  --brand-300: #5cc0fb;
  --brand-100: #dceeff;
  --brand-50:  #f0f7ff;

  --accent-500: #f5a524;
  --accent-100: #fff2da;

  --ink-900: #0b1220;
  --ink-800: #16233a;
  --ink-700: #2b3a53;
  --ink-500: #5b6b85;
  --ink-400: #8695ac;
  --ink-200: #dfe5ee;
  --ink-100: #eef2f7;
  --ink-50:  #f7f9fc;
  --white:   #ffffff;

  --success-500: #16a34a;

  --grad-brand: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 55%, var(--brand-300) 100%);
  --grad-soft:  linear-gradient(160deg, var(--brand-50) 0%, var(--white) 60%);

  /* Type */
  --font-sans: "Inter", "Kantumruy Pro", "Noto Sans Khmer", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", "Kantumruy Pro", sans-serif;

  /* Spacing / shape */
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7rem);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(11, 18, 32, .06);
  --shadow-sm: 0 2px 8px rgba(11, 18, 32, .06);
  --shadow-md: 0 12px 28px -12px rgba(11, 18, 32, .18);
  --shadow-lg: 0 28px 60px -24px rgba(7, 64, 168, .32);

  --ring: 0 0 0 3px rgba(18, 115, 230, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Semantic surfaces — the only tokens that must be re-declared for dark */
  --surface:    #ffffff;   /* cards, panels, inputs                        */
  --surface-2:  #f7f9fc;   /* subtle raised areas inside a card            */
  --header-bg:  rgba(255, 255, 255, .86);
  --footer-bg:  #0b1220;   /* pinned: the footer is dark in both themes    */
  --overlay:    rgba(11, 18, 32, .5);
  color-scheme: light;
}

/* ------------------------------------------------------------ 1b. Dark theme
   The neutral "ink" ramp is inverted rather than re-pointed, so every existing
   var(--ink-*) reference keeps its meaning (900 = strongest, 50 = faintest).
   Only the footer is pinned, because it is dark in the light theme too.      */
:root[data-theme="dark"] {
  --brand-700: #7cc0ff;
  --brand-600: #57a9ff;
  --brand-500: #3b94f0;
  --brand-400: #2c9bf5;
  --brand-300: #5cc0fb;
  --brand-100: #16294a;
  --brand-50:  #101d31;

  --accent-500: #f7b23f;
  --accent-100: #3a2c10;

  --ink-900: #eef3fa;
  --ink-800: #dfe7f2;
  --ink-700: #c3cddd;
  --ink-500: #98a6bd;
  --ink-400: #7c8aa2;
  --ink-200: #2d3b53;
  --ink-100: #222e42;
  --ink-50:  #101828;
  --white:   #0a1120;

  --success-500: #35c46f;

  --grad-soft: linear-gradient(160deg, #0f1c30 0%, var(--white) 60%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
  --shadow-md: 0 14px 30px -14px rgba(0, 0, 0, .75);
  --shadow-lg: 0 28px 60px -24px rgba(0, 0, 0, .85);

  --surface:   #131d31;
  --surface-2: #18233a;
  --header-bg: rgba(10, 17, 32, .82);
  --overlay:   rgba(0, 0, 0, .62);
  color-scheme: dark;
}

/* --------------------------------------------------------------- 2. Reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, picture { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-900);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .6em;
  font-weight: 800;
}
h1 { font-size: clamp(2.2rem, 5.4vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 700; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand-600); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------- 3. Layout */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}
.section { padding-block: var(--section-y); }
.section--tint { background: var(--ink-50); }
.section--brand-tint { background: var(--grad-soft); }

.section-head { max-width: 660px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-head p { color: var(--ink-500); font-size: 1.06rem; }
.section-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-600);
  background: var(--brand-100); border-radius: var(--r-pill);
  padding: .4rem .9rem; margin-bottom: 1rem;
}
.eyebrow--onDark { color: #fff; background: rgba(255,255,255,.16); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ------------------------------------------------------------ 4. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-weight: 650; font-size: .98rem; line-height: 1;
  padding: .95rem 1.6rem; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { color: #fff; box-shadow: var(--shadow-lg); }

.btn--ghost { background: transparent; color: var(--ink-900); border-color: var(--ink-200); }
.btn--ghost:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }

.btn--onDark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(6px); }
/* These two always sit on the brand gradient and always have a white face, in
   either theme — so the label is pinned rather than following --brand-700,
   which lightens in dark mode and would leave pale blue text on white. */
.btn--onDark:hover { background: #fff; color: #0740a8; border-color: #fff; }

.btn--white { background: #fff; color: #0740a8; box-shadow: var(--shadow-md); }
.btn--white:hover { color: #0740a8; box-shadow: var(--shadow-lg); }

.btn--lg { padding: 1.1rem 2rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ------------------------------------------------------------- 5. Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); border-bottom-color: var(--ink-100); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: .7rem; flex: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.06rem;
  color: var(--ink-900); letter-spacing: -.02em;
}
.brand-tag { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-400); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  position: relative; display: block; padding: .55rem .9rem;
  font-size: .95rem; font-weight: 550; color: var(--ink-700);
  border-radius: var(--r-sm); transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--brand-600); background: var(--brand-50); }
.nav-links a.is-active { color: var(--brand-700); font-weight: 700; }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .15rem;
  height: 2px; border-radius: 2px; background: var(--grad-brand);
}
.nav-cta { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--ink-200);
  background: var(--surface); border-radius: var(--r-sm); padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 19px; height: 2px; background: var(--ink-900);
  border-radius: 2px; position: relative; transition: background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 19px; height: 2px;
  background: var(--ink-900); border-radius: 2px; transition: transform .28s var(--ease), top .28s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.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: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: 76px 0 auto 0;
    background: var(--surface); border-bottom: 1px solid var(--ink-100);
    padding: 1rem var(--gutter) 1.75rem;
    display: grid; gap: .25rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
    max-height: calc(100dvh - 76px); overflow-y: auto;
  }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { padding: .85rem .75rem; font-size: 1.05rem; border-radius: var(--r-sm); }
  .nav-links a.is-active::after { display: none; }
  .nav-cta { margin-top: .75rem; flex-direction: column; align-items: stretch; }
  .nav-cta .btn { width: 100%; }
}
@media (min-width: 901px) {
  .nav-menu { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
}
@media (max-width: 900px) {
  .nav-tools { margin-left: auto; }
}
/* The tools take ~120px out of the bar, so between the mobile breakpoint and
   a comfortable desktop width the phone button gives up its seat. The number
   is still one tap away in the footer and the floating action button. */
@media (min-width: 901px) and (max-width: 1150px) {
  .nav-cta .btn--ghost { display: none; }
  .nav-links a { padding: .55rem .6rem; font-size: .9rem; }
}
@media (max-width: 400px) {
  .lang-switch button { padding: .3rem .5rem; font-size: .74rem; }
  .theme-btn { width: 36px; height: 36px; }
  .nav-toggle { width: 40px; height: 40px; }
}

/* --------------------------------------------------------------- 6. Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad-brand);
  color: #fff; isolation: isolate;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 62%);
}
.hero::before { width: 620px; height: 620px; top: -240px; right: -160px; }
.hero::after  { width: 460px; height: 460px; bottom: -260px; left: -140px; opacity: .7; }
.hero-grid-overlay {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 40%, #000 35%, transparent 78%);
}
.hero-inner {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center;
  grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 940px) { .hero-inner { grid-template-columns: 1fr; text-align: center; } }

.hero h1 { color: #fff; margin-bottom: .5rem; }
.hero h1 .accent {
  background: linear-gradient(100deg, #fff 20%, #ffe9bd 55%, #fff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: rgba(255,255,255,.92); max-width: 56ch; margin-bottom: 1.9rem; }
@media (max-width: 940px) { .hero-lede, .hero .btn-row { margin-inline: auto; justify-content: center; } }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; margin-top: 2.5rem;
  padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.22);
}
@media (max-width: 940px) { .hero-trust { justify-content: center; } }
.hero-trust li strong {
  display: block; font-family: var(--font-display); font-size: 1.7rem;
  font-weight: 800; color: #fff; line-height: 1.1;
}
.hero-trust li span { font-size: .85rem; color: rgba(255,255,255,.8); }

/* Hero visual card */
.hero-visual { position: relative; }
.hero-card {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(14px); border-radius: var(--r-xl);
  padding: 1.5rem; box-shadow: var(--shadow-lg);
}
.hero-card-illus { border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.hero-card-illus svg { width: 100%; height: auto; display: block; }
.hero-badge {
  position: absolute; display: flex; align-items: center; gap: .65rem;
  background: var(--surface); color: var(--ink-900); border-radius: var(--r-md);
  padding: .7rem .95rem; box-shadow: var(--shadow-md); font-size: .85rem; font-weight: 650;
  animation: float 5s ease-in-out infinite;
}
.hero-badge i {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--brand-100); color: var(--brand-600); flex: none;
}
.hero-badge i svg { width: 17px; height: 17px; }
.hero-badge--tl { top: -18px; left: -14px; }
.hero-badge--br { bottom: -20px; right: -10px; animation-delay: -2.5s; }
@media (max-width: 560px) { .hero-badge { display: none; } }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@media (prefers-reduced-motion: reduce) { .hero-badge { animation: none; } }

/* Wave divider. The svg is 1440x70, so at width:100% its height is exactly
   4.8611% of the body width — the same basis a percentage margin resolves
   against. Pulling it up by that amount lays the white curve over the bottom
   of the blue hero at every viewport size, with no colour seam. */
.wave {
  display: block; width: 100%; height: auto;
  margin-top: -4.8611%; position: relative; z-index: 1;
}
/* The svg carries fill="#ffffff" as a presentation attribute; CSS outranks it,
   so the curve follows the page background in either theme. */
.wave path { fill: var(--white); }
.wave + .section { padding-top: clamp(2rem, 4vw, 3.25rem); }

/* --------------------------------------------------------- 7. Page header */
.page-hero {
  background: var(--grad-brand); color: #fff; position: relative; overflow: hidden;
  padding-block: clamp(3rem, 6vw, 4.75rem) clamp(3.5rem, 7vw, 5.5rem); text-align: center;
}
.page-hero::before {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  top: -300px; right: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.3), transparent 65%);
}
.page-hero h1 { color: #fff; position: relative; }
.page-hero p { color: rgba(255,255,255,.9); max-width: 62ch; margin-inline: auto; font-size: 1.08rem; position: relative; }
.crumbs {
  display: flex; justify-content: center; gap: .5rem; font-size: .85rem;
  color: rgba(255,255,255,.75); margin-bottom: 1rem; position: relative;
}
.crumbs a { color: rgba(255,255,255,.9); }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------- 8. Cards */
.card {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-500); font-size: .97rem; }

.icon-badge {
  display: grid; place-items: center; width: 54px; height: 54px;
  border-radius: var(--r-md); background: var(--brand-100); color: var(--brand-600);
  margin-bottom: 1.1rem;
}
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge--accent { background: var(--accent-100); color: #b57610; }
.icon-badge--grad { background: var(--grad-brand); color: #fff; }

/* Service card with illustration */
.service-card {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card-media { aspect-ratio: 16 / 10; background: var(--brand-50); position: relative; overflow: hidden; }
.service-card-media svg { width: 100%; height: 100%; display: block; }
.service-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.service-card-body p { color: var(--ink-500); font-size: .96rem; flex: 1; }
.service-card .tag-row { margin-top: .35rem; }
.card-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 650; font-size: .93rem; color: var(--brand-600); margin-top: .5rem;
}
.card-link svg { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.card-link:hover svg { transform: translateX(4px); }

.tag-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .76rem; font-weight: 600; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: .3rem .65rem; border-radius: var(--r-pill);
}

/* --------------------------------------------------------------- 9. Lists */
.check-list { display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; color: var(--ink-700); }
.check-list li svg { width: 22px; height: 22px; flex: none; color: var(--brand-500); margin-top: .1rem; }
.check-list strong { color: var(--ink-900); }

.feature-list { display: grid; gap: 1.5rem; }
.feature-item { display: flex; gap: 1.1rem; align-items: flex-start; }
.feature-item .icon-badge { margin-bottom: 0; width: 48px; height: 48px; flex: none; }
.feature-item h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.feature-item p { color: var(--ink-500); font-size: .95rem; margin: 0; }

/* --------------------------------------------------------- 10. Stats band */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; text-align: center;
}
.stat {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: 1.6rem 1rem; box-shadow: var(--shadow-xs);
}
.stat strong {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem); line-height: 1;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: .45rem; font-size: .9rem; color: var(--ink-500); font-weight: 550; }

/* ------------------------------------------------------- 11. Split blocks */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split--reverse .split-media { order: 2; }
@media (max-width: 900px) { .split--reverse .split-media { order: 0; } }

.split-media {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--brand-50); box-shadow: var(--shadow-md);
  border: 1px solid var(--ink-100);
}
.split-media svg { width: 100%; height: auto; display: block; }

/* ------------------------------------------------------- 12. Subject grid */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.subject {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-md);
  padding: 1rem 1.1rem; box-shadow: var(--shadow-xs);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.subject:hover { transform: translateY(-3px); border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.subject i {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--brand-50); color: var(--brand-600);
}
.subject i svg { width: 21px; height: 21px; }
.subject b { display: block; color: var(--ink-900); font-size: .98rem; font-weight: 650; }
.subject small { color: var(--ink-400); font-size: .81rem; }

/* --------------------------------------------------------- 13. Level pills */
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1rem; }
.level {
  border-radius: var(--r-lg); padding: 1.5rem 1.4rem; color: #fff;
  background: var(--grad-brand); box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.level::after {
  content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  right: -55px; top: -55px; background: rgba(255,255,255,.13);
}
.level:nth-child(2) { background: linear-gradient(135deg, #0740a8, #1273e6); }
.level:nth-child(3) { background: linear-gradient(135deg, #1273e6, #5cc0fb); }
.level:nth-child(4) { background: linear-gradient(135deg, #0b57d0, #2c9bf5); }
.level b { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 750; margin-bottom: .3rem; }
.level span { font-size: .92rem; color: rgba(255,255,255,.88); position: relative; }

/* -------------------------------------------------------- 14. Steps / flow */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.75rem; counter-reset: step; }
.step { position: relative; padding-top: 3.6rem; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 800; color: #fff;
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-brand); box-shadow: var(--shadow-md);
}
.step h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.step p { color: var(--ink-500); font-size: .95rem; }

/* ------------------------------------------------------ 15. Testimonials */
.quote {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: 1.8rem; box-shadow: var(--shadow-xs); height: 100%;
  display: flex; flex-direction: column; gap: 1rem;
}
.stars { display: flex; gap: .15rem; color: var(--accent-500); }
.stars svg { width: 17px; height: 17px; }
.quote blockquote { margin: 0; color: var(--ink-700); font-size: 1rem; line-height: 1.7; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: .8rem; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-weight: 700; font-family: var(--font-display);
}
.quote figcaption b { display: block; color: var(--ink-900); font-size: .95rem; }
.quote figcaption span { font-size: .84rem; color: var(--ink-400); }

/* -------------------------------------------------------------- 16. FAQ */
.faq { display: grid; gap: .8rem; max-width: 820px; margin-inline: auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-md);
  padding: 0 1.25rem; box-shadow: var(--shadow-xs); transition: border-color .25s var(--ease);
}
.faq details[open] { border-color: var(--brand-300); }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2rem 1.15rem 0;
  font-weight: 650; color: var(--ink-900); position: relative; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .2rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--brand-500); border-bottom: 2px solid var(--brand-500);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 1.25rem; color: var(--ink-500); font-size: .97rem; }

/* --------------------------------------------------------------- 17. CTA */
.cta-band {
  background: var(--grad-brand); color: #fff; border-radius: var(--r-xl);
  padding: clamp(2.25rem, 5vw, 3.5rem); position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center;
}
.cta-band::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  right: -130px; top: -200px; background: rgba(255,255,255,.14);
}
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; text-align: center; } .cta-band .btn-row { justify-content: center; } }
.cta-band h2 { color: #fff; margin-bottom: .5rem; position: relative; }
.cta-band p { color: rgba(255,255,255,.9); margin: 0; position: relative; }
.cta-band .btn-row { position: relative; }

/* ------------------------------------------------------------ 18. Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm);
}
.contact-methods { display: grid; gap: 1rem; }
.contact-method {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.1rem; border: 1px solid var(--ink-100); border-radius: var(--r-md);
  background: var(--surface); transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.contact-method:hover { border-color: var(--brand-300); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.contact-method i {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 13px; background: var(--brand-100); color: var(--brand-600);
}
.contact-method i svg { width: 22px; height: 22px; }
.contact-method b { display: block; color: var(--ink-900); font-size: .93rem; margin-bottom: .15rem; }
.contact-method a, .contact-method p { font-size: .97rem; color: var(--ink-500); margin: 0; word-break: break-word; }
.contact-method a { color: var(--brand-600); font-weight: 600; }

/* Form */
.form-grid { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 650; color: var(--ink-800); }
.field label .req { color: #d33; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink-900);
  padding: .8rem .95rem; border: 1.5px solid var(--ink-200); border-radius: var(--r-sm);
  background: var(--surface); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field select { appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b85' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 17px; padding-right: 2.6rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(18,115,230,.15);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-400); }
.field .hint { font-size: .8rem; color: var(--ink-400); }
.field .error { font-size: .8rem; color: #d33; display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #d33; }
.field.is-invalid .error { display: block; }

.form-note { font-size: .85rem; color: var(--ink-400); }
.form-status {
  display: none; align-items: flex-start; gap: .6rem; padding: .9rem 1.1rem;
  border-radius: var(--r-sm); font-size: .93rem;
  background: #eaf7ef; color: #14532d; border: 1px solid #b7e4c7;
}
.form-status.is-visible { display: flex; }
.form-status svg { width: 19px; height: 19px; flex: none; margin-top: .1rem; }

/* Map */
.map-frame {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-sm); line-height: 0; background: var(--ink-100);
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }

/* Hours table */
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; }
.hours th, .hours td { text-align: left; padding: .7rem 0; border-bottom: 1px solid var(--ink-100); }
.hours th { color: var(--ink-800); font-weight: 600; }
.hours td { color: var(--ink-500); text-align: right; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------- 19. Footer */
.site-footer { background: var(--footer-bg); color: #aebbd0; padding-block: clamp(3rem, 6vw, 4.5rem) 0; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(2rem, 4vw, 3rem); padding-bottom: 3rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.footer-brand img { width: 42px; height: 42px; background: #fff; border-radius: 10px; padding: 3px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: #7f8fa8; }
.site-footer p { color: #9caac0; font-size: .94rem; }
.site-footer h4 {
  color: #fff; font-family: var(--font-display); font-size: .8rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1.1rem;
}
.footer-links { display: grid; gap: .65rem; }
.footer-links a { color: #aebbd0; font-size: .94rem; transition: color .2s var(--ease), padding-left .2s var(--ease); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact { display: grid; gap: .8rem; }
.footer-contact li { display: flex; gap: .65rem; align-items: flex-start; font-size: .94rem; }
.footer-contact svg { width: 17px; height: 17px; flex: none; margin-top: .22rem; color: var(--brand-300); }
.footer-contact a { color: #aebbd0; }
.footer-contact a:hover { color: #fff; }

.socials { display: flex; gap: .6rem; margin-top: 1.35rem; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: rgba(255,255,255,.08); color: #cfd9e8;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.socials a:hover { background: var(--brand-500); color: #fff; transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between; font-size: .87rem; color: #7f8fa8;
}
.footer-bottom a { color: #9caac0; }
.footer-bottom a:hover { color: #fff; }

/* --------------------------------------------------- 20. Floating actions */
.float-actions {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: grid; gap: .6rem; justify-items: end;
}
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-lg);
  border: 0; transition: transform .25s var(--ease);
}
.fab:hover { transform: scale(1.07); color: #fff; }
.fab svg { width: 25px; height: 25px; }
.fab--telegram { background: linear-gradient(135deg, #229ED9, #33b0ea); }
.fab--top { background: var(--surface); color: var(--ink-700); width: 44px; height: 44px; opacity: 0; pointer-events: none; border: 1px solid var(--ink-200); }
.fab--top svg { width: 19px; height: 19px; }
.fab--top.is-visible { opacity: 1; pointer-events: auto; }

/* --------------------------------------------------- 21. Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------- 22. Misc */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.lead { font-size: 1.08rem; color: var(--ink-500); }
.divider { height: 1px; background: var(--ink-100); border: 0; margin-block: clamp(2.5rem, 5vw, 4rem); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media print {
  .site-header, .float-actions, .site-footer, .btn { display: none !important; }
  body { color: #000; }
}

/* ==========================================================================
   23. Header tools — theme switch + language switch
   ========================================================================== */
.nav-tools { display: flex; align-items: center; gap: .45rem; flex: none; }

.lang-switch {
  display: inline-flex; align-items: center; padding: 3px;
  background: var(--ink-50); border: 1px solid var(--ink-100);
  border-radius: var(--r-pill);
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: .34rem .7rem; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-500); line-height: 1.4;
  transition: background-color .22s var(--ease), color .22s var(--ease);
}
.lang-switch button:hover { color: var(--ink-900); }
.lang-switch button.is-on {
  background: var(--surface); color: var(--brand-600);
  box-shadow: var(--shadow-xs);
}
.lang-switch button[data-lang="km"] { font-family: "Kantumruy Pro", "Noto Sans Khmer", var(--font-sans); }

.theme-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-pill); border: 1px solid var(--ink-100);
  background: var(--ink-50); color: var(--ink-700); padding: 0;
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}
.theme-btn:hover { color: var(--brand-600); border-color: var(--brand-300); transform: translateY(-1px); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
:root[data-theme="dark"] .theme-btn .i-sun  { display: none; }

/* ==========================================================================
   24. Nav dropdown — Learning ▸ Math ▸ Grade 12 Formula
   ========================================================================== */
.nav-links li { position: relative; }
.has-sub > a { display: inline-flex; align-items: center; gap: .35rem; }
.has-sub > a .chev { width: 13px; height: 13px; flex: none; transition: transform .25s var(--ease); }
.has-sub:hover > a .chev { transform: rotate(180deg); }

.sub, .sub2 {
  list-style: none; margin: 0; padding: .45rem;
  background: var(--surface);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 234px;
}
.sub a, .sub2 a {
  display: flex; align-items: center; gap: .7rem;
  padding: .6rem .7rem; border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 600; color: var(--ink-700);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.sub a:hover, .sub2 a:hover, .sub-item:hover > a { background: var(--brand-50); color: var(--brand-700); }
.sub a i, .sub2 a i {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  border-radius: 9px; background: var(--brand-100); color: var(--brand-600);
}
.sub a i svg, .sub2 a i svg { width: 16px; height: 16px; }
.sub a small, .sub2 a small {
  display: block; font-size: .76rem; font-weight: 500; color: var(--ink-400);
  letter-spacing: 0; margin-top: .05rem;
}
.sub a > span, .sub2 a > span { flex: 1; min-width: 0; }
.sub-item { position: relative; }
.sub-item > a { justify-content: space-between; }
.sub-item > a .chev { width: 13px; height: 13px; flex: none; margin-left: auto; }

@media (min-width: 901px) {
  .sub, .sub2 {
    position: absolute; z-index: 60;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .sub  { top: calc(100% + .55rem); left: -.4rem; }
  /* keeps the pointer path from the trigger to the panel hoverable */
  .has-sub::after { content: ""; position: absolute; inset: 100% 0 auto; height: .6rem; }
  .sub2 { top: -.45rem; left: calc(100% + .35rem); }
  .has-sub:hover > .sub,
  .has-sub:focus-within > .sub,
  .sub-item:hover > .sub2,
  .sub-item:focus-within > .sub2 {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  }
  .sub-item::after { content: ""; position: absolute; top: 0; left: 100%; width: .5rem; height: 100%; }
}
/* On a narrow desktop the second level would run off the right edge, because
   the nav sits hard against it. Flip it to open inward instead. */
@media (min-width: 901px) and (max-width: 1180px) {
  .sub2 { left: auto; right: calc(100% + .35rem); }
  .sub-item::after { left: auto; right: 100%; }
}

@media (max-width: 900px) {
  /* In the drawer everything is laid out flat and indented — no hover needed. */
  .has-sub > a .chev { display: none; }
  .sub  { margin: .1rem 0 .35rem .5rem; box-shadow: none; min-width: 0; }
  .sub2 { margin: .1rem 0 .1rem .6rem; box-shadow: none; min-width: 0; background: var(--ink-50); }
  .sub a, .sub2 a { font-size: .97rem; }
  .sub-item > a .chev { display: none; }
}

/* ==========================================================================
   25. Learning hub
   ========================================================================== */
.learn-hero { position: relative; overflow: hidden; }
.learn-hero .page-hero-inner { position: relative; z-index: 1; }
.learn-hero .chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.6rem;
}
.learn-hero .chip {
  padding: .42rem .95rem; border-radius: var(--r-pill); font-size: .84rem; font-weight: 600;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff;
}

.subject-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(1.25rem, 2.5vw, 1.75rem); }

.subject-card {
  --sc: var(--brand-600);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--ink-100);
  border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.subject-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--sc), color-mix(in srgb, var(--sc) 35%, transparent));
}
.subject-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--sc) 40%, var(--ink-100)); }
.subject-card-head { display: flex; align-items: center; gap: .95rem; padding: 1.5rem 1.5rem .9rem; }
.subject-card-head i {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 15px;
  background: color-mix(in srgb, var(--sc) 14%, transparent); color: var(--sc);
}
.subject-card-head i svg { width: 26px; height: 26px; }
.subject-card-head h3 { margin: 0; font-size: 1.18rem; }
.subject-card-head .kh { display: block; font-family: "Kantumruy Pro", "Noto Sans Khmer", var(--font-sans); font-size: .84rem; font-weight: 500; color: var(--ink-400); letter-spacing: 0; }
.subject-card-body { padding: 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.subject-card-body > p { color: var(--ink-500); font-size: .96rem; margin: 0; }

.topic-list { display: grid; gap: .5rem; margin-top: .2rem; }
.topic-list a {
  display: flex; align-items: center; gap: .8rem;
  padding: .8rem .95rem; border-radius: var(--r-md);
  background: var(--ink-50); border: 1px solid transparent;
  color: var(--ink-800); font-weight: 650; font-size: .95rem;
  transition: background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.topic-list a:hover { background: var(--surface); border-color: var(--sc); color: var(--sc); transform: translateX(4px); }
.topic-list a .go { margin-left: auto; width: 17px; height: 17px; flex: none; transition: transform .22s var(--ease); }
.topic-list a:hover .go { transform: translateX(3px); }
.topic-list a small { display: block; font-weight: 500; font-size: .79rem; color: var(--ink-400); }

.topic-list .is-soon { pointer-events: none; opacity: .62; }
.badge-soon {
  margin-left: auto; flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .22rem .55rem; border-radius: var(--r-pill);
  background: var(--ink-100); color: var(--ink-400);
}

.subject-card--soon { opacity: .78; }
.subject-card--soon:hover { transform: none; box-shadow: var(--shadow-xs); }

/* ==========================================================================
   26. Dark-theme refinements for pieces that are not token-driven
   ========================================================================== */
:root[data-theme="dark"] .form-status { background: #0f2f1e; color: #a7e8c3; border-color: #1d5137; }
:root[data-theme="dark"] .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a6bd' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
/* The hand-drawn illustrations are light-on-light artwork — keep them on a
   white plate in dark mode instead of letting them float on the page. */
:root[data-theme="dark"] .service-card-media,
:root[data-theme="dark"] .split-media,
:root[data-theme="dark"] .hero-card-illus { background: #eef6ff; }
:root[data-theme="dark"] .map-frame iframe { filter: invert(.92) hue-rotate(180deg); }
:root[data-theme="dark"] .icon-badge--accent { color: var(--accent-500); }
:root[data-theme="dark"] .field .error,
:root[data-theme="dark"] .req { color: #ff7b7b; }
:root[data-theme="dark"] .field.is-invalid input,
:root[data-theme="dark"] .field.is-invalid select,
:root[data-theme="dark"] .field.is-invalid textarea { border-color: #ff7b7b; }

/* Both themes animate the swap so the page does not flash. */
/* .sub / .sub2 are deliberately absent: they own an opacity + visibility
   transition for the flyout, and this block would replace it. */
body, .site-header, .card, .service-card, .subject, .quote, .faq details,
.contact-card, .contact-method, .stat, .subject-card, .topic-list a,
.field input, .field select, .field textarea {
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: .28s;
  transition-timing-function: var(--ease);
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; } }

/* ==========================================================================
   27. Khmer typography — applied when the KM language is active
   ========================================================================== */
:root[lang="km"] body,
:root[lang="km"] h1, :root[lang="km"] h2, :root[lang="km"] h3, :root[lang="km"] h4,
:root[lang="km"] .btn, :root[lang="km"] .brand-name {
  font-family: "Kantumruy Pro", "Noto Sans Khmer", "Khmer OS Battambang", var(--font-sans);
}
:root[lang="km"] body { line-height: 1.85; }
:root[lang="km"] h1, :root[lang="km"] h2, :root[lang="km"] h3, :root[lang="km"] h4 {
  letter-spacing: 0; line-height: 1.45;
}
:root[lang="km"] .eyebrow, :root[lang="km"] .brand-tag, :root[lang="km"] .site-footer h4 {
  letter-spacing: .04em; text-transform: none;
}
