/* =====================================================
   assets/css/motion.css — World-Class Motion Layer
   Watpanchatayikawat Super Portal
   - Uses ONLY the existing brand palette (Royal Blue / Indigo / Emerald / Amber / Rose)
   - Vanilla CSS + motion.js (no external libraries)
   - Fully disabled for prefers-reduced-motion
   Principles: Stagger, Overshoot (easeOutBack), easeOutExpo, Idle Bob,
               Squash & Stretch, 3D Tilt + Spotlight, Shine Sweep
   ===================================================== */

:root {
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-out-back: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.2, .8, .2, 1);
}

/* Cross-document page transitions (Chrome/Edge 126+, safely ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: m-vt-out .28s var(--ease-smooth) both; }
::view-transition-new(root) { animation: m-vt-in .42s var(--ease-out-expo) both; }
@keyframes m-vt-out { to { opacity: 0; transform: translateY(-8px) scale(.995); } }
@keyframes m-vt-in { from { opacity: 0; transform: translateY(12px); } }

/* =====================================================
   1. AMBIENT AURORA BACKGROUND (brand colors, very soft)
   ===================================================== */
.m-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.m-aurora span {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.m-aurora .a1 {
  width: 62vmax; height: 62vmax;
  top: -26vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(37, 99, 235, .13) 0%, rgba(37, 99, 235, 0) 62%);
  animation: m-drift-1 26s ease-in-out infinite alternate;
}
.m-aurora .a2 {
  width: 54vmax; height: 54vmax;
  top: -14vmax; right: -22vmax;
  background: radial-gradient(circle, rgba(79, 70, 229, .11) 0%, rgba(79, 70, 229, 0) 62%);
  animation: m-drift-2 32s ease-in-out infinite alternate;
}
.m-aurora .a3 {
  width: 48vmax; height: 48vmax;
  bottom: -24vmax; left: 22vw;
  background: radial-gradient(circle, rgba(16, 185, 129, .09) 0%, rgba(16, 185, 129, 0) 62%);
  animation: m-drift-3 28s ease-in-out infinite alternate;
}
.m-aurora .grid {
  inset: 0;
  border-radius: 0;
  background-image: radial-gradient(rgba(37, 99, 235, .16) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .35) 30%, transparent 62%);
  opacity: .55;
}
@keyframes m-drift-1 { to { transform: translate3d(9vw, 7vh, 0) scale(1.08); } }
@keyframes m-drift-2 { to { transform: translate3d(-8vw, 10vh, 0) scale(1.12); } }
@keyframes m-drift-3 { to { transform: translate3d(-10vw, -8vh, 0) scale(1.05); } }

/* =====================================================
   2. SCROLL PROGRESS BAR + NAVBAR ON SCROLL
   ===================================================== */
.m-scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1000;
  background: var(--grad-luxury-pill);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
  box-shadow: 0 0 10px rgba(79, 70, 229, .45);
}

.motion-on .portal-navbar {
  transition: box-shadow .4s var(--ease-smooth), background-color .4s var(--ease-smooth);
  animation: m-nav-in .7s var(--ease-out-expo) both;
}
.portal-navbar.is-scrolled {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 30px -12px rgba(30, 58, 138, .18);
}
@keyframes m-nav-in { from { transform: translateY(-100%); opacity: 0; } }

/* Logo pop with overshoot + soft halo */
.motion-on .brand-logo {
  animation: m-logo-pop .9s var(--ease-out-back) .15s both;
}
@keyframes m-logo-pop {
  0% { scale: .4; rotate: -18deg; opacity: 0; }
  60% { scale: 1.08; rotate: 4deg; opacity: 1; }
  100% { scale: 1; rotate: 0deg; }
}
.brand-wrap { position: relative; }
.motion-on .brand-wrap::before {
  content: '';
  position: absolute;
  left: -4px; top: 50%;
  width: 60px; height: 60px;
  margin-top: -30px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(37, 99, 235, .28), transparent 70%);
  filter: blur(8px);
  opacity: 0;
  z-index: -1;
  animation: m-halo 4.5s ease-in-out 1s infinite;
}
@keyframes m-halo {
  0%, 100% { opacity: 0; scale: .9; }
  50% { opacity: .9; scale: 1.1; }
}

.motion-on .brand-title {
  animation: m-rise .8s var(--ease-out-expo) .22s both;
}
.motion-on .brand-system-full {
  animation: m-rise .8s var(--ease-out-expo) .32s both;
}

