/* ============================
   KINETIC — Style System
   Animation & Effects Encyclopedia
   ============================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --surface: #16161f;
    --border: rgba(255, 255, 255, 0.06);
    --text: #e8e8f0;
    --text-dim: #8888a0;
    --text-muted: #55556a;
    --white: #ffffff;

    /* Section Accents */
    --accent-transitions: #6c63ff;
    --accent-keyframes: #ff6b9d;
    --accent-visual: #00d4aa;
    --accent-text: #ffd93d;
    --accent-scroll: #ff8a50;
    --accent-cursor: #a78bfa;
    --accent-micro: #38bdf8;
    --accent-webgl: #f472b6;
    --accent-svg: #e879f9;
    --accent-premium: #14b8a6;
    --accent-advanced: #f97316;
    --accent-ultra: #ec4899;
    --accent-motion: #8b5cf6;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --gap: 24px;
    --radius: 16px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    cursor: none;
    /* We'll show custom cursor */
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: var(--font-mono);
    font-size: 0.8em;
    background: rgba(108, 99, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-transitions);
}

/* ---------- Custom Cursor ---------- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s;
}

body:hover .custom-cursor {
    opacity: 1;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav.visible {
    transform: translateY(0);
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--accent-transitions), var(--accent-keyframes));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    color: var(--text-dim);
    text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 30%, transparent 70%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-transitions);
    border: 1px solid rgba(108, 99, 255, 0.3);
    padding: 8px 24px;
    border-radius: 30px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    letter-spacing: 8px;
    line-height: 1;
    margin-bottom: 16px;
}

.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(-90deg);
    animation: letterReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.3s + var(--i) * 0.08s);
    background: linear-gradient(135deg, var(--white) 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 1.2s;
}

.hero-desc {
    max-width: 500px;
    margin: 24px auto 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 1.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 2s;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 0.3;
    }

    50% {
        transform: rotate(45deg) translate(6px, 6px);
        opacity: 1;
    }
}

/* ---------- Section Shared Styles ---------- */
.fx-section {
    padding: 120px 48px 80px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-header {
    margin-bottom: 64px;
    position: relative;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    position: absolute;
    top: -40px;
    left: -10px;
    opacity: 0.04;
    line-height: 1;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Section accent colors via data attribute */
[data-accent="transitions"] .section-title {
    color: var(--accent-transitions);
}

[data-accent="keyframes"] .section-title {
    color: var(--accent-keyframes);
}

[data-accent="visual"] .section-title {
    color: var(--accent-visual);
}

[data-accent="text"] .section-title {
    color: var(--accent-text);
}

[data-accent="scroll"] .section-title {
    color: var(--accent-scroll);
}

[data-accent="cursor"] .section-title {
    color: var(--accent-cursor);
}

[data-accent="micro"] .section-title {
    color: var(--accent-micro);
}

[data-accent="webgl"] .section-title {
    color: var(--accent-webgl);
}

[data-accent="svg"] .section-title {
    color: var(--accent-svg);
}

[data-accent="premium"] .section-title {
    color: var(--accent-premium);
}

[data-accent="advanced"] .section-title {
    color: var(--accent-advanced);
}

.section-desc {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 600px;
    line-height: 1.6;
}

/* ---------- Effects Grid ---------- */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--gap);
}

/* ---------- Effect Card ---------- */
.effect-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s ease, box-shadow 0.3s;
}

.effect-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.effect-demo {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.effect-info {
    padding: 20px 24px;
}

.effect-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.effect-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 12px;
}

.effect-prop {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Section accent on card names */
[data-accent="transitions"] .effect-name {
    color: var(--accent-transitions);
}

[data-accent="keyframes"] .effect-name {
    color: var(--accent-keyframes);
}

[data-accent="visual"] .effect-name {
    color: var(--accent-visual);
}

[data-accent="text"] .effect-name {
    color: var(--accent-text);
}

[data-accent="scroll"] .effect-name {
    color: var(--accent-scroll);
}

[data-accent="cursor"] .effect-name {
    color: var(--accent-cursor);
}

[data-accent="micro"] .effect-name {
    color: var(--accent-micro);
}

[data-accent="webgl"] .effect-name {
    color: var(--accent-webgl);
}

[data-accent="svg"] .effect-name {
    color: var(--accent-svg);
}

[data-accent="premium"] .effect-name {
    color: var(--accent-premium);
}

[data-accent="advanced"] .effect-name {
    color: var(--accent-advanced);
}

/* ---------- Demo Box Shared ---------- */
.demo-box {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    position: relative;
}

/* =========================================
   SECTION 1: CSS TRANSITIONS
   ========================================= */

/* Fade */
.fade-demo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.effect-card:hover .fade-demo {
    opacity: 1;
}

/* Slide */
.slide-demo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    transform: translateX(-120px);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.effect-card:hover .slide-demo {
    transform: translateX(0);
}

/* Scale */
.scale-demo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.effect-card:hover .scale-demo {
    transform: scale(1.5);
}

/* Rotate */
.rotate-demo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.effect-card:hover .rotate-demo {
    transform: rotate(180deg);
}

/* Skew */
.skew-demo {
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    transition: transform 0.4s ease;
}

.effect-card:hover .skew-demo {
    transform: skew(-12deg, 4deg);
}

/* Color Transition */
.color-demo {
    width: 100px;
    height: 100px;
    background: var(--accent-transitions);
    border-radius: var(--radius-sm);
    transition: background-color 0.6s ease, color 0.6s ease;
    color: var(--white);
}

.effect-card:hover .color-demo {
    background: #ff6b9d;
    color: #fff;
}

/* Border Radius Morph */
.border-morph-demo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-transitions), #8b7aff);
    border-radius: var(--radius-sm);
    transition: border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--white);
}

.effect-card:hover .border-morph-demo {
    border-radius: 50%;
}

