/* 力元教育 focstu.com — main stylesheet (mobile-first; breakpoints 640 / 768 / 960 nav / 1024) */

/* 1. Tokens */
:root {
  --ink: #1b1a33;
  --ink-2: #585775;
  --bg: #fff9f1;
  --bg-warm: #fff3e4;
  --bg-soft: #f3f1ff;
  --line: #eee6da;
  --indigo-50: #eef0ff;
  --indigo-100: #e0e3ff;
  --indigo-200: #c7cbfe;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-800: #3730a3;
  --indigo-900: #312e81;
  --indigo-950: #1e1b4b;
  --coral-50: #fff1ec;
  --coral-300: #ff9c83;
  --coral-400: #ff7a59;
  --coral-500: #ff6b4a;
  --coral-700: #c8381f;
  --yellow-100: #fff3c4;
  --yellow-300: #ffd66b;
  --yellow-400: #ffc53d;
  --yellow-800: #7a4e00;
  --mint-100: #d9f7ee;
  --mint-300: #7be3c6;
  --mint-400: #2ed3a6;
  --mint-700: #086b52;
  --grad-coral: linear-gradient(135deg, #d1451a 0%, #d64020 42%, #d92f5c 100%);
  --grad-indigo: linear-gradient(135deg, #4f46e5 0%, #4338ca 55%, #5b21b6 100%);
  --font-sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(27, 26, 51, .05), 0 4px 12px rgba(27, 26, 51, .05);
  --shadow: 0 2px 4px rgba(27, 26, 51, .04), 0 10px 24px rgba(27, 26, 51, .07), 0 24px 48px -16px rgba(67, 56, 202, .16);
  --shadow-lg: 0 4px 10px rgba(27, 26, 51, .05), 0 18px 36px rgba(27, 26, 51, .08), 0 44px 80px -24px rgba(67, 56, 202, .28);
  --ease: cubic-bezier(.22, .8, .26, 1);
  --lift: transform .3s var(--ease), box-shadow .3s var(--ease);
  --header-h: 64px;
  --gutter: 16px;
  --section-pad: clamp(64px, 9vw, 116px);
  --wave-h: clamp(22px, 3.6vw, 52px);
  --focus: #4f46e5;
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 960px) { :root { --header-h: 76px; } }

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: .02em;
  overflow-x: hidden;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.35; letter-spacing: .01em; text-wrap: balance; text-spacing-trim: trim-start; }
p { text-wrap: pretty; }
/* Chinese line breaking (see phrase_html()): keep short phrases together; a leading bracket is set half-width */
.nw { display: inline-block; max-width: 100%; word-break: keep-all; overflow-wrap: anywhere; }
.ph-ok { word-break: keep-all; overflow-wrap: anywhere; }
.lp { font-feature-settings: "halt"; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--indigo-700); text-underline-offset: .2em; }
a:hover { color: var(--indigo-800); }
button { font: inherit; color: inherit; }
main { display: block; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--yellow-300); color: var(--ink); }
.icon { width: var(--i, 1.25em); height: var(--i, 1.25em); flex: none; }

