/* =========================================================
   MOTION LAYER — site-wide effects & scalable components
   Paired with assets/js/motion.js. Everything degrades to a
   static, fully readable page without JS or with reduced motion.
   ========================================================= */

:root {
    --mo-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --mo-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
    scroll-behavior: smooth;
}

/* ---------- Page transitions (cross-document View Transitions) ---------- */
@view-transition {
    navigation: auto;
}

#mainHeader {
    view-transition-name: site-header;
}

::view-transition-old(root) {
    animation: mo-page-out 0.28s var(--mo-ease-in-out) both;
}

::view-transition-new(root) {
    animation: mo-page-in 0.5s var(--mo-ease) both;
}

@keyframes mo-page-out {
    to { opacity: 0; transform: translateY(-12px); filter: blur(4px); }
}

@keyframes mo-page-in {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
}

/* ---------- Scroll progress ---------- */
.mo-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 6000;
    pointer-events: none;
    transform-origin: 0 50%;
    transform: scaleX(var(--p, 0));
    background: linear-gradient(90deg, #5eead4, #0d9488 50%, #f59e0b);
    box-shadow: 0 0 12px rgba(13, 148, 136, 0.5);
}

/* ---------- Aurora hero background ---------- */
.mo-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.mo-aurora span {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}

.mo-aurora span:nth-child(1) {
    width: 46vw;
    height: 46vw;
    max-width: 640px;
    max-height: 640px;
    top: -18%;
    right: -8%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.55), rgba(45, 212, 191, 0) 70%);
    animation: mo-drift-a 18s ease-in-out infinite alternate;
}

.mo-aurora span:nth-child(2) {
    width: 34vw;
    height: 34vw;
    max-width: 480px;
    max-height: 480px;
    bottom: -20%;
    left: -10%;
    background: radial-gradient(circle, rgba(251, 207, 232, 0.7), rgba(251, 207, 232, 0) 70%);
    animation: mo-drift-b 22s ease-in-out infinite alternate;
}

.mo-aurora span:nth-child(3) {
    width: 26vw;
    height: 26vw;
    max-width: 360px;
    max-height: 360px;
    top: 30%;
    left: 38%;
    background: radial-gradient(circle, rgba(253, 230, 138, 0.45), rgba(253, 230, 138, 0) 70%);
    animation: mo-drift-c 26s ease-in-out infinite alternate;
}

/* Fine dot grid that fades out toward the bottom */
.mo-aurora::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 23, 42, 0.09) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

.mo-has-aurora {
    position: relative;
    isolation: isolate;
}

.mo-has-aurora > .container {
    position: relative;
    z-index: 1;
}

@keyframes mo-drift-a {
    to { transform: translate(-8vw, 10vh) scale(1.15); }
}

@keyframes mo-drift-b {
    to { transform: translate(10vw, -8vh) scale(1.2); }
}

@keyframes mo-drift-c {
    to { transform: translate(-12vw, 6vh) scale(0.85); }
}

/* ---------- Animated accent text ---------- */
.hm .hm-accent {
    background: linear-gradient(100deg, #0f766e 0%, #14b8a6 30%, #0ea5e9 50%, #14b8a6 70%, #0f766e 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mo-shine 7s linear infinite;
}

.hm .hm-h2-light .hm-accent {
    background-image: linear-gradient(100deg, #5eead4, #fde68a, #5eead4);
}

@keyframes mo-shine {
    to { background-position: -250% 0; }
}

/* ---------- Split-word headings ---------- */
.mo-split .mo-w {
    display: inline-block;
    white-space: pre;
    opacity: 0;
    transform: translateY(0.55em) rotate(2deg);
    filter: blur(6px);
    transition:
        opacity 0.7s var(--mo-ease),
        transform 0.9s var(--mo-ease),
        filter 0.7s var(--mo-ease);
    transition-delay: calc(var(--i, 0) * 45ms);
}

.mo-split.mo-in .mo-w {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

/* Gradient accent spans keep their clip when words are split inside */
.hm-accent .mo-w {
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
}

/* ---------- Staggered items ---------- */
.mo-item {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition:
        opacity 0.7s var(--mo-ease),
        transform 0.9s var(--mo-ease);
    transition-delay: var(--d, 0ms);
}

.mo-in > .mo-item,
.mo-item.mo-in {
    opacity: 1;
    transform: none;
}

/* Fade-up for single blocks */
.mo-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--mo-ease), transform 0.9s var(--mo-ease);
}

.mo-fade.mo-in {
    opacity: 1;
    transform: none;
}

/* ---------- Image wipe reveal ---------- */
.mo-img {
    clip-path: inset(12% 12% 12% 12% round 28px);
    transition: clip-path 1.2s var(--mo-ease);
}

.mo-img img {
    transform: scale(1.18);
    transition: transform 1.6s var(--mo-ease);
}

.mo-img.mo-in {
    clip-path: inset(0 0 0 0 round 28px);
}

.mo-img.mo-in img {
    transform: scale(1);
}

/* ---------- Hero parallax ---------- */
.mo-par {
    transition: translate 0.6s var(--mo-ease);
    translate: calc(var(--mx, 0) * var(--depth, 10px)) calc(var(--my, 0) * var(--depth, 10px));
}

/* ---------- Card spotlight + tilt ---------- */
.mo-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.mo-card.mo-tilting {
    transition: transform 0.12s linear, box-shadow 0.3s ease, border-color 0.3s ease !important;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px) !important;
}

.mo-glow {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(20, 184, 166, 0.14), transparent 45%);
}

.mo-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(13, 148, 136, 0.7), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.mo-card:hover > .mo-glow {
    opacity: 1;
}

/* Dark cards get a softer, lighter glow */
.hm-plan-trial > .mo-glow,
.rv-form-card > .mo-glow {
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.1), transparent 45%);
}

/* ---------- Magnetic buttons ---------- */
.mo-mag {
    transition: translate 0.35s var(--mo-ease), transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
    translate: var(--bx, 0) var(--by, 0);
}

/* ---------- Rails (horizontal scrollers that scale to any number of items) ---------- */
.mo-rail-wrap {
    position: relative;
}

.mo-rail-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: -8px 0 16px;
}

.mo-rail-count {
    margin-right: auto;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.mo-rail-count b {
    color: #0f172a;
}

.mo-rail-btns {
    display: flex;
    gap: 8px;
}

.mo-rail-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e8edf3;
    background: #ffffff;
    color: #0f172a;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.mo-rail-btn svg {
    width: 20px;
    height: 20px;
}

.mo-rail-btn:hover:not(:disabled) {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    transform: scale(1.06);
}

.mo-rail-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.mo-rail-wrap.mo-fits .mo-rail-btns,
.mo-rail-wrap.mo-fits .mo-rail-bar {
    display: none;
}

.hm .mo-rail {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: var(--rail-w, 290px);
    grid-template-columns: none !important;
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    padding: 6px 4px 18px !important;
    margin: 0 -4px !important;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 60px), transparent);
}

.hm .mo-rail.mo-at-end {
    -webkit-mask-image: none;
    mask-image: none;
}

.hm .mo-rail::-webkit-scrollbar {
    display: none;
}

.hm .mo-rail > * {
    scroll-snap-align: start;
    min-width: 0;
}

.hm .mo-rail > [hidden] {
    display: none !important;
}

.mo-rail.mo-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
}

.mo-rail.mo-dragging a {
    pointer-events: none;
}

.mo-rail-bar {
    height: 4px;
    margin-top: 6px;
    border-radius: 999px;
    background: #e8edf3;
    overflow: hidden;
}

