
/* ═══════════════════════════════════════════════════════════════
   SMALL WORLD 小小宇宙 · "CELESTIAL ATELIER" DESIGN LAYER v2
   Editorial serif typography × deep-space palette × starlight motion
   ═══════════════════════════════════════════════════════════════ */

:root {
  --ink:    #081120;            /* deep space */
  --ink2:   #0c1f33;
  --sky:    #0e7490;            /* lagoon teal */
  --sky2:   #0a4f66;
  --gold:   #efa31d;            /* starlight amber */
  --gold2:  #ffc95c;
  --aurora: #38c5ba;
  --pale:   #f7f3ea;            /* warm paper */
  --mist:   #e6f1f5;
  --text:   #2a3b4d;
  --soft:   #5f7e8d;
  --radius: 18px;
  --card-shadow: 0 12px 48px rgba(8,17,32,.10);
  /* Latin faces are self-hosted (/assets/css/fonts.css); Chinese text uses
     high-quality system fonts — reliable in mainland China, zero download */
  --font-display: 'Fraunces', 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', Georgia, serif;
  --font-body: 'Schibsted Grotesk', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --grad-star: linear-gradient(92deg, var(--gold2), var(--gold) 45%, var(--aurora));
  --grad-sea:  linear-gradient(135deg, var(--sky2), var(--sky));
}

body { font-family: var(--font-body); letter-spacing: .005em; }
::selection { background: var(--gold); color: var(--ink); }
html { scroll-padding-top: 84px; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(14,116,144,.45); border-radius: 8px; border: 3px solid rgba(0,0,0,0); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(14,116,144,.7); border: 3px solid rgba(0,0,0,0); background-clip: padding-box; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* film grain over everything (subtle, never intercepts input) */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 2147483000;
  pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* comet scroll-progress bar (element injected by JS) */
#swProgress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 600; pointer-events: none;
  background: var(--grad-star);
  box-shadow: 0 0 14px rgba(239,163,29,.65), 0 0 4px rgba(255,201,92,.9);
  border-radius: 0 3px 3px 0;
}

/* ── DISPLAY TYPE — every serif moment now speaks Fraunces ── */
.nav-logo-text, .hero-title, .section-title, .s-title, .stat-num,
.about-badge .num, .connect-title, .footer-logo-text, .cta-banner h2,
.testi-quote-mark, .why-card-num, .ach-badge-text .num, .mind-hub,
.trainer-card-body h3, .tile h3, .service-content h3, .report-highlight-box h3,
.prog-card-body h3, .pc-num, .how-step-num, .approach-step::before,
.testi-avatar, .stat-pill .stat-num, .stat-pill .num, #hero .hero-quote .hq-mark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}
.section-title, .s-title { letter-spacing: -.015em; font-weight: 600; }
.hero-title { letter-spacing: -.02em; font-weight: 600; }

/* eyebrow labels become little constellations */
.section-label, .s-label {
  display: inline-flex; align-items: center; gap: 9px;
  letter-spacing: .22em;
}
.section-label::before, .s-label::before {
  content: '✦'; font-size: .95em; line-height: 1;
  color: var(--gold); letter-spacing: 0;
}

