/* ==========================================================================
   REALREM — Estilos Principales
   Archivo CSS consolidado: estilos custom + dark mode + animaciones
   ========================================================================== */

/* --- Variables de Color --- */
:root {
    --accent: #009f8f;
    --accent-dark: #006156;
    --accent-light: #00d4c0;
    --grain-opacity: 0.06;
}

.dark {
    --grain-opacity: 0.04;
}

/* --- Estilos Base --- */
body {
    background-color: #ffffff;
    color: #000000;
    transition: background-color 0.6s ease, color 0.6s ease;
}

html.dark body {
    background-color: #0a0a0a;
    color: #f0f0f0;
}

::selection {
    background-color: var(--accent);
    color: #ffffff;
}

html {
    scroll-behavior: smooth;
}

/* --- Capa de Efecto Granulado --- */
.bg-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Sistema de Vistas (Pestañas) --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.7s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Ocultar scrollbar en carrusel --- */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================
   ANIMACIONES DE SCROLL (Reveal on scroll)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* ============================================
   DARK MODE TOGGLE - Retro Holográfico
   ============================================ */
.theme-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9998;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #009f8f, #6366f1, #f59e0b, #ec4899, #009f8f);
    background-size: 300% 300%;
    animation: holoShift 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.theme-toggle-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(0, 159, 143, 0.05);
}

html.dark .theme-toggle-inner {
    background: rgba(15, 15, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 159, 143, 0.2), inset 0 0 20px rgba(0, 159, 143, 0.1);
}

.theme-toggle-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.8s steps(6) infinite;
    border-radius: 18px;
}

.theme-toggle-inner::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: linear-gradient(135deg,
            rgba(0, 159, 143, 0.3),
            rgba(99, 102, 241, 0.2),
            rgba(236, 72, 153, 0.2),
            rgba(245, 158, 11, 0.3));
    background-size: 300% 300%;
    animation: holoShift 4s ease infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(10px);
}

.theme-toggle:hover .theme-toggle-inner::after {
    opacity: 1;
}

.toggle-symbol {
    font-size: 26px;
    line-height: 1;
    position: relative;
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 6px rgba(0, 159, 143, 0.4));
}

.toggle-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    position: absolute;
}

html.dark .toggle-sun {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.toggle-moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
    position: absolute;
}

