/* ===== Fonts (local) ===== */
@font-face { font-family: 'Avenir LT'; src: url('../fonts/AvenirLTProRoman.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Avenir LT'; src: url('../fonts/AvenirLTProMedium.otf') format('opentype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Avenir LT'; src: url('../fonts/AvenirLTProHeavy.otf') format('opentype'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Avenir LT'; src: url('../fonts/AvenirLTProBlack.otf') format('opentype'); font-weight: 900; font-display: swap; }
/* Thai = PSL KandaModern (PSL160pro = regular, PSL162pro = bold, despite their internal names). unicode-range limits it to Thai glyphs, so Latin text always renders in Avenir.
   size-adjust compensates for PSL's small x-height so Thai sits at the same visual size as Avenir. */
@font-face { font-family: 'PSL KandaModern'; src: url('../fonts/PSL160pro.ttf') format('truetype'); font-weight: 400 599; unicode-range: U+0E00-0E7F; size-adjust: 140%; font-display: swap; }
@font-face { font-family: 'PSL KandaModern'; src: url('../fonts/PSL162pro.ttf') format('truetype'); font-weight: 600 900; unicode-range: U+0E00-0E7F; size-adjust: 140%; font-display: swap; }

/* ===== Tokens ===== */
:root {
  --navy: #1e2a78;        /* GGED blue */
  --navy-900: #141b4d;
  --crimson: #a51c30;     /* Harvard crimson */
  --crimson-700: #85142a;
  --wse-red: #c8102e;
  --ink: #1b2038;
  --ink-2: #4a5170;
  --line: #e3e6ef;
  --bg-soft: #f5f6fa;
  --bg-tint: #f8f1f2;
  --white: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 27, 77, .08);
  --container: 1200px;
  --header-h: 76px;
  --font: 'Avenir LT', 'PSL KandaModern', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
html[lang="th"] body { line-height: 1.75; }
/* Thai script should not be letter-spaced */
html[lang="th"] .kicker, html[lang="th"] .local-label, html[lang="th"] .cert-badge { letter-spacing: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--crimson); }
h1, h2, h3 { margin: 0; line-height: 1.25; color: var(--navy-900); text-wrap: balance; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { line-height: 1.4; }
h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.kicker { font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--crimson); margin-bottom: 10px; }
.center-cta { margin-top: 40px; display: flex; justify-content: center; }

.ms { font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; display: inline-block; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; font-size: 22px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid rgba(165, 28, 48, .45); outline-offset: 2px; }

/* ===== Buttons ===== */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; border-radius: 999px; padding: 14px 26px; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; text-align: center; }
.btn .ms { font-size: 20px; }
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-700); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--crimson); }
.btn-light:hover { background: #fbe9ec; color: var(--crimson-700); }
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .7; cursor: progress; }
.text-link { font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: rgba(30, 42, 120, .3); }
.text-link:hover { text-decoration-color: var(--crimson); color: var(--crimson); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(20, 27, 77, .05); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
/* logos must never be squeezed: their boxes don't shrink, and images keep their own aspect ratio */
.brand, .local-centre { flex: none; }
.brand img, .local-centre img { max-width: none; width: auto; object-fit: contain; }
.brand img { height: 54px; width: auto; }
.local-centre { display: flex; align-items: center; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.local-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); line-height: 1.2; max-width: 92px; }
.local-centre img { height: 44px; width: auto; }
.local-centre .local-badge { height: 62px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.main-nav a:not(.btn):hover { color: var(--crimson); }
.main-nav .nav-cta { display: none; }
/* English labels are longer than Thai: slightly tighter so the desktop header stays on one row.
   Scoped to desktop widths so it never touches the mobile menu (≤1180px). */
@media (min-width: 1181px) {
  html[lang="en"] .main-nav { gap: 18px; }
  html[lang="en"] .main-nav a:not(.btn) { font-size: 14.5px; }
}
@media (min-width: 1181px) and (max-width: 1280px) {
  .main-nav, html[lang="en"] .main-nav { gap: 14px; }
  .main-nav a:not(.btn), html[lang="en"] .main-nav a:not(.btn) { font-size: 14px; }
  .header-inner { gap: 12px; }
  .local-centre { padding-left: 12px; }
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button { font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .04em; border: 0; background: transparent; color: var(--ink-2); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--navy-900); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; }
.burger { position: relative; width: 24px; height: 18px; display: block; }
.burger span { position: absolute; left: 0; width: 100%; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .45s cubic-bezier(.68, -0.4, .27, 1.4), opacity .2s ease, width .3s ease, top .3s ease; }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 7.75px; width: 70%; }
.burger span:nth-child(3) { top: 15.5px; }
.menu-toggle:hover .burger span:nth-child(2) { width: 100%; }
.nav-open .burger span:nth-child(1) { top: 7.75px; transform: rotate(135deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; transform: translateX(10px); }
.nav-open .burger span:nth-child(3) { top: 7.75px; transform: rotate(-135deg); }
.nav-backdrop { display: none; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; background: #eef3f8; }
.hero-bg { position: absolute; inset: 0; background: url('../img/city.webp') center bottom / cover no-repeat; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 30%, rgba(255,255,255,.45) 55%, rgba(255,255,255,.55) 100%); }
.hero-inner { position: relative; min-height: min(680px, calc(100vh - var(--header-h))); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 360px); gap: 24px clamp(16px, 2vw, 28px); align-items: center; padding-top: 48px; padding-bottom: 48px; }
.hero-people { align-self: stretch; position: relative; overflow: hidden; margin: -24px 0 -48px; min-height: 420px; }
.hero-people img { position: absolute; top: 24px; left: 50%; width: max(128%, 420px); max-width: none; transform: translateX(-50%); }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 17px; color: var(--navy); line-height: 1.45; padding-left: 14px; border-left: 4px solid var(--crimson); }
.eyebrow strong { font-weight: 800; }
.hero-tagline { font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); line-height: 1.3; margin-bottom: -8px; }
.hero h1 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; letter-spacing: -.02em; }
html[lang="th"] .hero h1 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 700; letter-spacing: 0; }
.hero h1 .accent { color: var(--crimson); display: block; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); }
.hero-location { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; color: var(--navy-900); font-size: 15.5px; }
.hero-location .ms { color: var(--crimson); margin-top: 2px; }
.hero-form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 50px rgba(20, 27, 77, .1); padding: 26px 22px 22px; }
.hero-form-head { display: flex; flex-direction: column; gap: 2px; }
.hero-form-sub { color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.hero-form { gap: 14px; }
.hero-form-title { font-weight: 800; font-size: clamp(24px, 2.2vw, 30px); color: var(--navy-900); line-height: 1.4; }
.hero-form-fields { display: grid; grid-template-columns: 1fr; gap: 12px 14px; align-items: start; }
.hero-form .form-row label { font-size: 14px; }
.hero-form input[type="text"], .hero-form input[type="tel"] { height: 48px; }
.hero-form .privacy-note { font-size: 13px; color: var(--ink); }
.hero-form-card .form-success { padding: 20px 6px; gap: 10px; }
.hero-form-card .form-success .ms { font-size: 48px; }
.hero-form-card .form-success p { font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 6px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-copy { display: flex; flex-direction: column; gap: 16px; }
.about-copy h2 { margin-bottom: 4px; }
.about-copy p:not(.kicker) { color: var(--ink-2); }
.about-copy p:nth-of-type(2) { color: var(--ink); font-weight: 600; }
.about-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.about-media img { width: 100%; height: 100%; object-fit: cover; object-position: 78% center; }

/* ===== How you learn ===== */
.learn { background: var(--bg-soft); }
.learn .section-head { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 220px; display: flex; align-items: center; padding: 32px clamp(24px, 4vw, 48px); background: url('../img/scene-07.webp') 70% center / cover no-repeat; }
.learn .section-head::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.8) 35%, rgba(255,255,255,0) 60%); }
.learn .section-head h2 { position: relative; }
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.learn-card { background: #fff; border-radius: var(--radius); padding: 30px 26px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.learn-icon { width: 58px; height: 58px; border-radius: 14px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.learn-card:nth-child(2) .learn-icon { background: var(--crimson); }
.learn-icon .ms { font-size: 30px; }
.learn-label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--crimson); }
.learn-card p:last-child { color: var(--ink-2); font-size: 16px; }