.mo-rail-bar > span {
    display: block;
    height: 100%;
    width: var(--thumb, 30%);
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #0f766e);
    transform: translateX(var(--pos, 0%));
    transition: width 0.2s ease;
}

/* Grid mode: used when a rail is filtered/searched, so results wrap instead of scrolling */
.hm .mo-rail-wrap.mo-grid-mode .mo-rail {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)) !important;
    overflow: visible;
    scroll-snap-type: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.mo-rail-wrap.mo-grid-mode .mo-rail-head {
    display: none;
}

@media (max-width: 640px) {
    .hm .mo-rail {
        grid-auto-columns: min(82%, var(--rail-w, 290px));
        gap: 14px;
        margin: 0 -16px !important;
        padding: 6px 16px 18px !important;
        scroll-padding-inline: 16px;
    }

    .mo-rail-head {
        margin-top: 0;
    }

    .mo-rail-btn {
        width: 38px;
        height: 38px;
    }
}

/* ---------- Show-more (batching) ---------- */
.mo-more-hidden {
    display: none !important;
}

.mo-more-wrap {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mo-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid #e8edf3;
    background: #ffffff;
    color: #0f172a;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mo-more-btn:hover {
    border-color: rgba(13, 148, 136, 0.45);
    background: #f0fdfa;
    transform: translateY(-2px);
}

.mo-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

.mo-more-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.mo-more-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.mo-more-meta .mo-more-track {
    display: block;
    width: 160px;
    height: 4px;
    margin: 6px auto 0;
    border-radius: 999px;
    background: #e8edf3;
    overflow: hidden;
}

.mo-more-meta .mo-more-track span {
    display: block;
    height: 100%;
    width: var(--w, 0%);
    background: linear-gradient(90deg, #14b8a6, #0f766e);
    transition: width 0.5s var(--mo-ease);
}

.mo-more-wrap[hidden],
.mo-rail-head[hidden] {
    display: none !important;
}

/* Compact chip-style "more" for tag lists */
.mo-more-wrap.mo-inline {
    display: inline-flex;
    margin: 0;
}

.mo-more-wrap.mo-inline .mo-more-btn {
    min-height: 0;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.mo-more-wrap.mo-inline .mo-more-meta {
    display: none;
}

.mo-reveal-new {
    animation: mo-pop-in 0.6s var(--mo-ease) both;
    animation-delay: var(--d, 0ms);
}

@keyframes mo-pop-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
}

/* ---------- Infinite ticker ---------- */
.mo-ticker {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.mo-ticker-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: mo-ticker var(--dur, 40s) linear infinite;
}

.mo-ticker:hover .mo-ticker-track {
    animation-play-state: paused;
}

.mo-ticker-track.mo-rev {
    animation-direction: reverse;
}

@keyframes mo-ticker {
    to { transform: translateX(calc(-50% - 6px)); }
}

/* ---------- Reduced motion: show everything, animate nothing ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    .mo-split .mo-w,
    .mo-item,
    .mo-fade,
    .mo-img,
    .mo-img img {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
        transition: none !important;
    }

    .mo-aurora span,
    .hm .hm-accent,
    .mo-ticker-track,
    .mo-reveal-new {
        animation: none !important;
    }

    .mo-par {
        translate: none !important;
    }
}

/* Items removed by a page filter (e.g. review star filter) */
.hm .is-filtered {
    display: none !important;
}

/* =====================================================================
   Continuous motion around forms & reviews
   (booking card + steps, review / contact / suggestion forms, review wall, outreach form).
   Only transform / opacity / background-position animate, so it stays cheap;
   floating uses the separate `translate` property so it never fights the card tilt.
   ===================================================================== */
@property --fm-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* 1. Light that travels around the edge of the white form cards */
.bt-card::after,
.rv-suggest::after,
.partner-section .form-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--fm-angle), transparent 0deg, transparent 250deg, rgba(20, 184, 166, .9) 300deg, rgba(251, 191, 36, .85) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: fm-spin 6s linear infinite;
}
.rv-suggest, .partner-section .form-card { position: relative; }
@keyframes fm-spin { to { --fm-angle: 360deg; } }

/* The booking card's soft glow breathes */
.bt-card::before { animation: fm-breathe 5s ease-in-out infinite; }
@keyframes fm-breathe { 0%, 100% { opacity: .35; transform: scale(.98); } 50% { opacity: .7; transform: scale(1.02); } }

/* Progress bar shimmer */
.bt-bar span { position: relative; overflow: hidden; }
.bt-bar span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
    transform: translateX(-100%);
    animation: fm-sweep 2.4s ease-in-out infinite;
}

/* 2. "How it works" steps: a glowing dot stops on each number in turn and that number lights up.
      Dot and numbers share one 4.5s clock (no per-item delays), so they cannot drift apart.
      --y1/--y2/--y3 are the dot positions, measured from the real layout by book-trial.php. */
.bt-next { --y1: 15px; --y2: 50%; --y3: calc(100% - 39px); }
.bt-next::after {
    content: '';
    position: absolute;
    left: 15px;
    top: var(--y1);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .18), 0 0 14px 2px rgba(20, 184, 166, .7);
    animation: fm-travel 4.5s ease-in-out infinite;
}
@keyframes fm-travel {
    0%       { top: var(--y1); opacity: 0; }
    5%, 20%  { top: var(--y1); opacity: 1; }
    35%, 53% { top: var(--y2); opacity: 1; }
    68%, 86% { top: var(--y3); opacity: 1; }
    100%     { top: var(--y3); opacity: 0; }
}
.bt-next li:nth-child(1) .bt-next-num { animation: fm-num1 4.5s ease-in-out infinite; }
.bt-next li:nth-child(2) .bt-next-num { animation: fm-num2 4.5s ease-in-out infinite; }
.bt-next li:nth-child(3) .bt-next-num { animation: fm-num3 4.5s ease-in-out infinite; }
@keyframes fm-num1 {
    0%, 3%, 24%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); background: #fff; color: var(--teal-d, #0f766e); }
    7%, 20% { box-shadow: 0 0 0 6px rgba(20, 184, 166, .15), 0 8px 18px -6px rgba(13, 148, 136, .55); background: #0d9488; color: #fff; }
}
@keyframes fm-num2 {
    0%, 33%, 57%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); background: #fff; color: var(--teal-d, #0f766e); }
    37%, 53% { box-shadow: 0 0 0 6px rgba(20, 184, 166, .15), 0 8px 18px -6px rgba(13, 148, 136, .55); background: #0d9488; color: #fff; }
}
@keyframes fm-num3 {
    0%, 66%, 92%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); background: #fff; color: var(--teal-d, #0f766e); }
    70%, 86% { box-shadow: 0 0 0 6px rgba(20, 184, 166, .15), 0 8px 18px -6px rgba(13, 148, 136, .55); background: #0d9488; color: #fff; }
}