/* 3. Utilities */
.container { width: min(100% - var(--gutter) * 2, 1200px); margin-inline: auto; }
.container-narrow { width: min(100% - var(--gutter) * 2, 860px); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 10px 18px; border-radius: 999px;
  background: var(--indigo-700); color: #fff; font-weight: 700; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  color: var(--coral-700);
  font-family: var(--font-display);
  font-size: .875rem; font-weight: 700; letter-spacing: .12em; line-height: 1.5;
}
.eyebrow::before {
  content: ""; width: 22px; height: 4px; flex: none; border-radius: 4px;
  background: var(--grad-coral);
}
.hl {
  --hl-text: linear-gradient(100deg, #c8381f 0%, #d63a2f 45%, #c92a5e 100%);
  --hl-mark: linear-gradient(90deg, rgba(255, 197, 61, .78), rgba(255, 214, 107, .6) 55%, rgba(123, 227, 198, .62));
  color: var(--coral-700);
  background-image: var(--hl-mark);
  background-repeat: no-repeat;
  background-size: 100% .34em;
  background-position: 0 88%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hl {
    background-image: var(--hl-text), var(--hl-mark);
    background-size: 100% 100%, 100% .34em;
    background-position: 0 0, 0 88%;
    -webkit-background-clip: text, border-box; background-clip: text, border-box;
    -webkit-text-fill-color: transparent;
  }
}
.prose a, .text-html a { font-weight: 700; }
.prose > * + * { margin-top: 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }

/* 4. Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: .7em 1.6em;
  border: 2px solid transparent; border-radius: 999px;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 700; line-height: 1.35; letter-spacing: .04em;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background-color .22s, color .22s, border-color .22s;
}
.btn .icon { --i: 1.15em; }
.btn .btn-icon { transition: transform .22s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon-arrow-right { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: #fff; background: var(--grad-coral); box-shadow: 0 10px 22px -8px rgba(214, 64, 32, .6), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover { color: #fff; box-shadow: 0 16px 28px -10px rgba(214, 64, 32, .7), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-secondary { color: #fff; background: var(--indigo-700); box-shadow: 0 10px 22px -10px rgba(67, 56, 202, .7); }
.btn-secondary:hover { color: #fff; background: var(--indigo-800); }
.btn-ghost { color: var(--indigo-700); background: rgba(255, 255, 255, .7); border-color: var(--indigo-200); }
.btn-ghost:hover { color: var(--indigo-800); background: #fff; border-color: var(--indigo-400); }
.btn-sm { min-height: 42px; padding: .45em 1.15em; font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-row .btn { flex: 1 1 220px; }
@media (min-width: 640px) { .btn-row .btn { flex: 0 0 auto; } }

.is-inverse .btn-secondary { color: var(--indigo-800); background: #fff; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .35); }
.is-inverse .btn-secondary:hover { color: var(--indigo-900); background: var(--indigo-50); }
.is-inverse .btn-ghost { color: #fff; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .55); }
.is-inverse .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .18); border-color: #fff; }
.is-inverse :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow-400); }

/* 5. Header & navigation */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 249, 241, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s, background-color .3s;
}
.site-header.is-scrolled::before { background: rgba(255, 249, 241, .9); border-bottom-color: rgba(67, 56, 202, .08); box-shadow: 0 8px 24px -12px rgba(27, 26, 51, .18); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark svg { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6); transition: transform .3s var(--ease); }
.brand:hover .brand-mark svg { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.3rem; font-weight: 900; letter-spacing: .08em; white-space: nowrap; }
.brand-sub { margin-top: 3px; font: 600 .625rem/1.2 var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.brand-logo { width: auto; height: 44px; }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; flex: none;
  border: 0; border-radius: 14px;
  background: var(--indigo-50); color: var(--indigo-800);
  cursor: pointer; transition: background-color .2s;
}
.nav-toggle:hover { background: var(--indigo-100); }
.nav-toggle .icon { --i: 26px; grid-area: 1 / 1; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle .icon-close { opacity: 0; transform: rotate(-90deg); }
.nav-toggle[aria-expanded="true"] .icon-open { opacity: 0; transform: rotate(90deg); }
.nav-toggle[aria-expanded="true"] .icon-close { opacity: 1; transform: none; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer;
  color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.nav-link:hover { color: var(--indigo-700); background: var(--indigo-50); }
.nav-link[aria-current="page"], .is-current > .nav-link, .is-current > .nav-split > .nav-link { color: var(--indigo-700); font-weight: 700; }
.nav-chevron { --i: 18px; transition: transform .25s var(--ease); }
.is-open .nav-chevron { transform: rotate(180deg); }
.nav-ext { --i: 15px; opacity: .6; }
.nav-split { display: flex; align-items: center; }
.sub-menu { list-style: none; margin: 0; padding: 0; }
.sub-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 14px;
  color: var(--ink); font-weight: 500; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.sub-link:hover { color: var(--indigo-800); background: var(--indigo-50); }
.sub-icon {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 11px; background: var(--indigo-50); color: var(--indigo-700);
  transition: background-color .2s, color .2s;
}
.sub-link:hover .sub-icon { background: var(--indigo-700); color: #fff; }
.sub-icon .icon { --i: 20px; }
.sub-label { flex: 1; }
.sub-ext { --i: 16px; color: var(--ink-2); }
.nav-cta .btn .icon { --i: 1.1em; }

/* Mobile (< 960px) */
@media (max-width: 959.98px) {
  .brand-mark svg { width: 38px; height: 38px; }
  .site-nav { font-size: 1.0625rem; }
  .nav-link { width: 100%; justify-content: space-between; padding: 13px 16px; border-radius: 16px; }
  .nav-link[aria-current="page"], .is-current > .nav-link { background: var(--indigo-50); }
  .nav-split .nav-link:first-child { flex: 1; }
  .nav-split .nav-sub-toggle { width: 52px; flex: none; justify-content: center; }
  .sub-menu { display: none; padding: 4px 0 8px 12px; }
  .is-open > .sub-menu { display: block; }
  .nav-cta { margin-top: 20px; }
  .nav-cta .btn { width: 100%; }

  .js .site-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 12px var(--gutter) 40px;
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg);
    border-top: 1px solid rgba(67, 56, 202, .08);
    opacity: 0; visibility: hidden;
    transform: translateY(-14px);
    clip-path: inset(0 0 100% 0);
    transition: opacity .25s var(--ease), transform .3s var(--ease), clip-path .35s var(--ease), visibility 0s linear .35s;
  }
  .js.nav-open .site-nav {
    opacity: 1; visibility: visible; transform: none; clip-path: inset(0 0 0 0);
    transition: opacity .25s var(--ease), transform .3s var(--ease), clip-path .35s var(--ease), visibility 0s;
  }
  .js .nav-list > li { border-bottom: 1px dashed var(--line); padding: 4px 0; }
  html.nav-open, html.nav-open body { overflow: hidden; }

  /* Without JavaScript: simple wrapped nav under the logo */
  html:not(.js) .site-header { position: relative; height: auto; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 10px; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .site-nav { width: 100%; font-size: .9375rem; }
  html:not(.js) .nav-list { display: flex; flex-wrap: wrap; gap: 4px; }
  html:not(.js) .nav-list > li { flex: 1 1 auto; }
  html:not(.js) .nav-link { padding: 8px 12px; background: var(--indigo-50); }
  html:not(.js) .sub-menu { display: block; flex-basis: 100%; }
}

/* Desktop (>= 960px) */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 14px; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-item { position: relative; }
  .nav-link { position: relative; padding: 9px 14px; border-radius: 999px; font-size: 1rem; }
  .nav-split .nav-link:first-child { padding-right: 4px; }
  .nav-split .nav-sub-toggle { padding-left: 4px; padding-right: 8px; }
  .nav-link[aria-current="page"]::after, .is-current > .nav-link::after, .is-current > .nav-split > .nav-link:first-child::after {
    content: ""; position: absolute; left: 50%; bottom: 1px;
    width: 18px; height: 3px; margin-left: -9px; border-radius: 3px;
    background: var(--grad-coral);
  }
  .sub-menu {
    position: absolute; top: calc(100% + 12px); left: 50%;
    min-width: 250px; padding: 10px;
    background: #fff; border-radius: 22px;
    border: 1px solid rgba(67, 56, 202, .08);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
  }
  .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
  .sub-menu::after {
    content: ""; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px;
    margin-left: -7px; background: #fff; transform: rotate(45deg);
    border-left: 1px solid rgba(67, 56, 202, .08); border-top: 1px solid rgba(67, 56, 202, .08);
    border-top-left-radius: 4px;
  }
  .is-open > .sub-menu,
  html:not(.js) .has-children:hover > .sub-menu,
  html:not(.js) .has-children:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
    transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s;
  }
  html:not(.js) .has-children:hover .nav-chevron,
  html:not(.js) .has-children:focus-within .nav-chevron { transform: rotate(180deg); }
}
@media (min-width: 960px) and (max-width: 1099.98px) {
  .nav-link { padding-inline: 10px; }
  .brand-sub { display: none; }
}

