/* =========================================
   VARIABLES & SETUP
========================================= */
:root {
    /* Colors */
    --clr-black: #050505;
    --clr-white: #f5f5f0;
    --clr-cyan: #71efbb;
    --clr-orange: #FF6B35;
    
    /* Typography */
    --font-heading: 'Inter Tight', sans-serif;
    --font-body: 'Inter Tight', sans-serif;
    
    /* Transitions */
    --transition-slow: 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    --transition-fast: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-black);
    color: var(--clr-white);
    overflow-x: hidden;
    cursor: none; /* For custom cursor */
}

/* =========================================
   CUSTOM CURSOR
========================================= */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--clr-white);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--clr-white);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    transition-timing-function: ease-out;
}

/* =========================================
   GLOBAL LOGO
========================================= */
/* HOME: logo centrado */
.fixed-global-logo {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    width: 230px;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.fixed-global-logo .logo-img {
    width: 100%;
    height: auto;
}

/* Modal: ocultar logo */
body.modal-open .fixed-global-logo {
    display: none;
}

/* PÁGINAS INTERIORES: logo arriba izquierda */
body.detail-active .fixed-global-logo {
    left: 2rem;
    top: calc(1.8rem - 10px);
    transform: none;
    width: 140px;
    z-index: 500;
}

/* ── Top-fade: cubre el contenido que sube hacia el logo y el menú ── */
body.detail-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.55) 45%,
        transparent 100%);
    z-index: 499;        /* justo debajo del logo */
    pointer-events: none;
}

/* logo-back hidden — global logo handles both branding and back navigation */
.logo-back {
    display: none;
}

/* =========================================
   MENU TOGGLE (FAN ICON)
========================================= */
/* =========================================
   BACKDROP OVERLAY
========================================= */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse 320px 380px at calc(100% - 20px) 20px, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
    backdrop-filter: none;
    z-index: 950;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    pointer-events: none;
}

body.menu-open .menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* =========================================
   CIRCLE MENU (REPLICATING REACT/TW)
========================================= */
.circle-menu-container {
    position: fixed;
    top: 2rem;
    right: 1rem;
    width: 250px; 
    height: 250px;
    z-index: 1000; /* Asegurado por encima del backdrop (950) */
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    pointer-events: none;
}

.circle-trigger {
    position: absolute;
    top: 0;
    right: 0;
    width: 38px; /* 20% más pequeño */
    height: 38px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    z-index: 1050;
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    outline: none;
}

.circle-trigger:hover {
    transform: scale(1.1);
    background: #191919;
}

/* Expansión invisible del área de clic (Hitbox de 60px) */
.circle-trigger::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    pointer-events: auto;
}

.circle-trigger i, .circle-trigger svg {
    color: #fff;
    width: 14px; /* Proporcional */
    height: 14px;
    display: none; /* Ocultos por defecto */
    pointer-events: none !important; /* Blindar el área de clic del botón padre */
}

/* Mecanismo de estados robusto */
.circle-trigger[data-state="menu"] .menu-icon { display: flex; }
.circle-trigger[data-state="close"] .close-icon { display: flex; }
.circle-trigger[data-state="back"] .back-icon { display: flex; }

.circle-items-wrapper {
    position: absolute;
    top: 19px; /* Centro de 38px */
    right: 19px;
    width: 0;
    height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.circle-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px; /* 20% más pequeño */
    height: 42px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.99);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none;
    pointer-events: none; /* Desactivado por defecto para no bloquear el disparador */
    opacity: 0;
    /* Punto de anclaje central */
    transform: translate(-50%, -50%); 
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    transition: background 0.2s;
    z-index: 1040;
}

body.menu-open .circle-item {
    pointer-events: all; /* Activar solo al abrir el menú */
}

.circle-item:hover {
    background: rgba(60, 60, 60, 0.6);
}