/* 3. Dark review / contact form panel: drifting aurora + twinkling sparkles */
.rv-form-card { position: relative; overflow: hidden; isolation: isolate; }
.rv-form-card > * { position: relative; z-index: 1; }
.rv-form-card::before {
    content: '';
    position: absolute;
    inset: -40%;
    z-index: 0;
    background:
        radial-gradient(30% 30% at 20% 30%, rgba(94, 234, 212, .28), transparent 70%),
        radial-gradient(25% 25% at 80% 70%, rgba(251, 191, 36, .16), transparent 70%),
        radial-gradient(35% 35% at 60% 20%, rgba(45, 212, 191, .2), transparent 70%);
    animation: fm-aurora 16s ease-in-out infinite alternate;
    pointer-events: none;
}
.rv-form-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, .9), transparent),
        radial-gradient(1px 1px at 32% 72%, rgba(255, 255, 255, .7), transparent),
        radial-gradient(2px 2px at 58% 34%, rgba(253, 230, 138, .9), transparent),
        radial-gradient(1px 1px at 76% 12%, rgba(255, 255, 255, .8), transparent),
        radial-gradient(1.5px 1.5px at 88% 56%, rgba(255, 255, 255, .7), transparent),
        radial-gradient(1px 1px at 44% 90%, rgba(255, 255, 255, .6), transparent),
        radial-gradient(2px 2px at 6% 64%, rgba(94, 234, 212, .9), transparent),
        radial-gradient(1px 1px at 66% 82%, rgba(255, 255, 255, .8), transparent);
    background-size: 100% 400px;
    animation: fm-twinkle 4s ease-in-out infinite alternate, fm-rise 24s linear infinite;
    pointer-events: none;
}
@keyframes fm-aurora {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(6%, -4%) rotate(8deg) scale(1.08); }
    100% { transform: translate(-5%, 5%) rotate(-6deg) scale(1); }
}
@keyframes fm-twinkle { 0% { opacity: .35; } 100% { opacity: 1; } }
@keyframes fm-rise { from { background-position: 0 0; } to { background-position: 0 -400px; } }

/* Chosen rating stars glow one after another */
.rv-rate-stars input:checked ~ label svg { animation: fm-star 3s ease-in-out infinite; }
.rv-rate-stars label:nth-of-type(5) svg { animation-delay: 0s; }
.rv-rate-stars label:nth-of-type(4) svg { animation-delay: .15s; }
.rv-rate-stars label:nth-of-type(3) svg { animation-delay: .3s; }
.rv-rate-stars label:nth-of-type(2) svg { animation-delay: .45s; }
.rv-rate-stars label:nth-of-type(1) svg { animation-delay: .6s; }
@keyframes fm-star {
    0%, 70%, 100% { filter: drop-shadow(0 0 0 rgba(251, 191, 36, 0)); transform: none; }
    80% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, .9)); transform: scale(1.12) rotate(-6deg); }
}

/* Suggestion lightbulb swings and glows */
.rv-suggest-icon svg { transform-origin: 50% 10%; animation: fm-swing 3.2s ease-in-out infinite; }
.rv-suggest-icon { animation: fm-bulb 3.2s ease-in-out infinite; }
@keyframes fm-swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes fm-bulb { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); } 50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, .14), 0 0 22px rgba(251, 191, 36, .35); } }

/* 4. Submit / continue buttons: a light sweep every few seconds */
.rv-form .hm-btn[type="submit"], .rv-sg-form .hm-btn[type="submit"], .bt-card .hm-btn-primary,
.partner-section .btn-submit { position: relative; overflow: hidden; isolation: isolate; }
.rv-form .hm-btn[type="submit"]::after, .rv-sg-form .hm-btn[type="submit"]::after, .bt-card .hm-btn-primary::after,
.partner-section .btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: translateX(-120%) skewX(-20deg);
    animation: fm-btn-sweep 4.5s ease-in-out 1s infinite;
    pointer-events: none;
}
.rv-form .hm-btn-light[type="submit"]::after { background: linear-gradient(100deg, transparent, rgba(20, 184, 166, .28), transparent); }
@keyframes fm-sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@keyframes fm-btn-sweep { 0%, 55% { transform: translateX(-120%) skewX(-20deg); } 85%, 100% { transform: translateX(320%) skewX(-20deg); } }

/* 5. Review wall: cards float gently out of step with each other, stars shimmer in turn */
.rv-grid .rv-card { animation: fm-float 7s ease-in-out infinite; }
.rv-grid .rv-card:nth-child(3n+2) { animation-delay: -2.3s; animation-duration: 8s; }
.rv-grid .rv-card:nth-child(3n) { animation-delay: -4.6s; animation-duration: 9s; }
@keyframes fm-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.rv-card .hm-review-stars .on { animation: fm-card-star 5s ease-in-out infinite; }
.rv-card .hm-review-stars > :nth-child(2) { animation-delay: .12s; }
.rv-card .hm-review-stars > :nth-child(3) { animation-delay: .24s; }
.rv-card .hm-review-stars > :nth-child(4) { animation-delay: .36s; }
.rv-card .hm-review-stars > :nth-child(5) { animation-delay: .48s; }
@keyframes fm-card-star { 0%, 80%, 100% { transform: none; filter: none; } 88% { transform: scale(1.25); filter: drop-shadow(0 0 5px rgba(251, 191, 36, .9)); } }

@media (prefers-reduced-motion: reduce) {
    .bt-card::before, .bt-card::after, .rv-suggest::after, .partner-section .form-card::after, .bt-bar span::after,
    .bt-next::after, .bt-next-num, .rv-form-card::before, .rv-form-card::after, .rv-rate-stars label svg,
    .rv-suggest-icon, .rv-suggest-icon svg, .rv-grid .rv-card, .rv-card .hm-review-stars *,
    .rv-form .hm-btn::after, .rv-sg-form .hm-btn::after, .bt-card .hm-btn-primary::after, .partner-section .btn-submit::after {
        animation: none !important;
    }
    .bt-next::after { display: none; }
}

/* =====================================================================
   Footer motion
   Story photo drifts (Ken Burns) under a passing light; the links card gets the running
   border light + a slow aurora; doodle bobs; socials hop in turn; newsletter button shines;
   the giant watermark has a light passing through its letters.
   Hover effects in footer.php use `transform`, so loops here use `translate` / `rotate` / `scale`.
   ===================================================================== */
.lf-story-image { animation: lf-kenburns 26s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes lf-kenburns { 0% { transform: scale(1) translate(0, 0); } 100% { transform: scale(1.12) translate(-2%, -2%); } }

.lf-story::after {
    content: '';
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: 0;
    width: 35%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
    transform: translateX(-160%) skewX(-18deg);
    animation: lf-sweep 8s ease-in-out 2s infinite;
    pointer-events: none;
}
@keyframes lf-sweep { 0%, 60% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(420%) skewX(-18deg); } }

/* Floating light specks over the photo */
.lf-story-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(2px 2px at 18% 80%, rgba(204, 251, 241, .8), transparent),
        radial-gradient(1.5px 1.5px at 42% 60%, rgba(255, 255, 255, .7), transparent),
        radial-gradient(2px 2px at 70% 88%, rgba(253, 230, 138, .8), transparent),
        radial-gradient(1px 1px at 85% 40%, rgba(255, 255, 255, .8), transparent),
        radial-gradient(1.5px 1.5px at 28% 30%, rgba(204, 251, 241, .7), transparent),
        radial-gradient(1px 1px at 60% 15%, rgba(255, 255, 255, .6), transparent);
    background-size: 100% 380px;
    animation: lf-rise 20s linear infinite, lf-twinkle 3.5s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes lf-rise { from { background-position: 0 0; } to { background-position: 0 -380px; } }
@keyframes lf-twinkle { from { opacity: .3; } to { opacity: 1; } }

/* "Start with 3 free trial classes" arrow keeps nudging */
.lf-trial-link svg { animation: lf-nudge 2.4s ease-in-out infinite; }
@keyframes lf-nudge { 0%, 60%, 100% { translate: 0 0; } 75% { translate: 3px -3px; } }

/* Social icons hop one after another */
.lf-socials a { animation: lf-hop 6s ease-in-out infinite; }
.lf-socials a:nth-child(2) { animation-delay: .15s; }
.lf-socials a:nth-child(3) { animation-delay: .3s; }
.lf-socials a:nth-child(4) { animation-delay: .45s; }
.lf-socials a:nth-child(5) { animation-delay: .6s; }
@keyframes lf-hop { 0%, 82%, 100% { translate: 0 0; } 88% { translate: 0 -6px; } 94% { translate: 0 1px; } }