/* 6. Sections, tones & waves */
.block { position: relative; isolation: isolate; z-index: 0; padding-block: var(--section-pad); }
.block:not(.tone-default) { z-index: 1; }
.tone-soft { background: var(--bg-soft); }
.tone-brand {
  background:
    radial-gradient(34% 40% at 92% 40%, rgba(124, 58, 237, .5), transparent 70%),
    radial-gradient(30% 36% at 4% 62%, rgba(49, 46, 129, .6), transparent 70%),
    var(--indigo-700);
}
.tone-dark {
  background:
    radial-gradient(36% 40% at 94% 38%, rgba(79, 70, 229, .45), transparent 70%),
    radial-gradient(30% 36% at 3% 64%, rgba(124, 58, 237, .3), transparent 70%),
    var(--indigo-950);
}
.wave { position: absolute; left: 0; right: 0; height: var(--wave-h); pointer-events: none; }
.wave svg, .hero-wave svg, .footer-wave svg { width: 100%; height: 100%; }
.wave-top { bottom: calc(100% - 1px); }
.wave-bottom { top: calc(100% - 1px); transform: scale(-1, -1); }
.tone-soft .wave { color: var(--bg-soft); }
.tone-brand .wave { color: var(--indigo-700); }
.tone-dark .wave { color: var(--indigo-950); }
.block-page-header + .block { padding-top: clamp(48px, 7vw, 88px); }
.block-hero + .block > .wave-top, .block-page-header + .block > .wave-top, main > .block:last-child > .wave-bottom { display: none; }

.is-inverse { color: #fff; }
.card, .contact-card, .faq-item, .stats-grid, .feature, .step { color: var(--ink); }
.is-inverse .eyebrow { color: var(--yellow-300); }
.is-inverse .eyebrow::before { background: var(--yellow-300); }
.is-inverse .section-intro, .is-inverse .hero-subtitle, .is-inverse .page-subtitle { color: var(--indigo-100); }
.is-inverse .hl {
  --hl-text: linear-gradient(100deg, #ffd66b, #ffb38a 60%, #ff9c83);
  --hl-mark: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .08));
  color: var(--yellow-300);
}
.is-inverse a:not([class]) { color: var(--yellow-300); }