.circle-item i,
.circle-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.permanent-label {
    position: absolute;
    top: 50%;
    right: 52px; /* Espacio de seguridad ajustado */
    transform: translateY(-50%);
    background: transparent;
    color: #fff;
    padding: 0;
    border-radius: 0;
    font-size: 0.5rem; /* 20% más pequeño */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    border: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.circle-item {
    /* ... existing styles ... */
}

/* Mostrar etiquetas SOLO en rollover (hover) */
.circle-item:hover .permanent-label {
    opacity: 1;
}

/* Los iconos se gestionan por data-state ahora */

/* Language Sub-menu Specifics */
.lang-sub-items {
    position: absolute;
    top: 19px; /* Centro de 38px */
    right: 19px;
    width: 0;
    height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1060; /* Above main items */
}

.lang-sub-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px; /* 20% más pequeño */
    height: 28px;
    border-radius: 50%;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.6rem; /* Proporcional */
    font-weight: 700;
    cursor: none;
    pointer-events: none; /* Desactivado por defecto */
    opacity: 0;
    /* Punto de anclaje central */
    transform: translate(-50%, -50%);
    transition: background 0.2s, border-color 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.menu-open .lang-sub-item {
    pointer-events: all;
}

.lang-sub-item:hover {
    background: #1a1a1a;
    border-color: var(--clr-cyan);
}

.lang-sub-item.active {
    border-color: var(--clr-orange);
    color: var(--clr-orange);
}

.hidden { display: none !important; }

/* =========================================
   SPLIT SCREEN HERO
========================================= */
.main-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    transition: opacity var(--transition-fast);
}

.main-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
    mix-blend-mode: difference;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 8vw;
    font-weight: 700;
    letter-spacing: -2px;
    color: white;
}

/* Base side styling */
.split-side {
    position: relative;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width var(--transition-slow);
    cursor: none;
    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    transition: background var(--transition-fast);
    z-index: 5;
    pointer-events: none;
}

.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(80%); /* Da un tono monocromático base */
    transition: filter var(--transition-fast), transform var(--transition-slow);
}

.split-side:hover .hero-bg-media {
    filter: grayscale(0%);
    transform: scale(1.05); /* Efecto inmersivo suave */
}

/* Side Specifics */
.side-av {
    background-color: var(--clr-black);
    color: var(--clr-white);
    border-right: 1px solid rgba(255,255,255,0.1);
}

.side-agency {
    background-color: var(--clr-black); /* Cambiado a negro detrás de la media */
    color: var(--clr-white); /* El titular puede ser blanco o naranja */
}

/* Título Agencia en blanco, subtítulo en naranja */
.side-agency .side-title {
    color: var(--clr-white);
}
.side-agency .side-subtitle {
    color: var(--clr-orange);
}

.side-agency .overlay {
    background: rgba(0,0,0,0.7); /* Filtro puramente negro, nada de blanco como antes */
}

/* Content within sides */
.side-content {
    position: relative;
    z-index: 20; /* Forzado por encima del bg media y el overlay */
    text-align: center;
    /* La opacidad inicial pasa a 1, la animación se controlará con GSAP from() en lugar de to() */
}

.side-title {
    font-family: var(--font-heading);
    font-size: 4vw;
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.side-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.1;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Subtítulo de AV en turquesa */
.side-av .side-subtitle {
    color: var(--clr-cyan);
}

.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

/* Hover Effects on Split Screen */
.main-container:hover .split-side {
    width: 30%; /* Shrink the unhovered side */
}

.main-container .split-side:hover {
    width: 70%; /* Expand the hovered side */
}

.split-side:hover .overlay {
    background: rgba(0,0,0,0.3); /* Claramenos la capa en hover para ver el vídeo/foto, pero sigue siendo oscuro */
}

.side-agency:hover .overlay {
    background: rgba(0,0,0,0.4); /* Mantiene legibilidad del texto blanco */
}

.split-side:hover .explore-btn {
    opacity: 1;
}

/* =========================================
   DETAIL VIEWS
========================================= */
.detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5; /* Below main-container normally */
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    padding: 2rem;
    transition: opacity var(--transition-slow);
}

.detail-view.active {
    z-index: 15; /* Bring to front */
    opacity: 1;
    pointer-events: all;
}

/* View Specifics */
.view-av {
    background-color: var(--clr-black);
    color: var(--clr-white);
}

.view-agency {
    background-color: #080808;
    color: var(--clr-white);
}

.agency-grid-svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

/* =========================================
   ANIMATED BACKGROUNDS
========================================= */