/* Links card: running border light + slow aurora inside */
.lf-links-card > *:not(.lf-doodle) { position: relative; z-index: 1; }
.lf-links-card .lf-doodle { z-index: 4; } /* above the running border light (z 3) */
.lf-links-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background:
        radial-gradient(40% 50% at var(--lf-x1, 15%) var(--lf-y1, 20%), rgba(45, 212, 191, .18), transparent 70%),
        radial-gradient(35% 45% at var(--lf-x2, 85%) var(--lf-y2, 80%), rgba(251, 191, 36, .12), transparent 70%);
    animation: lf-aurora 14s ease-in-out infinite alternate;
    pointer-events: none;
}
@property --lf-x1 { syntax: '<percentage>'; inherits: false; initial-value: 15%; }
@property --lf-y1 { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@property --lf-x2 { syntax: '<percentage>'; inherits: false; initial-value: 85%; }
@property --lf-y2 { syntax: '<percentage>'; inherits: false; initial-value: 80%; }
@keyframes lf-aurora {
    0% { --lf-x1: 15%; --lf-y1: 20%; --lf-x2: 85%; --lf-y2: 80%; }
    50% { --lf-x1: 55%; --lf-y1: 70%; --lf-x2: 40%; --lf-y2: 25%; }
    100% { --lf-x1: 80%; --lf-y1: 30%; --lf-x2: 20%; --lf-y2: 70%; }
}
.lf-links-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--fm-angle), transparent 0deg, transparent 250deg, rgba(20, 184, 166, .9) 300deg, rgba(251, 191, 36, .8) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: fm-spin 8s linear infinite;
}

/* "Ready to learn?" doodle bobs, its sparkles twinkle */
.lf-doodle span { animation: lf-bob 4s ease-in-out infinite; }
.lf-doodle span svg { animation: lf-sparkle 2.8s ease-in-out infinite; }
.lf-doodle em { animation: lf-wobble 4s ease-in-out infinite; transform-origin: left center; }
@keyframes lf-bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -7px; rotate: 4deg; } }
@keyframes lf-sparkle { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: 1.18; opacity: .75; } }
@keyframes lf-wobble { 0%, 100% { rotate: 0deg; } 50% { rotate: -3deg; } }

/* Nav links: underline draws in on hover */
.lf-nav a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: color .2s ease, transform .2s ease, background-size .3s ease; }
.lf-nav a:hover { background-size: 100% 1.5px; }

/* Newsletter button: light sweep */
.lf-newsletter-form button { position: relative; overflow: hidden; isolation: isolate; }
.lf-newsletter-form button::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: translateX(-130%) skewX(-20deg);
    animation: fm-btn-sweep 4.5s ease-in-out 1.5s infinite;
    pointer-events: none;
}

/* Giant watermark: a band of light passes through the letters */
.lf-watermark {
    background: linear-gradient(90deg, rgba(13, 92, 88, .06) 0%, rgba(13, 92, 88, .06) 40%, rgba(20, 184, 166, .3) 50%, rgba(13, 92, 88, .06) 60%, rgba(13, 92, 88, .06) 100%) 0 0 / 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: lf-watermark 9s ease-in-out infinite;
}
@keyframes lf-watermark { 0% { background-position: 100% 0; } 100% { background-position: -50% 0; } }

@media (prefers-reduced-motion: reduce) {
    .lf-story-image, .lf-story::after, .lf-story-content::before, .lf-trial-link svg, .lf-socials a,
    .lf-links-card::before, .lf-links-card::after, .lf-doodle span, .lf-doodle span svg, .lf-doodle em,
    .lf-newsletter-form button::after, .lf-watermark { animation: none !important; }
}

/* =====================================================================
   Home "How it works" — motion-graphic scenes
   Each card plays a small looping SVG story (book a day / meet the tutor / grades grow),
   and the cards take turns in the spotlight (7.5s cycle, 2.5s each) with an autoplay bar.
   `.hm .hm-steps` beats home.css (which loads after this file).
   ===================================================================== */
.hm .hm-steps::before { display: none; }          /* old dashed connector */

.hs-scene { width: 100%; max-width: 230px; margin: 4px auto 14px; }
.hs-scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.hs-scene text { font: 800 9px var(--font-h, 'Outfit', sans-serif); letter-spacing: .02em; }
.hs-scene .hs-shadow { fill: rgba(13, 148, 136, .1); }
.hs-scene [class^="hs-"], .hs-scene [class*=" hs-"] { transform-box: fill-box; transform-origin: center; }