/* =========================================
   SECTION 2: CSS KEYFRAME ANIMATIONS
   ========================================= */

/* Bounce */
.bounce-demo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-keyframes), #ff9bb8);
    border-radius: 50%;
    animation: bounceAnim 1s ease infinite;
}

@keyframes bounceAnim {

    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-40px);
    }

    50% {
        transform: translateY(-20px);
    }

    70% {
        transform: translateY(-10px);
    }
}

/* Pulse */
.pulse-demo {
    width: 60px;
    height: 60px;
    background: var(--accent-keyframes);
    border-radius: 50%;
    animation: pulseAnim 2s ease-in-out infinite;
}

@keyframes pulseAnim {

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

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Shake */
.shake-demo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-keyframes), #ff9bb8);
    border-radius: var(--radius-sm);
    animation: shakeAnim 0.6s ease-in-out infinite;
}

@keyframes shakeAnim {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    50%,
    90% {
        transform: translateX(-8px);
    }

    30%,
    70% {
        transform: translateX(8px);
    }
}

/* Swing */
.swing-demo {
    width: 8px;
    height: 80px;
    background: var(--accent-keyframes);
    border-radius: 4px;
    transform-origin: top center;
    animation: swingAnim 1.5s ease-in-out infinite;
    position: relative;
}

.swing-demo::after {
    content: '';
    width: 24px;
    height: 24px;
    background: var(--accent-keyframes);
    border-radius: 50%;
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes swingAnim {

    0%,
    100% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-15deg);
    }
}

/* Flip */
.flip-demo {
    width: 100px;
    height: 100px;
    position: relative;
    perspective: 600px;
    background: transparent;
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.flip-front {
    background: linear-gradient(135deg, var(--accent-keyframes), #ff9bb8);
    color: var(--white);
}

.flip-back {
    background: linear-gradient(135deg, #ff9bb8, var(--accent-keyframes));
    color: var(--white);
    transform: rotateY(180deg);
}

.effect-card:hover .flip-front {
    transform: rotateY(180deg);
}

.effect-card:hover .flip-back {
    transform: rotateY(360deg);
}

/* Float */
.float-demo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-keyframes), #ff9bb8);
    border-radius: 50%;
    animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-15px) rotate(5deg);
    }

    75% {
        transform: translateY(5px) rotate(-3deg);
    }
}

/* Spin */
.spin-demo {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 107, 157, 0.2);
    border-top-color: var(--accent-keyframes);
    border-radius: 50%;
    animation: spinAnim 1s linear infinite;
}

@keyframes spinAnim {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   SECTION 3: CSS VISUAL EFFECTS
   ========================================= */

/* Glassmorphism */
.glassmorphism-bg {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24);
    background-size: 200% 200%;
    animation: gradShift 4s ease infinite;
}

.glassmorphism-demo {
    width: 140px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
}

/* Neumorphism */
.neumorphism-bg {
    background: #2a2a3a;
}

.neumorphism-demo {
    width: 100px;
    height: 100px;
    background: #2a2a3a;
    border-radius: var(--radius);
    box-shadow:
        8px 8px 16px #1a1a28,
        -8px -8px 16px #3a3a4c;
}

/* Gradient Animation */
.gradient-anim-demo {
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradShift 4s ease infinite;
    border-radius: 0;
}

@keyframes gradShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Box Shadow Layers */
.box-shadow-demo {
    width: 100px;
    height: 100px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    transition: box-shadow 0.4s ease;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--text-dim);
}

.effect-card:hover .box-shadow-demo {
    box-shadow:
        0 2px 4px rgba(0, 212, 170, 0.1),
        0 8px 16px rgba(0, 212, 170, 0.1),
        0 16px 32px rgba(0, 212, 170, 0.15),
        0 32px 64px rgba(0, 212, 170, 0.15);
}

/* Clip Path */
.clip-path-demo {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-visual), #00ffcc);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: clip-path 0.5s ease;
    color: var(--white);
}

.effect-card:hover .clip-path-demo {
    clip-path: polygon(50% 5%, 95% 20%, 95% 80%, 50% 95%, 5% 80%, 5% 20%);
}

/* CSS Filters */
.css-filters-demo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4, #45b7d1);
    filter: grayscale(100%) brightness(0.6);
    transition: filter 0.5s ease;
}

.effect-card:hover .css-filters-demo {
    filter: grayscale(0%) brightness(1) hue-rotate(30deg) saturate(1.2);
}

/* Mix Blend Mode */
.blend-mode-demo {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--surface);
}

.blend-layer {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    mix-blend-mode: screen;
    animation: blendFloat 4s ease-in-out infinite;
}

.blend-a {
    background: #ff0066;
    top: 30%;
    left: 25%;
}

.blend-b {
    background: #0066ff;
    top: 30%;
    left: 45%;
    animation-delay: -2s;
}

@keyframes blendFloat {

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

    50% {
        transform: translate(10px, -10px);
    }
}

/* =========================================
   SECTION 4: TEXT EFFECTS
   ========================================= */

/* Typewriter */
.typewriter-demo {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-text);
}

.typewriter-text {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid var(--accent-text);
    white-space: nowrap;
    animation:
        typewrite 3s steps(17) infinite,
        blink 0.7s step-end infinite;
    max-width: 17ch;
}