/* Gradient Dots — Experience interior background */
.gradient-dots-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #080808;
    background-image:
        radial-gradient(circle at 50% 50%, transparent 1.5px, #080808 0 8px, transparent 8px),
        radial-gradient(circle at 50% 50%, transparent 1.5px, #080808 0 8px, transparent 8px),
        radial-gradient(circle at 50% 50%, rgba(194,248,225,0.38), transparent 38%),
        radial-gradient(circle at 50% 50%, rgba(113,239,187,0.40), transparent 38%),
        radial-gradient(circle at 50% 50%, rgba(46,212,149,0.38), transparent 38%),
        radial-gradient(ellipse at 50% 50%, rgba(13,158,101,0.35), transparent 38%);
    background-size:
        10px 17.32px,
        10px 17.32px,
        200% 200%,
        200% 200%,
        200% 200%,
        200% 17.32px;
    background-position: 0px 0px, 5px 8.66px, 0% 0%, 0% 0%, 0% 0%, 0% 0px;
    animation: gdMove 38s linear infinite;
}

/* Pause when the view is not visible to save GPU */
.view-av:not(.active) .gradient-dots-bg {
    animation-play-state: paused;
}

@keyframes gdMove {
    from {
        background-position:
            0px 0px, 5px 8.66px,
            800% 400%,
            1000% -400%,
            -1200% -600%,
            400% 17.32px;
    }
    to {
        background-position:
            0px 0px, 5px 8.66px,
            0% 0%,
            0% 0%,
            0% 0%,
            0% 0%;
    }
}


/* SVG Floating Paths (Experience) */
.bg-paths-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-paths-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--clr-cyan);
    opacity: 0.10;
}

.bg-paths-svg.mirror {
    transform: scaleX(-1);
    opacity: 0.07;
}

/* Ink Canvas brushstroke background */
.ink-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* Header */
.detail-header {
    /* Spacer so content starts below the fixed logo */
    height: 80px;
}

.view-agency .view-title {
    color: var(--clr-white);
}

.view-agency button {
    color: var(--clr-white);
}

.view-agency .global-footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--clr-white);
}

.view-agency .footer-col a,
.view-agency .footer-col p,
.view-agency .footer-bottom p {
    color: rgba(255,255,255,0.7);
}

/* Project info keeps white text — sits over dark gradient */
.view-agency .project-info {
    color: var(--clr-white);
}

/* Content must sit above the WebGL canvas (z-index:0 in this stacking context) */
.view-agency .detail-header,
.view-agency .view-title,
.view-agency .view-subtitle-agency,
.view-agency .projects-grid,
.view-agency .global-footer,
.view-av .detail-header,
.view-av .view-title,
.view-av .view-subtitle-av,
.view-av .projects-grid,
.view-av .global-footer {
    position: relative;
    z-index: 1;
}

/* Invert white logo to black in Agency view */
.view-agency .logo-back img {
    filter: none; /* fondo oscuro — logo blanco sin invertir */
}

/* Cursor blanco en Agencia — fondo oscuro */
body.agency-active .cursor {
    background-color: var(--clr-white);
}
body.agency-active .cursor-follower {
    border-color: var(--clr-white);
}

.view-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: 2px;
    margin-top: 10px;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.view-subtitle-av {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.2;
    color: rgba(255,255,255,0.75);
    margin-bottom: 3rem;
}

.view-subtitle-av strong {
    font-weight: 700;
    color: var(--clr-cyan);
}

.view-subtitle-agency {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.2;
    color: rgba(255,255,255,0.75);
    margin-bottom: 3rem;
}

.view-subtitle-agency strong {
    font-weight: 700;
    color: var(--clr-orange);
}

button {
    background: none;
    border: none;
    color: inherit;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 1;
}

/* Grids */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

.project-card {
    position: relative;
    aspect-ratio: 4/5;
    background-color: #222;
    overflow: hidden;
    cursor: none;
}

.view-agency .project-card {
    background-color: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-img {
    transform: scale(1.07);
}

/* Info panel slides up on hover */
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: var(--clr-white);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s ease;
}

.view-agency .project-info {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.85;
}

/* =========================================
   FOOTER
========================================= */
.global-footer {
    display: none; /* Initially hidden, shown at bottom of detail views */
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 4rem;
}

.view-av .global-footer, .view-agency .global-footer {
    display: block;
}

.view-agency .global-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-col p, .footer-col a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* =========================================
   RESPONSIVE