/* Interactive Step Jump Pills in 5-Steps Header */
.step-jump-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.step-jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .35s var(--ease-out-back), box-shadow .25s ease, border-color .25s ease, background-color .25s ease, color .25s ease;
}
.step-jump-pill:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 6px 14px -4px rgba(37, 99, 235, .18);
}
.step-jump-pill:active {
  transform: scale(.95);
}
.step-jump-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.step-card.is-spotlight-flash {
  animation: m-card-flash 1.3s var(--ease-out-expo);
}
@keyframes m-card-flash {
  0%, 100% { box-shadow: var(--shadow-sm); }
  30% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .28), 0 22px 38px -10px rgba(37, 99, 235, .32); transform: translateY(-6px) scale(1.015); }
}
.motion-on .nav-controls-stack > * {
  animation: m-rise .7s var(--ease-out-expo) both;
}
.motion-on .nav-controls-stack > *:nth-child(1) { animation-delay: .30s; }
.motion-on .nav-controls-stack > *:nth-child(2) { animation-delay: .38s; }
.motion-on .nav-controls-stack > *:nth-child(3) { animation-delay: .46s; }
.motion-on .nav-controls-stack > *:nth-child(4) { animation-delay: .54s; }
@keyframes m-rise { from { opacity: 0; translate: 0 10px; } }

/* =====================================================
   3. SCROLL REVEAL WITH STAGGER (easeOutExpo)
   ===================================================== */
.motion-on .fade-up { animation: none; }

.motion-on .fade-up,
.motion-on .daily-card,
.motion-on .m-tilt {
  transition:
    opacity .85s var(--ease-out-expo) var(--d, 0ms),
    translate 1s var(--ease-out-expo) var(--d, 0ms),
    scale 1s var(--ease-out-expo) var(--d, 0ms),
    filter .9s ease var(--d, 0ms),
    transform var(--t-tf, .75s var(--ease-out-back)),
    box-shadow .45s var(--ease-smooth),
    background-color .3s ease,
    border-color .3s ease;
}

.motion-on .fade-up:not(.is-in),
.motion-on .daily-card:not(.is-in) {
  opacity: 0;
  translate: 0 16px;
  scale: .985;
  filter: blur(2px);
}

/* On mobile, keep it super crisp and snappy - no muddy heavy blur! */
@media (hover: none) {
  .motion-on .fade-up:not(.is-in),
  .motion-on .daily-card:not(.is-in),
  .motion-on .bb-card:not(.is-in),
  .motion-on .stat-card:not(.is-in) {
    filter: blur(2px);
    translate: 0 14px;
  }
}

/* Thai-safe heading wipe reveal (no character splitting) */
.motion-on .section-title,
.motion-on .daily-ops-title > span {
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 1.1s var(--ease-out-expo) .2s;
}
.motion-on .is-in .section-title,
.motion-on .is-in .daily-ops-title > span {
  clip-path: inset(-10% 0 -10% 0);
}
.motion-on .section-icon-box,
.motion-on .daily-title-icon {
  transition: scale .7s var(--ease-out-back) .1s, rotate .7s var(--ease-out-back) .1s;
}
.motion-on .fade-up:not(.is-in) .section-icon-box,
.motion-on .fade-up:not(.is-in) .daily-title-icon {
  scale: 0;
  rotate: -90deg;
}

/* Feature tags pop in one by one after card reveal */
.motion-on .step-card .feature-tag {
  opacity: 0;
  translate: 0 8px;
  scale: .85;
}
.motion-on .step-card.is-in .feature-tag {
  animation: m-tag-pop .6s var(--ease-out-back) both;
  animation-delay: calc(var(--d, 0ms) + 420ms);
}
.motion-on .step-card.is-in .feature-tag:nth-child(2) { animation-delay: calc(var(--d, 0ms) + 500ms); }
.motion-on .step-card.is-in .feature-tag:nth-child(3) { animation-delay: calc(var(--d, 0ms) + 580ms); }
@keyframes m-tag-pop {
  to { opacity: 1; translate: 0 0; scale: 1; }
}

/* =====================================================
   4. 3D TILT + CURSOR SPOTLIGHT (desktop, fine pointer)
   ===================================================== */
.motion-on .m-tilt {
  transform-style: preserve-3d;
  transform:
    perspective(1000px)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    translateY(var(--lift, 0px))
    scale(var(--sc, 1));
}
.motion-on .m-tilt.is-tilting {
  --t-tf: .18s var(--ease-smooth);
}
.motion-on .m-tilt:hover {
  --lift: -6px;
  --sc: 1.01;
}
.motion-on .m-tilt:active {
  --lift: -2px;
  --sc: .985;
}

.m-tilt::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s var(--ease-smooth);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .10), transparent 45%);
  z-index: 3;
}
.m-tilt:hover::after { opacity: 1; }
.stat-card-luxury.m-tilt::after {
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%);
}
.step-card-2.m-tilt::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 58, 237, .10), transparent 45%); }
.step-card-3.m-tilt::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 119, 6, .10), transparent 45%); }
.step-card-4.m-tilt::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(5, 150, 105, .11), transparent 45%); }
.step-card-5.m-tilt::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(225, 29, 72, .09), transparent 45%); }
.daily-card-duty.m-tilt::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(5, 150, 105, .10), transparent 45%); }

.eval-rubric-card { position: relative; overflow: hidden; }

/* Depth: icons float above card surface while tilting */
.motion-on .m-tilt:hover .stat-icon,
.motion-on .m-tilt:hover .step-icon,
.motion-on .m-tilt:hover .daily-icon {
  box-shadow: 0 12px 22px -8px rgba(30, 58, 138, .28);
}