/* 7. Section head */
.section-head { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.section-head--left { margin-left: 0; text-align: left; }
.section-title { font-size: clamp(1.625rem, 1.15rem + 2vw, 2.625rem); font-weight: 800; }
.section-intro { margin-top: 14px; color: var(--ink-2); font-size: clamp(1rem, .95rem + .25vw, 1.125rem); }
.section-head--center .section-intro p, .page-subtitle p, .cta-text p, .faq-q, .stat-label { text-wrap: balance; }

/* 8. Hero */
.block-hero {
  overflow: hidden;
  padding-top: clamp(36px, 6vw, 84px);
  padding-bottom: calc(var(--wave-h) + clamp(56px, 8vw, 110px));
  background: linear-gradient(180deg, var(--bg-warm) 0%, #fff7ee 55%, var(--bg) 100%);
}
.hero-bg, .page-header-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; display: block; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
.hero-bg .blob-1 { width: 520px; height: 520px; top: -170px; right: -140px; background: radial-gradient(circle at 30% 30%, rgba(255, 214, 107, .75), rgba(255, 197, 61, .2) 70%); }
.hero-bg .blob-2 { width: 380px; height: 380px; bottom: -120px; left: -150px; background: radial-gradient(circle at 60% 40%, rgba(123, 227, 198, .55), rgba(46, 211, 166, .1) 70%); border-radius: 58% 42% 37% 63% / 55% 41% 59% 45%; }
.dot-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(67, 56, 202, .16) 1.3px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(60% 55% at 22% 30%, #000, transparent 75%);
  mask-image: radial-gradient(60% 55% at 22% 30%, #000, transparent 75%);
}
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow-pill {
  gap: 8px; padding: 7px 16px 7px 10px; border-radius: 999px;
  background: #fff; color: var(--indigo-700); letter-spacing: .06em;
  box-shadow: 0 6px 18px -8px rgba(67, 56, 202, .35);
  border: 1px solid rgba(67, 56, 202, .1);
}
.eyebrow-pill::before { display: none; }
.eyebrow-pill .icon { --i: 26px; padding: 4px; border-radius: 50%; color: #fff; background: var(--grad-coral); }
.hero-title { font-size: clamp(2.05rem, 1.3rem + 3.4vw, 3.9rem); font-weight: 900; line-height: 1.24; letter-spacing: .015em; }
.hero-subtitle { margin-top: 18px; max-width: 36em; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); }
.hero-actions { margin-top: 30px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 26px; }
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; font-size: .9375rem; }
.hero-badges .icon { --i: 24px; padding: 4px; border-radius: 50%; color: var(--mint-700); background: var(--mint-100); stroke-width: 2.6; }

.hero-art { position: relative; width: min(100%, 500px); margin-inline: auto; }
.hero-art-frame { position: relative; }
.hero-illustration { width: 100%; filter: drop-shadow(0 30px 40px rgba(67, 56, 202, .16)); }
.glyphs { position: absolute; inset: 0; pointer-events: none; }
.glyph { position: absolute; display: block; width: var(--s, 34px); height: var(--s, 34px); }
.glyph svg { width: 100%; height: 100%; overflow: visible; }
.hero-glyphs .g-1 { top: 2%; left: 4%; color: var(--coral-500); --s: 38px; --r: -12deg; }
.hero-glyphs .g-2 { top: -2%; right: 18%; color: var(--indigo-500); --r: 10deg; --delay: -2s; }
.hero-glyphs .g-3 { top: 38%; right: -2%; color: var(--mint-400); --s: 40px; --delay: -4s; }
.hero-glyphs .g-4 { bottom: 10%; left: -2%; color: var(--yellow-400); --s: 40px; --delay: -1s; }
.hero-glyphs .g-5 { bottom: -2%; right: 20%; color: var(--coral-400); --r: 8deg; --delay: -3s; }
.hero-glyphs .g-6 { top: 44%; left: -4%; color: var(--indigo-400); --s: 26px; --delay: -5s; }
.hero-glyphs .g-7 { top: 16%; right: 2%; color: var(--yellow-400); --s: 26px; --delay: -2.5s; }
.hero-glyphs .g-8 { bottom: 2%; left: 30%; color: var(--indigo-200); --s: 44px; --delay: -6s; }
.hero-glyphs .g-9 { top: 8%; left: 40%; color: var(--coral-300); --s: 22px; --delay: -1.5s; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: var(--wave-h); color: var(--bg); z-index: 1; }
.block:has(+ .tone-soft) .hero-wave { color: var(--bg-soft); }
.block:has(+ .tone-brand) .hero-wave { color: var(--indigo-700); }
.block:has(+ .tone-dark) .hero-wave { color: var(--indigo-950); }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .hero-art { width: 100%; }
}
@media (max-width: 959.98px) {
  .hero-copy { text-align: center; }
  .hero-subtitle { margin-inline: auto; }
  .hero-subtitle p { text-wrap: balance; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-art { width: min(88%, 440px); }
}

/* 404 */
.hero-404 .hero-title { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); }
.hero-404 .eyebrow-pill { font-size: 1rem; }

/* 9. Page header & breadcrumb */
.block-page-header {
  overflow: hidden; text-align: center;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: calc(var(--wave-h) + clamp(40px, 6vw, 76px));
  background: linear-gradient(160deg, #fff1e3 0%, #f6f0ff 60%, #eef0ff 100%);
}
.page-header-bg .blob-1 { width: 340px; height: 340px; top: -150px; left: -90px; background: radial-gradient(circle at 60% 60%, rgba(255, 214, 107, .6), transparent 70%); }
.page-header-bg .blob-2 { width: 380px; height: 380px; bottom: -200px; right: -120px; background: radial-gradient(circle at 40% 40%, rgba(255, 156, 131, .4), transparent 70%); }
.page-header-inner { position: relative; max-width: 820px; }
.page-title { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.5rem); font-weight: 900; }
.page-subtitle { margin: 14px auto 0; max-width: 40em; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + .3vw, 1.2rem); }
.breadcrumb { margin-bottom: 18px; font-size: .875rem; }
.breadcrumb ol { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .75); box-shadow: 0 4px 14px -8px rgba(67, 56, 202, .3); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.breadcrumb li + li::before { content: ""; width: 6px; height: 6px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .5; margin-right: 4px; }
.breadcrumb a { color: var(--indigo-700); font-weight: 700; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }
.page-glyphs .g-1 { top: 22%; left: 8%; color: var(--coral-400); --r: -10deg; }
.page-glyphs .g-2 { top: 18%; right: 10%; color: var(--indigo-400); --s: 38px; --delay: -2s; }
.page-glyphs .g-3 { bottom: 26%; right: 6%; color: var(--yellow-400); --delay: -3s; }
.page-glyphs .g-4 { bottom: 20%; left: 5%; color: var(--mint-400); --s: 30px; --delay: -1s; }
.page-glyphs .g-5 { top: 58%; left: 16%; color: var(--indigo-200); --s: 22px; --delay: -4s; }
.page-glyphs .g-6 { top: 12%; left: 30%; color: var(--coral-300); --s: 22px; --delay: -2.5s; }
@media (max-width: 767.98px) {
  .page-glyphs .g-5, .page-glyphs .g-6 { display: none; }
  .page-glyphs .g-1 { top: 8%; left: 4%; }
  .page-glyphs .g-2 { top: 6%; right: 4%; --s: 30px; }
  .page-glyphs .g-3, .page-glyphs .g-4 { bottom: calc(var(--wave-h) + 6px); --s: 24px; }
  .page-glyphs .g-3 { right: 5%; }
  .page-glyphs .g-4 { left: 5%; }
}