@keyframes typewrite {

    0%,
    100% {
        max-width: 0;
    }

    40%,
    60% {
        max-width: 17ch;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Glitch */
.glitch-demo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    position: relative;
}

.glitch-demo::before,
.glitch-demo::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glitch-demo::before {
    color: #ff0040;
    animation: glitch1 2s infinite linear;
    clip-path: inset(0 0 60% 0);
}

.glitch-demo::after {
    color: #00ffff;
    animation: glitch2 2s infinite linear;
    clip-path: inset(40% 0 0 0);
}

@keyframes glitch1 {

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

    20% {
        transform: translate(-3px, 2px);
    }

    40% {
        transform: translate(3px, -2px);
    }

    60% {
        transform: translate(-2px, -1px);
    }

    80% {
        transform: translate(2px, 3px);
    }
}

@keyframes glitch2 {

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

    20% {
        transform: translate(3px, -2px);
    }

    40% {
        transform: translate(-3px, 2px);
    }

    60% {
        transform: translate(2px, 1px);
    }

    80% {
        transform: translate(-2px, -3px);
    }
}

/* Neon Glow */
.neon-demo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-text);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        text-shadow:
            0 0 7px var(--accent-text),
            0 0 10px var(--accent-text),
            0 0 21px var(--accent-text),
            0 0 42px #ffaa00,
            0 0 82px #ffaa00;
    }

    50% {
        text-shadow:
            0 0 4px var(--accent-text),
            0 0 7px var(--accent-text),
            0 0 13px var(--accent-text),
            0 0 25px #ffaa00;
    }
}

/* Text Gradient */
.text-gradient-demo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-text), #ff6b9d, #6c63ff, #00d4aa);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradShift 4s ease infinite;
}

@keyframes textGradShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Split Text */
.split-text-demo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-text);
}

.split-char {
    display: inline-block;
    animation: splitReveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes splitReveal {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    10% {
        transform: translateY(-20px);
        opacity: 0;
    }

    20% {
        transform: translateY(20px);
        opacity: 0;
    }

    30% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scramble */
.scramble-demo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-text);
    letter-spacing: 3px;
}

/* Stroke */
.stroke-demo {
    width: 100%;
    height: 100%;
}

.stroke-svg {
    width: 100%;
    height: 100%;
}

.stroke-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    fill: none;
    stroke: var(--accent-text);
    stroke-width: 1.5;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: strokeDraw 3s ease forwards infinite;
}

@keyframes strokeDraw {
    0% {
        stroke-dashoffset: 300;
        fill: transparent;
    }

    70% {
        stroke-dashoffset: 0;
        fill: transparent;
    }

    100% {
        stroke-dashoffset: 0;
        fill: var(--accent-text);
    }
}

/* =========================================
   SECTION 5: SCROLL ANIMATIONS
   ========================================= */

/* Fade Scroll */
.fade-scroll-demo {
    font-size: 1rem;
    color: var(--accent-scroll);
    opacity: 0.3;
}

/* Parallax */
.parallax-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    border-radius: 50%;
}

.parallax-back {
    width: 120px;
    height: 120px;
    background: rgba(255, 138, 80, 0.1);
    top: 10%;
    left: 10%;
}

.parallax-mid {
    width: 80px;
    height: 80px;
    background: rgba(255, 138, 80, 0.2);
    top: 40%;
    left: 50%;
}

.parallax-front {
    width: 40px;
    height: 40px;
    background: rgba(255, 138, 80, 0.4);
    top: 60%;
    left: 30%;
}

/* Stagger Reveal */
.stagger-reveal-demo {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 100%;
    padding: 24px;
}

.stagger-item {
    width: 40px;
    flex: 1;
    background: linear-gradient(180deg, var(--accent-scroll), rgba(255, 138, 80, 0.3));
    border-radius: 4px 4px 0 0;
    height: 30%;
    opacity: 0.3;
}

/* Scale Scroll */
.scale-scroll-demo {
    font-size: 0.9rem;
    color: var(--accent-scroll);
    transform: scale(0.5);
    opacity: 0.5;
}

/* Text Reveal Scroll */
.text-reveal-scroll-demo {
    overflow: hidden;
}

.reveal-line {
    overflow: hidden;
}

.reveal-text {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-scroll);
}

/* Progress Bar */
.progress-bar-demo {
    flex-direction: column;
    gap: 12px;
}

.progress-track {
    width: 80%;
    height: 6px;
    background: rgba(255, 138, 80, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-scroll), #ffb380);
    border-radius: 3px;
    transition: width 0.1s;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Counter */
.counter-demo {
    flex-direction: column;
    gap: 8px;
}

.counter-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-scroll);
}

.counter-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================
   SECTION 6: CURSOR & MOUSE EFFECTS 
   ========================================= */

.cursor-fx-area {
    cursor: crosshair;
}

/* Custom Cursor Demo */
.custom-cursor-demo {
    color: var(--accent-cursor);
    cursor: none;
}

/* Mouse Follow */
.mouse-follow-demo {
    position: relative;
    overflow: hidden;
}

.follower-dot {
    width: 16px;
    height: 16px;
    background: var(--accent-cursor);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: calc(1 - var(--delay) * 0.18);
    transition: left 0.1s ease, top 0.1s ease;
    transition-delay: calc(var(--delay) * 0.05s);
}

/* Magnetic Button */
.magnetic-demo {
    perspective: 500px;
}

.magnetic-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-cursor), #c4b5fd);
    color: var(--bg);
    border: none;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tilt */
.tilt-demo {
    perspective: 500px;
}

.tilt-card {
    width: 140px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-cursor), #c4b5fd);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--bg);
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
}

/* Ripple */
.ripple-demo {
    background: var(--accent-cursor);
    color: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    width: 160px;
    height: 80px;
    font-weight: 600;
    position: relative;
}

.ripple-demo .ripple-circle {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleExpand 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Spotlight */
.spotlight-demo {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

.spotlight-hidden {
    padding: 24px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--accent-cursor);
    position: relative;
    z-index: 1;
}

.spotlight-mask {
    position: absolute;
    inset: 0;
    background: var(--surface);
    z-index: 2;
    pointer-events: none;
}

/* =========================================
   SECTION 7: MICRO-INTERACTIONS
   ========================================= */

/* Animated Underline */
.hover-underline-demo {
    font-size: 1.2rem;
}

.underline-link {
    position: relative;
    display: inline-block;
    color: var(--accent-micro);
    font-weight: 600;
    cursor: pointer;
}

.underline-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-micro);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.underline-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button Press */
.btn-press-demo {}