/* =====================================================
   5. IDLE "BOB" ICONS (alive, never static)
   ===================================================== */
.motion-on .stat-icon,
.motion-on .daily-icon,
.motion-on .step-icon,
.motion-on .eval-rubric-trophy {
  animation: m-bob 4.2s ease-in-out infinite;
  transition: transform .45s var(--ease-out-back), box-shadow .4s var(--ease-smooth);
}
.motion-on .stats-grid > :nth-child(2) .stat-icon { animation-delay: -1.1s; }
.motion-on .stats-grid > :nth-child(3) .stat-icon { animation-delay: -2.2s; }
.motion-on .stats-grid > :nth-child(4) .stat-icon { animation-delay: -3.1s; }
.motion-on .step-card-2 .step-icon { animation-delay: -.8s; }
.motion-on .step-card-3 .step-icon { animation-delay: -1.6s; }
.motion-on .step-card-4 .step-icon { animation-delay: -2.4s; }
.motion-on .step-card-5 .step-icon { animation-delay: -3.2s; }
.motion-on .daily-card-duty .daily-icon { animation-delay: -2s; }
@keyframes m-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

/* Squash & stretch on icon hover (replaces static rotate) */
.motion-on .wow-card:hover .wow-icon,
.motion-on .daily-card:hover .wow-icon,
.motion-on .step-card:hover .step-icon {
  animation: m-squash .7s var(--ease-smooth) both, m-bob 4.2s ease-in-out .7s infinite;
  transform: rotate(7deg);
}
@keyframes m-squash {
  0% { scale: 1 1; }
  25% { scale: 1.22 .82; }
  45% { scale: .9 1.14; }
  65% { scale: 1.08 .95; }
  85% { scale: .98 1.02; }
  100% { scale: 1.12 1.12; }
}

/* =====================================================
   6. LUXURY STAT CARD — living gradient + periodic shine
   ===================================================== */
.motion-on .stat-card-luxury {
  background-size: 180% 180%;
  animation: m-grad-flow 9s ease-in-out infinite alternate;
}
@keyframes m-grad-flow {
  0% { background-position: 0% 30%; }
  100% { background-position: 100% 70%; }
}
.motion-on .stat-card-luxury::before {
  animation: m-orb 7s ease-in-out infinite alternate;
}
@keyframes m-orb {
  to { transform: translate(-60px, 40px) scale(1.5); opacity: .8; }
}
.m-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 2;
}
.m-shine::before {
  content: '';
  position: absolute;
  top: -50%; bottom: -50%;
  left: -60%;
  width: 40%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .28) 50%, transparent 100%);
  transform: skewX(-18deg) translateX(0);
  animation: m-shine-sweep 6.5s var(--ease-smooth) 2s infinite;
}
@keyframes m-shine-sweep {
  0% { transform: skewX(-18deg) translateX(0); }
  22%, 100% { transform: skewX(-18deg) translateX(480%); }
}

/* Progress bar — glowing tip + flowing stripes */
.stat-progress-bar { position: relative; overflow: hidden; }
.motion-on .stat-progress-bar {
  transition: width 1.8s var(--ease-out-expo);
  box-shadow: 0 0 12px rgba(110, 231, 183, .55);
}
.motion-on .stat-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(115deg, rgba(255, 255, 255, .0) 25%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 75%);
  background-size: 60px 100%;
  animation: m-stripes 1.6s linear infinite;
}
@keyframes m-stripes { to { background-position: 60px 0; } }

/* Number counter — subtle lift when finished */
.count-num { display: inline-block; font-variant-numeric: tabular-nums; }
.count-num.is-done { animation: m-num-pop .55s var(--ease-out-back); }
@keyframes m-num-pop {
  0% { scale: 1; }
  40% { scale: 1.12; }
  100% { scale: 1; }
}

/* =====================================================
   7. BUTTONS — shine sweep, magnetic, ripple
   ===================================================== */
.step-action-btn,
.eval-rubric-btn,
.btn-login {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.step-action-btn::before,
.daily-btn::before,
.eval-rubric-btn::before,
.btn-login::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -75%;
  width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
  transition: left .75s var(--ease-smooth);
}
.step-action-btn-soft::before {
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .85), transparent);
}
.step-action-btn:hover::before,
.daily-card:hover .daily-btn::before,
.eval-rubric-btn:hover::before,
.btn-login:hover::before {
  left: 130%;
}
.step-action-btn > *,
.daily-btn > *,
.eval-rubric-btn > * { position: relative; z-index: 2; }

.motion-on .step-action-btn:active,
.motion-on .daily-btn:active,
.motion-on .eval-rubric-btn:active {
  scale: .97;
}

/* Arrow — playful nudge loop on hover */
.motion-on .step-action-btn:hover i.fa-arrow-right,
.motion-on .daily-card:hover .daily-btn i.fa-arrow-right,
.motion-on .eval-rubric-btn:hover i.fa-arrow-right {
  animation: m-arrow-nudge 1s var(--ease-smooth) infinite;
}
@keyframes m-arrow-nudge {
  0%, 100% { translate: 0 0; }
  50% { translate: 5px 0; }
}

