/* ================================================================
   animation-components.css
   Base styles for all [data-anim] Twig components.
   Each section mirrors the matching Twig component.
   Custom properties allow per-instance overrides via inline style.
   ================================================================ */

/* ────────────────────────────────────────────────────────────────
   SHARED TOKENS
   ──────────────────────────────────────────────────────────────── */
:root {
    --anim-accent: #BC171F;
    --anim-text: #ffffff;
    --anim-muted: rgba(255, 255, 255, 0.55);
    --anim-surface: rgba(255, 255, 255, 0.04);
    --anim-border: rgba(255, 255, 255, 0.08);
    --anim-radius: 16px;
    --anim-radius-sm: 8px;
    --anim-font-tag: 0.7rem;
}

/* ================================================================
   1. TEXT REVEAL  (.anim-text-reveal)
   ================================================================ */
.anim-text-reveal {
    overflow: hidden;
}

.anim-text-reveal .anim-tr-line {
    overflow: hidden;
}

/* ================================================================
   2. SCRAMBLE  (.anim-scramble)
   ================================================================ */
/* No specific layout needed — JS drives the content */
.anim-scramble {
    display: inline-block;
}

/* ================================================================
   3. TEXT REPLACE  (.anim-text-replace)
   ================================================================ */
.anim-text-replace {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    flex-wrap: wrap;
}

.anim-tr__prefix {
    /* static text before the slot */
}

.anim-tr__slot {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

/* Highlight pill behind the changing word */
.anim-tr__pill {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 1.4em;
    width: 80px;
    /* overridden by JS */
    background: var(--anim-accent);
    border-radius: 999px;
    opacity: 0.18;
    pointer-events: none;
    transition: width 0.25s ease;
}

/* Grid stack so all words share same space */
.anim-tr__reel {
    display: grid;
    grid-template-areas: 'cell';
    min-width: 4ch;
}

.anim-tr__word {
    grid-area: cell;
    white-space: nowrap;
    clip-path: inset(0 0 100% 0);
}

/* ================================================================
   4. PARALLAX  (.anim-parallax)
   ================================================================ */
.anim-parallax {
    will-change: transform;
}

.anim-parallax img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================================
   5. MARQUEE VELOCITY  (.anim-marquee)
   ================================================================ */
.anim-marquee {
    overflow: hidden;
    user-select: none;
    white-space: nowrap;
    width: 100%;
}

.anim-mq__track {
    display: inline-flex;
    will-change: transform;
}

.anim-mq__copy {
    display: inline-flex;
    align-items: center;
}

.anim-mq__item {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0 0.25em;
}

.anim-mq__sep {
    opacity: 0.4;
    margin: 0 0.6em;
}

/* Size variants */
.anim-marquee--sm .anim-mq__item {
    font-size: 1rem;
}

.anim-marquee--md .anim-mq__item {
    font-size: 2rem;
}

.anim-marquee--lg .anim-mq__item {
    font-size: 4rem;
}

/* ================================================================
   6. COUNTER  (.anim-counter)
   ================================================================ */
.anim-counter {
    --counter-color: var(--anim-accent);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.anim-counter__track {
    display: flex;
    align-items: baseline;
    gap: 0.1em;
    line-height: 1;
}

.anim-counter__num {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--counter-color);
}

.anim-counter__prefix,
.anim-counter__suffix {
    font-size: clamp(1.25rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--counter-color);
    opacity: 0.8;
}

.anim-counter__bar-wrap {
    height: 3px;
    background: var(--anim-border);
    border-radius: 999px;
    overflow: hidden;
}

.anim-counter__bar {
    height: 100%;
    width: 100%;
    background: var(--counter-color);
    transform: scaleX(0);
    transform-origin: left center;
    border-radius: 999px;
}

.anim-counter__label {
    font-size: 0.875rem;
    color: var(--anim-muted);
    margin: 0;
}

/* ================================================================
   7. CARD STACK  (.anim-card-stack)
   ================================================================ */
.anim-card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /**/
}

/* ── Card Stack + Visuals layout ─────────────────────────────── */
.anim-card-stack.has-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 4rem; /**/
    align-items: start;
}

.anim-cs__col--cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Sticky visual panel */
.anim-cs__col--visuals {
    position: sticky;
    top: 6.5rem;
    /* aspect-ratio: 3 / 4; /**/
    height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    background: var(--anim-surface);
    background: #fff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 40%, rgba(250, 250, 250, 1) 70%, rgba(238, 238, 238, 1) 100%);
    border: 1px solid var(--anim-border);
    margin: 20px 40px 0 0;
}