/* ===== Topics ===== */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.topic-card.topic-new { animation: fadeUp .5s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.topic-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f4f5fb, #fbeff1); display: flex; align-items: center; justify-content: center; }
.topic-media .ms { font-size: 52px; color: var(--crimson); }
.topic-media:has(img) { aspect-ratio: 1200 / 628; background: #fdf3ec; border-bottom: 1px solid var(--line); }
.topic-media img { width: 100%; height: 100%; object-fit: cover; }
.topic-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.topic-no { font-size: 13px; font-weight: 900; color: var(--crimson); letter-spacing: .06em; }
.topic-body h3 { font-size: 17.5px; }
.topic-body p { font-size: 15px; color: var(--ink-2); line-height: 1.55; }
html[lang="th"] .topic-body p { line-height: 1.7; }
.topics-more { margin-top: 32px; display: flex; justify-content: center; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ===== Who ===== */
.who { background: var(--bg-tint); }
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.who-card { background: #fff; border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; border-top: 4px solid var(--crimson); }
.who-card:nth-child(even) { border-top-color: var(--navy); }
.who-card .ms { font-size: 36px; color: var(--navy); }
.who-card p { color: var(--ink-2); font-size: 16px; }
.who-card strong { display: block; color: var(--navy-900); font-size: 18px; margin-bottom: 4px; }

/* ===== Certificate ===== */
.cert { position: relative; background: var(--crimson) url('../img/scene-03.webp') right var(--cert-y, 50%) / cover no-repeat; color: #fff; }
.cert::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(133,20,42,.94) 0%, rgba(150,18,38,.84) 45%, rgba(133,20,42,.62) 100%); }
.cert-inner { position: relative; min-height: 460px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(32px, 5vw, 72px); align-items: center; padding-top: 72px; padding-bottom: 72px; }
/* certificate visual: reveal (figure) > pointer tilt > idle float > image */
.cert-visual { margin: 0; perspective: 1100px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cert-tilt { position: relative; width: 100%; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-2.5deg); transition: transform .6s cubic-bezier(.16, 1, .3, 1); transform-style: preserve-3d; }
.cert-tilt.is-tilting { transition-duration: .15s; }
.cert-float { position: relative; animation: certFloat 6s ease-in-out infinite; }
.cert-float img { width: 100%; height: auto; filter: drop-shadow(0 28px 36px rgba(40, 0, 10, .45)); }
/* light sweep across the glass: periodic, and follows the pointer while tilting */
.cert-float::after { content: ''; position: absolute; inset: 5% 4.5% 6%; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%); background-size: 260% 100%; background-position: 160% 0; mix-blend-mode: soft-light; animation: certShine 7s ease-in-out infinite 2.5s; }
.cert-tilt.is-tilting .cert-float::after { animation: none; background-position: var(--gx, 50%) 0; opacity: .9; }
@keyframes certFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes certShine { 0%, 72% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.cert-copy { max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cert-copy h2 { color: #fff; }
.cert-copy p { font-size: 18px; color: rgba(255,255,255,.92); }
.cert .btn-primary { box-shadow: 0 10px 26px rgba(40, 0, 10, .35), 0 0 0 1px rgba(255, 255, 255, .35); }
.cert-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); padding: 7px 14px; border-radius: 999px; }

/* ===== Enquire ===== */
.enquire { background: #f2f6fa url('../img/city.webp') center bottom / cover no-repeat; }
.enquire-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.enquire-intro { display: flex; flex-direction: column; gap: 16px; }
.enquire-intro > p { color: var(--ink-2); font-size: 18px; }
.contact-card { margin-top: 16px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; grid-template-columns: 92px 1fr; gap: 16px 18px; align-items: center; }
.contact-card > img { width: 92px; }
.contact-place { font-size: 16px; color: var(--ink-2); line-height: 1.5; }
.contact-place strong { color: var(--navy-900); }
.contact-phones { margin-top: 6px; font-weight: 800; font-size: 17px; }
.contact-phones a { color: var(--navy-900); text-decoration: none; white-space: nowrap; }
.contact-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy-900); text-decoration: none; font-weight: 700; font-size: 15px; }
.chip:hover { border-color: var(--navy); }
.chip .ms { font-size: 20px; color: var(--crimson); }
.contact-qr { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.qr-link { flex: none; display: block; width: 116px; padding: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.qr-link:hover { border-color: #06c755; box-shadow: 0 8px 20px rgba(6, 199, 85, .18); transform: translateY(-2px); }
.qr-link img { width: 100%; height: auto; }
.qr-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qr-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; color: var(--navy-900); }
.qr-text p:not(.qr-title):not(.qr-id) { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
html[lang="th"] .qr-text p:not(.qr-title):not(.qr-id) { line-height: 1.6; }
.qr-id { font-size: 14.5px; font-weight: 800; color: #06a34a; letter-spacing: .02em; }
.line-mark { background: #06c755; color: #fff; font-size: 9px; font-weight: 900; border-radius: 6px; padding: 4px 4px; line-height: 1; }

.form-wrap { background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(20, 27, 77, .12); padding: clamp(24px, 4vw, 40px); }
.lead-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 700; font-size: 15px; color: var(--navy-900); }
.req { color: var(--crimson); }
.opt { font-weight: 500; color: var(--ink-2); font-size: 13.5px; }
.lead-form input[type="text"], .lead-form input[type="tel"], .lead-form input[type="email"], .lead-form select { font: inherit; font-size: 16px; height: 50px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid #d3d7e3; background: #fff; color: var(--ink); width: 100%; }
.lead-form select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a5170' stroke-width='2'/%3E%3C/svg%3E") right 16px center no-repeat; padding-right: 40px; }
.lead-form input:focus, .lead-form select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30, 42, 120, .15); }
.lead-form [aria-invalid="true"] { border-color: var(--crimson); }
.field-error { color: var(--crimson); font-size: 14px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; cursor: pointer; padding: 12px 14px; background: var(--bg-soft); border-radius: var(--radius-sm); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.privacy-note .ms { font-size: 18px; margin-top: 1px; }
.privacy-note a { font-weight: 700; margin-left: 4px; }
html[lang="th"] .privacy-note a { margin-left: 2px; }
.form-status { background: #fdecee; color: var(--crimson-700); border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; font-size: 15px; }
.form-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 40px 10px; outline: none; }
.form-success .ms { font-size: 64px; color: #1f8a4c; }
.form-success p { font-size: 19px; font-weight: 700; color: var(--navy-900); max-width: 420px; }

/* ===== Footer ===== */
/* Learn – Apply – Grow band */
.lag { background: var(--crimson); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.lag-row { display: flex; justify-content: center; align-items: center; gap: 20px clamp(20px, 3.5vw, 48px); }
.lag-item { display: flex; align-items: center; gap: 16px; }
.lag-item > .ms { font-size: 44px; opacity: .9; }
.lag-item strong { display: block; font-size: clamp(26px, 3vw, 36px); font-weight: 900; letter-spacing: .06em; line-height: 1.1; }
.lag-item span { font-size: 15px; opacity: .85; line-height: 1.5; }
.lag-chev { font-size: 40px; opacity: .55; }
@media (max-width: 760px) {
  .lag-row { display: grid; justify-content: center; justify-items: start; gap: 14px; }
  .lag-chev { transform: rotate(90deg); margin-left: 2px; }
}
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.8); padding: 40px 0 48px; font-size: 14.5px; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.footer-logo { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 6px 12px; }
.site-footer a { color: #fff; }
.footer-legal { font-size: 13px; color: rgba(255,255,255,.6); }

/* ===== Floating dock (CTA + back to top) ===== */
.fab-dock { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.fab-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.fab-dock > :where(.fab-cta), .fab-stack > * { pointer-events: auto; opacity: 0; visibility: hidden; transform: translateY(28px) scale(.7); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease, visibility 0s linear .55s, box-shadow .25s; }
.fab-dock.is-visible > :where(.fab-cta), .fab-dock.is-visible :where(.fab-stack > *) { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fab-dock.is-visible .fab-line { transition-delay: .07s, .07s, 0s, 0s; }
.fab-dock.is-visible .fab-top { transition-delay: .14s, .14s, 0s, 0s; }
.fab-dock.is-visible.cta-off .fab-cta { opacity: 0; visibility: hidden; transform: translateX(24px) scale(.6); transition: transform .35s ease, opacity .25s ease, visibility 0s linear .35s; }

.fab-cta { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 8px; border-radius: 999px; background: linear-gradient(135deg, var(--crimson) 0%, #c62d47 100%); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; box-shadow: 0 14px 30px rgba(133, 20, 42, .38); }
.fab-cta::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--crimson); animation: fabPulse 2.6s ease-out infinite; }
.fab-cta:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 18px 36px rgba(133, 20, 42, .45); }
.fab-cta:hover .fab-cta-arrow .ms { transform: translateX(4px); }
.fab-cta:active { transform: translateY(0) scale(.97); }
.fab-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.fab-shine::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-130%) skewX(-20deg); animation: fabShine 5s ease-in-out infinite 1s; }
.fab-cta-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--crimson); display: flex; align-items: center; justify-content: center; animation: fabWiggle 5s ease-in-out infinite 1s; }
.fab-cta-icon .ms { font-size: 22px; }
.fab-cta-label, .fab-cta-arrow { display: inline-block; overflow: hidden; max-width: 300px; transition: max-width .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, margin .45s; }
.fab-cta-arrow { max-width: 24px; }
.fab-cta-arrow .ms { font-size: 20px; transition: transform .25s ease; }
.fab-cta { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease, visibility 0s linear .55s, box-shadow .25s, padding .45s cubic-bezier(.2, .8, .2, 1), gap .45s; }
.fab-dock.is-visible .fab-cta { transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease, visibility 0s, box-shadow .25s, padding .45s cubic-bezier(.2, .8, .2, 1), gap .45s; }
.fab-cta.is-compact { padding: 0 8px; gap: 0; }
.fab-cta.is-compact .fab-cta-label, .fab-cta.is-compact .fab-cta-arrow { max-width: 0; opacity: 0; }
.fab-ripple { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: rgba(255, 255, 255, .55); pointer-events: none; animation: fabRipple .6s ease-out forwards; }

.fab-top { position: relative; flex: none; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #fff; color: var(--navy); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(20, 27, 77, .2); }
.fab-top:hover { box-shadow: 0 14px 32px rgba(20, 27, 77, .28); }
.fab-top:hover .fab-top-arrow { animation: fabBob .8s ease-in-out infinite; }
.fab-top.is-launching .fab-top-arrow { animation: fabLaunch .6s cubic-bezier(.5, 0, .3, 1); }
.fab-top-arrow { font-size: 24px; position: relative; }
.fab-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.fab-ring circle { fill: none; stroke-width: 3; }
.fab-ring-track { stroke: var(--line); }
.fab-ring-bar { stroke: var(--crimson); stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
/* tooltips sit to the left of the round buttons */
.fab-top::after, .fab-line::after { content: attr(data-tip); position: absolute; z-index: 2; right: calc(100% + 12px); top: 50%; background: var(--navy-900); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; padding: 6px 10px; border-radius: 8px; opacity: 0; transform: translate(6px, -50%); transition: opacity .2s, transform .2s; pointer-events: none; }
.fab-top:hover::after, .fab-top:focus-visible::after, .fab-line:hover::after, .fab-line:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* LINE button */
.fab-line { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; background: #06c755; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 10px 24px rgba(6, 199, 85, .38); }
.fab-line::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #06c755; opacity: 0; pointer-events: none; }
.fab-dock.is-visible .fab-line::before { animation: lineRing 2.2s ease-out .9s 2; }
.fab-line:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 30px rgba(6, 199, 85, .5); }
.fab-line:hover .fab-line-icon { animation: lineNod .6s ease-in-out; }
.fab-line:active { transform: scale(.95); }
.fab-line-icon { width: 38px; height: 38px; }
@keyframes lineRing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes lineNod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-10deg); } 65% { transform: rotate(8deg); } }

@keyframes fabPulse { 0% { transform: scale(1); opacity: .5; } 80%, 100% { transform: scale(1.18, 1.45); opacity: 0; } }
@keyframes fabShine { 0%, 65% { transform: translateX(-130%) skewX(-20deg); } 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes fabWiggle { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-16deg) scale(1.08); } 78% { transform: rotate(14deg) scale(1.08); } 82% { transform: rotate(-8deg); } 86% { transform: rotate(0); } }
@keyframes fabRipple { to { transform: scale(18); opacity: 0; } }
@keyframes fabBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes fabLaunch { 0% { transform: translateY(0); opacity: 1; } 45% { transform: translateY(-26px); opacity: 0; } 46% { transform: translateY(26px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* ===== Responsive ===== */
@media (max-width: 1280px) {
  .local-label { display: none; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) {
  :root { --header-h: 64px; }
  .brand img { height: 38px; }
  .local-centre img { height: 32px; }
  .local-centre .local-badge { height: 50px; }
  .local-centre { padding-left: 12px; }
  .header-inner { gap: 12px; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  /* mobile menu: panel unrolls from the header, links cascade in */
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 22px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(20,27,77,.14); border-radius: 0 0 20px 20px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    visibility: hidden; clip-path: inset(0 0 100% 0 round 0 0 20px 20px); transition: clip-path .4s cubic-bezier(.4, 0, .2, 1) .12s, visibility 0s linear .52s; }
  .site-header.nav-open .main-nav { visibility: visible; clip-path: inset(0 0 -60px 0 round 0 0 20px 20px); transition: clip-path .55s cubic-bezier(.16, 1, .3, 1), visibility 0s; }
  .main-nav > a { opacity: 0; transform: translateY(-14px); transition: opacity .2s ease, transform .2s ease; }
  .site-header.nav-open .main-nav > a { opacity: 1; transform: none; transition: opacity .4s ease, transform .5s cubic-bezier(.16, 1, .3, 1); }
  .site-header.nav-open .main-nav > a:nth-child(1) { transition-delay: .10s; }
  .site-header.nav-open .main-nav > a:nth-child(2) { transition-delay: .16s; }
  .site-header.nav-open .main-nav > a:nth-child(3) { transition-delay: .22s; }
  .site-header.nav-open .main-nav > a:nth-child(4) { transition-delay: .28s; }
  .site-header.nav-open .main-nav > a:nth-child(5) { transition-delay: .36s; }
  .main-nav > a:not(.btn) { position: relative; }
  .main-nav > a:not(.btn)::after { content: 'arrow_forward'; font-family: 'Material Symbols Outlined'; font-size: 20px; position: absolute; right: 0; top: 50%; transform: translate(-6px, -50%); opacity: 0; color: var(--crimson); transition: transform .25s ease, opacity .25s ease; }
  .main-nav > a:not(.btn):hover::after, .main-nav > a:not(.btn):focus-visible::after { opacity: 1; transform: translate(0, -50%); }
  .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(20, 27, 77, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
  .nav-backdrop.is-visible { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }
  html.nav-locked { overflow: hidden; }  /* html only — locking body too breaks the sticky header */
  .site-header.nav-open { background: #fff; }
  .main-nav a:not(.btn) { font-size: 17px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav .nav-cta { display: inline-flex; margin-top: 16px; }
}

@media (max-width: 960px) {

  .hero { display: flex; flex-direction: column; }
  .hero-bg { display: none; }
  .hero-inner { min-height: 0; padding-top: 40px; padding-bottom: 0; background: #fff; grid-template-columns: minmax(0, 1fr); }
  .hero-people { order: 3; min-height: 0; overflow: visible; display: flex; justify-content: center; margin: 8px -24px 0; padding-top: 24px; background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 40%), url('../img/city.webp') center bottom / cover no-repeat; margin-bottom: 0; }
  .hero-people img { position: static; transform: none; width: auto; max-width: 100%; max-height: 380px; }
  .hero { background: #fff; }

  .about-grid, .enquire-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; aspect-ratio: 16 / 9; }
  .learn-grid { grid-template-columns: 1fr; }
  .learn .section-head { min-height: 180px; background-position: 65% center; }
  .learn .section-head::before { background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.85) 50%, rgba(255,255,255,.2) 85%); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }

  .cert { background-position: 80% var(--cert-y, 50%); }
  .cert-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .cert-visual { max-width: 460px; width: 100%; justify-self: center; }
  .cert::before { background: linear-gradient(90deg, rgba(133,20,42,.94) 0%, rgba(150,18,38,.82) 60%, rgba(150,18,38,.45) 100%); }

  .site-footer { padding-bottom: 100px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .btn { white-space: normal; }
  .header-cta { display: none; }
  .fab-dock { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); gap: 10px; }
  .fab-cta { height: 52px; font-size: 14.5px; padding-right: 18px; }
  .fab-cta-icon { width: 36px; height: 36px; }
  .fab-cta-arrow { display: none; }
  .fab-top { width: 52px; height: 52px; }
  .fab-line { width: 52px; height: 52px; }
  .fab-line-icon { width: 34px; height: 34px; }
  .fab-stack { gap: 10px; }
  .fab-top::after, .fab-line::after { display: none; }
  .container { padding: 0 16px; }
  .local-centre { padding-left: 10px; }
  .local-centre img { height: 28px; }
  .local-centre .local-badge { height: 44px; }
  .brand img { height: 32px; }
  .header-inner { gap: 10px; }
  .lang-switch button { padding: 5px 9px; }
  .hero-people { margin-left: -16px; margin-right: -16px; }
  .hero-people img { max-height: 320px; }
  .hero-actions .btn { width: 100%; }
  .hero-form-card { padding: 20px 18px; }
  .hero-actions { justify-content: center; }
  .topic-grid, .who-grid { grid-template-columns: 1fr; }
  .topic-card:not(:has(img)) { flex-direction: row; }
  .topic-card:not(:has(img)) .topic-media { aspect-ratio: auto; width: 84px; flex: none; }
  .topic-media .ms { font-size: 36px; }
  .topic-body { padding: 16px; }
  .cert-inner { min-height: 0; }
  .contact-card { grid-template-columns: 72px 1fr; padding: 18px; }
  .contact-card > img { width: 72px; }
  .contact-qr { gap: 14px; }
  .qr-link { width: 96px; }
}

/* ===== Scroll reveal =====
   Only active when <head> adds .reveal-ready (JS on, IntersectionObserver, no reduced-motion).
   main.js adds .is-in as each element enters the viewport, then removes data-reveal once it has played. */
.reveal-ready [data-reveal] { opacity: 0; transition: opacity .7s ease, transform .9s cubic-bezier(.16, 1, .3, 1), clip-path 1.1s cubic-bezier(.65, 0, .35, 1); transition-delay: var(--rd, 0s); }
.reveal-ready [data-reveal="up"]      { transform: translateY(34px); }
.reveal-ready [data-reveal="rise"]    { transform: translateY(60px) scale(.97); }
.reveal-ready [data-reveal="left"]    { transform: translateX(-48px); }
.reveal-ready [data-reveal="zoom"]    { transform: translateY(24px) scale(.9); }
.reveal-ready [data-reveal="cert"]    { transform: translateY(60px) rotate(8deg) scale(.85); transition-duration: .8s, 1.2s; }
.reveal-ready [data-reveal="clip"]    { opacity: 1; clip-path: inset(0 100% 0 0 round var(--radius)); }
.reveal-ready [data-reveal="hero-bg"] { transform: scale(1.08); transition-duration: 1.2s, 1.8s; }
.reveal-ready [data-reveal].is-in     { opacity: 1; transform: none; }
.reveal-ready [data-reveal="clip"].is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.reveal-probe { position: absolute; pointer-events: none; visibility: hidden; }
.reveal-ready [data-reveal="clip"] > * { transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--rd, 0s) + .15s); }
.reveal-ready [data-reveal="clip"]:not(.is-in) > * { transform: scale(1.12); }
.reveal-ready .learn .section-head[data-reveal]:not(.is-in) h2 { opacity: 0; transform: translateX(-20px); }
.reveal-ready .learn .section-head[data-reveal] h2 { transition: opacity .6s ease, transform .8s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--rd, 0s) + .45s); }
/* little extras once a card lands */
.learn-card.is-in .learn-icon { animation: iconPop .7s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--rd, 0s) + .35s); }
.who-card.is-in > .ms { animation: iconPop .7s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--rd, 0s) + .3s); }
.cert-badge.is-in .ms { animation: badgeSpin 1s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--rd, 0s) + .3s); }
@keyframes iconPop { from { transform: scale(0) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes badgeSpin { from { transform: rotate(-200deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Privacy notice page (privacy.html) ===== */
.doc { max-width: 760px; padding: 48px 24px 80px; margin: 0 auto; }
.doc h1 { font-size: clamp(28px, 4vw, 38px); margin: 24px 0 8px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 22px; }
.doc-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.draft { background: #fff6e0; border: 1px solid #f1d38a; color: #6b4d00; padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-top: 16px; }
[data-page="privacy"] [data-l] { display: none; }
[data-page="privacy"][lang="th"] [data-l="th"], [data-page="privacy"][lang="en"] [data-l="en"] { display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