========================================= */

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .fixed-global-logo {
        width: 190px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .side-title {
        font-size: 5vw;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* --- Global --- */
    body, * {
        cursor: auto !important;
    }

    .cursor,
    .cursor-follower {
        display: none !important;
    }

    /* --- Logo header --- */
    .fixed-global-logo {
        width: 150px;
        height: 26px;
        top: 1rem;
    }

    .logo-back {
        height: 44px;
    }

    /* --- Split screen --- */
    .main-container {
        flex-direction: column;
    }

    .split-side {
        width: 100% !important;
        height: 50%;
    }

    /* Disable hover-expand on touch */
    .main-container:hover .split-side,
    .main-container .split-side:hover {
        width: 100% !important;
        height: 50% !important;
    }

    .side-title {
        font-size: 9vw;
    }

    .side-subtitle {
        font-size: 0.9rem;
    }

    /* Siempre visible en mobile (no hay hover) */
    .explore-btn {
        opacity: 1;
        font-size: 0.8rem;
    }

    /* --- Circle menu --- */
    .circle-menu-container {
        top: 1rem;
        right: 0.4rem;
        width: 200px;
        height: 200px;
    }

    .circle-trigger {
        width: 34px;
        height: 34px;
    }

    /* --- Detail views --- */
    .detail-view {
        padding: 1rem;
    }

    .view-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .detail-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    /* --- Projects grid --- */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 3rem;
    }

    .project-card {
        aspect-ratio: 4/3;
    }

    /* Info siempre visible en mobile */
    .project-info {
        transform: translateY(0);
        opacity: 1;
    }

    /* --- Modal responsive --- */
    .project-modal {
        background: rgba(4,4,4,1);
    }

    .modal-header {
        padding: 0.9rem 1rem 0.6rem 1.2rem;
        flex-shrink: 0;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-close {
        cursor: pointer;
        width: 28px;
        height: 28px;
    }

    /* Layout: columna única, scroll vertical */
    .modal-layout {
        flex-direction: column !important;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
    }

    /* Panel media: ancho completo, altura 16:9, sin padding */
    .modal-media-panel {
        width: 100% !important;
        flex-shrink: 0;
        flex: none !important;
        aspect-ratio: 16 / 9;
        padding: 0 !important;
        order: 1;
    }

    .slider-viewport {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .slider-track {
        height: 100%;
    }

    .slide-item {
        width: 100%;
        height: 100%;
    }

    .slide-item img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    .vp-wrap {
        width: 100% !important;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .vp-wrap video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .modal-media-footer {
        padding: 0.5rem 1rem;
        flex-shrink: 0;
        order: 2;
    }

    .slider-btn {
        cursor: pointer;
        padding: 0.3rem 0.6rem;
        font-size: 1.2rem;
    }

    .slider-counter {
        font-size: 0.7rem;
    }

    /* Panel texto: ancho completo, fluye debajo */
    .modal-text-panel {
        width: 100% !important;
        flex-shrink: 0;
        padding: 1.2rem 1.2rem 3rem;
        overflow-y: visible;
        order: 3;
    }

    .modal-description {
        font-size: 0.82rem;
        line-height: 1.65;
    }

    /* --- Footer --- */
    .global-footer {
        padding: 2rem 1rem 1.5rem;
        margin-top: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .footer-col h3 {
        font-size: 0.9rem;
    }

    .footer-col p,
    .footer-col a {
        font-size: 0.8rem;
    }

    /* --- Menu backdrop mobile --- */
    .menu-backdrop {
        background: radial-gradient(ellipse 240px 280px at calc(100% - 16px) 16px, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    }
}

/* =========================================
   PROJECT MODAL (FULLSCREEN SLIDER)
========================================= */
/* ── PROJECT MODAL ── */
.project-modal {
    position: fixed;
    inset: 0;
    background: rgba(4,4,4,0.96);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 1;
    pointer-events: all;
    transition: opacity var(--transition-slow);
}
.project-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Header — título + categoría + X */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.8rem 2rem 1.2rem 2.5rem;
    flex-shrink: 0;
}
.modal-header-info { flex: 1; }

.modal-category {
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.3rem;
    font-family: var(--font-body);
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--clr-white);
    margin: 0;
}

/* Close — X minimalista */
.modal-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
    margin-left: 1.5rem;
}
.modal-close:hover { color: var(--clr-white); }
.modal-close svg { width: 18px; height: 18px; }

/* Body — dos columnas */
.modal-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Columna izquierda — descripción */
.modal-text-panel {
    width: 320px;
    flex-shrink: 0;
    padding: 2rem 1.8rem 2rem 2.5rem;
    /* border-right removed */
    overflow-y: auto;
}
.modal-text-panel.hidden { display: none; }

.modal-description {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
}
.modal-description strong {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    display: block;
    margin-top: 1.2rem;
    margin-bottom: 0.2rem;
}

/* Columna derecha — media */
.modal-media-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem;
}

.slider-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
}

.slide-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-item img {
    max-width: 92%;
    max-height: 92%;
    object-fit: contain;
    border-radius: 4px;
}