/* ═══ NAV — transparent over hero, crystallises to glass on scroll ═══ */
nav {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background .4s ease, box-shadow .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}
nav.scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: rgba(8,17,32,.08);
  box-shadow: 0 2px 24px rgba(8,17,32,.08);
}
nav:not(.scrolled) .nav-logo-text { color: #fff; }
nav:not(.scrolled) .nav-logo-text span { color: rgba(255,255,255,.65) !important; }
nav:not(.scrolled) .nav-logo:hover { background: rgba(255,255,255,.1); }
nav:not(.scrolled) .nav-links li > a { color: rgba(255,255,255,.88); }
nav:not(.scrolled) .nav-links li > a:hover,
nav:not(.scrolled) .nav-links li > a.active { background: rgba(255,255,255,.12); color: #fff; }
nav:not(.scrolled) .dark-toggle { border-color: rgba(255,255,255,.3); }
nav:not(.scrolled) .dark-toggle svg { stroke: #fff; }
nav:not(.scrolled) .dark-toggle:hover { background: rgba(255,255,255,.12); }
nav:not(.scrolled) .hamburger { border-color: rgba(255,255,255,.35); color: #fff; }
nav:not(.scrolled) .hamburger:hover { background: rgba(255,255,255,.12); }
body.dark nav.scrolled { background: rgba(8,17,32,.92); }

/* ═══ BUTTONS — starlight gradients + shine sweep ═══ */
.btn-primary, .btn-gold, .btn-sky, .btn-dark, .btn-dark-solid,
.btn-white, .btn-outline, .btn-ghost, .btn-ink-btn {
  position: relative; overflow: hidden;
}
.btn-primary::after, .btn-gold::after, .btn-sky::after,
.btn-dark::after, .btn-dark-solid::after {
  content: ''; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
  pointer-events: none;
}
.btn-primary:hover::after, .btn-gold:hover::after, .btn-sky:hover::after,
.btn-dark:hover::after, .btn-dark-solid:hover::after { left: 130%; }
.btn-primary, .btn-gold {
  background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 55%, #d98c12 100%);
  color: #221503;
  box-shadow: 0 8px 26px rgba(239,163,29,.35), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn-primary:hover, .btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(239,163,29,.5), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn-outline, .btn-ghost {
  border: 1.5px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-outline:hover, .btn-ghost:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.8); }
.btn-sky { background: var(--grad-sea); box-shadow: 0 8px 26px rgba(14,116,144,.32); }

/* ═══ HERO — the little universe ═══ */
#hero {
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(56,197,186,.16), transparent 62%),
    radial-gradient(760px 520px at -12% 112%, rgba(239,163,29,.13), transparent 60%),
    linear-gradient(158deg, #070f1d 0%, #0a2236 56%, #0d3a4e 100%);
}
.hero-orb { opacity: .14; }
.hero-orb1 { background: var(--gold); }
.hero-orb2 { background: var(--aurora); }
.sw-stars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-eyebrow {
  background: rgba(239,163,29,.13);
  border-color: rgba(239,163,29,.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-eyebrow::before { content: '✦'; margin-right: 8px; font-size: .9em; }
.hero-title { font-size: clamp(2.5rem, 4.8vw, 4.05rem); line-height: 1.12; }
.hero-title em, .s-title em {
  font-style: italic; font-weight: 600;
  background: var(--grad-star);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-title em {
  background: none;
  -webkit-background-clip: unset; background-clip: unset;
  color: var(--gold);
}
.hero-sub { color: rgba(255,255,255,.72); }
.trusted-pill { background: rgba(255,255,255,.07); }
.trusted-pill .tp-dot { animation: swPulse 2.6s ease-out infinite; }
@keyframes swPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,163,29,.55); }
  55%      { box-shadow: 0 0 0 6px rgba(239,163,29,0); }
}
.float-badge { background: rgba(255,255,255,.92); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); }

/* ═══ STARFIELDS on dark sections (pure CSS twinkle) ═══ */
#impact, #why-us, footer, .cta-banner { position: relative; }
#impact::before, #why-us::before, footer::before, .cta-banner::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 8% 22%, rgba(255,255,255,.8), transparent 55%),
    radial-gradient(1.5px 1.5px at 23% 64%, rgba(255,255,255,.5), transparent 55%),
    radial-gradient(1px 1px at 37% 16%, rgba(255,255,255,.65), transparent 55%),
    radial-gradient(2px 2px at 52% 80%, rgba(239,163,29,.55), transparent 55%),
    radial-gradient(1px 1px at 64% 34%, rgba(255,255,255,.6), transparent 55%),
    radial-gradient(1.5px 1.5px at 78% 60%, rgba(255,255,255,.45), transparent 55%),
    radial-gradient(1px 1px at 91% 14%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1.5px 1.5px at 95% 86%, rgba(56,197,186,.55), transparent 55%),
    radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,.5), transparent 55%),
    radial-gradient(1px 1px at 45% 47%, rgba(255,255,255,.4), transparent 55%),
    radial-gradient(1.5px 1.5px at 70% 8%, rgba(255,201,92,.5), transparent 55%);
  animation: swTwinkle 6.5s ease-in-out infinite alternate;
}
@keyframes swTwinkle { from { opacity: .45; } to { opacity: 1; } }
#impact > *, #why-us > *, footer > * { position: relative; z-index: 1; }