/* 10. Tints (shared by items) */
.tint-coral, .tint-indigo, .tint-mint { --t-on: #fff; }
.tint-yellow { --t-on: #3d2a00; }
.tint-coral { --t-bg: var(--coral-50); --t-ink: var(--coral-700); --t-solid: var(--coral-500); --t-grad: linear-gradient(135deg, #ef5b3f, #d6336c); }
.tint-indigo { --t-bg: var(--indigo-50); --t-ink: var(--indigo-700); --t-solid: var(--indigo-500); --t-grad: linear-gradient(135deg, #6366f1, #4338ca); }
.tint-mint { --t-bg: var(--mint-100); --t-ink: var(--mint-700); --t-solid: var(--mint-400); --t-grad: linear-gradient(135deg, #0f9a7a, #07785e); }
.tint-yellow { --t-bg: var(--yellow-100); --t-ink: var(--yellow-800); --t-solid: var(--yellow-400); --t-grad: linear-gradient(135deg, #ffd66b, #f59e0b); }

/* 11. Stats */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px;
  padding: 12px; border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(67, 56, 202, .06);
}
.stat {
  display: flex; flex-direction: row-reverse; align-items: baseline; justify-content: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius); text-align: center;
  background: var(--t-bg); white-space: nowrap;
}
.stat-value { font-family: var(--font-display); font-weight: 800; line-height: 1.15; font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.875rem); color: var(--t-ink); }
.stat-value.is-long { font-size: clamp(1rem, .85rem + .5vw, 1.2rem); }
.stat-label { color: var(--ink); font-weight: 500; font-size: .875rem; line-height: 1.4; }
@media (min-width: 768px) { .stats-grid { padding: 16px; gap: 14px; } .stat { padding: 10px 16px; } }
@media (max-width: 559px) { .stats-grid { grid-template-columns: 1fr; } }
.block-stats { padding-bottom: clamp(8px, 2vw, 24px); }
.block-hero + .block-stats { z-index: 2; margin-top: calc(-1 * (var(--wave-h) + clamp(36px, 5vw, 70px))); padding-top: 0; }

/* 12. Card grids (features, cards, portal, contact): 1 → 2 → 3/4 columns; an incomplete last row is centred */
.feature-grid, .card-grid, .portal-grid, .contact-grid { --gap: clamp(16px, 2vw, 24px); display: grid; gap: var(--gap); }
@media (min-width: 640px) {
  .feature-grid, .card-grid, .portal-grid, .contact-grid { --cols: 2; display: flex; flex-wrap: wrap; justify-content: center; }
  .feature-grid > li, .card-grid > li, .portal-grid > li, .contact-grid > li {
    flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols) - .1px); min-width: 0;
  }
}
@media (min-width: 1024px) {
  .cols-3, .contact-grid { --cols: 3; }
  .cols-4 { --cols: 4; }
}

/* Features */
.feature {
  position: relative; padding: 30px 26px 28px;
  border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: var(--lift);
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-icon {
  display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 20px;
  border-radius: 20px; color: var(--t-ink); background: var(--t-bg);
  transition: transform .35s var(--ease);
}
.feature-icon .icon { --i: 30px; }
.feature:hover .feature-icon { transform: rotate(-8deg) scale(1.06); }
.feature-title { font-size: 1.25rem; margin-bottom: 8px; }
.feature-text { color: var(--ink-2); }
.tone-soft .feature { border-color: transparent; }
.is-inverse .feature, .is-inverse .step { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .13); box-shadow: none; }
.is-inverse .feature-text, .is-inverse .step-text { color: var(--indigo-100); }
.is-inverse .feature-icon { color: var(--t-on, #fff); background: var(--t-grad); box-shadow: 0 10px 22px -10px var(--t-solid); }

/* 13. Cards */
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: var(--lift);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { overflow: hidden; background: var(--t-bg); aspect-ratio: 16 / 10; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 26px 24px; }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 16px; color: var(--t-on, #fff); background: var(--t-grad);
  box-shadow: 0 10px 20px -10px var(--t-solid);
}
.card-media + .card-body .card-icon { margin-top: -52px; border: 4px solid #fff; width: 60px; height: 60px; border-radius: 20px; }
.card-icon .icon { --i: 26px; }
.card-title { font-size: 1.3rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { padding: 2px 12px; border-radius: 999px; background: var(--t-bg); color: var(--t-ink); font-size: .8125rem; font-weight: 700; }
.card-text { margin-top: 12px; color: var(--ink-2); }
.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 18px;
  color: var(--t-ink); font-weight: 700; text-decoration: none;
}
.card-link .icon { --i: 18px; transition: transform .25s var(--ease); }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card:hover .card-link { color: var(--t-ink); }
.card:hover .card-link .icon-arrow-right { transform: translateX(4px); }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: var(--radius-lg); }

/* 14. Steps */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step {
  position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px; align-items: start; align-content: start;
  padding: 22px; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: 20px; color: var(--t-on, #fff); background: var(--t-grad);
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 10px 20px -10px var(--t-solid);
}
.step-title { font-size: 1.2rem; margin-top: 2px; }
.step-text { margin-top: 6px; color: var(--ink-2); }
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 50px; top: 88px; bottom: -19px;
  border-left: 3px dashed var(--indigo-200);
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 24px; }
  .step { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 34px 22px 30px; }
  .step-num { width: 68px; height: 68px; font-size: 1.5rem; border-radius: 24px; transform: rotate(-6deg); }
  .step:nth-child(even) .step-num { transform: rotate(6deg); }
  .step:not(:last-child)::after {
    left: calc(50% + 46px); right: calc(-50% + 22px); top: 68px; bottom: auto;
    border-left: 0; border-top: 3px dashed var(--indigo-200); z-index: 1;
  }
}
.is-inverse .step::after { border-color: rgba(255, 255, 255, .3) !important; }

/* 15. Portal */
@media (min-width: 1100px) { .portal-grid.count-4 { --cols: 4; } .portal-grid.count-3 { --cols: 3; } }
.portal-grid > li { display: flex; }
.portal-tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto;
  grid-template-areas: "icon title title" "text text go";
  align-items: center; column-gap: 14px; row-gap: 10px; width: 100%;
  padding: 22px 24px 20px; border-radius: 30px;
  background: #fff; color: var(--ink); text-decoration: none;
  border: 1px solid rgba(67, 56, 202, .08); box-shadow: var(--shadow);
  transition: var(--lift);
}
.portal-tile::before {
  content: ""; position: absolute; z-index: -1; right: -60px; bottom: -70px;
  width: 190px; height: 190px; border-radius: 50%;
  background: var(--t-bg); transition: transform .5s var(--ease);
}
a.portal-tile:hover { color: var(--ink); transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--shadow-lg); }
a.portal-tile:hover::before { transform: scale(1.35); }
@media (max-width: 639.98px) { .portal-tile::before { width: 130px; height: 130px; right: -50px; bottom: -60px; } }
.portal-top { grid-area: icon; display: flex; align-items: center; justify-content: flex-start; gap: 12px; margin-bottom: 0; }
.portal-icon {
  display: grid; place-items: center; width: 64px; height: 64px; flex: none;
  border-radius: 22px; color: var(--t-on, #fff); background: var(--t-grad);
  box-shadow: 0 12px 22px -10px var(--t-solid);
  transition: transform .35s var(--ease);
}
.portal-icon .icon { --i: 32px; }
a.portal-tile:hover .portal-icon { transform: rotate(-8deg) scale(1.05); }
.portal-badge { padding: 3px 12px; border-radius: 999px; background: var(--t-bg); color: var(--t-ink); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.portal-title { grid-area: title; font-size: 1.4rem; font-weight: 800; }
.portal-text { grid-area: text; color: var(--ink-2); font-size: .9688rem; }
.portal-go {
  grid-area: go; align-self: center; justify-self: end; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  color: var(--t-ink); font-weight: 700;
}
.portal-go .icon { --i: 18px; transition: transform .25s var(--ease); }
a.portal-tile:hover .portal-go .icon { transform: translate(3px, -3px); }

/* 16. FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: box-shadow .25s; }
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--indigo-100); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px 18px 24px; border-radius: 22px;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.6;
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover .faq-q { color: var(--indigo-700); }
.faq-icon { position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--indigo-50); transition: background-color .25s, transform .3s var(--ease); }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.5px; margin: -1.25px 0 0 -7px;
  border-radius: 2px; background: var(--indigo-700); transition: transform .3s var(--ease), background-color .25s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--grad-coral); transform: rotate(180deg); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: #fff; }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-a { padding: 0 24px 22px; color: var(--ink-2); }
.faq-a p + p { margin-top: .8em; }

/* 17. CTA */
.block-cta { padding-block: clamp(40px, 6vw, 80px); }
.block.tone-default + .block-cta.tone-default { padding-top: 0; }
.cta-card {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(40px, 6vw, 76px) clamp(22px, 5vw, 76px);
  border-radius: 36px; text-align: center; color: #fff;
  background: linear-gradient(120deg, #4338ca 0%, #5b3fd6 50%, #7c3aed 100%);
  box-shadow: var(--shadow-lg);
}
.cta-deco { position: absolute; inset: 0; z-index: -1; }
.cta-blob { position: absolute; border-radius: 50%; }
.cta-blob-1 { width: 320px; height: 320px; top: -150px; right: -80px; background: radial-gradient(circle, rgba(255, 122, 89, .55), transparent 68%); }
.cta-blob-2 { width: 300px; height: 300px; bottom: -170px; left: -60px; background: radial-gradient(circle, rgba(46, 211, 166, .45), transparent 68%); }
.cta-title { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem); font-weight: 800; }
.cta-text { max-width: 40em; margin: 14px auto 0; color: #fff; opacity: .92; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
.cta-actions { justify-content: center; }
.cta-glyphs .glyph { color: rgba(255, 255, 255, .22); }
.cta-glyphs .g-1 { top: 14%; left: 6%; --r: -12deg; }
.cta-glyphs .g-2 { top: 12%; right: 8%; color: var(--yellow-300); --s: 30px; --delay: -2s; }
.cta-glyphs .g-3 { bottom: 14%; right: 5%; --s: 40px; --delay: -4s; }
.cta-glyphs .g-4 { bottom: 12%; left: 4%; --s: 40px; --delay: -1s; }
.cta-glyphs .g-5 { top: 50%; right: 16%; --s: 22px; --delay: -3s; }
.cta-glyphs .g-6 { top: 56%; left: 15%; color: var(--coral-300); --s: 22px; --delay: -5s; }
@media (max-width: 767.98px) {
  .cta-glyphs .g-3, .cta-glyphs .g-4, .cta-glyphs .g-5, .cta-glyphs .g-6 { display: none; }
  .cta-glyphs .g-1 { top: 14px; left: 16px; --s: 22px; }
  .cta-glyphs .g-2 { top: 12px; right: 18px; --s: 22px; }
}

/* 18. Text + media */
.text-layout { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
.text-layout:not(.has-image) { max-width: 780px; margin-inline: auto; }
.text-paragraphs { color: var(--ink-2); font-size: 1.0625rem; }
.text-body .section-title + .text-paragraphs { margin-top: 18px; }
.text-paragraphs p + p { margin-top: 1em; }
.text-html { margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: var(--indigo-50); }
.text-media { position: relative; isolation: isolate; width: min(100%, 520px); margin-inline: auto; }
.text-media::before {
  content: ""; position: absolute; z-index: -1; inset: 8% 0 -5% 10%;
  border-radius: 40px; background: var(--yellow-300); transform: rotate(4deg); opacity: .7;
}
.text-media img { width: 100%; border-radius: 32px; background: #fff; box-shadow: var(--shadow-lg); }
@media (min-width: 960px) {
  .text-layout.has-image { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .text-layout.image-left .text-media { order: -1; }
  .text-media::before { inset: 12% 6% -6% -6%; transform: rotate(-4deg); }
  .image-left .text-media::before { inset: 12% -6% -6% 6%; transform: rotate(4deg); background: var(--mint-300); }
}

/* 19. Contact */
.contact-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: var(--lift);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 18px; color: var(--t-on, #fff); background: var(--t-grad); box-shadow: 0 10px 20px -10px var(--t-solid); }
.contact-icon .icon { --i: 26px; }
.contact-body { min-width: 0; }
.contact-label { font-family: var(--font-sans); font-size: .875rem; font-weight: 500; color: var(--ink-2); letter-spacing: .06em; }
.contact-value { margin-top: 2px; font-size: 1.125rem; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.contact-value a { color: var(--ink); text-decoration: none; }
.contact-value a:hover { color: var(--indigo-700); text-decoration: underline; }
.contact-hours { margin-top: 4px; font-weight: 700; }
.contact-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; text-decoration: none; }
.contact-link .icon { --i: 17px; }
.contact-link:hover { text-decoration: underline; }

/* 20. Gallery, html block */
.gallery-grid { --gap: clamp(12px, 2vw, 22px); --c: min(2, var(--cols, 2)); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.gallery-grid > li { flex: 0 0 calc((100% - (var(--c) - 1) * var(--gap)) / var(--c) - .1px); min-width: 0; }
@media (min-width: 768px) { .gallery-grid { --c: var(--cols-md, 3); } }
@media (min-width: 1024px) { .gallery-grid { --c: var(--cols, 4); } }
.gallery-item figure { height: 100%; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); transition: var(--lift); }
.gallery-item:nth-child(even) figure { transform: translateY(14px); }
.gallery-item figure:hover { box-shadow: var(--shadow); transform: translateY(-4px) rotate(-.6deg); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: 10px 16px 14px; color: var(--ink-2); font-size: .9375rem; font-weight: 500; line-height: 1.6; }
@media (max-width: 767.98px) { .gallery-item:nth-child(even) figure { transform: none; } }
.block-html { padding-block: clamp(40px, 6vw, 72px); }
.html-block { max-width: 860px; margin-inline: auto; }
.note { padding: 22px 26px; border-radius: 24px; background: var(--yellow-100); border: 2px dashed rgba(122, 78, 0, .25); color: var(--ink); }
.note p + p { margin-top: .5em; }

/* 21. Footer */
.site-footer {
  position: relative; z-index: 1;
  margin-top: var(--wave-h);
  padding-top: clamp(48px, 7vw, 88px);
  background: var(--indigo-950); color: #c7c4f5;
}
.footer-wave { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: var(--wave-h); color: var(--indigo-950); }
.footer-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(36% 46% at 100% 46%, rgba(79, 70, 229, .32), transparent 70%), radial-gradient(26% 36% at 0% 64%, rgba(255, 107, 74, .1), transparent 70%); }
.footer-grid { display: grid; gap: 36px 28px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.3fr); } .footer-brand { grid-column: auto; } }
.brand-footer, .brand-footer:hover { color: #fff; }
.brand-footer .brand-sub { color: #a5a2d9; }
.brand-footer .brand-mark svg { box-shadow: none; }
.footer-tagline { margin-top: 16px; color: #fff; font-weight: 700; }
.footer-about { margin-top: 10px; max-width: 30em; font-size: .9375rem; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .08); transition: background-color .2s, transform .2s; }
.footer-social a:hover { color: #fff; background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.footer-title { margin-bottom: 14px; color: #fff; font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 700; }
.footer-title::after { content: ""; display: block; width: 26px; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--grad-coral); }
.footer-links li + li { margin-top: 4px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; color: #c7c4f5; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links .icon { --i: 15px; opacity: .7; }
.footer-contact-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; }
.footer-contact-list li + li { margin-top: 10px; }
.footer-contact-list .icon { --i: 20px; margin-top: .25em; color: var(--yellow-300); }
.footer-contact-list span, .footer-contact-list a { min-width: 0; overflow-wrap: anywhere; }
.footer-contact-list a { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-top: clamp(36px, 5vw, 56px); padding-block: 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #a5a2d9; font-size: .875rem;
}
.back-to-top { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; text-decoration: none; }
.back-to-top .icon { --i: 30px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: transform .2s; }
.back-to-top:hover { color: #fff; }
.back-to-top:hover .icon { transform: translateY(-3px); }

/* 22. Motion */
.reveal-ready .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s var(--ease), translate .7s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal-ready .reveal.is-visible { opacity: 1; translate: none; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(calc(var(--r, 0deg) + 10deg)); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } }
.glyph { transform: rotate(var(--r, 0deg)); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .glyph { animation: float 7s ease-in-out infinite; animation-delay: var(--delay, 0s); }
  .js .hero-copy > *, .js .page-header-inner > * { animation: rise .8s var(--ease) both; }
  .js .hero-copy > :nth-child(2), .js .page-header-inner > :nth-child(2) { animation-delay: .08s; }
  .js .hero-copy > :nth-child(3), .js .page-header-inner > :nth-child(3) { animation-delay: .16s; }
  .js .hero-copy > :nth-child(4), .js .page-header-inner > :nth-child(4) { animation-delay: .24s; }
  .js .hero-copy > :nth-child(5) { animation-delay: .32s; }
  .js .hero-art-frame { animation: pop 1s var(--ease) .15s both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 線上練習：遊戲框（/practice/ 底下的遊戲頁） ---------- */
.html-block:has(.game-frame) { max-width: 1100px; }
.game-frame {
  overflow: hidden; border-radius: var(--radius-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.game-frame iframe { display: block; width: 100%; height: 640px; border: 0; background: transparent; }
.game-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.prose .game-links a { text-decoration: none; }
@media (max-width: 767.98px) {
  .game-frame { border-radius: var(--radius); }
  .game-frame iframe { height: 560px; }
}

/* ---------- 選單最後一項（系統入口）的下拉靠右對齊，避免超出畫面 ---------- */
@media (min-width: 960px) {
  .nav-list > li:last-child > .sub-menu { left: auto; right: -8px; transform: translate(0, 8px); }
  .nav-list > li:last-child.is-open > .sub-menu,
  html:not(.js) .nav-list > li:last-child.has-children:hover > .sub-menu,
  html:not(.js) .nav-list > li:last-child.has-children:focus-within > .sub-menu { transform: translate(0, 0); }
  .nav-list > li:last-child > .sub-menu::after { left: auto; right: var(--sub-arrow-right, 55px); margin-left: 0; }
}

/* ---------- 手機：數字區改成一列一項（數字在左、說明在右），避免擠成兩欄斷字 ---------- */
@media (max-width: 559.98px) {
  .stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 14px; padding: 12px 18px; text-align: left; }
  .stat-value { min-width: 2.4em; text-align: center; font-size: 2rem; }
}

/* ---------- 遊戲頁：頁首縮小，讓遊戲更快出現在畫面上 ---------- */
.block-page-header.is-compact { padding-top: clamp(24px, 4vw, 48px); padding-bottom: calc(var(--wave-h) + clamp(18px, 3vw, 36px)); }
.block-page-header.is-compact .page-title { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.block-page-header.is-compact .breadcrumb { margin-bottom: 10px; }
.block-page-header.is-compact + .block { padding-top: clamp(16px, 3vw, 40px); }