/* Magnetic buttons use `translate` (composes with existing transforms) */
.m-magnetic {
  transition: translate .5s var(--ease-out-back), transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}

/* Click ripple */
.m-ripple-host { position: relative; overflow: hidden; }
.m-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 70%);
  animation: m-ripple .7s var(--ease-out-expo) forwards;
  z-index: 5;
}
.m-ripple.is-dark {
  background: radial-gradient(circle, rgba(37, 99, 235, .22) 0%, rgba(37, 99, 235, 0) 70%);
}
@keyframes m-ripple {
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* =====================================================
   8. STEP 4 (Primary Mission) — breathing emerald glow
   ===================================================== */
.motion-on .step-card-4 {
  animation: m-breathe 3.6s ease-in-out infinite;
}
@keyframes m-breathe {
  0%, 100% { box-shadow: 0 8px 22px rgba(16, 185, 129, .12); }
  50% { box-shadow: 0 10px 34px rgba(16, 185, 129, .28), 0 0 0 4px rgba(16, 185, 129, .06); }
}
.motion-on .step-card-4 .step-badge .fa-star {
  animation: m-twinkle 2.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes m-twinkle {
  0%, 100% { scale: 1; rotate: 0deg; filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0)); }
  50% { scale: 1.3; rotate: 72deg; filter: drop-shadow(0 0 4px rgba(251, 191, 36, .9)); color: #f59e0b; }
}

/* Live pulse dot — expanding ring */
.pulse-dot { position: relative; }
.motion-on .pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #2563eb;
  animation: m-ring 1.8s var(--ease-smooth) infinite;
}
@keyframes m-ring {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* =====================================================
   9. LIVE DATE/TIME CHIP (Daily Ops header)
   ===================================================== */
.daily-ops-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.live-clock-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1e3a8a;
  border: 1px solid #dbeafe;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.live-clock-chip i { color: #2563eb; }
.live-clock-colon { animation: m-blink 1s steps(1) infinite; }
@keyframes m-blink { 50% { opacity: .2; } }

/* =====================================================
   10. BACK-TO-TOP WITH PROGRESS RING
   ===================================================== */
.m-top-btn {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 10px 25px -6px rgba(30, 58, 138, .3);
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  translate: 0 20px;
  scale: .7;
  pointer-events: none;
  transition: opacity .4s var(--ease-smooth), translate .5s var(--ease-out-back), scale .5s var(--ease-out-back);
}
.m-top-btn.is-show {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  pointer-events: auto;
}
.m-top-btn:hover { color: #4f46e5; }
.m-top-btn:hover i { animation: m-arrow-up 1s var(--ease-smooth) infinite; }
@keyframes m-arrow-up { 50% { translate: 0 -3px; } }
.m-top-btn svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.m-top-btn circle { fill: none; stroke-width: 3; }
.m-top-btn .ring-bg { stroke: #e0e7ff; }
.m-top-btn .ring-fg { stroke: url(#mTopGrad); stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
.m-top-btn i { position: relative; font-size: .95rem; }

/* =====================================================
   11. MOBILE BOTTOM NAV — slide-up + tactile tap
   ===================================================== */
.motion-on .mobile-bottom-nav {
  animation: m-bottom-in .8s var(--ease-out-expo) .4s both;
}
@keyframes m-bottom-in { from { transform: translateY(110%); } }
.motion-on .bottom-nav-item {
  transition: scale .35s var(--ease-out-back), background-color .2s, color .2s;
}
.motion-on .bottom-nav-item:active { scale: .9; }
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 16px;
  height: 3px;
  margin-left: -8px;
  border-radius: 9999px;
  background: var(--grad-luxury-pill);
}
.motion-on .bottom-nav-item.active::after { animation: m-indicator .6s var(--ease-out-back) .9s both; }
@keyframes m-indicator { from { scale: 0 1; } }
.motion-on .nav-tiny-badge { animation: m-badge-wiggle 3.5s ease-in-out 1.5s infinite; }
@keyframes m-badge-wiggle {
  0%, 86%, 100% { rotate: 0deg; }
  89% { rotate: -12deg; }
  92% { rotate: 10deg; }
  95% { rotate: -6deg; }
}

/* =====================================================
   12. BEBETTER 1:1 AUTHENTIC SECTION & 3D CLAY CARDS
   Headline: "ครบทั้งเด็ก ครู และสถาบัน [ลองกดเล่นได้ทุกช่อง]"
   Interactive Feature Cards Grid (5 Steps + 1 Evidence)
   ===================================================== */

/* Section Header Container */
.bb-section-header {
  margin: 28px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* 2-Column Hero Row */
.bb-hero-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

.bb-headline-col {
  flex-shrink: 0;
}

.bb-headline-main {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 900;
  color: #111827;
  line-height: 1.16;
  letter-spacing: -0.025em;
  font-family: var(--font-heading);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bb-line {
  display: block;
  color: #111827;
}

/* The Authentic Yellow Sticker Badge (Matches Reference Exactly) */
.bb-yellow-pill {
  display: inline-block;
  background: #f7ca38;
  color: #111827;
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  font-weight: 900;
  padding: 5px 20px 7px;
  border-radius: 14px;
  box-shadow: 0 5px 0 #c89417, 0 10px 18px rgba(200, 148, 23, 0.28);
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              background-color 0.2s ease;
  vertical-align: middle;
}

.bb-yellow-pill:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 7px 0 #c89417, 0 14px 24px rgba(200, 148, 23, 0.36);
  background: #f8cf49;
}

.bb-yellow-pill:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 2px 0 #c89417, 0 4px 8px rgba(200, 148, 23, 0.2);
}

/* Right Explanatory Column */
.bb-desc-col {
  max-width: 420px;
  padding-bottom: 8px;
}

.bb-desc-text {
  font-size: 0.98rem;
  color: #4b5563;
  line-height: 1.62;
  margin: 0;
  font-family: var(--font-body);
}

.bb-sample-pill {
  display: inline-block;
  background: #f1f3f5;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  margin-left: 6px;
  vertical-align: middle;
}

/* Category Sub-Header with 3D Archery Target */
.bb-category-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.bb-target-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-target-svg {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 8px rgba(140, 107, 78, 0.22));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bb-category-block:hover .bb-target-svg {
  transform: scale(1.08) rotate(12deg);
}

.bb-category-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bb-category-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
  animation: m-twinkle 2.5s infinite ease-in-out;
}

.bb-category-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
  font-family: var(--font-heading);
}

.bb-category-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 9999px;
}

.bb-category-sub {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0;
  line-height: 1.5;
  font-family: var(--font-body);
}

/* =====================================================
   FEATURE CARDS GRID (Responsive 3-Col, 2-Col, 1-Col)
   ===================================================== */
.bb-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 18px 0 44px;
}