.press-btn {
    padding: 14px 32px;
    background: var(--accent-micro);
    color: var(--bg);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 0 #1d8abf;
    transition: all 0.1s ease;
    transform: translateY(0);
}

.press-btn:active {
    box-shadow: 0 2px 0 #1d8abf;
    transform: translateY(4px);
}

/* Toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.toggle-input:checked+.toggle-slider {
    background: var(--accent-micro);
}

.toggle-input:checked+.toggle-slider::before {
    transform: translateX(26px);
}

/* Loaders */
.loaders-demo {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.loader {
    display: flex;
    align-items: center;
}

.loader-spin {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--accent-micro);
    border-radius: 50%;
    animation: spinAnim 0.8s linear infinite;
}

.loader-dots {
    gap: 6px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    background: var(--accent-micro);
    border-radius: 50%;
    animation: dotBounce 1.2s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dotBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-bars {
    gap: 3px;
    align-items: flex-end;
    height: 32px;
}

.loader-bars span {
    width: 5px;
    background: var(--accent-micro);
    border-radius: 2px;
    animation: barPulse 1s ease-in-out infinite;
}

.loader-bars span:nth-child(1) {
    animation-delay: 0s;
    height: 12px;
}

.loader-bars span:nth-child(2) {
    animation-delay: 0.15s;
    height: 20px;
}

.loader-bars span:nth-child(3) {
    animation-delay: 0.3s;
    height: 28px;
}

.loader-bars span:nth-child(4) {
    animation-delay: 0.45s;
    height: 16px;
}

@keyframes barPulse {

    0%,
    100% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(1.2);
    }
}

/* Tooltip */
.tooltip-demo {}

.tooltip-trigger {
    position: relative;
    cursor: pointer;
    color: var(--accent-micro);
    font-weight: 600;
    border-bottom: 1px dashed var(--accent-micro);
    padding-bottom: 2px;
}

.tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--accent-micro);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    border: 6px solid transparent;
    border-top-color: var(--accent-micro);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.tooltip-trigger:hover::after,
.tooltip-trigger:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Accordion */
.accordion-demo {
    width: 100%;
    padding: 16px;
}

.accordion-item {
    width: 100%;
}

.accordion-header {
    width: 100%;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-micro);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: rgba(56, 189, 248, 0.15);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.accordion-body p {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.accordion-item.open .accordion-body {
    max-height: 200px;
}

.accordion-item.open .accordion-header {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* =========================================
   SECTION 8: 3D & WEBGL
   ========================================= */
.webgl-grid {
    grid-template-columns: 1fr;
}

.webgl-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.webgl-demo-area {
    height: 350px;
}

.webgl-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--surface);
    border-radius: 0;
}

.webgl-card .effect-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    text-align: center;
    padding: 80px 48px 60px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent-transitions), var(--accent-keyframes));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-sub {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-credit {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* =========================================
   SECTION 9: SVG ANIMATIONS
   ========================================= */

/* SVG Path Drawing */
.svg-path-draw-demo {
    background: transparent;
}

.svg-draw {
    width: 200px;
    height: 200px;
}

.draw-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: svgDraw 2.5s ease forwards infinite;
}

.draw-circle {
    stroke-dasharray: 260;
    stroke-dashoffset: 260;
    animation: svgDraw 2.5s ease forwards infinite;
}

@keyframes svgDraw {
    0% {
        stroke-dashoffset: 300;
        opacity: 0.3;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -300;
        opacity: 0.3;
    }
}

/* SVG Morphing */
.svg-morph-demo {
    background: transparent;
}

.svg-morph-svg {
    width: 150px;
    height: 150px;
}

.morph-shape {
    d: path("M100,20 C140,20 180,60 180,100 C180,140 140,180 100,180 C60,180 20,140 20,100 C20,60 60,20 100,20Z");
    animation: morphAnim 4s ease-in-out infinite;
}

@keyframes morphAnim {

    0%,
    100% {
        d: path("M100,20 C140,20 180,60 180,100 C180,140 140,180 100,180 C60,180 20,140 20,100 C20,60 60,20 100,20Z");
    }

    25% {
        d: path("M100,10 C160,30 190,80 170,120 C150,170 120,190 80,170 C30,150 10,110 30,70 C50,30 70,10 100,10Z");
    }

    50% {
        d: path("M100,30 C130,10 170,40 180,80 C190,130 160,180 120,180 C70,180 20,150 20,110 C20,60 50,30 100,30Z");
    }

    75% {
        d: path("M100,15 C150,15 185,50 185,100 C185,150 150,185 100,185 C50,185 15,150 15,100 C15,50 50,15 100,15Z");
    }
}

/* SVG Line Animation */
.svg-line-anim-demo {
    background: transparent;
}

.svg-lines {
    width: 240px;
    height: 120px;
}

.anim-line {
    stroke: var(--accent-svg);
    stroke-width: 2;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: lineDraw 1.5s ease forwards infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes lineDraw {
    0% {
        stroke-dashoffset: 60;
        opacity: 0;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -60;
        opacity: 0;
    }
}

/* SVG Clip-Path Reveal */
.svg-clip-reveal-demo {
    position: relative;
}

.clip-reveal-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-svg);
    z-index: 1;
}

.clip-reveal-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.clip-circle {
    animation: clipExpand 3s ease infinite;
}

@keyframes clipExpand {

    0%,
    100% {
        r: 0;
    }

    50% {
        r: 120;
    }
}

/* SVG Gooey */
.svg-filter-demo {
    overflow: visible;
}

.goo-container {
    filter: url('#goo');
    position: relative;
    width: 180px;
    height: 120px;
}