/* ═══ ABOUT — paper warmth + orbital flourish ═══ */
#about, #services { position: relative; overflow: hidden; }
#about::after, #services::after {
  content: ''; position: absolute; width: 420px; height: 420px;
  border: 1.5px dashed rgba(14,116,144,.18); border-radius: 50%;
  pointer-events: none;
  animation: orbspin 70s linear infinite;
}
#about::after { top: -150px; right: -150px; }
#services::after { bottom: -170px; left: -170px; border-color: rgba(239,163,29,.22); animation-direction: reverse; }
.about-visual { box-shadow: 16px 16px 0 rgba(239,163,29,.16); }
.pillar { border-left-color: var(--gold); border-radius: 4px 14px 14px 4px; }
.pillar:hover { transform: translateX(4px); transition: transform .25s; }
.feature-badge { border: 1px solid rgba(14,116,144,.15); }

/* ═══ PARTNERS — editorial wordmarks instead of grey pills ═══ */
.partner-logo-item {
  background: transparent; border: none;
  font-family: var(--font-display); font-size: 1rem; font-weight: 500;
  letter-spacing: .02em; color: #9eb2bd;
}
.partner-logo-item:hover { color: var(--ink); background: transparent; }
.partner-logo-item::after { content: '✦'; margin-left: 44px; color: rgba(239,163,29,.45); font-size: .7rem; }
body.dark .partner-logo-item:hover { color: #e8f4f8; }

/* ═══ TESTIMONIALS ═══ */
.testi-premium { border-radius: 22px; }
.testi-premium::before { height: 3px; background: var(--grad-star); }
.testi-avatar { background: var(--grad-sea); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px rgba(239,163,29,.5); }
.testi-body { font-family: var(--font-display); font-size: .95rem; }

/* ═══ SERVICES — spotlight cards that follow the cursor ═══ */
.tab-btn { background: transparent; border: 1.5px solid rgba(8,17,32,.14); color: var(--soft); }
.tab-btn.active { background: var(--grad-sea); border-color: transparent; color: #fff; box-shadow: 0 8px 24px rgba(14,116,144,.35); }
body.dark .tab-btn { border-color: rgba(232,244,248,.16); }
.service-card, .benefit-card, .fmt-card, .why-card { --mx: 50%; --my: 50%; }
.service-card::after, .benefit-card::after, .fmt-card::after, .why-card::after {
  content: ''; position: absolute; inset: 0; opacity: 0; z-index: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(14,116,144,.12), transparent 65%);
  transition: opacity .35s ease;
  pointer-events: none;
}
.service-card:hover::after, .benefit-card:hover::after, .fmt-card:hover::after { opacity: 1; }
.why-card { position: relative; overflow: hidden; }
.why-card::after { background: radial-gradient(240px circle at var(--mx) var(--my), rgba(239,163,29,.14), transparent 65%); }
.why-card:hover::after { opacity: 1; }
.benefit-card, .fmt-card { position: relative; }
.service-card { border: 1px solid rgba(8,17,32,.07); }
.service-card::before { background: var(--grad-star); z-index: 1; }
.service-card h3, .service-card p { position: relative; z-index: 1; }
.service-card:hover { box-shadow: 0 18px 48px rgba(8,17,32,.13); transform: translateY(-6px); }

/* ═══ IMPACT — cosmic depth + glowing numerals ═══ */
#impact {
  background:
    radial-gradient(820px 460px at 92% -6%, rgba(56,197,186,.13), transparent 60%),
    radial-gradient(640px 420px at -6% 106%, rgba(239,163,29,.11), transparent 60%),
    linear-gradient(152deg, #0b2335 0%, #070f1d 100%);
}
.stat-num { text-shadow: 0 0 28px rgba(239,163,29,.45); }
.serve-card { box-shadow: 0 10px 36px rgba(8,17,32,.25); }
.serve-card img { transition: transform .65s cubic-bezier(.22,.61,.36,1); }
.serve-card:hover img { transform: scale(1.06); }
.serve-card-tag { box-shadow: 0 4px 14px rgba(239,163,29,.45); }

/* ═══ WHY US ═══ */
#why-us {
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(56,197,186,.12), transparent 60%),
    radial-gradient(800px 480px at 100% 100%, rgba(239,163,29,.10), transparent 60%),
    linear-gradient(135deg, #070f1d 0%, #0a3144 100%);
}
.why-point:hover { box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.why-card-num { text-shadow: 0 0 24px rgba(239,163,29,.4); }

/* ═══ CTA BANNER — flipped from flat gold to deep cosmos ═══ */
.cta-banner {
  background:
    radial-gradient(640px 360px at 14% 0%, rgba(239,163,29,.22), transparent 60%),
    radial-gradient(560px 360px at 88% 110%, rgba(56,197,186,.18), transparent 60%),
    linear-gradient(150deg, #0a1c2e 0%, #070f1d 100%);
}
.cta-banner h2 { color: #fff; }
.cta-banner h2 em { font-style: italic; background: var(--grad-star); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-banner p { color: rgba(255,255,255,.66); }
.cta-banner .btn-dark-solid {
  background: linear-gradient(135deg, var(--gold2) 0%, var(--gold) 55%, #d98c12 100%);
  color: #221503;
  box-shadow: 0 10px 30px rgba(239,163,29,.4);
}
.cta-banner .btn-dark-solid:hover { box-shadow: 0 16px 40px rgba(239,163,29,.55); }
.cta-banner .btn-white-outline { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-banner .btn-white-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.75); }

/* ═══ TEAM / CONTACT / CONNECT ═══ */
.team-card { border-radius: 20px; }
.team-card:hover { box-shadow: 0 22px 56px rgba(8,17,32,.16); }
.team-card img { transition: transform .5s ease; }
.team-card:hover img { transform: scale(1.04); }
.form-field input:focus, .form-field textarea:focus {
  box-shadow: 0 0 0 4px rgba(14,116,144,.14);
}
.connect-panel { background: linear-gradient(150deg, var(--mist), rgba(230,241,245,.4)); border: 1px solid rgba(14,116,144,.1); }
.contact-info-icon { background: var(--grad-sea); }
.contact-info-icon .material-icons { color: #fff; }

/* ═══ FOOTER — night sky with a golden horizon ═══ */
footer { background: linear-gradient(180deg, #081323 0%, #050a12 100%); }
footer::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 1;
  background: linear-gradient(90deg, transparent 5%, rgba(239,163,29,.55) 35%, rgba(56,197,186,.45) 65%, transparent 95%);
}
.footer-col a:hover { color: var(--gold2); transform: translateX(3px); transition: color .2s, transform .2s; }

/* ═══ BACK TO TOP ═══ */
#backToTop { background: var(--grad-sea); box-shadow: 0 6px 24px rgba(14,116,144,.45); }
#backToTop:hover { background: var(--grad-sea); box-shadow: 0 10px 32px rgba(14,116,144,.6); }

/* ═══ SERVICE SUB-PAGES ═══ */
.breadcrumb-trail .bc-current { color: var(--sky); background: var(--mist); }
.chip { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(255,255,255,.1); }
.eyebrow { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.stat-pill .stat-num, .stat-pill .num { text-shadow: 0 0 22px rgba(239,163,29,.4); }
.dashboard-img-frame { box-shadow: 0 24px 64px rgba(8,17,32,.2), 14px 14px 0 rgba(239,163,29,.14); }
.dash-icon, .point-icon { background: var(--grad-sea); }
.report-highlight-box::before { background: var(--grad-star); }
.benefit-card::before { background: var(--grad-star); }
.how-num { border-color: rgba(239,163,29,.3); }
.mind-hub { box-shadow: 0 12px 36px rgba(239,163,29,.35); }
.p-circle, .mindmap-center-node { background: var(--grad-sea); }
.feat-card::before { background: var(--grad-star); }
.t-bubble.accent { color: var(--gold2); }
.pillar-card::after { background: var(--grad-star); }
.vt-dot { background: var(--grad-sea); }
.testi-card::before { color: rgba(239,163,29,.25); }
.prog-flag { background: rgba(239,163,29,.14); color: #b07208; }

/* ═══ DARK MODE — re-tuned for the new palette ═══ */
body.dark {
  --pale: #0e1d2e;
  --white: #0a1626;
  --mist: #14283a;
  --text: #c6dce7;
  --soft: #7fa6ba;
  background: #070f1d;
}
body.dark .service-card { border-color: rgba(232,244,248,.08); }
body.dark .connect-panel { background: rgba(20,40,58,.5); border-color: rgba(232,244,248,.08); }
body.dark .about-visual { box-shadow: 16px 16px 0 rgba(239,163,29,.10); }
body.dark .testi-avatar { box-shadow: 0 0 0 2px #0a1626, 0 0 0 4px rgba(239,163,29,.5); }
body.dark ::-webkit-scrollbar-thumb { background: rgba(127,166,186,.4); background-clip: padding-box; border: 3px solid rgba(0,0,0,0); }

/* ═══ RESPONSIVE GUARDS ═══ */
@media (max-width: 880px) {
  #about::after, #services::after { display: none; }
  .about-visual { box-shadow: 10px 10px 0 rgba(239,163,29,.16); }
}
@media (max-width: 480px) {
  .nav-logo-text { font-size: .82rem; }
  .nav-logo img { height: 30px; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 2.6rem); }
}

/* ═══ SUB-PAGE NAV — always glass over breadcrumb + light hero imagery ═══ */
body.sw-sub nav {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom-color: rgba(8,17,32,.08);
  box-shadow: 0 2px 24px rgba(8,17,32,.08);
}
body.sw-sub nav .nav-logo-text { color: var(--ink); }
body.sw-sub nav .nav-logo-text span { color: var(--soft) !important; }
body.sw-sub nav .nav-links li > a { color: var(--text); }
body.sw-sub nav .nav-links li > a:hover,
body.sw-sub nav .nav-links li > a.active { background: var(--mist); color: var(--sky); }
body.sw-sub nav .dark-toggle { border-color: rgba(8,17,32,.18); }
body.sw-sub nav .dark-toggle svg { stroke: var(--ink); }
body.sw-sub nav .hamburger { color: var(--ink); border-color: rgba(8,17,32,.15); }
body.dark.sw-sub nav { background: rgba(8,17,32,.92); border-bottom-color: rgba(232,244,248,.07); }
body.dark.sw-sub nav .nav-logo-text { color: #e8f4f8; }
body.dark.sw-sub nav .nav-links li > a { color: #c8dde8; }
body.dark.sw-sub nav .dark-toggle svg { stroke: #c8dde8; }
body.dark.sw-sub nav .hamburger { color: #c8dde8; border-color: rgba(232,244,248,.2); }
@media (prefers-reduced-motion: reduce) {
  #swProgress { box-shadow: none; }
  .sw-stars { display: none; }
}

/* ════════════════════════════════════════════════════
   LOADING / ENTRANCE TEXT EFFECTS
   ════════════════════════════════════════════════════ */

/* ── HERO TEXT ──────────────────────────────────────
   Space-cinematic: glint → curtain-wipe → blur-reveal
   ─────────────────────────────────────────────────── */

/* 1 · Eyebrow badge: gold shimmer glint sweeps after fade-in */
.hero-eyebrow {
  position: relative;
  overflow: hidden;
}
.hero-eyebrow::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255,230,120,.78) 50%,
    transparent 75%
  );
  transform: translateX(-130%);
  animation: heroGlint 1.15s .9s cubic-bezier(.4,0,.2,1) forwards;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes heroGlint {
  to { transform: translateX(230%); }
}

/* 2 · Hero title: single clean rise-fade — no competing transforms */
#hero .hero-title {
  animation: heroTitleIn 1.1s cubic-bezier(.16, 1, .3, 1) .15s both;
}
@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 3 · Hero subtitle: gentle rise, no blur */
#hero .hero-sub {
  animation: heroSubIn 1.0s cubic-bezier(.16, 1, .3, 1) .32s both;
}
@keyframes heroSubIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SECTION TEXT (below hero) ────────────────────────
   Refined & distinct: expand-contract + blur-to-sharp
   Triggered by existing .reveal → .visible flow (no JS needed)
   ─────────────────────────────────────────────────── */

/* 4 · Section labels: letter-spacing expands wide then contracts to rest value */
.reveal .section-label,
.reveal .s-label {
  letter-spacing: .6em;
  opacity: 0;
  transition: opacity .65s ease,
              transform .65s ease,
              letter-spacing 1.05s cubic-bezier(.22, 1, .36, 1) .04s;
}
.reveal.visible .section-label,
.reveal.visible .s-label {
  opacity: 1;
  letter-spacing: .22em;
}

/* 5 · Section titles: clean rise-fade, staggered after label */
.reveal .section-title,
.reveal .s-title {
  transition: opacity .8s ease,
              transform .8s ease .1s;
}

/* 6 · Section subtitles: slightly later cascade */
.reveal .section-sub {
  transition: opacity .75s ease,
              transform .75s ease .2s;
}

/* ── 4 · Hero eyebrow — letter-spacing materialise (replaces plain fadeUp) ── */
.hero-eyebrow {
  animation: heroEyebrowIn 1.0s cubic-bezier(.22,1,.36,1) both;
}
@keyframes heroEyebrowIn {
  from { opacity: 0; transform: translateY(14px); letter-spacing: .55em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: .12em; }
}

/* ── 5 · CTA buttons — spring-pop with stagger (container is instant layout box) ── */
.hero-ctas { animation: none; opacity: 1; }
.hero-ctas > *:nth-child(1) {
  animation: heroBtnPop .88s cubic-bezier(.34,1.56,.64,1) .58s both;
}
.hero-ctas > *:nth-child(2) {
  animation: heroBtnPop .88s cubic-bezier(.34,1.56,.64,1) .76s both;
}
.hero-ctas > *:nth-child(3) {
  animation: heroBtnPop .88s cubic-bezier(.34,1.56,.64,1) .94s both;
}
@keyframes heroBtnPop {
  from { opacity: 0; transform: translateY(24px) scale(.86); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── 6 · Trusted-by strip — waterfall left-to-right cascade ── */
.hero-trusted { animation: none; opacity: 1; }
.hero-trusted-label {
  animation: fadeUp .6s ease .78s both;
}
.hero-trusted-pills .trusted-pill:nth-child(1) {
  animation: pillSlideIn .55s cubic-bezier(.22,1,.36,1) .90s both;
}
.hero-trusted-pills .trusted-pill:nth-child(2) {
  animation: pillSlideIn .55s cubic-bezier(.22,1,.36,1) 1.05s both;
}
.hero-trusted-pills .trusted-pill:nth-child(3) {
  animation: pillSlideIn .55s cubic-bezier(.22,1,.36,1) 1.20s both;
}
@keyframes pillSlideIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-eyebrow::after,
  #hero .hero-title,
  #hero .hero-sub,
  .hero-ctas > *,
  .hero-trusted-label,
  .hero-trusted-pills .trusted-pill {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    letter-spacing: inherit !important;
    filter: none !important;
  }
  .hero-eyebrow::after { display: none; }
  .reveal .section-label, .reveal .s-label,
  .reveal .section-title, .reveal .s-title,
  .reveal .section-sub { filter: none !important; letter-spacing: inherit !important; }
}

/* ═══════════════════════════════════════════════════════════════
   ── polish pass ──
   Conservative, additive refinements layered on top of the cascade.
   Fully reversible: deleting everything below restores prior styling.
   Focus: type/spacing rhythm · button + card consistency ·
          reveal timing · dark-mode contrast (WCAG AA) · a11y wins.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --sw-ease:        cubic-bezier(.22, 1, .36, 1);   /* standard decelerate */
  --sw-dur:         .42s;                            /* card/state timing   */
  --sw-dur-reveal:  .5s;                             /* entrance timing     */
  --sw-section-pad: clamp(76px, 8vw, 116px);         /* vertical rhythm     */
  --sw-card-pad:    clamp(24px, 2.4vw, 30px);        /* card interior       */
}

/* ── CJK correctness — never track Chinese text ──
   The global body tracking + uppercase label tracking must not apply to
   CJK glyphs. One rule neutralises spacing on every .zh span (headings,
   labels, nav) while Latin .en keeps its editorial tracking. */
.zh { letter-spacing: normal; }

/* ── 1 · TYPOGRAPHIC RHYTHM ── */
/* Unify the two heading systems (home vs. service sub-pages) so the
   hero → section → card cadence reads identically everywhere. */
.section-title, .s-title { line-height: 1.18; margin-bottom: 16px; }
.section-sub, .s-sub     { line-height: 1.7; max-width: 56ch; margin-bottom: clamp(36px, 4vw, 52px); }

/* Eyebrow / kicker — single consistent treatment across both systems. */
.section-label, .s-label {
  font-size: .74rem; font-weight: 700;
  color: var(--sky); margin-bottom: 12px;
}
body.dark .section-label, body.dark .s-label { color: var(--aurora); }

/* Card headings — consistent size + comfortable CJK/Latin leading. */
.service-card h3, .benefit-card h3, .fmt-card h4,
.team-card-info h3, .approach-step h4, .trainer-card-body h3,
.prog-card-body h3 { line-height: 1.35; }

/* ── 2 · SPACING RHYTHM ── */
/* Base content sections share one responsive vertical scale. Sections
   with their own id/class padding (#hero, .hero, .stats-bar, …) keep it
   thanks to higher specificity — only the generic rhythm is unified. */
section { padding-top: var(--sw-section-pad); padding-bottom: var(--sw-section-pad); }

/* Consistent interior padding for the primary marketing cards. */
.service-card, .benefit-card, .fmt-card, .why-card { padding: var(--sw-card-pad); }

/* ── 3 · BUTTONS — one sizing/shape/motion system ── */
.btn-primary, .btn-gold, .btn-sky, .btn-dark, .btn-dark-solid,
.btn-white, .btn-outline, .btn-ghost, .btn-ink-btn, .btn-white-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;                 /* ≥44px touch target */
  border-radius: 50px;
  line-height: 1.1;
  transition: transform .22s var(--sw-ease),
              box-shadow .22s var(--sw-ease),
              background .22s var(--sw-ease),
              border-color .22s var(--sw-ease),
              color .22s var(--sw-ease);
}

/* ── 4 · CARDS — consistent radius, border, hover lift ── */
.service-card, .benefit-card, .fmt-card, .why-card, .team-card {
  border-radius: var(--radius);
  transition: transform var(--sw-dur) var(--sw-ease),
              box-shadow var(--sw-dur) var(--sw-ease),
              border-color var(--sw-dur) var(--sw-ease);
}
.service-card:hover, .benefit-card:hover, .fmt-card:hover,
.team-card:hover, .approach-step:hover, .trainer-card:hover,
.prog-card:hover { transform: translateY(-6px); }
.fmt-card:hover, .team-card:hover, .approach-step:hover,
.trainer-card:hover, .prog-card:hover { box-shadow: var(--card-shadow); }

/* ── 5 · REVEAL / ENTRANCE — consistent, snappier timing ── */
.reveal, .reveal-l, .reveal-r {
  transition-duration: var(--sw-dur-reveal);
  transition-timing-function: var(--sw-ease);
}
.reveal .section-label, .reveal .s-label {
  transition: opacity var(--sw-dur-reveal) var(--sw-ease),
              transform var(--sw-dur-reveal) var(--sw-ease),
              letter-spacing .6s var(--sw-ease) .04s;
}
.reveal .section-title, .reveal .s-title {
  transition: opacity var(--sw-dur-reveal) var(--sw-ease),
              transform var(--sw-dur-reveal) var(--sw-ease) .06s;
}
.reveal .section-sub {
  transition: opacity var(--sw-dur-reveal) var(--sw-ease),
              transform var(--sw-dur-reveal) var(--sw-ease) .12s;
}

/* ── 6 · DARK-SECTION CONTRAST (lift muted whites toward WCAG AA) ── */
.why-point p, .why-card-label, .how-step p,
.report-highlight-box p { color: rgba(255,255,255,.74); }
#impact .section-sub, .reports-section .s-sub,
.how-section .s-sub, .dd-step p { color: rgba(255,255,255,.72); }
.stat-lbl, .stat-pill .stat-lbl, .stat-pill .lbl { color: rgba(255,255,255,.7); }
.pillar-card ul li { color: rgba(255,255,255,.68); }
.footer-col a { color: rgba(255,255,255,.62); }

/* ── 7 · ACCESSIBILITY WINS ── */
/* Focus ring that stays visible on both the dark hero and light sections. */
a:focus-visible, button:focus-visible,
.btn-primary:focus-visible, .btn-gold:focus-visible, .btn-sky:focus-visible,
.btn-dark:focus-visible, .btn-dark-solid:focus-visible, .btn-white:focus-visible,
.btn-outline:focus-visible, .btn-ghost:focus-visible, .btn-ink-btn:focus-visible,
.btn-white-outline:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold2);
  outline-offset: 3px;
  border-radius: 8px;
}
/* Slightly larger tap target for the service tab pills. */
.tab-btn { min-height: 44px; }
/* Honour reduced-motion for the globally-enabled smooth scroll. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