@media (max-width: 1140px) {
  .bb-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .bb-cards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .bb-hero-row {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: flex-start;
  }
  .bb-desc-col {
    max-width: 100%;
  }
}

/* Individual Feature Card */
.bb-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              border-color 0.28s ease;
  position: relative;
  overflow: hidden;
}

.bb-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -6px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.bb-card-highlight {
  animation: bbPulseHighlight 1.2s ease;
}

@keyframes bbPulseHighlight {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
  100% { transform: scale(1); }
}

.bb-card-trophy {
  border-color: #fde68a;
  background: linear-gradient(180deg, #ffffff 0%, #fffdf5 100%);
}

.bb-card-trophy:hover {
  border-color: #f59e0b;
}

/* Card Header */
.bb-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bb-card-head-left {
  flex: 1;
}

.bb-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #eff6ff;
  color: #2563eb;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.bb-step-violet { background: #f5f3ff; color: #7c3aed; }
.bb-step-amber { background: #fffbeb; color: #d97706; }
.bb-step-emerald { background: #ecfdf5; color: #059669; }
.bb-step-rose { background: #fff1f2; color: #e11d48; }
.bb-step-gold { background: #fefce8; color: #b45309; }

.bb-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.35;
  font-family: var(--font-heading);
}

.bb-card-sub {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-body);
}

/* 3D Clay Figure Container */
.bb-card-clay {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clay-figure {
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.motion-on .clay-figure {
  animation: m-clay-bob 5s ease-in-out infinite;
}

@keyframes m-clay-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.bb-card:hover .clay-figure {
  transform: scale(1.1) rotate(4deg);
  animation-play-state: paused;
}

/* Interactive Mini-Widget Box */
.bb-card-widget {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  margin: 6px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 156px;
  justify-content: center;
}

.bb-widget-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
}

.bb-widget-label {
  font-weight: 700;
  color: #64748b;
  font-family: var(--font-heading);
}

.bb-chip-success {
  background: #ecfdf5;
  color: #059669;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
}

.bb-chip-warning {
  background: #fff1f2;
  color: #e11d48;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
}

.bb-chip-gold {
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
}

/* Segmented Buttons */
.bb-seg-tabs, .bb-period-tabs {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 12px;
  gap: 3px;
}

.bb-seg-btn, .bb-period-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-heading);
}

.bb-seg-btn.active, .bb-period-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Dimension Bars (Card 2) */
.bb-dimension-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  align-items: flex-end;
  height: 54px;
  padding: 4px 0;
}

.bb-dim-bar {
  background: #e2e8f0;
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

.bb-dim-bar-fill {
  width: 100%;
  border-radius: 6px;
  background: #93c5fd;
  transition: all 0.2s;
}

.bb-dim-bar:hover, .bb-dim-bar.active {
  background: #cbd5e1;
  transform: translateY(-2px);
}

.bb-dim-bar.active .bb-dim-bar-fill {
  background: #e11d48;
}

.bb-dimension-readout {
  font-size: 0.78rem;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
  font-family: var(--font-heading);
}

/* Rubric checklist (Card 6) */
.bb-rubric-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: #334155;
}

.bb-rubric-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.bb-rubric-item input[type="checkbox"] {
  accent-color: #d97706;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.bb-rubric-award {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  text-align: center;
  margin-top: 4px;
  font-family: var(--font-heading);
}

/* Action Buttons Footer */
.bb-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bb-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
}