.goo-blob {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--accent-svg);
    border-radius: 50%;
}

.goo-1 {
    top: 35px;
    left: 30px;
    animation: gooMove1 3s ease-in-out infinite;
}

.goo-2 {
    top: 35px;
    left: 70px;
    animation: gooMove2 3s ease-in-out infinite;
}

.goo-3 {
    top: 35px;
    left: 110px;
    animation: gooMove3 3s ease-in-out infinite;
}

@keyframes gooMove1 {

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

    50% {
        transform: translate(20px, -10px);
    }
}

@keyframes gooMove2 {

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

    50% {
        transform: translate(-10px, 15px);
    }
}

@keyframes gooMove3 {

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

    50% {
        transform: translate(-20px, -15px);
    }
}

/* =========================================
   SECTION 10: PREMIUM SCROLL EFFECTS
   ========================================= */

/* Premium wide cards */
.premium-wide-card {
    grid-column: 1 / -1;
}

/* Lenis Demo */
.lenis-demo {
    flex-direction: column;
    gap: 16px;
}

.lenis-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lenis-bar {
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, var(--accent-premium), transparent);
    border-radius: 2px;
    animation: lenisFloat 2s ease-in-out infinite;
}

@keyframes lenisFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.lenis-label {
    font-size: 0.8rem;
    color: var(--accent-premium);
    text-align: center;
}

/* Horizontal Scroll Demo */
.horizontal-scroll-demo {
    overflow: hidden;
}

.h-scroll-track {
    display: flex;
    gap: 12px;
    padding: 16px;
    animation: hScrollAnim 6s linear infinite;
}

.h-scroll-panel {
    min-width: 120px;
    height: 160px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--white);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--bg);
}

.h-scroll-panel {
    border-left-color: var(--bg);
}

.h-scroll-panel:nth-child(1) {
    border-left-color: #6c63ff;
}

.h-scroll-panel:nth-child(2) {
    border-left-color: #ff6b9d;
}

.h-scroll-panel:nth-child(3) {
    border-left-color: #00d4aa;
}

.h-scroll-panel:nth-child(4) {
    border-left-color: #ffd93d;
}

@keyframes hScrollAnim {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-280px);
    }
}

/* Pin & Scrub */
.pin-scrub-demo {
    flex-direction: column;
    gap: 12px;
}

.pin-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-premium), #5eead4);
    animation: pinTransform 4s ease-in-out infinite;
}

@keyframes pinTransform {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        border-radius: 50%;
    }

    25% {
        transform: scale(1.5) rotate(90deg);
        border-radius: 20%;
    }

    50% {
        transform: scale(0.8) rotate(180deg);
        border-radius: 50%;
    }

    75% {
        transform: scale(1.3) rotate(270deg);
        border-radius: 10%;
    }
}

.pin-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Scroll Velocity Text */
.scroll-velocity-demo {
    overflow: hidden;
}

.velocity-text-wrapper {
    overflow: hidden;
    width: 100%;
}

.velocity-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-premium);
    white-space: nowrap;
    display: inline-block;
    animation: velocityScroll 8s linear infinite;
    letter-spacing: 2px;
}

@keyframes velocityScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Scroll Snap */
.scroll-snap-demo {
    padding: 0;
}

.snap-container {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.snap-container::-webkit-scrollbar {
    display: none;
}

.snap-item {
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent-premium);
    flex-shrink: 0;
}

/* =========================================
   SECTION 11: ADVANCED TECHNIQUES
   ========================================= */

/* Marquee */
.marquee-demo {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 12s linear infinite;
}

.marquee-content {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-advanced);
    white-space: nowrap;
    padding: 0 8px;
    letter-spacing: 3px;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Mask Reveal */
.image-reveal-demo {
    overflow: hidden;
}

.img-reveal-box {
    width: 160px;
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.img-reveal-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-advanced), #fb923c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--bg);
}

.img-reveal-mask {
    position: absolute;
    inset: 0;
    background: var(--surface);
    z-index: 2;
    animation: maskWipe 3s ease infinite;
    transform-origin: right;
}

@keyframes maskWipe {
    0% {
        transform: scaleX(1);
        transform-origin: right;
    }

    40% {
        transform: scaleX(0);
        transform-origin: right;
    }

    41% {
        transform: scaleX(0);
        transform-origin: left;
    }

    100% {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Text Masking */
.text-mask-demo {}

.text-mask-container {
    position: relative;
}

.text-mask-word {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(-45deg, #f97316, #fb923c, #fbbf24, #f97316, #ef4444, #f97316);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textMaskShift 4s ease infinite;
}

@keyframes textMaskShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Noise / Film Grain */
.noise-grain-demo {
    position: relative;
    background: linear-gradient(135deg, #1a1a28, #2a2a3a);
    overflow: hidden;
}

.grain-overlay {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px;
    animation: grainAnim 0.5s steps(4) infinite;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes grainAnim {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-5%, -5%);
    }

    50% {
        transform: translate(5%, 5%);
    }

    75% {
        transform: translate(-5%, 5%);
    }

    100% {
        transform: translate(5%, -5%);
    }
}

.grain-text {
    position: relative;
    z-index: 1;
    color: var(--accent-advanced);
    font-weight: 600;
}

/* Stacking Cards */
.stacking-cards-demo {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 16px;
}

.stack-card {
    width: 80%;
    height: 50px;
    margin: 0 auto 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white);
    animation: stackPop 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.3s);
    position: relative;
}

.stack-card {
    background: var(--bg);
    border-color: var(--bg);
}

.stack-card:nth-child(1) {
    background: rgba(108, 99, 255, 0.15);
    border-color: rgba(108, 99, 255, 0.3);
}

.stack-card:nth-child(2) {
    background: rgba(255, 107, 157, 0.15);
    border-color: rgba(255, 107, 157, 0.3);
}

.stack-card:nth-child(3) {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.3);
}