/* Individual visual slides */
.anim-cs__visual {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-radius: 20px;
}

.anim-cs__visual.is-active {
    opacity: 1;
}

/* Gradient background glow */
.anim-cs__vis-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 35% 30%,
            var(--vis-accent) 0%,
            transparent 70%);
    opacity: 0.12;
}

/* Floating blur orbs */
.anim-cs__vis-orb {
    position: absolute;
    border-radius: 50%;
    background: var(--vis-accent);
    filter: blur(55px);
    pointer-events: none;
}

.anim-cs__vis-orb--a {
    width: 60%;
    aspect-ratio: 1;
    top: -8%;
    right: -8%;
    opacity: 0.25;
    animation: cs-orb-a 7s ease-in-out infinite;
}

.anim-cs__vis-orb--b {
    width: 45%;
    aspect-ratio: 1;
    bottom: 5%;
    left: -8%;
    opacity: 0.16;
    animation: cs-orb-b 10s ease-in-out infinite;
}

@keyframes cs-orb-a {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    40% {
        transform: translate(-6%, 10%) scale(1.08);
    }

    70% {
        transform: translate(4%, 4%) scale(0.95);
    }
}

@keyframes cs-orb-b {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    35% {
        transform: translate(8%, -6%) scale(1.06);
    }

    70% {
        transform: translate(-3%, 7%) scale(0.96);
    }
}

/* Optional photo */
.anim-cs__vis-img {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: auto;
    /* height: 100%; */
    object-fit: cover;
    border-radius: 20px;
    padding: 20px 40px 0px 20px;
    z-index: 1;
}

/* Content overlay (items list + label) */
.anim-cs__vis-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    z-index: 2;
}

.anim-cs__vis-list {
    list-style: none;
    /* display: flex; /**/
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.anim-cs__vis-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--anim-text);
    opacity: 0.75;
}

.anim-cs__vis-item::before {
    content: '';
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--vis-accent);
    opacity: 0.9;
}

.anim-cs__vis-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--vis-accent);
    opacity: 0.7;
    padding-top: 1rem;
    border-top: 1px solid var(--anim-border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .anim-card-stack.has-visuals {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .anim-cs__col--visuals {
        display: none;
    }
}

.anim-cs__card {
    --card-accent: var(--anim-accent);
    background: var(--anim-surface);
    border: 1px solid var(--anim-border);
    border-top: 3px solid var(--card-accent);
    border-radius: var(--anim-radius);
    backdrop-filter: blur(12px);
    will-change: transform;
    transform-origin: top center;
    padding: 0;
}

.anim-cs__inner {
    padding: 2rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.anim-cs__tag {
    display: inline-block;
    font-size: var(--anim-font-tag);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--card-accent);
    border: 1px solid var(--card-accent);
    border-radius: 999px;
    padding: 0.25em 0.75em;
    width: fit-content;
}

.anim-cs__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    color: var(--anim-text);
}

.anim-cs__body {
    font-size: 0.9375rem;
    color: var(--anim-muted);
    line-height: 1.65;
    margin: 0;
}

.anim-cs__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--card-accent);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: gap 0.2s ease;
}

.anim-cs__link:hover {
    gap: 0.6em;
}

/* ================================================================
   8. MORPH  (.anim-morph)
   ================================================================ */
.anim-morph {
    display: block;
    position: relative;
}

.anim-morph__svg {
    width: 100%;
    height: 100%;
    fill: var(--anim-accent);
    display: block;
}

.anim-morph__path {
    will-change: d;
}



/* ================================================================
   9. SCROLL STORY  (.anim-scroll-story)
   ================================================================ */


.anim-scroll-story {
    /* height comes from the pin spacer GSAP injects */
}

.anim-ss__wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden;
    max-width: 1200px !important;
    margin: auto !important;
    left: auto !important;
}

/* Left: text */
.anim-ss__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem 4rem 4rem;
    position: relative;
}

.anim-ss__step {
    position: absolute;
    top: 50%; /**/
    left: 3rem;
    right: 3rem;
    transform: translateY(-50%) !important;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /*height: 200px;/**/
}

.anim-ss__label {
    display: inline-block;
    font-size: var(--anim-font-tag);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--anim-accent);
    border: 1px solid var(--anim-accent);
    border-radius: 999px;
    padding: 0.25em 0.75em;
    width: fit-content;
}

.anim-ss__title {
    font-size: clamp(2.4rem, 3.5vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--anim-text);
    margin: 0;
}

.anim-ss__body {
    font-size: 1rem;
    color: var(--anim-muted);
    line-height: 1.7;
    max-width: 42ch;
    margin: 0;
}