/* --- Scene 1: book a day (5s) --- */
.hs-scene-book .hs-cursor { transform-box: view-box; transform-origin: 0 0; animation: hs-cursor 5s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes hs-cursor {
    0% { transform: translate(186px, 124px); opacity: 0; }
    8% { opacity: 1; }
    34% { transform: translate(114px, 80px); }
    38% { transform: translate(114px, 80px) scale(.82); }
    43%, 72% { transform: translate(114px, 80px) scale(1); opacity: 1; }
    82%, 100% { transform: translate(160px, 126px); opacity: 0; }
}
.hs-scene-book .hs-day { fill: #f0fdfa; animation: hs-day 5s ease infinite; }
@keyframes hs-day {
    0%, 37% { fill: #f0fdfa; transform: scale(1); }
    41% { fill: #0d9488; transform: scale(1.18); }
    47%, 86% { fill: #0d9488; transform: scale(1); }
    94%, 100% { fill: #f0fdfa; }
}
.hs-scene-book .hs-tick { stroke-dasharray: 18; stroke-dashoffset: 18; animation: hs-tick 5s ease infinite; }
@keyframes hs-tick { 0%, 44% { stroke-dashoffset: 18; } 54%, 86% { stroke-dashoffset: 0; opacity: 1; } 92%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.hs-scene-book .hs-badge { animation: hs-pop 5s cubic-bezier(.34, 1.56, .64, 1) infinite; --pop-in: 56%; }
@keyframes hs-pop {
    0%, 54% { transform: scale(0) rotate(-12deg); opacity: 0; }
    62% { transform: scale(1.12) rotate(4deg); opacity: 1; }
    68%, 86% { transform: scale(1) rotate(0); opacity: 1; }
    94%, 100% { transform: scale(0); opacity: 0; }
}

/* --- Scene 2: meet the tutor (5.5s) --- */
.hs-scene-match .hs-bub-l { animation: hs-bub 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; transform-origin: 70% 100%; }
.hs-scene-match .hs-bub-r { animation: hs-bub 5.5s cubic-bezier(.34, 1.56, .64, 1) .55s infinite; transform-origin: 30% 100%; }
@keyframes hs-bub {
    0%, 4% { transform: scale(0); opacity: 0; }
    12% { transform: scale(1.1); opacity: 1; }
    17%, 80% { transform: scale(1); opacity: 1; }
    88%, 100% { transform: scale(0); opacity: 0; }
}
.hs-scene-match .hs-link { stroke-dasharray: 60; stroke-dashoffset: 60; animation: hs-link 5.5s ease-in-out infinite; }
@keyframes hs-link { 0%, 30% { stroke-dashoffset: 60; opacity: 1; } 48%, 82% { stroke-dashoffset: 0; opacity: 1; } 90%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.hs-scene-match .hs-heart { animation: hs-heart 5.5s ease infinite; }
@keyframes hs-heart {
    0%, 46% { transform: scale(0); opacity: 0; }
    52% { transform: scale(1.35); opacity: 1; }
    57% { transform: scale(.95); }
    62% { transform: scale(1.2); }
    67%, 82% { transform: scale(1); opacity: 1; }
    90%, 100% { transform: scale(0); opacity: 0; }
}
.hs-scene-match .hs-match { animation: hs-rise 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
@keyframes hs-rise { 0%, 60% { transform: translateY(14px); opacity: 0; } 68%, 84% { transform: none; opacity: 1; } 92%, 100% { transform: translateY(6px); opacity: 0; } }
.hs-scene-match .hs-ring-l, .hs-scene-match .hs-ring-r { animation: hs-ripple 2.2s ease-out infinite; }
.hs-scene-match .hs-ring-r { animation-delay: 1.1s; }
@keyframes hs-ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.45); opacity: 0; } }

/* --- Scene 3: watch them grow (5s) --- */
.hs-scene-grow .hs-bar { transform-origin: 50% 100%; animation: hs-bar 5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
.hs-scene-grow .hs-bar2 { animation-delay: .18s; }
.hs-scene-grow .hs-bar3 { animation-delay: .36s; }
.hs-scene-grow .hs-bar4 { animation-delay: .54s; }
@keyframes hs-bar { 0%, 4% { transform: scaleY(0); } 18%, 84% { transform: scaleY(1); opacity: 1; } 92%, 100% { transform: scaleY(1); opacity: 0; } }
.hs-scene-grow .hs-line { stroke-dasharray: 110; stroke-dashoffset: 110; animation: hs-line 5s ease-in-out infinite; }
@keyframes hs-line { 0%, 30% { stroke-dashoffset: 110; opacity: 1; } 56%, 84% { stroke-dashoffset: 0; opacity: 1; } 92%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.hs-scene-grow .hs-dot { animation: hs-dot 5s ease infinite; }
@keyframes hs-dot { 0%, 54% { transform: scale(0); } 60% { transform: scale(1.5); } 66%, 84% { transform: scale(1); opacity: 1; } 92%, 100% { transform: scale(0); opacity: 0; } }
.hs-scene-grow .hs-grade { animation: hs-pop 5s cubic-bezier(.34, 1.56, .64, 1) .35s infinite; }

/* --- Spotlight: cards take turns (7.5s, 2.5s each) --- */
.hm-step { animation: hs-card 7.5s ease-in-out infinite; }
.hm-step:nth-child(2) { animation-delay: 2.5s; }
.hm-step:nth-child(3) { animation-delay: 5s; }
@keyframes hs-card {
    0%, 36%, 100% { translate: 0 0; border-color: var(--line); box-shadow: var(--shadow-sm); }
    6%, 30% { translate: 0 -8px; border-color: rgba(13, 148, 136, .35); box-shadow: 0 24px 48px -20px rgba(13, 148, 136, .45), 0 0 0 4px rgba(20, 184, 166, .08); }
}
/* Running border light while in the spotlight */
.hm-step::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--fm-angle), transparent 0deg, transparent 220deg, rgba(20, 184, 166, .95) 290deg, rgba(251, 191, 36, .9) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    animation: fm-spin 2.5s linear infinite, hs-ring 7.5s ease-in-out infinite;
}
.hm-step:nth-child(2)::before { animation-delay: 0s, 2.5s; }
.hm-step:nth-child(3)::before { animation-delay: 0s, 5s; }
@keyframes hs-ring { 0%, 36%, 100% { opacity: 0; } 6%, 30% { opacity: 1; } }
/* Autoplay bar along the bottom of the card in the spotlight */
.hm-step::after {
    content: '';
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 10px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #14b8a6, #0d9488 65%, #fbbf24);
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
    animation: hs-autoplay 7.5s linear infinite;
}
.hm-step:nth-child(2)::after { animation-delay: 2.5s; }
.hm-step:nth-child(3)::after { animation-delay: 5s; }
@keyframes hs-autoplay { 0% { transform: scaleX(0); opacity: 1; } 33% { transform: scaleX(1); opacity: 1; } 37%, 100% { transform: scaleX(1); opacity: 0; } }
/* Big faint number glows in the spotlight */
.hm-step-num { animation: hs-num 7.5s ease-in-out infinite; }
.hm-step:nth-child(2) .hm-step-num { animation-delay: 2.5s; }
.hm-step:nth-child(3) .hm-step-num { animation-delay: 5s; }
@keyframes hs-num {
    0%, 36%, 100% { color: #eef2f6; text-shadow: none; }
    6%, 30% { color: #5eead4; text-shadow: 0 6px 18px rgba(20, 184, 166, .35); }
}

@media (prefers-reduced-motion: reduce) {
    .hs-scene *, .hm-step, .hm-step::before, .hm-step::after, .hm-step-num { animation: none !important; }
    .hm-step::before, .hm-step::after, .hs-scene-book .hs-cursor { opacity: 0 !important; }
    .hs-scene-book .hs-day { fill: #0d9488; } .hs-scene-book .hs-tick, .hs-scene-match .hs-link, .hs-scene-grow .hs-line { stroke-dashoffset: 0; }
}

/* =====================================================================
   Home hero — motion graphics
   Orbits + planets behind the photo, floating subject chips (pop in, drift, parallax),
   LIVE badge with audio wave, progress card with a self-drawing sparkline, scribbled
   underline under the handwriting, icon micro-moves, CTA shine, stats light, drifting shapes.
   Pop-ins use `scale`, drift uses `transform`, parallax (motion.js) uses `translate`,
   so none of them fight each other.
   ===================================================================== */

/* Drifting background shapes */
.hh-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hh-particles i { position: absolute; display: block; animation: hh-bg-drift 16s ease-in-out infinite alternate; }
.hh-particles i:nth-child(1) { left: 6%; top: 16%; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(20, 184, 166, .28); }
.hh-particles i:nth-child(2) { left: 44%; top: 9%; width: 14px; height: 14px; background: linear-gradient(rgba(245, 158, 11, .4), rgba(245, 158, 11, .4)) center/100% 2.5px no-repeat, linear-gradient(rgba(245, 158, 11, .4), rgba(245, 158, 11, .4)) center/2.5px 100% no-repeat; animation-duration: 13s; }
.hh-particles i:nth-child(3) { left: 30%; top: 82%; width: 8px; height: 8px; border-radius: 50%; background: rgba(245, 158, 11, .35); animation-duration: 11s; }
.hh-particles i:nth-child(4) { left: 94%; top: 76%; width: 12px; height: 12px; border: 2px solid rgba(13, 148, 136, .3); border-radius: 3px; animation-duration: 19s; }
.hh-particles i:nth-child(5) { left: 58%; top: 92%; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(245, 158, 11, .35); animation-duration: 14s; }
.hh-particles i:nth-child(6) { left: 3%; top: 62%; width: 14px; height: 14px; background: linear-gradient(rgba(20, 184, 166, .38), rgba(20, 184, 166, .38)) center/100% 2.5px no-repeat, linear-gradient(rgba(20, 184, 166, .38), rgba(20, 184, 166, .38)) center/2.5px 100% no-repeat; animation-duration: 17s; }
.hh-particles i:nth-child(7) { left: 76%; top: 6%; width: 7px; height: 7px; border-radius: 50%; background: rgba(20, 184, 166, .4); animation-duration: 12s; }
.hh-particles i:nth-child(8) { left: 50%; top: 48%; width: 14px; height: 12px; background: rgba(244, 63, 94, .18); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation-duration: 21s; }
.hh-particles i:nth-child(9) { left: 97%; top: 30%; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed rgba(20, 184, 166, .25); animation-duration: 23s; }
.hh-particles i:nth-child(10) { left: 22%; top: 38%; width: 6px; height: 6px; border-radius: 50%; background: rgba(13, 148, 136, .3); animation-duration: 15s; }
@keyframes hh-bg-drift { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(18px, -22px) rotate(90deg); } 100% { transform: translate(-14px, 12px) rotate(180deg); } }

/* Orbits behind the photo */
.hh-orbits { position: absolute; left: 28px; right: 8px; top: 28px; bottom: 36px; pointer-events: none; }
.hh-orbit { position: absolute; left: 50%; top: 50%; aspect-ratio: 1; border-radius: 50%; }
.hh-orbit-1 { width: 116%; border: 1.5px dashed rgba(13, 148, 136, .3); animation: hh-orbit 46s linear infinite; }
.hh-orbit-2 { width: 138%; border: 1.5px dotted rgba(245, 158, 11, .38); animation: hh-orbit 70s linear infinite reverse; }
@keyframes hh-orbit { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.hh-orbit i { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; }
.hh-orbit-1 i { left: 50%; top: 0; background: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, .18), 0 0 14px rgba(20, 184, 166, .8); }
.hh-orbit-2 i:nth-child(1) { left: 85.4%; top: 85.4%; background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18), 0 0 14px rgba(245, 158, 11, .7); }
.hh-orbit-2 i:nth-child(2) { left: 6%; top: 26%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #0d9488; box-shadow: 0 0 10px rgba(13, 148, 136, .7); }

/* LIVE badge on the photo */
.hh-live {
    position: absolute; top: 14px; right: 14px; z-index: 2;   /* top-right: the "3 free trial classes" card covers the top-left */
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 11px 6px 9px; border-radius: 999px;
    background: rgba(15, 23, 42, .72); backdrop-filter: blur(6px);
    color: #fff; font: 800 .68rem/1 var(--font-ui, 'Inter', sans-serif); letter-spacing: .1em;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .3);
    animation: hh-pop .6s cubic-bezier(.34, 1.56, .64, 1) 1.4s backwards;
}
.hh-live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.hh-live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #ef4444; animation: hh-ping 1.4s ease-out infinite; }
@keyframes hh-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.hh-wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; margin-left: 2px; }
.hh-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: #5eead4; transform-origin: center; animation: hh-wave 1s ease-in-out infinite; }
.hh-wave i:nth-child(2) { animation-delay: -.8s; } .hh-wave i:nth-child(3) { animation-delay: -.4s; }
.hh-wave i:nth-child(4) { animation-delay: -.6s; } .hh-wave i:nth-child(5) { animation-delay: -.2s; }
@keyframes hh-wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* Floating subject chips */
.hh-chip {
    position: absolute; z-index: 3;
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .94); border: 1px solid var(--line, #e2e8f0);
    box-shadow: 0 12px 26px -10px rgba(15, 23, 42, .3);
    font: 800 1.05rem/1 var(--font-h, 'Outfit', sans-serif);
    animation: hh-pop .7s cubic-bezier(.34, 1.56, .64, 1) backwards, hh-drift 7s ease-in-out infinite;
}
.hh-chip svg { width: 22px; height: 22px; }
.hh-chip-code { top: 22%; right: -14px; color: #0d9488; animation-delay: .8s, 0s; }
.hh-chip-pi { top: 58%; right: -6px; color: #d97706; font-size: 1.35rem; animation-delay: 1s, -2s; animation-duration: .7s, 8s; }
.hh-chip-abc { bottom: 2px; left: 42%; color: #e11d48; animation-delay: 1.2s, -4s; animation-duration: .7s, 6.5s; }
.hh-chip-star { top: 40%; left: -12px; color: #f59e0b; animation-delay: 1.1s, -1s; animation-duration: .7s, 9s; }
@keyframes hh-pop { from { scale: 0; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes hh-drift { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }

/* Progress card with self-drawing sparkline (uses .hm-float look + bob) */
.hm-float.hh-progress { left: -22px; bottom: 34px; top: auto; right: auto; gap: 14px; padding: 12px 14px 12px 16px; animation-delay: -1.5s; }
.hh-progress small { display: block; }
.hh-progress-num { font-family: var(--font-h, 'Outfit', sans-serif) !important; font-size: 1.25rem !important; color: #0d9488 !important; line-height: 1.1; }
.hh-spark { width: 72px; height: 32px; overflow: visible; }
.hh-spark-area { fill: rgba(20, 184, 166, .14); animation: hh-spark-area 4.5s ease infinite; }
.hh-spark-line { fill: none; stroke: #0d9488; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: hh-spark 4.5s ease-in-out infinite; }
.hh-spark-dot { fill: #f59e0b; stroke: #fff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: hh-spark-dot 4.5s ease infinite; }
@keyframes hh-spark { 0%, 8% { stroke-dashoffset: 90; } 45%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hh-spark-area { 0%, 30% { opacity: 0; } 50%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes hh-spark-dot { 0%, 42% { transform: scale(0); } 50% { transform: scale(1.6); } 56%, 88% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }

/* Handwriting: scribbled underline draws itself */
.hm-doodle .hh-scribble { position: absolute; left: 2%; right: 2%; bottom: -10px; width: 96%; height: 12px; overflow: visible; }
.hh-scribble path { fill: none; stroke: #f59e0b; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 240; stroke-dashoffset: 240; animation: hh-scribble 6s ease-in-out 1s infinite; }
@keyframes hh-scribble { 0% { stroke-dashoffset: 240; opacity: 1; } 30%, 85% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }

/* Icon micro-moves on the existing cards */
.hm-float-top .hm-float-icon svg { animation: hh-gift 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes hh-gift { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-14deg) scale(1.1); } 82% { transform: rotate(12deg) scale(1.1); } 88% { transform: rotate(-6deg); } 94% { transform: rotate(3deg); } }
.hm-float-icon-live { animation: hh-rec 2s ease-out infinite; }
@keyframes hh-rec { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .45); } 100% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); } }

/* Main CTA: light sweep + nudging arrow */
.hm-hero-actions .hm-btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.hm-hero-actions .hm-btn-primary::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
    transform: translateX(-120%) skewX(-20deg);
    animation: fm-btn-sweep 4.5s ease-in-out 2s infinite; pointer-events: none;
}
.hm-hero-actions .hm-btn-arrow svg { animation: hh-nudge 2.2s ease-in-out infinite; }
@keyframes hh-nudge { 0%, 60%, 100% { translate: 0 0; } 75% { translate: 4px 0; } 85% { translate: 0 0; } 92% { translate: 2px 0; } }

/* Stats bar: a light runs along the top edge */
.hm-stats { position: relative; overflow: hidden; }
.hm-stats::before {
    content: ''; position: absolute; top: 0; left: 0; width: 28%; height: 3px; z-index: 1;
    background: linear-gradient(90deg, transparent, #14b8a6, #fbbf24, transparent);
    animation: hh-stats 6s ease-in-out infinite; pointer-events: none;
}
@keyframes hh-stats { 0% { transform: translateX(-110%); } 60%, 100% { transform: translateX(400%); } }

/* Tablet / phone: keep it tidy */
@media (max-width: 992px) {
    .hh-orbit-2 { width: 124%; }
}
@media (max-width: 640px) {
    .hm-float.hh-progress, .hh-chip-abc, .hh-chip-star, .hh-orbit-2,
    .hh-particles i:nth-child(2), .hh-particles i:nth-child(8), .hh-particles i:nth-child(10) { display: none; }   /* these sit behind the headline on phones */
    .hh-chip { width: 38px; height: 38px; border-radius: 12px; font-size: .9rem; }
    .hh-chip-code { right: -4px; } .hh-chip-pi { right: 0; }
    .hh-orbits { left: 0; right: 0; top: 24px; bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .hh-particles i, .hh-orbit, .hh-live, .hh-live-dot::after, .hh-wave i, .hh-chip, .hh-spark-area, .hh-spark-line, .hh-spark-dot,
    .hh-scribble path, .hm-float-top .hm-float-icon svg, .hm-float-icon-live, .hm-hero-actions .hm-btn-primary::after,
    .hm-hero-actions .hm-btn-arrow svg, .hm-stats::before { animation: none !important; }
    .hh-spark-line, .hh-scribble path { stroke-dashoffset: 0; }
    .hm-stats::before { display: none; }
}

/* =====================================================================
   Course card motion (cc-card)
   1. Entrance — plays when the row scrolls in (motion.js adds .mo-in to the grid):
      a teal panel wipes off the banner, the banner settles from a zoom, topic chips pop in
      one by one, the action bar rises.
   2. Idle — hot tags shimmer, the lessons icon pulses, the banner drifts very slowly,
      the "View course" button gets a light sweep (staggered per card).
   3. Hover — a light runs round the card border.
   Uses clip-path / `scale` / `translate` / pseudo-elements, so the existing fade-up,
   tilt (transform) and image hover-zoom (transform) keep working.
   ===================================================================== */

/* ---- 1. Entrance ---- */
/* (No colour panel over the banner — the image stays visible; it just eases in.) */
.mo-in > .cc-card .cc-media img { animation: cc-settle 1.2s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: var(--cc-d, 0s); }
@keyframes cc-settle { from { scale: 1.08; opacity: .6; } to { scale: 1; opacity: 1; } }

.mo-in > .cc-card .cc-chips li { animation: cc-chip .5s cubic-bezier(.34, 1.56, .64, 1) backwards; }
.mo-in > .cc-card .cc-chips li:nth-child(1) { animation-delay: calc(var(--cc-d, 0s) + .7s); }
.mo-in > .cc-card .cc-chips li:nth-child(2) { animation-delay: calc(var(--cc-d, 0s) + .76s); }
.mo-in > .cc-card .cc-chips li:nth-child(3) { animation-delay: calc(var(--cc-d, 0s) + .82s); }
.mo-in > .cc-card .cc-chips li:nth-child(4) { animation-delay: calc(var(--cc-d, 0s) + .88s); }
.mo-in > .cc-card .cc-chips li:nth-child(5) { animation-delay: calc(var(--cc-d, 0s) + .94s); }
.mo-in > .cc-card .cc-chips li:nth-child(6) { animation-delay: calc(var(--cc-d, 0s) + 1s); }
.mo-in > .cc-card .cc-chips li:nth-child(n+7) { animation-delay: calc(var(--cc-d, 0s) + 1.06s); }
@keyframes cc-chip { from { opacity: 0; scale: .6; translate: 0 8px; } to { opacity: 1; scale: 1; translate: 0 0; } }

.mo-in > .cc-card .cc-bar { animation: cc-bar-in .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--cc-d, 0s) + .9s); }
@keyframes cc-bar-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* Cards in a row start one after another */
.mo-in > .cc-card:nth-child(2) { --cc-d: .12s; }
.mo-in > .cc-card:nth-child(3) { --cc-d: .24s; }
.mo-in > .cc-card:nth-child(n+4) { --cc-d: .36s; }

/* ---- 2. Idle ---- */
/* Banner drifts very slowly (translate only, so hover zoom still works) */
.cc-media img { animation: cc-drift 16s ease-in-out infinite alternate; }
.mo-in > .cc-card .cc-media img { animation: cc-settle 1.4s cubic-bezier(.2, .7, .2, 1) backwards, cc-drift 16s ease-in-out 1.8s infinite alternate; animation-delay: var(--cc-d, 0s), calc(var(--cc-d, 0s) + 1.4s); }
@keyframes cc-drift { from { translate: 0 0; } to { translate: -1.2% -1.4%; } }

/* "★ Most popular / Top pick" tag shimmers, star spins now and then */
.cc-tag.is-hot {
    background: linear-gradient(100deg, #fef3c7 0%, #fef3c7 40%, #fff7d6 50%, #fef3c7 60%, #fef3c7 100%) 0 0 / 250% 100%;
    animation: cc-shimmer 3.2s ease-in-out infinite;
}
@keyframes cc-shimmer { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

/* Lessons play icon: soft pulse */
.cc-lessons svg { border-radius: 50%; animation: cc-play 2.6s ease-out infinite; }
@keyframes cc-play { 0%, 60%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); scale: 1; } 15% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .5); scale: 1.15; } 45% { box-shadow: 0 0 0 7px rgba(20, 184, 166, 0); scale: 1; } }

/* "View course" button: light sweep, out of step per card */
.cc-btn { position: relative; overflow: hidden; isolation: isolate; }
.cc-btn::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 45%;
    z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: translateX(-130%) skewX(-20deg);
    animation: fm-btn-sweep 5s ease-in-out infinite;
    animation-delay: var(--cc-sweep, 1.5s);
    pointer-events: none;
}
.cc-card:nth-child(3n+2) { --cc-sweep: 3.1s; }
.cc-card:nth-child(3n) { --cc-sweep: 4.4s; }

/* ---- 3. Hover: light runs round the border ---- */
.cc-card { position: relative; }
.cc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--fm-angle), transparent 0deg, transparent 220deg, rgba(20, 184, 166, .95) 290deg, rgba(251, 191, 36, .9) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s ease;
    animation: fm-spin 2.6s linear infinite paused;
}
.cc-card:hover::after, .cc-card:focus-visible::after { opacity: 1; animation-play-state: running; }

@media (prefers-reduced-motion: reduce) {
    .cc-media img, .mo-in > .cc-card .cc-media img, .mo-in > .cc-card .cc-chips li, .mo-in > .cc-card .cc-bar,
    .cc-tag.is-hot, .cc-lessons svg, .cc-btn::after, .cc-card::after { animation: none !important; }
}

/* =====================================================================
   Courses page "Every programme includes" — motion-graphic scenes
   Four looping SVG stories (syllabus / faculty / progress / certificate) in place of the
   small icons; the cards take turns in the spotlight (10s cycle, 2.5s each) with an
   autoplay bar. `.pg-feature-grid .pf-scene svg` beats programs.css' 22px svg rule.
   ===================================================================== */
.pg-feature-grid .pf-scene { width: 100%; max-width: 230px; margin: 0 auto 4px; }
.pg-feature-grid .pf-scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.pf-scene text { font: 800 9px var(--font-h, 'Outfit', sans-serif); letter-spacing: .02em; }
.pf-scene [class^="pf-"], .pf-scene [class*=" pf-"] { transform-box: fill-box; transform-origin: center; }
.pg-feature-grid li { position: relative; text-align: center; }
.hm .pg-feature-grid h3 { margin-top: 10px; }

/* --- 1. Syllabus (5s): page flips, ticks land one by one, badge pops --- */
.pf-book .pf-flip { transform-box: view-box; transform-origin: 100px 70px; animation: pf-flip 5s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes pf-flip {
    0%, 6% { transform: scaleX(1); opacity: 1; fill: #f0fdfa; }
    26% { transform: scaleX(0); fill: #ccfbf1; }
    44% { transform: scaleX(-1); opacity: 1; fill: #f0fdfa; }
    52%, 100% { transform: scaleX(-1); opacity: 0; }
}
.pf-book .pf-tick { stroke-dasharray: 12; stroke-dashoffset: 12; animation: pf-tick 5s ease infinite; }
.pf-book .pf-row2 .pf-tick { animation-delay: .35s; }
.pf-book .pf-row3 .pf-tick { animation-delay: .7s; }
@keyframes pf-tick { 0%, 46% { stroke-dashoffset: 12; opacity: 1; } 54%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.pf-book .pf-badge, .pf-progress .pf-tip { animation: pf-pop 5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
@keyframes pf-pop {
    0%, 62% { transform: scale(0) rotate(-10deg); opacity: 0; }
    70% { transform: scale(1.12) rotate(3deg); opacity: 1; }
    76%, 88% { transform: scale(1) rotate(0); opacity: 1; }
    96%, 100% { transform: scale(0); opacity: 0; }
}

/* --- 2. Expert faculty (5.5s): specialist steps forward, badge, stars fill --- */
.pf-faculty .pf-lead { animation: pf-lead 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
@keyframes pf-lead { 0%, 8% { transform: scale(.85) translateY(6px); } 18%, 86% { transform: scale(1.08) translateY(-2px); } 96%, 100% { transform: scale(.85) translateY(6px); } }
.pf-faculty .pf-side { animation: pf-side 5.5s ease infinite; }
@keyframes pf-side { 0%, 8% { opacity: 1; transform: none; } 18%, 86% { opacity: .55; transform: scale(.92); } 96%, 100% { opacity: 1; transform: none; } }
.pf-faculty .pf-halo { animation: pf-halo 1.8s ease-out infinite; }
@keyframes pf-halo { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }
.pf-faculty .pf-expert { animation: pf-expert 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
@keyframes pf-expert { 0%, 20% { transform: scale(0); opacity: 0; } 28% { transform: scale(1.15); opacity: 1; } 34%, 86% { transform: scale(1); opacity: 1; } 94%, 100% { transform: scale(0); opacity: 0; } }
.pf-faculty .pf-star { animation: pf-star 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
.pf-faculty .pf-star:nth-child(2) { animation-delay: .15s; }
.pf-faculty .pf-star:nth-child(3) { animation-delay: .3s; }
.pf-faculty .pf-star:nth-child(4) { animation-delay: .45s; }
.pf-faculty .pf-star:nth-child(5) { animation-delay: .6s; }
@keyframes pf-star { 0%, 36% { transform: scale(.4); fill: #e2e8f0; } 44% { transform: scale(1.35); fill: #fbbf24; } 50%, 86% { transform: scale(1); fill: #fbbf24; } 94%, 100% { transform: scale(.4); fill: #e2e8f0; } }

/* --- 3. Progress (5s): ring fills to 82%, line draws, point + "+18%" --- */
.pf-progress .pf-ring { stroke-dasharray: 176; stroke-dashoffset: 176; transform-box: view-box; transform-origin: 0 0; /* its rotate(-90 52 62) attribute already sets the centre */ animation: pf-ring 5s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes pf-ring { 0%, 6% { stroke-dashoffset: 176; opacity: 1; } 46%, 88% { stroke-dashoffset: 32; opacity: 1; } 96%, 100% { stroke-dashoffset: 32; opacity: 0; } }
.pf-progress .pf-pct { animation: pf-fade 5s ease infinite; }
@keyframes pf-fade { 0%, 30% { opacity: 0; } 44%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
.pf-progress .pf-line { stroke-dasharray: 90; stroke-dashoffset: 90; animation: pf-line 5s ease-in-out infinite; }
@keyframes pf-line { 0%, 16% { stroke-dashoffset: 90; opacity: 1; } 56%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.pf-progress .pf-area { animation: pf-fade 5s ease infinite; animation-delay: .5s; }
.pf-progress .pf-pt { animation: pf-pt 5s ease infinite; }
@keyframes pf-pt { 0%, 54% { transform: scale(0); } 60% { transform: scale(1.6); } 66%, 88% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }

/* --- 4. Certificate (5.5s): signature writes, seal drops + swings, sparkles --- */
.pf-cert .pf-sign { stroke-dasharray: 80; stroke-dashoffset: 80; animation: pf-sign 5.5s ease-in-out infinite; }
@keyframes pf-sign { 0%, 6% { stroke-dashoffset: 80; opacity: 1; } 40%, 88% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.pf-cert .pf-seal { transform-origin: 50% 40%; animation: pf-seal 5.5s cubic-bezier(.34, 1.56, .64, 1) infinite; }
@keyframes pf-seal {
    0%, 40% { transform: translateY(-40px) scale(.6); opacity: 0; }
    50% { transform: translateY(0) scale(1.1) rotate(-8deg); opacity: 1; }
    58% { transform: rotate(6deg); }
    66% { transform: rotate(-3deg); }
    72%, 88% { transform: rotate(0); opacity: 1; }
    96%, 100% { transform: scale(.6); opacity: 0; }
}
.pf-cert .pf-spark { animation: pf-spark 2.2s ease-in-out infinite; }
.pf-cert .pf-spark2 { animation-delay: .7s; } .pf-cert .pf-spark3 { animation-delay: 1.4s; }
@keyframes pf-spark { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }

/* --- Spotlight: cards take turns (10s cycle, 2.5s each) --- */
.pg-feature-grid li { animation: pf-card 10s ease-in-out infinite; }
.pg-feature-grid li:nth-child(2) { animation-delay: 2.5s; }
.pg-feature-grid li:nth-child(3) { animation-delay: 5s; }
.pg-feature-grid li:nth-child(4) { animation-delay: 7.5s; }
@keyframes pf-card {
    0%, 27%, 100% { translate: 0 0; border-color: var(--line); box-shadow: var(--shadow-sm); }
    4%, 22% { translate: 0 -8px; border-color: rgba(13, 148, 136, .35); box-shadow: 0 24px 48px -20px rgba(13, 148, 136, .45), 0 0 0 4px rgba(20, 184, 166, .08); }
}
.pg-feature-grid li::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--fm-angle), transparent 0deg, transparent 220deg, rgba(20, 184, 166, .95) 290deg, rgba(251, 191, 36, .9) 330deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    animation: fm-spin 2.5s linear infinite, pf-ring-on 10s ease-in-out infinite;
}
.pg-feature-grid li:nth-child(2)::before { animation-delay: 0s, 2.5s; }
.pg-feature-grid li:nth-child(3)::before { animation-delay: 0s, 5s; }
.pg-feature-grid li:nth-child(4)::before { animation-delay: 0s, 7.5s; }
@keyframes pf-ring-on { 0%, 27%, 100% { opacity: 0; } 4%, 22% { opacity: 1; } }
.pg-feature-grid li::after {
    content: '';
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 10px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #14b8a6, #0d9488 65%, #fbbf24);
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
    animation: pf-autoplay 10s linear infinite;
}
.pg-feature-grid li:nth-child(2)::after { animation-delay: 2.5s; }
.pg-feature-grid li:nth-child(3)::after { animation-delay: 5s; }
.pg-feature-grid li:nth-child(4)::after { animation-delay: 7.5s; }
@keyframes pf-autoplay { 0% { transform: scaleX(0); opacity: 1; } 25% { transform: scaleX(1); opacity: 1; } 28%, 100% { transform: scaleX(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .pf-scene *, .pg-feature-grid li, .pg-feature-grid li::before, .pg-feature-grid li::after { animation: none !important; }
    .pg-feature-grid li::before, .pg-feature-grid li::after { opacity: 0 !important; }
    .pf-book .pf-flip { opacity: 0; }
    .pf-book .pf-tick, .pf-progress .pf-line, .pf-cert .pf-sign { stroke-dashoffset: 0; }
    .pf-progress .pf-ring { stroke-dashoffset: 32; }
}