@keyframes stackPop {

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

    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Elastic / Spring */
.elastic-demo {}

.elastic-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-advanced), #fb923c);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--bg);
    cursor: grab;
    animation: elasticBounce 2s cubic-bezier(0.5, -0.5, 0.5, 1.5) infinite;
}

@keyframes elasticBounce {

    0%,
    100% {
        transform: translateX(0) scaleX(1) scaleY(1);
    }

    25% {
        transform: translateX(30px) scaleX(1.2) scaleY(0.8);
    }

    50% {
        transform: translateX(0) scaleX(0.9) scaleY(1.1);
    }

    75% {
        transform: translateX(-15px) scaleX(1.1) scaleY(0.9);
    }
}

/* Velocity Cursor Stretch */
.cursor-stretch-demo {
    position: relative;
    cursor: none;
}

.stretch-cursor {
    width: 20px;
    height: 20px;
    background: var(--accent-advanced);
    border-radius: 50%;
    position: absolute;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.05s;
}

/* =========================================
   SECTION 12: ULTRA-PREMIUM EFFECTS
   ========================================= */

/* Section accent colors */
[data-accent="ultra"] .section-title {
    color: var(--accent-ultra);
}

[data-accent="ultra"] .effect-name {
    color: var(--accent-ultra);
}

[data-accent="motion"] .section-title {
    color: var(--accent-motion);
}

[data-accent="motion"] .effect-name {
    color: var(--accent-motion);
}

/* Scroll-Driven Text Fill */
.scroll-text-fill-demo {
    padding: 20px 32px;
}

.fill-paragraph {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.fill-word {
    color: rgba(255, 255, 255, 0.12);
    transition: color 0.4s ease;
}

.fill-word.filled {
    color: var(--accent-ultra);
}

/* Image Trail */
.image-trail-demo {
    overflow: hidden;
    cursor: crosshair;
    position: relative;
}

.trail-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    z-index: 1;
    pointer-events: none;
}

.trail-image {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.trail-image.fade {
    opacity: 0;
    transform: scale(0.3) rotate(15deg);
}

/* Circular Text */
.circular-text-demo {
    background: transparent;
}

.circular-text-wrapper {
    width: 150px;
    height: 150px;
    position: relative;
}

.circular-svg {
    width: 100%;
    height: 100%;
    animation: circularSpin 12s linear infinite;
}

.circular-text-content {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    fill: var(--accent-ultra);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.circular-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-ultra);
}

@keyframes circularSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Before/After Slider */
.before-after-demo {
    padding: 0;
}

.ba-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: col-resize;
}

.ba-before,
.ba-after {
    position: absolute;
    inset: 0;
}

.ba-before {
    z-index: 1;
}

.ba-after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

.ba-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.ba-dark {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: var(--text-dim);
}

.ba-light {
    background: linear-gradient(135deg, var(--accent-ultra), #f472b6);
    color: var(--bg);
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.ba-handle-line {
    flex: 1;
    width: 2px;
    background: var(--white);
    opacity: 0.6;
}

.ba-handle-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* Perspective 3D Gallery */
.perspective-gallery-demo {
    perspective: 800px;
}

.persp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    padding: 16px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.persp-item {
    height: 70px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--white);
    background: hsla(var(--hue), 60%, 50%, 0.2);
    border: 1px solid hsla(var(--hue), 60%, 50%, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s;
}

.persp-item:hover {
    transform: translateZ(20px);
    box-shadow: 0 10px 30px hsla(var(--hue), 60%, 50%, 0.2);
}

/* Gradient Mesh */
.gradient-mesh-demo {
    overflow: hidden;
    background: var(--bg);
    position: relative;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    mix-blend-mode: screen;
}

.mesh-1 {
    width: 120px;
    height: 120px;
    background: #ec4899;
    top: 10%;
    left: 10%;
    animation: meshFloat1 6s ease-in-out infinite;
}

.mesh-2 {
    width: 100px;
    height: 100px;
    background: #6366f1;
    top: 30%;
    right: 10%;
    animation: meshFloat2 8s ease-in-out infinite;
}

.mesh-3 {
    width: 80px;
    height: 80px;
    background: #06b6d4;
    bottom: 10%;
    left: 30%;
    animation: meshFloat3 7s ease-in-out infinite;
}

.mesh-4 {
    width: 90px;
    height: 90px;
    background: #f59e0b;
    bottom: 20%;
    right: 20%;
    animation: meshFloat4 5s ease-in-out infinite;
}

@keyframes meshFloat1 {

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

    33% {
        transform: translate(40px, 20px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 40px) scale(0.9);
    }
}

@keyframes meshFloat2 {

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

    33% {
        transform: translate(-30px, 30px) scale(1.2);
    }

    66% {
        transform: translate(20px, -20px) scale(0.8);
    }
}

@keyframes meshFloat3 {

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

    50% {
        transform: translate(30px, -30px) scale(1.15);
    }
}

@keyframes meshFloat4 {

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

    50% {
        transform: translate(-25px, -25px) scale(1.1);
    }
}

/* Drag Carousel */
.drag-carousel-demo {
    overflow: hidden;
    cursor: grab;
    padding: 0;
}

.drag-carousel-demo:active {
    cursor: grabbing;
}

.drag-track {
    display: flex;
    gap: 12px;
    padding: 20px;
    user-select: none;
    will-change: transform;
}

.drag-slide {
    min-width: 150px;
    height: 160px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white);
    flex-shrink: 0;
    background: hsla(var(--hue), 60%, 50%, 0.15);
    border: 1px solid hsla(var(--hue), 60%, 50%, 0.3);
    pointer-events: none;
}

/* =========================================
   SECTION 13: MOTION DESIGN
   ========================================= */

/* Character-by-Character Scroll Reveal */
.char-scroll-reveal-demo {
    padding: 24px 32px;
}

.char-reveal-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.8;
}