.anim-ss__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--anim-accent);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.anim-ss__link:hover {
    gap: 0.7em;
}

/* Dot nav */
.anim-ss__dots {
    position: absolute;
    bottom: 2.5rem;
    left: 3rem;
    display: flex;
    gap: 0.5rem;
}

.anim-ss__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--anim-accent);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.anim-ss__dot.is-active {
    background: var(--anim-accent);
    transform: scale(1.25);
}

/* Right: visuals */
.anim-ss__visuals {
    position: relative;
    overflow: hidden;
}

.anim-ss__visual {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    /*background: #1a1a2e; */
    display: flex;
}

.anim-ss__visual img {
    max-width: 600px;
    width: 100%;
    /*height: 100%;*/
    object-fit: cover;
    display: table;
    vertical-align: middle;
    margin: auto;
    padding: 20px 40px;
}

.anim-ss__visual-label {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    /* background: rgba(0,0,0,0.4); */
    backdrop-filter: blur(6px);
    padding: 0.35em 0.75em;
    border-radius: 999px;
}

/* Responsive — mobile : layout vertical, pas de pin GSAP */
@media (max-width: 768px) {
    .anim-ss__wrap {
        /*display: block; */
        height: auto;
        min-height: unset;
        height: auto !important;
        max-height: 1000vh !important;
        height: auto !important;
    }

    /* Panneau visuel : bande en haut, hauteur fixe */
    .anim-ss__visuals {
        /* position: relative; */
        position: sticky;
        /* height: 52vw; */
        min-height: 200px;
        max-height: 320px;
        height: 100vw;
        width: 50vw;
    }

    .anim-ss__visual {
        position: absolute;
        inset: 0;
        opacity: 0;
        transform: none;
        transition: opacity 0.45s ease;
    }

    .anim-ss__visual.is-mobile-active {
        opacity: 1;
    }

    /* Zone texte : flux normal, étapes empilées */
    .anim-ss__text {
        position: static;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        gap: 0;
    }

    /* Chaque étape : positionnement normal (plus absolu) */
    .anim-ss__step {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        opacity: 1;
        /* JS ne pilote plus l'opacité sur mobile */
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 2rem 1.5rem;
        border-bottom: 1px solid var(--anim-border);
    }

    .anim-ss__step:last-child {
        border-bottom: none;
    }

    /* Dots : cachés — navigation scroll suffit */
    .anim-ss__dots {
        display: none;
    }
}

/* ================================================================
   10. HORIZONTAL SCROLL  (.anim-hscroll)
   ================================================================ */
.anim-hscroll {
    /* Pin spacer injected by GSAP */
}