.bb-action-btn:hover {
  background: #1e3a8a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.bb-btn-duty {
  background: #059669;
}
.bb-btn-duty:hover {
  background: #047857;
}

.bb-btn-gold {
  background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
}
.bb-btn-gold:hover {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}

.bb-action-soft {
  background: #f1f5f9;
  color: #334155;
}
.bb-action-soft:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bb-dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bb-dual-actions .bb-action-btn {
  font-size: 0.78rem;
  padding: 9px 10px;
  justify-content: center;
  gap: 6px;
}

.bb-footer-primary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bb-footer-primary-row .bb-action-btn {
  font-size: 0.76rem;
  padding: 8px 8px;
  justify-content: center;
  gap: 4px;
}

.bb-footer-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bb-sub-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
}
.bb-sub-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bb-network-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.bb-net-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 5px 2px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
  font-family: var(--font-heading);
}
.bb-net-btn.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  font-weight: 800;
}

.bb-network-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.76rem;
}
.net-title {
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 2px;
}
.net-desc {
  color: #475569;
  line-height: 1.4;
  margin-bottom: 4px;
}
.net-badge {
  display: inline-block;
  font-size: 0.68rem;
  color: #059669;
  font-weight: 700;
  background: #ecfdf5;
  padding: 1px 6px;
  border-radius: 6px;
}

.bb-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bb-stat-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-lbl {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 700;
}
.stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}
.stat-val small {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}
.stat-sub {
  font-size: 0.68rem;
  color: #059669;
  font-weight: 700;
}

.bb-scholarship-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scholar-stat-row {
  display: flex;
  gap: 6px;
}
.scholar-pill {
  flex: 1;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.72rem;
  color: #334155;
}
.scholar-pill b {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}
.scholar-pill.pill-gold b {
  color: #d97706;
}
.scholar-guarantee-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bb-duty-preview-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
}
.duty-point-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.duty-attendance-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}
.att-sep {
  color: #cbd5e1;
}
.att-rate {
  margin-left: auto;
  color: #059669;
  font-weight: 800;
}


@media (max-width: 768px) {
  .m-top-btn { bottom: calc(86px + env(safe-area-inset-bottom)); right: 14px; width: 44px; height: 44px; }
  .m-aurora .grid { opacity: .35; }
}

/* =====================================================
   ACCESSIBILITY — respect reduced motion completely
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .m-aurora span { animation: none !important; }
}


.motion-on .fade-up,
.motion-on .daily-card,
.motion-on .bb-card,
.motion-on .stat-card,
.motion-on .m-tilt {
  transition:
    opacity .62s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    transform .62s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms),
    filter .62s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms) !important;
  will-change: opacity, transform, filter;
}

.motion-on .fade-up:not(.is-in),
.motion-on .daily-card:not(.is-in),
.motion-on .bb-card:not(.is-in),
.motion-on .stat-card:not(.is-in) {
  opacity: 0 !important;
  transform: translateY(28px) scale(0.97) !important;
  filter: blur(8px) !important;
}

.motion-on .fade-up.is-in,
.motion-on .daily-card.is-in,
.motion-on .bb-card.is-in,
.motion-on .stat-card.is-in {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0) !important;
}


/* =====================================================
   LUXURY STAGGERED CASCADE MICRO-ANIMATIONS (Apple & BeBetter Style)
   Left-to-Right Glide & Soft Pop for Every Important Line & Element
   ===================================================== */

/* 1. Section Header Lines & Yellow Sticker */
.motion-on .bb-line {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform, filter;
}

.motion-on .bb-section-header:not(.is-in) .bb-line:nth-child(1) {
  opacity: 0 !important;
  transform: translateX(-24px) !important;
  filter: blur(6px) !important;
}
.motion-on .bb-section-header:not(.is-in) .bb-line:nth-child(2) {
  opacity: 0 !important;
  transform: translateX(-24px) !important;
  filter: blur(6px) !important;
}
.motion-on .bb-section-header:not(.is-in) .bb-yellow-pill {
  opacity: 0 !important;
  transform: translateY(16px) scale(0.92) !important;
  filter: blur(6px) !important;
}

.motion-on .bb-section-header.is-in .bb-line:nth-child(1) {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 60ms !important;
}
.motion-on .bb-section-header.is-in .bb-line:nth-child(2) {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 140ms !important;
}
.motion-on .bb-section-header.is-in .bb-yellow-pill {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0) !important;
  transition-delay: 240ms !important;
}

/* 2. Feature Cards (.bb-card) Internal Cascade */
.motion-on .bb-card .bb-step-chip,
.motion-on .bb-card .bb-card-title,
.motion-on .bb-card .bb-card-sub,
.motion-on .bb-card-clay .clay-figure,
.motion-on .bb-card .bb-card-widget,
.motion-on .bb-card .bb-card-footer {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform, filter;
}