.char-reveal-text .char {
    opacity: 0.08;
    transition: opacity 0.3s ease;
}

.char-reveal-text .char.lit {
    opacity: 1;
    color: var(--accent-motion);
}

/* Cursor Reactive Grid */
.cursor-grid-demo {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 3px;
    padding: 8px;
}

.grid-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background: rgba(139, 92, 246, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

/* Circular Progress */
.circular-progress-demo {
    background: transparent;
}

.progress-ring-container {
    width: 100px;
    height: 100px;
    position: relative;
}

.progress-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(139, 92, 246, 0.15);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--accent-motion);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    animation: progressFill 2.5s ease-out forwards infinite;
}

@keyframes progressFill {
    0% {
        stroke-dashoffset: 314;
    }

    50% {
        stroke-dashoffset: 78;
    }

    100% {
        stroke-dashoffset: 314;
    }
}

.progress-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-motion);
}

/* Flip Clock */
.flip-counter-demo {
    background: transparent;
}

.flip-clock {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flip-digit {
    width: 44px;
    height: 60px;
    position: relative;
    perspective: 400px;
}

.flip-top,
.flip-bottom {
    width: 100%;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-motion);
    overflow: hidden;
    position: absolute;
    left: 0;
    right: 0;
}

.flip-top {
    top: 0;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    align-items: flex-end;
    padding-bottom: 2px;
}

.flip-bottom {
    bottom: 0;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 0 0 6px 6px;
    align-items: flex-start;
    padding-top: 2px;
}

.flip-separator {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-motion);
    animation: separatorBlink 1s ease-in-out infinite;
}

@keyframes separatorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Split-Screen Parallax */
.split-screen-demo {
    display: flex;
    overflow: hidden;
    padding: 0;
}

.split-left,
.split-right {
    flex: 1;
    overflow: hidden;
    height: 200px;
}

.split-left {
    background: rgba(139, 92, 246, 0.08);
    border-right: 1px solid var(--border);
}

.split-right {
    background: rgba(236, 72, 153, 0.08);
}

.split-content-left,
.split-content-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
}

.split-content-left span,
.split-content-right span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    opacity: 0.6;
}

.split-content-left {
    animation: splitUp 4s ease-in-out infinite;
}

.split-content-right {
    animation: splitDown 4s ease-in-out infinite;
}

@keyframes splitUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes splitDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
    }
}

/* Curtain / Wipe Reveal */
.color-reveal-demo {
    position: relative;
    overflow: hidden;
}

.cr-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-motion);
    letter-spacing: 6px;
    z-index: 1;
}

.cr-overlay {
    position: absolute;
    inset: 0;
    background: var(--accent-motion);
    z-index: 2;
    animation: curtainWipe 3s ease infinite;
}

@keyframes curtainWipe {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    30% {
        transform: scaleX(1);
        transform-origin: left;
    }

    31% {
        transform-origin: right;
    }

    60% {
        transform: scaleX(1);
        transform-origin: right;
    }

    100% {
        transform: scaleX(0);
        transform-origin: right;
    }
}

/* =========================================
   SECTION 14: ELITE AGENCY
   ========================================= */

[data-accent="elite"] .section-title {
    color: #10b981;
}

[data-accent="elite"] .effect-name {
    color: #10b981;
}

[data-accent="nextlevel"] .section-title {
    color: #f43f5e;
}

[data-accent="nextlevel"] .effect-name {
    color: #f43f5e;
}

/* Animated Gradient Border */
.gradient-border-demo {
    background: transparent;
}

.gb-card {
    width: 160px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    font-weight: 600;
    z-index: 1;
}

.gb-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: conic-gradient(from var(--gb-angle, 0deg), #10b981, #6366f1, #ec4899, #f59e0b, #10b981);
    z-index: -2;
    animation: gbRotate 3s linear infinite;
}

.gb-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 10px;
    background: var(--bg-card);
    z-index: -1;
}

@keyframes gbRotate {
    to {
        --gb-angle: 360deg;
    }
}

@property --gb-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Cursor Follower Blob */
.cursor-blob-demo {
    overflow: hidden;
    position: relative;
}

.blob-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.6), rgba(99, 102, 241, 0.3));
    filter: blur(25px);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: none;
}