.anim-hs__pin-target {
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.anim-hs__track {
    display: flex;
    gap: 24px;
    /* overridden by JS config.gap */
    padding: 0 5vw;
    will-change: transform;
    flex-shrink: 0;
}

.anim-hs__card {
    flex-shrink: 0;
    height: 65vh;
    min-height: 320px;
    border-radius: var(--anim-radius);
    background: var(--anim-surface);
    border: 1px solid var(--anim-border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.anim-hs__card-inner {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.anim-hs__tag {
    display: inline-block;
    font-size: var(--anim-font-tag);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 0.25em 0.75em;
    width: fit-content;
}

.anim-hs__title {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.anim-hs__body {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin: 0;
}

.anim-hs__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    margin-top: 0.25rem;
    transition: gap 0.2s ease;
}

.anim-hs__link:hover {
    gap: 0.6em;
}

/* Card number watermark */
.anim-hs__card-num {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 768px) {
    .anim-hs__pin-target {
        height: auto;
        overflow: visible;
    }

    .anim-hs__track {
        flex-direction: column;
        padding: 0 1.25rem;
    }

    .anim-hs__card {
        width: 100% !important;
        /* override inline width */
        height: 300px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SKEW LINES
═══════════════════════════════════════════════════════════════ */
.anim-skew-lines {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.anim-sl__line {
    overflow: hidden;
    border-bottom: 1px solid var(--anim-border, rgba(255, 255, 255, 0.08));
}

.anim-sl__inner {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(242, 242, 242, 0.18);
    padding: 0.55rem 0;
    white-space: nowrap;
    transform-origin: left center;
    will-change: transform;
}

.anim-sl__line:nth-child(3n+1) .anim-sl__inner {
    color: rgba(242, 242, 242, 0.12);
}

.anim-sl__line:nth-child(3n+2) .anim-sl__inner {
    color: rgba(242, 242, 242, 0.22);
}

.anim-sl__line:nth-child(3n+3) .anim-sl__inner {
    color: rgba(255, 92, 53, 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   ROLLING TEXT
═══════════════════════════════════════════════════════════════ */
.anim-rolling-text {
    display: flex;
    align-items: center;
    gap: 3rem;
    overflow: hidden;
}

.anim-rt__static {
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.anim-rt__ticker {
    flex: 1;
    position: relative;
}

.anim-rt__window {
    height: clamp(4rem, 9.5vw, 8.2rem);
    overflow: hidden;
    position: relative;
}

.anim-rt__reel {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.anim-rt__word {
    display: block;
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    white-space: nowrap;
    padding: 0.04em 0;
}

.anim-rt__word strong {
    background: linear-gradient(90deg, var(--anim-accent-a, #ff5c35), var(--anim-accent-b, #6b35ff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.anim-rt__line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--anim-accent-a, #ff5c35), var(--anim-accent-b, #6b35ff));
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════
   CHAR STORM
═══════════════════════════════════════════════════════════════ */
.anim-char-storm {
    display: block;
}

.anim-cs-line {
    display: block;
    font-size: clamp(4rem, 12vw, 11rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
    will-change: transform;
}

.anim-cs-char {
    display: inline-block;
    will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════════
   BOUNCE REVEAL
═══════════════════════════════════════════════════════════════ */
.anim-bounce-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    padding: 4rem 2rem;
    gap: 3rem;
}

.anim-br__text {
    line-height: 0.88;
    letter-spacing: -0.04em;
}

.anim-br__line-a,
.anim-br__line-b {
    display: block;
    font-size: clamp(5rem, 16vw, 14rem);
    font-weight: 800;
}

.anim-br__line-a {
    color: rgba(255, 255, 255, 0.12);
}

.anim-br__line-b {
    background: linear-gradient(90deg, var(--anim-accent-a, #ff5c35), var(--anim-accent-b, #6b35ff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.anim-br__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--anim-btn-bg, #f2f2f2);
    color: var(--anim-btn-color, #0a0a0a);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.03em;
    padding: 1.1rem 2.4rem;
    border-radius: 3rem;
    text-decoration: none;
    cursor: pointer;
    will-change: transform;
    transform-origin: center;
    border: none;
}

.anim-br__btn svg {
    transition: transform 0.3s;
}

.anim-br__btn:hover svg {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════
   CARD SLIDER
═══════════════════════════════════════════════════════════════ */
.anim-card-slider {
    overflow: hidden;
}

.anim-csl__gallery {
    position: relative;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anim-csl__cards {
    position: absolute;
    inset: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.anim-csl__card {
    position: absolute;
    width: 14rem;
    height: 20rem;
    border-radius: var(--anim-radius, 1rem);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    will-change: transform, opacity;
    background: linear-gradient(160deg, #556 0%, #334 100%);
}

.anim-csl__label {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    color: #fff;
}

.anim-csl__drag-proxy {
    position: absolute;
    inset: 0;
    visibility: hidden;
}

.anim-csl__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    border-top: 1px solid var(--anim-border, rgba(255, 255, 255, 0.08));
}

.anim-csl__btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid var(--anim-border, rgba(255, 255, 255, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    background: transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.anim-csl__btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.anim-csl__hint {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ANIM
═══════════════════════════════════════════════════════════════ */
.anim-responsive-anim {
    display: block;
}

.anim-ra__header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 4rem;
    margin-bottom: 3rem;
}

.anim-ra__bkpt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.anim-ra__dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--anim-accent-c, #35ffb0);
    will-change: background-color;
    transition: background-color 0.3s;
}

.anim-ra__label {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.45;
}

.anim-ra__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    perspective: 900px;
}

.anim-ra__card {
    border-radius: var(--anim-radius, 1rem);
    border: 1px solid var(--anim-border, rgba(255, 255, 255, 0.08));
    border-top: 2px solid var(--ra-accent, var(--anim-accent-a, #ff5c35));
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    will-change: transform, opacity;
    transform-origin: center;
}

.anim-ra__num {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.2;
}

.anim-ra__tag {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.45;
}

.anim-ra__title {
    font-size: 0.78rem;
    opacity: 0.45;
    margin-top: auto;
}

/* ================================================================
   SWIPE SLIDER  (.anim-swipe-slider)
   ================================================================ */
.anim-swipe-slider {
    position: relative;
    user-select: none;
}

/* Auto-progress bar at the very top */
.anim-sw__progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--anim-border);
    z-index: 10;
    border-radius: 999px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.anim-swipe-slider.has-autoplay .anim-sw__progress {
    opacity: 1;
}

.anim-sw__progress-fill {
    position: absolute;
    inset: 0;
    background: var(--anim-accent);
    transform: scaleX(0);
    transform-origin: left center;
}

/* Track */
.anim-sw__track-wrap {
    overflow: hidden;
    border-radius: var(--anim-radius);
    cursor: grab;
    touch-action: pan-y;
}

.anim-sw__track-wrap.is-dragging {
    cursor: grabbing;
}

.anim-sw__track {
    display: flex;
    will-change: transform;
}

/* Individual slide */
.anim-sw__slide {
    flex: 0 0 100%;
    min-height: 420px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

/* Decorative CSS grid overlay */
.anim-sw__slide-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.anim-sw__slide-inner {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .65) 0%, transparent 100%);
}

.anim-sw__tag {
    display: inline-block;
    font-size: var(--anim-font-tag);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--anim-accent);
    border: 1px solid var(--anim-accent);
    border-radius: 999px;
    padding: 0.25em 0.75em;
    align-self: flex-start;
}

.anim-sw__title {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    color: var(--anim-text);
}

.anim-sw__body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--anim-muted);
    margin: 0;
    max-width: 44ch;
}

/* Corner index badge */
.anim-sw__index-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, .35);
    font-variant-numeric: tabular-nums;
    z-index: 2;
}

.anim-sw__index-badge span {
    opacity: .5;
}

/* Nav bar */
.anim-sw__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.25rem;
}

.anim-sw__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--anim-border);
    background: var(--anim-surface);
    color: var(--anim-text);
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

.anim-sw__btn:hover {
    border-color: var(--anim-accent);
    background: rgba(107, 53, 255, .12);
    transform: scale(1.08);
}

.anim-sw__btn:disabled {
    opacity: .3;
    cursor: not-allowed;
    transform: none;
}

.anim-sw__dots {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.anim-sw__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, .2);
    cursor: pointer;
    transition: width .35s cubic-bezier(.34, 1.56, .64, 1), background .25s;
}

.anim-sw__dot.is-active {
    width: 28px;
    border-radius: 999px;
    background: var(--anim-accent);
}

/* ================================================================
   IMAGE SEQUENCE  (.anim-img-sequence)
   ================================================================ */
.anim-img-sequence {
    position: relative;
    background: #000;
    border-radius: var(--anim-radius);
    overflow: hidden;
}

.anim-iseq__canvas {
    display: block;
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: cover;
}

/* Caption */
.anim-iseq__caption {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    white-space: nowrap;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.6em;
}

.anim-iseq__caption::before,
.anim-iseq__caption::after {
    content: '';
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, .3);
}

/* HUD — frame counter + progress */
.anim-iseq__hud {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, .45);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    white-space: nowrap;
}

.anim-iseq__frame-num {
    color: rgba(255, 255, 255, .85);
    font-size: 0.75rem;
}

.anim-iseq__bar-wrap {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    overflow: hidden;
}

.anim-iseq__bar {
    height: 100%;
    width: 0%;
    background: var(--anim-accent);
    border-radius: 999px;
    transition: width 0.05s linear;
}

/* Loading overlay */
.anim-iseq__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: rgba(0, 0, 0, .9);
    z-index: 10;
    transition: opacity .5s ease, visibility .5s ease;
}

.anim-iseq__loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Spinning ring */
.anim-iseq__loader-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .1);
    border-top-color: var(--anim-accent);
    animation: iseq-spin 0.8s linear infinite;
}

@keyframes iseq-spin {
    to {
        transform: rotate(360deg);
    }
}

.anim-iseq__loader-bar-wrap {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
    overflow: hidden;
}

.anim-iseq__loader-bar {
    height: 100%;
    width: 0%;
    background: var(--anim-accent);
    border-radius: 999px;
    transition: width .15s ease;
}

.anim-iseq__loader-label {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}

@media (max-width: 767px) {
    .anim-swipe-slider.has-autoplay .anim-sw__progress {
        opacity: 1;
    }

    .anim-sw__slide {
        min-height: 320px;
    }

    .anim-sw__slide-inner {
        padding: 1.5rem;
    }

    .anim-iseq__canvas {
        max-height: 55vw;
    }
}

@media (max-width: 767px) {
    .anim-rolling-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .anim-ra__grid {
        grid-template-columns: 1fr;
    }

    .anim-ra__header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
 

@media (max-width: 640px) {
    .anim-ss__wrap {
        grid-template-columns: 1fr 1fr;
        height: auto !important;
        max-height: 10000vw !important;
        overflow: visible;
    }
}