/* ── PDF Viewer ── */
.pdf-wrap {
    position: relative;
    width: 92%;
    height: 92%;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    background: #1a1a1a;
}

.pdf-wrap iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.pdf-open-btn {
    flex-shrink: 0;
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.06);
    color: var(--clr-cyan);
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
}
.pdf-open-btn:hover {
    background: rgba(255,255,255,0.12);
}

/* ── Custom Video Player ── */
.vp-wrap {
    position: relative;
    width: 92%;
    max-height: 92%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.vp-wrap video {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Big centre play/pause button */
.vp-big-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s, background 0.2s;
    z-index: 3;
}
.vp-big-btn svg { width: 22px; height: 22px; margin-left: 3px; }
.vp-big-btn.vp-playing { opacity: 0; }
.vp-wrap:hover .vp-big-btn.vp-playing { opacity: 1; }
.vp-big-btn:hover { background: rgba(0,0,0,0.75); }

/* Bottom controls bar */
.vp-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 3;
}
.vp-wrap:hover .vp-bar { opacity: 1; }

.vp-toggle {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: none;
    padding: 0;
    display: flex;
    align-items: center;
}
.vp-toggle svg { width: 16px; height: 16px; }
.vp-toggle:hover { color: var(--clr-cyan); }

/* Progress track */
.vp-track {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    cursor: none;
    position: relative;
}
.vp-fill {
    height: 100%;
    background: var(--clr-cyan);
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
}

.vp-time {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Footer: caption + nav */
.modal-media-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.slide-caption {
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin: 0;
}

.slider-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-counter {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-family: var(--font-body);
}

.slider-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.45);
    font-size: 1.1rem;
    cursor: none;
    padding: 0.3rem 0.5rem;
    transition: color 0.2s;
}
.slider-btn:hover { color: var(--clr-white); }

body.modal-open {
    overflow: hidden;
}

body.modal-open .circle-menu-container {
    display: none;
}

/* =========================================
   ABOUT VIEW — Servicios & Filosofía
========================================= */
.view-about {
    background-color: var(--clr-black);
    color: var(--clr-white);
}

/* =========================================
   FERROFLUID BACKGROUND — About page
========================================= */
.view-about .ferrofluid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    filter: url(#ferrofluid-about);
    opacity: 0;
    transition: opacity 0.6s ease;
    overflow: hidden;
}

.view-about.active .ferrofluid-canvas {
    opacity: 0.55;
}

.view-about .globule {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    mix-blend-mode: screen;
}

.view-about .globule-1 {
    width: 420px;
    height: 420px;
    background: var(--clr-cyan);
    top: -8%;
    left: -6%;
    animation: ferro-1 24s ease-in-out infinite;
}

.view-about .globule-2 {
    width: 360px;
    height: 360px;
    background: var(--clr-orange);
    bottom: -10%;
    right: -8%;
    animation: ferro-2 28s ease-in-out infinite;
}

.view-about .globule-3 {
    width: 280px;
    height: 280px;
    background: var(--clr-cyan);
    top: 45%;
    right: 18%;
    animation: ferro-3 22s ease-in-out infinite;
}

.view-about .globule-4 {
    width: 240px;
    height: 240px;
    background: var(--clr-orange);
    bottom: 25%;
    left: 28%;
    animation: ferro-4 26s ease-in-out infinite;
}

@keyframes ferro-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(180px, 220px) scale(1.1); }
    66%      { transform: translate(-100px, 140px) scale(0.92); }
}

@keyframes ferro-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-220px, -260px) scale(1.18); }
}

@keyframes ferro-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-160px, 160px) scale(0.88); }
    66%      { transform: translate(110px, -90px) scale(1.08); }
}

@keyframes ferro-4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(220px, -160px) scale(1.12); }
}

/* Keep content above the canvas */
.view-about .detail-header,
.view-about .view-title,
.view-about .view-subtitle-about,
.view-about .about-scroll,
.view-about .global-footer {
    position: relative;
    z-index: 1;
}

.view-about .view-title {
    color: var(--clr-white);
}

.view-subtitle-about {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.2;
    color: rgba(255,255,255,0.75);
    margin-bottom: 3rem;
}

.view-subtitle-about strong {
    font-weight: 700;
    color: var(--clr-white);
    background: linear-gradient(90deg, var(--clr-cyan) 0%, var(--clr-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-manifesto {
    margin-bottom: 5rem;
    max-width: 900px;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.about-manifesto p {
    font-family: var(--font-body);
    font-size: 1.35rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
    margin: 0;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.01em;
}

/* Services section heading */
.about-services-heading {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--clr-white);
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.5px;
}

/* Two-column services grid */
.about-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 420px));
    justify-content: start;
    gap: 3rem 4rem;
    margin-bottom: 5rem;
    padding: 1rem 0 2rem;
}