/* Initial state before reveal (when .bb-card does NOT have .is-in) */
.motion-on .bb-card:not(.is-in) .bb-step-chip {
  opacity: 0 !important;
  transform: translateX(-18px) !important;
  filter: blur(4px) !important;
}
.motion-on .bb-card:not(.is-in) .bb-card-title {
  opacity: 0 !important;
  transform: translateX(-22px) !important;
  filter: blur(5px) !important;
}
.motion-on .bb-card:not(.is-in) .bb-card-sub {
  opacity: 0 !important;
  transform: translateX(-16px) !important;
  filter: blur(4px) !important;
}
.motion-on .bb-card:not(.is-in) .bb-card-clay .clay-figure {
  opacity: 0 !important;
  transform: scale(0.65) translateY(12px) rotate(-8deg) !important;
  filter: blur(6px) !important;
}
.motion-on .bb-card:not(.is-in) .bb-card-widget {
  opacity: 0 !important;
  transform: translateY(14px) scale(0.98) !important;
  filter: blur(4px) !important;
}
.motion-on .bb-card:not(.is-in) .bb-card-footer {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  filter: blur(4px) !important;
}

/* Staggered slide in from left & soft pop when .is-in is present */
.motion-on .bb-card.is-in .bb-step-chip {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 80ms !important;
}
.motion-on .bb-card.is-in .bb-card-title {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 150ms !important;
}
.motion-on .bb-card.is-in .bb-card-sub {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 220ms !important;
}
.motion-on .bb-card.is-in .bb-card-clay .clay-figure {
  opacity: 1 !important;
  transform: scale(1) translateY(0) rotate(0deg) !important;
  filter: blur(0) !important;
  transition-delay: 260ms !important;
}
.motion-on .bb-card.is-in .bb-card-widget {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  filter: blur(0) !important;
  transition-delay: 320ms !important;
}
.motion-on .bb-card.is-in .bb-card-footer {
  opacity: 1 !important;
  transform: translateY(0) !important;
  filter: blur(0) !important;
  transition-delay: 380ms !important;
}

/* 3. Daily Teacher Cards (.daily-card) Internal Cascade */
.motion-on .daily-card .daily-badge,
.motion-on .daily-card .daily-title,
.motion-on .daily-card .daily-desc,
.motion-on .daily-card-clay .clay-figure,
.motion-on .daily-card .daily-btn {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform, filter;
}

.motion-on .daily-card:not(.is-in) .daily-badge {
  opacity: 0 !important;
  transform: translateX(-18px) !important;
  filter: blur(4px) !important;
}
.motion-on .daily-card:not(.is-in) .daily-title {
  opacity: 0 !important;
  transform: translateX(-22px) !important;
  filter: blur(5px) !important;
}
.motion-on .daily-card:not(.is-in) .daily-desc {
  opacity: 0 !important;
  transform: translateX(-16px) !important;
  filter: blur(4px) !important;
}
.motion-on .daily-card:not(.is-in) .daily-card-clay .clay-figure {
  opacity: 0 !important;
  transform: scale(0.65) translateY(12px) rotate(-8deg) !important;
  filter: blur(6px) !important;
}
.motion-on .daily-card:not(.is-in) .daily-btn {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  filter: blur(4px) !important;
}

.motion-on .daily-card.is-in .daily-badge {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 80ms !important;
}
.motion-on .daily-card.is-in .daily-title {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 150ms !important;
}
.motion-on .daily-card.is-in .daily-desc {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 220ms !important;
}
.motion-on .daily-card.is-in .daily-card-clay .clay-figure {
  opacity: 1 !important;
  transform: scale(1) translateY(0) rotate(0deg) !important;
  filter: blur(0) !important;
  transition-delay: 260ms !important;
}
.motion-on .daily-card.is-in .daily-btn {
  opacity: 1 !important;
  transform: translateY(0) !important;
  filter: blur(0) !important;
  transition-delay: 340ms !important;
}

/* 4. Top Stat Cards Internal Cascade */
.motion-on .stat-card .stat-label,
.motion-on .stat-card .stat-value,
.motion-on .stat-card .stat-icon {
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform;
}

.motion-on .stat-card:not(.is-in) .stat-label {
  opacity: 0 !important;
  transform: translateX(-12px) !important;
}
.motion-on .stat-card:not(.is-in) .stat-value {
  opacity: 0 !important;
  transform: translateX(-16px) !important;
}
.motion-on .stat-card:not(.is-in) .stat-icon {
  opacity: 0 !important;
  transform: scale(0.7) !important;
}

.motion-on .stat-card.is-in .stat-label {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition-delay: 80ms !important;
}
.motion-on .stat-card.is-in .stat-value {
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition-delay: 140ms !important;
}
.motion-on .stat-card.is-in .stat-icon {
  opacity: 1 !important;
  transform: scale(1) !important;
  transition-delay: 180ms !important;
}