.blob-hint {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton-demo {
    background: transparent;
}

.skel-card {
    width: 200px;
    padding: 16px;
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}

.skel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skel-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skel-line {
    height: 10px;
    border-radius: 4px;
}

.skel-line-1 {
    width: 100%;
}

.skel-line-2 {
    width: 80%;
}

.skel-line-3 {
    width: 60%;
}

.skel-shimmer {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmerAnim 1.5s infinite;
}

@keyframes shimmerAnim {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Hamburger Menu */
.hamburger-demo {
    flex-direction: column;
    gap: 16px;
}

.hamburger-btn {
    width: 40px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.ham-line {
    display: block;
    width: 100%;
    height: 3px;
    background: #10b981;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: center;
}

.hamburger-btn.active .ham-1 {
    transform: translateY(13.5px) rotate(45deg);
}

.hamburger-btn.active .ham-2 {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active .ham-3 {
    transform: translateY(-13.5px) rotate(-45deg);
}

.ham-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Magnetic Text */
.magnetic-text-demo {
    gap: 4px;
    cursor: default;
}

.mag-char {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: #10b981;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Preloader */
.preloader-demo {
    flex-direction: column;
    gap: 16px;
}

.preloader-bar-track {
    width: 200px;
    height: 4px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #6366f1);
    border-radius: 2px;
    animation: preloaderFill 3s ease-in-out infinite;
}

@keyframes preloaderFill {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.preloader-percent {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #10b981;
}

/* Scroll Progress Dots */
.scroll-dots-demo {
    flex-direction: column;
}

.dots-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.dot.active {
    width: 14px;
    height: 14px;
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.dot::after {
    content: attr(data-label);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.dot:hover::after {
    opacity: 1;
}

/* =========================================
   SECTION 15: NEXT-LEVEL TECHNIQUES
   ========================================= */

/* Hover Zoom */
.hover-zoom-demo {
    padding: 0;
}

.zoom-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #533483 100%);
    background-size: 100%;
    transition: transform 0.1s ease;
    transform-origin: center;
}

.zoom-container:hover .zoom-image {
    transform: scale(2.5);
}

/* Infinite Gallery */
.infinite-gallery-demo {
    overflow: hidden;
    padding: 0;
}

.inf-gallery-track {
    display: flex;
    gap: 8px;
    padding: 16px 0;
    animation: infScroll 15s linear infinite;
    width: max-content;
}

.inf-gallery-track:hover {
    animation-play-state: paused;
}

.inf-item {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: hsla(var(--hue), 60%, 50%, 0.15);
    border: 1px solid hsla(var(--hue), 60%, 50%, 0.3);
    color: hsla(var(--hue), 60%, 70%, 1);
    transition: transform 0.3s;
}

.inf-item:hover {
    transform: scale(1.15);
}

@keyframes infScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Kinetic Typography */
.kinetic-type-demo {
    gap: 4px;
}

.kt-char {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: #f43f5e;
    display: inline-block;
    animation: kineticWave 2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.15s);
}

@keyframes kineticWave {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-15px) rotate(-5deg);
    }

    75% {
        transform: translateY(5px) rotate(3deg);
    }
}

/* Variable Font */
.variable-font-demo {
    cursor: crosshair;
}

.vf-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    color: #f43f5e;
    letter-spacing: 6px;
    transition: font-weight 0.1s ease;
}

/* Theme Switch */
.theme-switch-demo {
    background: transparent;
}

.theme-card {
    width: 180px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.5s ease;
}

.theme-card.light {
    background: #f8f8ff;
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-header {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--white);
    transition: color 0.5s;
}

.theme-card.light .theme-header {
    color: #1a1a2e;
}

.theme-body {
    font-size: 0.8rem;
    color: var(--text-dim);
    transition: color 0.5s;
}

.theme-card.light .theme-body {
    color: #666;
}

.theme-toggle-btn {
    margin-top: 4px;
    padding: 6px 12px;
    border: 1px solid #f43f5e;
    background: transparent;
    color: #f43f5e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    background: #f43f5e;
    color: var(--white);
}

/* Animated Tabs */
.animated-tabs-demo {
    flex-direction: column;
    width: 100%;
    padding: 16px;
}

.at-tabs {
    display: flex;
    gap: 0;
    position: relative;
    border-bottom: 2px solid var(--border);
}

.at-tab {
    padding: 8px 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.3s;
}

.at-tab.active {
    color: #f43f5e;
}

.at-indicator {
    position: absolute;
    bottom: -2px;
    height: 2px;
    background: #f43f5e;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.at-content {
    padding: 16px 0;
    position: relative;
    min-height: 40px;
}

.at-panel {
    display: none;
    font-size: 0.85rem;
    color: var(--text-dim);
    animation: tabFadeIn 0.3s ease;
}

.at-panel.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Liquid Fill Hover */
.liquid-hover-demo {
    background: transparent;
}

.liquid-btn {
    position: relative;
    padding: 14px 32px;
    border: 2px solid #f43f5e;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    color: #f43f5e;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.4s;
    z-index: 1;
}

.liquid-btn:hover {
    color: var(--white);
}

.liquid-bg {
    position: absolute;
    inset: 0;
    background: #f43f5e;
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: inherit;
}

.liquid-btn:hover .liquid-bg {
    transform: scaleY(1);
}

/* =========================================
   SECTION 16: UNCHARTED
   ========================================= */

[data-accent="uncharted"] .section-title {
    color: #eab308;
}

[data-accent="uncharted"] .effect-name {
    color: #eab308;
}

/* Lottie Canvas */
.lottie-demo-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}
#lottieContainer svg {
    max-width: 100%;
    height: auto;
}

/* Page Transition Wipe */
.page-transition-demo {
    position: relative;
    overflow: hidden;
}

.transition-wipe {
    position: absolute;
    inset: 0;
    background: #eab308;
    z-index: 10;
    transform: scaleY(0);
    transform-origin: bottom center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wipe-text {
    font-family: var(--font-heading);
    color: #0f172a;
    font-size: 2rem;
    font-weight: 900;
    opacity: 0;
}

.trigger-btn {
    padding: 12px 24px;
    background: #1e293b;
    border: 1px solid #eab308;
    color: #eab308;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.trigger-btn:hover {
    background: #eab308;
    color: #0f172a;
}

/* Virtual Fluid Simulation */
.fluid-demo-area {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: #0a0a0f;
    min-height: 400px;
}

.fluid-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Video Scroll Mask */
.video-mask-demo {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.mask-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    background: linear-gradient(45deg, #f43f5e, #8b5cf6, #06b6d4, #10b981);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.video-mask-wrapper {
    position: absolute;
    inset: 0;
    background-color: #000;
    color: #fff;
    mix-blend-mode: multiply;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.video-mask-text {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: -4px;
    transform-origin: center;
    /* Will-change helps with extreme scaling artifacts */
    will-change: transform;
}


/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .fx-section {
        padding: 80px 24px 60px;
    }

    .effects-grid {
        grid-template-columns: 1fr;
    }

    .premium-wide-card {
        grid-column: 1;
    }

    .webgl-card {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        letter-spacing: 4px;
    }

    .fx-section {
        padding: 60px 16px 40px;
    }

    body {
        cursor: auto;
    }

    .custom-cursor {
        display: none;
    }
}