/* =========================================
   SPOTLIGHT GLOW CARD (services)
========================================= */
[data-glow] {
    --base: 155;          /* hue base (cyan for AV) */
    --spread: 30;         /* small hue range on cursor move */
    --radius: 14;
    --border: 2;
    --backdrop: rgba(255,255,255,0.025);
    --backup-border: rgba(255,255,255,0.06);
    --size: 220;
    --outer: 1;
    --border-size: calc(var(--border, 2) * 1px);
    --spotlight-size: calc(var(--size, 150) * 1px);
    --hue: calc(var(--base) + (var(--xp, 0.5) * var(--spread, 0)));

    position: relative;
    display: flex;
    /* Static glow anchored to the RIGHT side of the card */
    background-image:
        radial-gradient(
            520px 520px at calc(100% + 40px) 50%,
            hsl(var(--base) 80% 60% / 0.28),
            hsl(var(--base) 80% 60% / 0.08) 35%,
            transparent 65%
        );
    background-color: var(--backdrop);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    border: var(--border-size) solid var(--backup-border);
    border-radius: calc(var(--radius) * 1px);
    box-shadow: 0 1rem 2rem -1rem rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    touch-action: none;
    transition: border-color 0.4s ease;
    overflow: hidden;
}

/* Brand hue ranges — Xperience cyan, Agencia naranja */
.services-av  { --base: 155; --spread: 30; }   /* cyan-greens */
.services-agency { --base: 15;  --spread: 25; }  /* warm oranges */

/* Glowing border via pseudo-elements (follows cursor) */
[data-glow]::before,
[data-glow]::after {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: calc(var(--border-size) * -1);
    border: var(--border-size) solid transparent;
    border-radius: calc(var(--radius) * 1px);
    background-attachment: fixed;
    background-size: calc(100% + (2 * var(--border-size))) calc(100% + (2 * var(--border-size)));
    background-repeat: no-repeat;
    background-position: 50% 50%;
    -webkit-mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    mask: linear-gradient(transparent, transparent), linear-gradient(white, white);
    -webkit-mask-clip: padding-box, border-box;
    mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

[data-glow]::before {
    background-image: radial-gradient(
        calc(var(--spotlight-size) * 0.75) calc(var(--spotlight-size) * 0.75) at
        calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
        hsl(var(--hue, 210) 90% 55% / 0.9), transparent 100%
    );
    filter: brightness(1.6);
}

[data-glow]::after {
    background-image: radial-gradient(
        calc(var(--spotlight-size) * 0.5) calc(var(--spotlight-size) * 0.5) at
        calc(var(--x, 0) * 1px) calc(var(--y, 0) * 1px),
        hsl(0 0% 100% / 0.7), transparent 100%
    );
}

/* Inner content area */
[data-glow] .card-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.2rem;
    color: var(--clr-white);
}

.services-head {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.services-head h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin: 0;
    font-weight: 700;
}

.services-av .services-head h3 {
    color: var(--clr-cyan);
}

.services-agency .services-head h3 {
    color: var(--clr-orange);
}

.services-tag {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.services-intro {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
    margin: 0 0 1.5rem 0;
    font-weight: 300;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.55rem 0;
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 300;
    position: relative;
    padding-left: 1.2rem;
}

.services-list li:last-child {
    border-bottom: none;
}

.services-list li::before {
    content: "·";
    position: absolute;
    left: 0;
    font-weight: 700;
}

.services-av .services-list li::before {
    color: var(--clr-cyan);
}

.services-agency .services-list li::before {
    color: var(--clr-orange);
}

/* Clients band */
.about-clients {
    margin-bottom: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.about-clients h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.clients-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 420px));
    justify-content: start;
    gap: 2.5rem 4rem;
}

.clients-group h5 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.clients-av h5 { color: var(--clr-cyan); }
.clients-agency h5 { color: var(--clr-orange); }

.clients-list {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(255,255,255,0.78);
    font-weight: 300;
    margin: 0;
    max-width: 1200px;
}

@media (max-width: 768px) {
    .clients-groups {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .about-services {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .view-subtitle-about {
        font-size: 1.1rem;
    }
    .services-head h3 {
        font-size: 1.4rem;
    }
}