/* =====================================================
   LUXURY 3-STAGE TRANSITION: SIS & DUTY CARDS + UNIVERSAL CASCADE
   1. Float-up + Blur-to-clear (Card level)
   2. Left-to-Right Glide for titles, labels & content lines
   3. Micro-pop & Stagger for badges, chips, values, and icons
   ===================================================== */

/* 1. Universal Cascading Lines */
.motion-on .m-cascade > *,
.motion-on .m-line,
.motion-on .m-line-1,
.motion-on .m-line-2,
.motion-on .m-line-3 {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform, filter;
}

.motion-on .fade-up:not(.is-in) .m-line,
.motion-on .fade-up:not(.is-in) .m-line-1,
.motion-on .fade-up:not(.is-in) .m-cascade > *:nth-child(1),
.motion-on .stat-card:not(.is-in) p,
.motion-on .wow-card:not(.is-in) p,
.motion-on .duty-point-card:not(.is-in) h4 {
  opacity: 0 !important;
  transform: translateX(-24px) !important;
  filter: blur(5px) !important;
}

.motion-on .fade-up:not(.is-in) .m-line-2,
.motion-on .fade-up:not(.is-in) .m-cascade > *:nth-child(2),
.motion-on .stat-card:not(.is-in) h3,
.motion-on .wow-card:not(.is-in) h3,
.motion-on .duty-point-card:not(.is-in) p {
  opacity: 0 !important;
  transform: translateX(-20px) !important;
  filter: blur(5px) !important;
}

.motion-on .fade-up:not(.is-in) .m-line-3,
.motion-on .fade-up:not(.is-in) .m-cascade > *:nth-child(3),
.motion-on .stat-card:not(.is-in) .wow-icon,
.motion-on .wow-card:not(.is-in) .wow-icon,
.motion-on .duty-point-card:not(.is-in) .duty-point-icon,
.motion-on .photo-slot:not(.is-in) img {
  opacity: 0 !important;
  transform: scale(0.8) translateY(10px) !important;
  filter: blur(6px) !important;
}

/* Staggered In when .is-in is present */
.motion-on .fade-up.is-in .m-line,
.motion-on .fade-up.is-in .m-line-1,
.motion-on .fade-up.is-in .m-cascade > *:nth-child(1),
.motion-on .stat-card.is-in p,
.motion-on .wow-card.is-in p,
.motion-on .duty-point-card.is-in h4 {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 80ms !important;
}

.motion-on .fade-up.is-in .m-line-2,
.motion-on .fade-up.is-in .m-cascade > *:nth-child(2),
.motion-on .stat-card.is-in h3,
.motion-on .wow-card.is-in h3,
.motion-on .duty-point-card.is-in p {
  opacity: 1 !important;
  transform: translateX(0) !important;
  filter: blur(0) !important;
  transition-delay: 160ms !important;
}

.motion-on .fade-up.is-in .m-line-3,
.motion-on .fade-up.is-in .m-cascade > *:nth-child(3),
.motion-on .stat-card.is-in .wow-icon,
.motion-on .wow-card.is-in .wow-icon,
.motion-on .duty-point-card.is-in .duty-point-icon,
.motion-on .photo-slot.is-in img {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
  filter: blur(0) !important;
  transition-delay: 240ms !important;
}


/* =====================================================
   WORLD-CLASS CHILD MICRO-CASCADE (ขยับที่แถวและรายการข้างใน)
   - Parent stays steady
   - Children slide in sequentially from Left-to-Right + Lift
   ===================================================== */
.motion-on .stagger-children > *,
.motion-on .stagger-row {
  opacity: 0 !important;
  transform: translateX(-16px) translateY(8px) !important;
  filter: blur(2px) !important;
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.42s ease !important;
  will-change: opacity, transform, filter;
}

.motion-on .is-in.stagger-children > *,
.motion-on .stagger-children.is-in > *,
.motion-on .is-in .stagger-row,
.motion-on .stagger-row.is-in {
  opacity: 1 !important;
  transform: translateX(0) translateY(0) !important;
  filter: blur(0) !important;
}

/* Stagger Delays */
.motion-on .stagger-children > *:nth-child(1)  { transition-delay: 30ms !important; }
.motion-on .stagger-children > *:nth-child(2)  { transition-delay: 60ms !important; }
.motion-on .stagger-children > *:nth-child(3)  { transition-delay: 90ms !important; }
.motion-on .stagger-children > *:nth-child(4)  { transition-delay: 120ms !important; }
.motion-on .stagger-children > *:nth-child(5)  { transition-delay: 150ms !important; }
.motion-on .stagger-children > *:nth-child(6)  { transition-delay: 180ms !important; }
.motion-on .stagger-children > *:nth-child(7)  { transition-delay: 210ms !important; }
.motion-on .stagger-children > *:nth-child(8)  { transition-delay: 240ms !important; }
.motion-on .stagger-children > *:nth-child(9)  { transition-delay: 270ms !important; }
.motion-on .stagger-children > *:nth-child(10) { transition-delay: 300ms !important; }
.motion-on .stagger-children > *:nth-child(11) { transition-delay: 330ms !important; }
.motion-on .stagger-children > *:nth-child(12) { transition-delay: 360ms !important; }