html.dark .toggle-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Keyframes — Toggle */
@keyframes holoShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes grainShift {
    0% {
        transform: translate(0, 0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(3px, -3px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(2px, 2px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes toggleBurst {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 159, 143, 0.5), 0 0 0 0 rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(0, 159, 143, 0), 0 0 0 25px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 159, 143, 0), 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.theme-toggle.burst {
    animation: toggleBurst 0.8s ease-out;
}

.theme-toggle:hover {
    transform: scale(1.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:active {
    transform: scale(0.92);
}

/* ============================================
   PORTFOLIO CARDS - Mejoradas
   ============================================ */
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #f5f5f5;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.6s ease;
    will-change: transform;
}

.dark .portfolio-card {
    background: #1a1a1a;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.dark .portfolio-card:hover {
    box-shadow: 0 20px 60px rgba(0, 159, 143, 0.15);
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.portfolio-card:hover img {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.portfolio-card:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   GALERÍA ITEMS - Hover dinámico
   ============================================ */
.gallery-item {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* ============================================
   NAVBAR - Mejorada con blur
   ============================================ */
.navbar-scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================================
   PLUGIN CARDS - Hover 3D sutil
   ============================================ */
.plugin-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.plugin-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.dark .plugin-card:hover {
    box-shadow: 0 20px 50px rgba(0, 159, 143, 0.12);
}

/* ============================================
   FLOATING LABEL en portfolio (mobile)
   ============================================ */
@media (max-width: 640px) {
    .portfolio-overlay {
        opacity: 1;
    }

    .portfolio-info {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero text shimmer */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #009f8f 0%, #00d4c0 25%, #009f8f 50%, #006156 75%, #009f8f 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* --- Gothic/Blackletter Logo Typography --- */
.font-gothic {
    font-family: 'Syne', sans-serif;
    font-weight: 400;
}

/* === LOGO R — Efecto Onírico === */
.logo-r-gothic {
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    color: #009f8f;
    line-height: 1;
    text-shadow:
        0 0 8px rgba(0, 159, 143, 0.4),
        0 0 20px rgba(0, 159, 143, 0.15);
    animation: dreamBreathe 8s ease-in-out infinite;
    will-change: text-shadow, filter, font-weight;
}

@keyframes dreamBreathe {

    0%,
    100% {
        text-shadow: 0 0 8px rgba(0, 159, 143, 0.4), 0 0 20px rgba(0, 159, 143, 0.15);
        filter: blur(0px);
        font-weight: 400;
    }

    35% {
        text-shadow: 0 0 14px rgba(0, 159, 143, 0.6), 0 0 35px rgba(0, 159, 143, 0.25), 0 0 60px rgba(0, 159, 143, 0.1);
        filter: blur(0.5px);
        font-weight: 400;
    }

    50% {
        text-shadow: 0 0 18px rgba(0, 159, 143, 0.7), 0 0 40px rgba(0, 159, 143, 0.3), 0 0 70px rgba(0, 159, 143, 0.12);
        filter: blur(1px);
        font-weight: 800;
    }

    65% {
        text-shadow: 0 0 14px rgba(0, 159, 143, 0.6), 0 0 35px rgba(0, 159, 143, 0.25), 0 0 60px rgba(0, 159, 143, 0.1);
        filter: blur(0.5px);
        font-weight: 400;
    }
}

/* === LOGO "Real" === */
.logo-text-real {
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* === LOGO "rem" — REM, sueños lúcidos === */
.logo-text-rem {
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    animation: remDiffuse 5s ease-in-out infinite;
    will-change: filter, text-shadow;
}

.logo-text-rem::after {
    content: 'rem';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-family: 'Syne', sans-serif;
    font-weight: 400;
    letter-spacing: -0.02em;
    filter: blur(6px);
    opacity: 0.6;
    z-index: -1;
    animation: remHalo 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes remDiffuse {

    0%,
    100% {
        filter: blur(0.4px);
        text-shadow: 0 0 8px rgba(0, 159, 143, 0.5), 0 0 20px rgba(0, 159, 143, 0.2);
        transform: translateY(0px);
    }

    50% {
        filter: blur(1.2px);
        text-shadow: 0 0 16px rgba(0, 159, 143, 0.7), 0 0 35px rgba(0, 159, 143, 0.35), 0 0 60px rgba(0, 159, 143, 0.15);
        transform: translateY(-1px);
    }
}

@keyframes remHalo {

    0%,
    100% {
        filter: blur(6px);
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        filter: blur(10px);
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Hover: rem se enfoca (sueño lúcido) */
.group:hover .logo-r-gothic {
    text-shadow: 0 0 16px rgba(0, 159, 143, 0.7), 0 0 40px rgba(0, 159, 143, 0.3);
    transition: text-shadow 0.6s ease;
}

.group:hover .logo-text-rem {
    filter: blur(0px) !important;
    text-shadow: 0 0 12px rgba(0, 159, 143, 0.8), 0 0 30px rgba(0, 159, 143, 0.4), 0 0 60px rgba(0, 159, 143, 0.15);
    transition: all 0.6s ease;
}

.group:hover .logo-text-rem::after {
    filter: blur(12px);
    opacity: 0.9;
    transition: all 0.6s ease;
}

/* Caja del logo R — resplandor onírico */
.logo-box-dream {
    box-shadow: 0 0 12px rgba(0, 159, 143, 0.15), inset 0 0 8px rgba(0, 159, 143, 0.05);
    animation: boxDreamGlow 4s ease-in-out infinite;
}

@keyframes boxDreamGlow {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(0, 159, 143, 0.15), inset 0 0 8px rgba(0, 159, 143, 0.05);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 159, 143, 0.25), inset 0 0 14px rgba(0, 159, 143, 0.1), 0 0 40px rgba(0, 159, 143, 0.08);
    }
}

/* ============================================= */
/* MENÚ MÓVIL ONÍRICO                            */
/* ============================================= */
.mobile-dream-link {
    position: relative;
    padding: 10px 24px;
    transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
}

.mobile-dream-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: #009f8f;
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(0, 159, 143, 0.5), 0 0 20px rgba(0, 159, 143, 0.2);
}

.mobile-dream-link:hover::after,
.mobile-dream-link:active::after {
    transform: scaleX(1);
}

.mobile-dream-link:hover {
    color: #009f8f;
    text-shadow: 0 0 20px rgba(0, 159, 143, 0.4), 0 0 40px rgba(0, 159, 143, 0.15);
    transform: translateX(6px);
}

.mobile-dream-link:active {
    transform: translateX(6px) scale(0.97);
    transition: transform 0.1s ease;
}

.mobile-menu-dream .cta-dream {
    transition: all 0.3s ease;
}

.mobile-menu-dream .cta-dream:hover {
    box-shadow: 0 0 25px rgba(0, 159, 143, 0.5), 0 0 50px rgba(0, 159, 143, 0.2);
    transform: scale(1.04);
}

.mobile-menu-dream .cta-dream:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* ============================================= */
/* DFLIP THUMBNAILS                              */
/* ============================================= */
.dflip-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.dflip-container>div,
.dflip-container>a,
.dflip-container .dflip-thumb-wrap,
.dflip-container .dflip-books {
    width: 100% !important;
    max-width: 100% !important;
}

.dflip-container img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain;
    border: 1px solid #000;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dflip-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ============================================= */
/* CARRUSEL INFINITO                             */
/* ============================================= */
@keyframes carousel-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.carousel-track {
    display: flex;
    gap: 24px;
    animation: carousel-scroll 30s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-slide {
    flex-shrink: 0;
    width: 500px;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .carousel-slide {
        width: 82vw;
        height: 56vw;
    }

    .carousel-track {
        gap: 16px;
        animation-duration: 20s;
    }
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-slide:hover img {
    transform: scale(1.03);
}

/* ============================================= */
/* CATÁLOGO DE SERVICIOS — Cards Glassmorphism    */
/* ============================================= */
.service-card {
    position: relative;
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s ease,
        border-color 0.4s ease;
    overflow: hidden;
}

.dark .service-card {
    background: rgba(20, 20, 20, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% auto;
    animation: shimmer 4s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0, 159, 143, 0.12);
    border-color: rgba(0, 159, 143, 0.25);
}

.dark .service-card:hover {
    box-shadow: 0 24px 60px rgba(0, 159, 143, 0.15);
    border-color: rgba(0, 159, 143, 0.3);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 30px rgba(0, 159, 143, 0.3);
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 159, 143, 0.08);
    color: var(--accent);
    border: 1px solid rgba(0, 159, 143, 0.15);
    transition: all 0.3s ease;
}

.service-tag:hover {
    background: rgba(0, 159, 143, 0.15);
    border-color: rgba(0, 159, 143, 0.3);
    transform: translateY(-1px);
}

/* ============================================= */
/* TECH STACK BADGES                             */
/* ============================================= */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #333;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
}

.dark .tech-badge {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

.tech-badge:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 159, 143, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.tech-badge svg,
.tech-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ============================================= */
/* QUÉ HACEMOS — Pillar Cards                    */
/* ============================================= */
.pillar-card {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

.dark .pillar-card {
    background: rgba(20, 20, 20, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
}

.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 159, 143, 0.1);
    border-color: rgba(0, 159, 143, 0.2);
}

.pillar-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: rgba(0, 159, 143, 0.08);
    transition: all 0.5s ease;
}

.pillar-card:hover .pillar-icon {
    background: rgba(0, 159, 143, 0.15);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 159, 143, 0.2);
}

/* ============================================= */
/* COUNTER ANIMATIONS                            */
/* ============================================= */
@keyframes countPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.stat-number {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--accent);
    animation: countPulse 3s ease-in-out infinite;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3.5rem;
    }
}

/* ============================================= */
/* SERVICIOS — Process Steps                      */
/* ============================================= */
.process-step {
    position: relative;
    padding-left: 3rem;
}

.process-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
}

.process-step::after {
    content: '';
    position: absolute;
    left: 0.9375rem;
    top: 2rem;
    width: 2px;
    height: calc(100% + 1rem);
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.process-step:last-child::after {
    display: none;
}

/* ============================================= */
/* DYNAMIC EFFECTS — Floating particles, glows    */
/* ============================================= */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(1deg); }
    66% { transform: translateY(4px) rotate(-1deg); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0,159,143,0.1); }
    50% { box-shadow: 0 0 40px rgba(0,159,143,0.25), 0 0 60px rgba(0,159,143,0.1); }
}

.service-card:hover {
    animation: pulseGlow 2s ease-in-out infinite;
}

.pillar-card {
    animation: float 6s ease-in-out infinite;
}

.pillar-card:nth-child(2) { animation-delay: 0.5s; }
.pillar-card:nth-child(3) { animation-delay: 1s; }
.pillar-card:nth-child(4) { animation-delay: 1.5s; }

/* Parallax-like tilt on service icons */
.service-icon {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(-5deg);
}

/* Gradient border animation on tech badges */
.tech-badge {
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light), var(--accent-dark), var(--accent));
    background-size: 300% 300%;
    animation: holoShift 6s ease infinite;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-badge:hover::before {
    opacity: 1;
}

/* Magnetic hover effect for portfolio cards */
.portfolio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0,159,143,0.15), transparent 60%);
    pointer-events: none;
    z-index: 2;
}

.portfolio-card:hover::after {
    opacity: 1;
}

/* Stagger animation for service list items */
.service-card li {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-card.visible li:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.1s; }
.service-card.visible li:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.2s; }
.service-card.visible li:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.3s; }
.service-card.visible li:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.4s; }

/* Plugin card ribbon - kept static as per UX request */
.plugin-card .absolute.top-3 {
    /* animation: float 3s ease-in-out infinite; */
}

/* Case Study Modal CSS Transitions */
.case-study-modal-overlay {
    transition: opacity 0.3s ease-in-out;
}

.case-study-modal-container {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.case-study-modal-overlay:not(.hidden) {
    display: flex !important;
}

.case-study-modal-overlay.opacity-0 {
    opacity: 0 !important;
}

.case-study-modal-overlay:not(.opacity-0) {
    opacity: 1 !important;
}