/* =========================================
   FUENTES LOCALES
   ========================================= */

@font-face {
    font-family: 'ElegantTypewriter';
    src: url('../fonts/ELEGANT TYPEWRITER Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Deutschlands';
    src: url('../fonts/Deutschlands.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Liminoru';
    src: url('../fonts/liminoru-personal-use/LiminoruPersonalUse-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'BubbleWavy';
    src: url('../fonts/bubble-wavy/Bubble Wavy.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'GoldenGirdle';
    src: url('../fonts/golden-girdle/Golden Girdle.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'YoureGone';
    src: url('../fonts/you-re-gone/Youre Gone.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'YoureGoneIt';
    src: url('../fonts/you-re-gone/Youre Gone It.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

/* =========================================
   PANEL DE CONTROL
   ========================================= */
:root {
    /* --- ESCALA DEL ECOSISTEMA 3D --- */
    --eco-scale: 1; /* 100% en escritorio */

    /* --- TIPOGRAFIA FLUIDA --- */
    /* clamp(MIN, VALOR DINAMICO, MAX) */
    --text-h1: clamp(3rem, 7vw, 9rem);
    --text-ui: clamp(0.25rem, 1.5vw, 9rem);
    --spacing-edge: 4.5vw;              /* Margenes dinamicos para las esquinas */
    --ui-row-gap: 5vw;                   /* Distancia entre los iconos del header */
    --icons-left-shift: 3.5vw;           /* Mueve ambos iconos hacia la izquierda */
    --video-icon-offset-x: 2.6vw;        /* Empuja el icono rojo hacia la derecha */
    --video-icon-offset-y: 7vh;          /* Empuja el icono rojo hacia abajo */
    --left-strip-pos-x: 10px; /* Posición horizontal de la franja vertical */

    --cloud-size: 35px;       
    --orbit-speed: 40s;       
  
    --logo-pos-x: 14vw; /* Más pegado a la derecha */
    --logo-pos-y: 80vh; /* Más pegado abajo */
    --logo-scale: 0.8;
    --logo-rotation: -12deg;
    --sticker-pos-x: 1480px;
    --sticker-pos-y: 800px;
    --sticker-size: 3.2vw;
    --sticker-rotation: -12deg;
    --sticker-font: 'Courier New', monospace;
    --circular-text-size: 0.55vw;
    --circular-text-spacing: 1.5px;
    --circular-text-color-video: #ff4500; /* Naranja del View Video */
    --circular-text-color-mode: #ffffff;  /* Azul de la Rana */

    /* --- PANEL DE CONTROL: MENU RADIAL --- */
    --menu-scale-hidden: 0.5; /* Tamano del menu cuando esta contraido (invisible) */
    --menu-scale-visible: 0.75; /* Tamano del menu al expandirse (hover) */
    --menu-offset-x: -29px; /* Compensa el margen negativo de p5.js en X */
    --menu-offset-y: -29px; /* Compensa el margen negativo de p5.js en Y */
    --menu-inner-radius: 110px;

    /* --- CONTROL DE LA NUBE --- */
    --cloud-orbit-radius-base: 100px;    /* Orbita normal */
    --cloud-orbit-radius-menu: 250px;    /* Orbita con menu abierto */
    --cloud-orbit-speed: 0.002;          /* Velocidad de giro (0.01 es lento, 0.05 es rapido) */
    --cloud-orbit-ease: 0.05;            /* Fluidez de cambio (0.1 es instantaneo, 0.02 es muy elastico) */

    /* --- CONTROL DEL VIDEO REEL --- */
    --video-offset-x: 0px;               /* Mover a la derecha con valores positivos */
    --video-offset-y: 0px;               /* Mover hacia abajo con valores positivos */
    --video-corner-radius: 35px;         /* Radio de esquinas del video */

    /* --- CONTROL SECCION 3D Y TEXTO --- */
    --scroll-content-start-offset: 15vh;  /* 0vh = el 3D aparece primero */
    --canvas-3d-width: 50vw;      /* Tamaño mediano del contenedor 3D */
    --canvas-3d-height: 80vh;
    --canvas-3d-pos-x: 68%;       /* 50% es el centro, 35% lo carga ligeramente a la izquierda */
    --canvas-3d-pos-y: 38%;       /* 50% es el centro vertical exacto */
    --model-3d-scale: 3.2; /* Modificador de tamaño para el archivo .glb */
    --content-3d-pos-x: 2.5vw;        /* Alineado a la izquierda, igual que el logo principal */
    --content-3d-pos-y: 85vh;      /* Posicionado debajo del header */
    --space-model-to-text: 88px;
    --content-3d-width: 5vw;     /* Columna más angosta */
    --content-3d-text-max-width: 280px;
    --content-3d-gap: 1.5vh;       /* Separación vertical entre los textos */

    /* --- TAMAÑOS DE LETRA SECCIÓN 3D --- */
    --content-3d-title-size: 1.4vw;       /* Tamaño de los 4 títulos principales */
    --content-3d-body-size: 0.8vw;        /* Tamaño del párrafo de descripción */
    --content-3d-font-family: 'Helvetica', sans-serif;
    --content-3d-instruction-font-family: 'Courier New', monospace;
    --content-3d-instruction-size: 0.58vw; /* Igual que creative-partner-size para mantener alineacion */
    --content-3d-instruction-spacing: 1px;
    --content-3d-instruction-offset-x: 0px; /* Mueve CLICK FOR MENU en horizontal */
    --content-3d-instruction-offset-y: 3.5vh; /* Mueve CLICK FOR MENU en vertical */
    --content-3d-gap-to-strip: 3.5vw; /* Distancia constante entre el texto y la franja */
    --space-3d-to-reel: -25vh;          /* Valor negativo para jalar el reel hacia arriba */

    /* --- UI HEADER --- */
    --creative-partner-pos-x: 2.5vw;                       /* Posición X del título (desde borde izquierdo) */
    --creative-partner-pos-y: 2.5vw;                       /* Posición Y del título (desde borde superior) */
    --creative-partner-size: 9vw;                          /* Tamaño de la fuente del título hero */
    --creative-partner-font-family: 'Deutschlands', 'Arial', sans-serif; /* Fuente del título hero */
    --creative-partner-font-weight: 50;                    /* Peso tipográfico del título */
    --creative-partner-letter-spacing: -0.03em;            /* Espaciado entre letras */
    --creative-partner-color: #c72a09;                     /* Color del título hero */
    --breathing-icon-size: var(--sticker-size);      /* Igualamos el icono rojo al tamano fluido del sticker */
    /* --- CONTROL IMAGEN FONDO AMBIENTAL --- */

    --bg-ambient-blur: 5px;       /* Que tan borroso (0px = nitido) */
    --bg-ambient-opacity: 0.35;    /* Intensidad (0.0 = invisible, 1.0 = opaco) */

    /* --- CONTROL PANEL ABOUT BRUTALISTA --- */
    --about-panel-width: 23vw;           /* Tamaño de la pestaña (ancho) */
    --about-panel-text-size: 2vw; /* Tamaño del texto lateral — editar en config.js */
    --about-panel-text-line-height: 0.9; /* Interlineado del texto de la pestaña lateral */
    --about-panel-speed: 1s;           /* Velocidad a la que se desliza/aparece */
    --about-glitch-color: #f2ff00;     |  /* Color ÚNICO para el parpadeo (Ej: Verde neón) */
    --about-glitch-rhythm: 650;          /* Cada cuántos milisegundos salta a otra palabra */
    --about-glitch-duration: 1500;        /* Cuánto tiempo se queda encendida la palabra */

    /* --- CONTROL FRANJA LATERAL --- */
    --strip-panel-width: 1.3vw;       /* Grosor de la franja */
    --strip-text-size: 0.8vw;         /* Tamaño de la tipografía */
    --strip-text-size-mobile: 1.8px;   /* Tamaño de la tipografía de la franja en móvil */
}

/* --- AJUSTES GENERALES --- */
body {
    background-color: #000000;
    font-family: 'Helvetica', 'Arial', sans-serif;
    margin: 0; 
    overflow-x: hidden; 
    overflow-y: auto;   
    color: #e8ddd4; 
    user-select: none;
    position: relative; /* NUEVO: Ancla para el fondo absoluto */
    z-index: 0; /* Crea contexto de apilado para que el fondo ambiental no quede oculto */
    isolation: isolate;
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 3.5vh;
    left: var(--content-3d-pos-x);
    z-index: 1000;
    padding: 2.5vw;
    padding-left: 0;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0); 
    backdrop-filter: blur(0px);         
    border: 1px solid rgba(255, 255, 255, 0); /* Borde invisible */
    
    /* Transición suave para TODAS las propiedades */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.brand-container {
    margin-bottom: 1.2vh;
    transition: margin 0.4s ease;
}

.logo {
    width: 5vw;
    display: block;
    margin-bottom: 15px;
    transition: all 0.4s ease; 
}

.header .logo:hover {
    transform: scale(1.3) rotate(-2deg); /* Crece y se inclina un poco */
    filter: 
        drop-shadow(0px 0px 2px #e8ddd4) 
        drop-shadow(0px 10px 15px rgba(0,0,0,0.5)); /* La sombra se aleja */
    cursor: pointer;
}

.tagline {
    font-family: 'Courier New', monospace;
    font-size: 0.62rem;
    color: #e8ddd4;
    letter-spacing: 0.5px;
    margin: 0;
    padding-left: 0;
    text-align: left;
    transform-origin: left center;
    
    /* Propiedades para animar su desaparición */
    opacity: 1;
    max-height: 20px; /* Altura original */
    overflow: hidden;
    transition: all 0.4s ease;
}
.creative-partner-text {
    position: fixed;
    top: var(--creative-partner-pos-y);
    left: var(--creative-partner-pos-x, 50%);
    z-index: 47;
    pointer-events: none;
    font-family: var(--creative-partner-font-family);
    font-size: var(--creative-partner-size);
    font-weight: var(--creative-partner-font-weight);
    line-height: 0.88;
    letter-spacing: var(--creative-partner-letter-spacing);
    color: var(--creative-partner-color);
    max-height: none;
    overflow: visible;
    transform-origin: left top;
    text-align: left;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    will-change: transform;
}
.tagline-hero {
    position: fixed;
    top: var(--tagline-pos-y, 5vh);
    left: var(--tagline-pos-x, 50%);
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    font-family: var(--tagline-font-family, 'Helvetica', 'Arial', sans-serif);
    font-size: var(--tagline-size, 0.65vw);
    font-weight: var(--tagline-font-weight, 100);
    letter-spacing: var(--tagline-letter-spacing, 0.35em);
    color: var(--tagline-color, rgba(255, 255, 255, 0.5));
    text-transform: uppercase;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    will-change: opacity;
    transition: opacity 0.12s linear;
}

.tagline-bottom {
    top: auto;
    bottom: var(--tagline-bottom-pos-y, 5vh);
}

.main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.main-nav a { text-decoration: none; color: #5d5d5d; font-weight: 900; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; transition: color 0.3s; }
.main-nav a:hover, .main-nav a.activo { color: #c72a09; }

.header.scrolled {
    top: 20px;  /* Se pega un poco más arriba */
    left: var(--content-3d-pos-x); /* Mantiene alineacion con CLICK P FOR MENU */
    
    /* Efecto Cristal (Glassmorphism) */
    background-color: rgba(20, 20, 20, 0.6); 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header.scrolled .logo {
    width: 50px; /* El logo se reduce al hacer scroll */
}

.header.scrolled .brand-container {
    margin-bottom: 20px; /* Se reduce el espacio con el menú */
}

.header.scrolled .tagline {
    opacity: 0;      /* Desaparece */
    max-height: 0;   /* Colapsa su espacio para no estorbar */
    margin: 0;
}

/* --- HERO --- */
.hero {
    position: relative; width: 100%; height: 100vh;
    display: flex;
}
.stage-container {
    position: absolute;
    left: var(--logo-pos-x);
    top: var(--logo-pos-y);
    transform: translate(-50%, -50%);
    width: var(--orbit-diameter); height: var(--orbit-diameter);
    display: flex; justify-content: center; align-items: center;
}

/* LOGO CENTRAL - Z-INDEX 10 */
.main-logo-3d {
    width: 150px; display: block;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    animation: float3D 6s ease-in-out infinite;
    transition: transform 0.2s;
    transform: scale(var(--logo-scale)) rotate(var(--logo-rotation));
    z-index: 10; 
    position: relative;

   /* --- RESPLANDOR PARA LOGO --- */
    filter: 
        /* 1. Capas para crear el borde blanco (Outline) */
        drop-shadow(0px 0px 90px #afafaf) 
        opacity(1)
        /*drop-shadow(0px 0px 100px #c5c5c5) 
        
        /* 2. Sombra de caída (Drop Shadow) para separarlo del fondo */
        drop-shadow(0px 5px 10px rgba(0,0,0,0.8));

}

#p5-logo-container {
    width: 250px;
    height: 250px;
    margin-left: -50px;
    margin-top: -50px;
    position: relative;
    z-index: 30; /* encima del radial-svg-menu (z:10) para que la P tape el menú al contraerse */
    transition: transform 0.2s;
    transform: scale(var(--logo-scale)) rotate(var(--logo-rotation));
    opacity: 0.8;
    filter:
        drop-shadow(0px 0px 90px #afafaf)
        drop-shadow(0px 5px 10px rgba(0,0,0,0.8));
}

#p5-logo-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* EFECTO GOLPE: Se mueve ligeramente en dirección opuesta (simulado con scale/rotate) */
.logo-hit {
    transform: scale(0.97) rotate(2deg) !important;
    filter: drop-shadow(0 0 45px rgba(255, 255, 255, 0.6));
}

.hard-hit {
    transform: scale(0.85) rotate(5deg) !important;
    filter: drop-shadow(0 0 60px rgba(255, 69, 0, 0.8));
    transition: all 0.1s cubic-bezier(0.25, 1.5, 0.5, 1);
}

/* SISTEMA ORBITAL - Z-INDEX 20 */
.cloud-orbit-system {
    position: absolute; width: 100%; height: 100%;
    z-index: 20;
    pointer-events: none;
}

.cloud-wrapper {
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

/* LA NUBE - Z-INDEX 50 */
.cloud-dragger {
    position: absolute; 
    top: 0; left: 50%; 
    width: var(--cloud-size); 
    transform: translate(-50%, -50%);
    cursor: grab; pointer-events: auto;
    z-index: 100;
}
#draggable-cloud { z-index: 100; }
.cloud-dragger img { width: 100%; display: block; pointer-events: none; }

/* ESTADO: ARRASTRANDO */
.cloud-dragger.grabbing {
    cursor: grabbing !important;
    transition: none !important;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.5));
}

/* ESTADO: APLASTAMIENTO AL CHOCAR */
.cloud-dragger.plush {
    /* Aplastamiento horizontal simulando choque contra pared vertical imaginaria */
    transform: translate(-50%, -50%) !important;
    z-index: 20;
}

/* --- ATMÓSFERA GLOBAL (FOG) --- */
#global-atmosphere {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
    z-index: -1; 
    
    /* El Truco Visual: */
    /* Centro transparente (0% opacidad) -> Bordes negros sólidos */
    background: radial-gradient(
        circle at 50% 50%, 
        rgba(0, 0, 0, 0) 20%,      /* Centro limpio */
        rgba(0, 0, 0, 0.4) 60%,    /* Empieza a oscurecer */
        rgba(0, 0, 0, 0.95) 100%   /* Bordes casi negros (profundidad) */
    );
}

/* --- CONTENEDOR DE IMAGEN AMBIENTAL (CROSSFADE) --- */
#ambient-bg-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: var(--bg-ambient-height, 100%); /* Cubre todo el scroll */
    z-index: -3; /* Nivel mas profundo */
    pointer-events: none;
    overflow: hidden;

    /* Aplica el blur y opacidad globales a ambas capas */
    filter: blur(var(--bg-ambient-blur, 25px));
    opacity: var(--bg-ambient-opacity, 0.35);
}
.bg-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: top center;
    opacity: 0; /* Inician invisibles */

    /* La duracion del Crossfade (1.5 segundos) */
    transition: opacity 1.5s ease-in-out;
}
/* La imagen que esta activa */
.bg-layer.active {
    opacity: 1;
}

/* AJUSTES DE CAPAS PARA QUE FUNCIONE */

#section-3d {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex; 
    flex-direction: column;
    justify-content: center; /* Centrados horizontalmente en conjunto */
    align-items: center; /* Centrados verticalmente */
    gap: var(--space-model-to-text);
    z-index: 5;
    background: transparent;
    overflow: visible; /* Evita recortes del modelo cuando rota en varios ejes */
}

.content-3d {
    position: fixed !important;
    top: var(--content-3d-pos-y) !important;
    left: var(--content-3d-pos-x) !important;
    right: auto !important; /* Apagamos la ancla derecha anterior */
    transform: none !important; /* Quitamos la traslación para respetar el top exacto */
    
    width: var(--content-3d-width);
    max-width: var(--content-3d-text-max-width);
    z-index: 10;
    pointer-events: none; 
    margin: 0; padding: 0;
    
    display: flex; flex-direction: column; gap: var(--content-3d-gap);
    text-align: left; /* Volvemos a la alineación editorial izquierda */
    align-items: flex-start; /* Empuja los elementos al inicio de la caja */
}

.content-3d h2 {
    font-size: var(--content-3d-title-size);
    line-height: 1.1;
    text-transform: uppercase;
    text-align: inherit;
    letter-spacing: 2px;
    margin: 0;
    background:  #fe4400d4; /* Texto con degradado sutil */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-3d p {
    font-family: var(--content-3d-font-family);
    font-size: var(--content-3d-body-size);
    color: #efedd5;
    line-height: 1.6;
    max-width: var(--content-3d-text-max-width);
    width: 100%;

}



#canvas-3d-container {
    position: absolute !important;
    top: var(--canvas-3d-pos-y) !important;
    left: var(--canvas-3d-pos-x) !important;
    transform: translate(-50%, -50%) !important; 

    width: var(--canvas-3d-width);
    height: var(--canvas-3d-height);

    border: none;
    cursor: grab; 
    z-index: 5;
    margin: 0;
    padding: 0;
}

#canvas-3d-container:active {
    cursor: grabbing;
}

/* --- ANIMACIONES --- */
@keyframes float3D {
    0%, 100% { transform: scale(var(--logo-scale)) rotate(var(--logo-rotation)) translateY(0px); }
    50% { transform: scale(var(--logo-scale)) rotate(var(--logo-rotation)) translateY(-15px); }
}

/* DECORACIÓN EXTRA */
/* --- 1. ESTILOS DEL BOTÓN DE ACCIÓN (Estilo Sticker) --- */
.top-right-control {
    position: fixed;
    width: var(--sticker-size);
    height: var(--sticker-size);
    top: calc(var(--spacing-edge) + var(--video-icon-offset-y));
    right: calc(var(--spacing-edge) + var(--icons-left-shift) - var(--video-icon-offset-x));
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: right 0.85s cubic-bezier(0.19, 1, 0.22, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ESTADO DESPLAZADO (Cuando el menú está abierto) */
.top-right-control.shift-left {
    right: calc(var(--spacing-edge) + var(--icons-left-shift) + 20% - var(--video-icon-offset-x));
}

/* Texto circular girando alrededor del icono */
.circular-text-video {
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    pointer-events: none;
    z-index: -1;
    animation: spinText 30s linear infinite;
}

.circular-text-video svg {
    width: 100%;
    height: 100%;
    scale: 1.25;
    fill: var(--circular-text-color-video);
    font-family: var(--sticker-font);
    font-weight: bold;
    font-size: var(--circular-text-size);
    letter-spacing: var(--circular-text-spacing);
    text-transform: uppercase;
    overflow: visible;
    transition: scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Rotacion base en elementos internos */
.top-right-control .breathing-icon,
.top-right-control .circular-text-video {
    transform: rotate(var(--sticker-rotation));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.footer-hero-text {
    position: relative !important;
    bottom: auto !important; right: auto !important;
    transform: rotate(-5deg); /* Mantiene su inclinación con estilo */
    margin-top: 30px; 
    transition: none !important; /* Ahora lo mueve el padre */
}

.footer-hero-text.shift-left {
    right: calc(80px + 20%);
}
.bottom-center-text {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-family: monospace; font-size: 0.9rem; color: #d1d1d1; z-index: 1;
}

/* =========================================
   EFECTO STICKER SUPREMO
   ========================================= */
.sticker-wrapper {
    position: fixed;
    top: var(--spacing-edge);
    right: calc(var(--spacing-edge) + var(--icons-left-shift) + var(--ui-row-gap));
    width: var(--sticker-size);
    height: var(--sticker-size);
    z-index: 2000;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.8;
    transition: right 1.65s cubic-bezier(0.19, 1, 0.22, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sticker-wrapper.shift-left {
    right: calc(var(--spacing-edge) + var(--icons-left-shift) + var(--ui-row-gap) + 20%);
}

.sticker-effect {
    width: 100%;
    display: block;
 
    filter: 
        /* Capas para el borde blanco grueso */
        drop-shadow(0px 0px 2px #ffffff)
        drop-shadow(0px 0px 2px #ffffff)
        drop-shadow(0px 0px 3px #fff)
        /* Sombra realista de "pegado" */
        drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.4));
}

/* Rotacion base en los elementos internos (no en el wrapper para no romper position fixed) */
.sticker-effect, .circular-text {
    transform: rotate(var(--sticker-rotation));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover unificado para los contenedores (escala todo el conjunto sin romper el giro del texto) */
.top-right-control:hover,
.sticker-wrapper:hover {
    transform: scale(1.15) translateY(-5px);
    z-index: 2010;
}

.top-right-control:active,
.sticker-wrapper:active {
    transform: scale(0.95);
    cursor: grabbing;
}

/* Expansión del texto circular al hacer hover en el contenedor */
.top-right-control:hover .circular-text-video svg,
.sticker-wrapper:hover .circular-text svg {
    scale: 1.8; /* Crece el radio del texto, alejándolo del centro y haciéndolo más legible */
}

/* =========================================
   MODO ALTERNATIVO (Light Mode)
   ========================================= */

/* Cuando el body tiene la clase 'light-mode'... */
body.light-mode {
    background-color: #e8ddd4 !important; 
    color: #111 !important;
}

body.light-mode #section-3d {
    background: none !important; /* Quita el linear-gradient oscuro */
    background-color: transparent !important;
}

/* Cambiamos la atmósfera (Niebla) a blanco */
body.light-mode #global-atmosphere {
    background: radial-gradient(
        circle at 50% 50%, 
        rgba(255, 255, 255, 0) 20%, 
        rgba(200, 200, 200, 0.4) 60%, 
        rgba(255, 255, 255, 0.9) 100%
    );
}

/* Ajustamos el Header para que se vea en fondo claro */
body.light-mode .header {
    background-color: rgba(255, 255, 255, 0.8); /* Fondo blanco semi-transparente */
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .main-nav a {
    color: #2e2e2e; /* Enlaces oscuros */
}

body.light-mode .main-nav a.activo {
    color: #c72a09; /* Mantenemos el rojo de acento */
}

/* Invertimos el Logo principal si es blanco (para que se vea negro) */
body.light-mode .logo, 
body.light-mode .main-logo-3d,
body.light-mode .logo-3d-wrapper img { /* Aseguramos el logo flotante 3D del inicio */
    filter: invert(1); 
}

body.light-mode .tagline { color: #666; }
body.light-mode .bottom-center-text p { color: #fd2e2e; }

body.light-mode .content-3d h2 {
    background:#f08102c3; /* Degradado negro a gris */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.light-mode .content-3d p { color: #db1111; }
body.light-mode .content-3d .instruction { color: #ff4500; } /* Mantenemos el naranja */

/* 5. Atmósfera (Niebla Global) en Blanco */
body.light-mode #global-atmosphere {
    background: radial-gradient(
        circle at 50% 50%, 
        rgba(255, 255, 255, 0) 20%, 
        rgba(244, 244, 244, 0.8) 60%, 
        rgba(244, 244, 244, 1) 100%
    );
}

/* --- NUEVA SECCIÓN: VIDEO REEL --- */
#section-reel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 150;
    margin-top: var(--space-3d-to-reel);
}

/* Bloque hero: contiene carrusel + dots, centrado en 100vh */
.reel-hero-block {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 50px;
}

/* ── Carrusel de videos ──────────────────────────────── */
.reel-carousel-wrapper {
    position: relative;
    width: 80%;
    max-width: 1200px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    transform: scale(0.8);
    opacity: 0;
    will-change: transform, opacity;
}

.reel-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

.reel-slide {
    min-width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.reel-slide .reel-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 0;      /* el redondeo ya está en el wrapper externo */
    box-shadow: none;
    border: none;
    transform: none !important;
    opacity: 1 !important;
}

/* Flechas de navegación */
.reel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 20;
}
.reel-arrow:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-50%) scale(1.1);
}
.reel-arrow--prev { left:  14px; }
.reel-arrow--next { right: 14px; }

/* Indicadores de punto */
.reel-dots {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.reel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}
.reel-dot--active {
    background: #fff;
    transform: scale(1.35);
}

/* =========================================
   GRID DE PROYECTOS DESTACADOS
   ========================================= */
.projects-section {
    position: relative;
    z-index: 150;
    padding-bottom: var(--projects-end-gap, 20vh);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-grid {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--projects-gap, 10px);
    grid-auto-flow: row dense;
}

/* ── Tarjeta individual ─────────────────── */
.project-card {
    aspect-ratio: 1 / 1;
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: var(--projects-radius, 14px);
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    will-change: transform, opacity;
    transition:
        opacity  0.6s ease,
        transform 0.9s cubic-bezier(0.34, 1.08, 0.64, 1),
        box-shadow 0.6s ease,
        filter 0.6s ease;
}

.project-card.is-visible {
    opacity: 1;
}

/* Contenedor interior — recorta el contenido */
.project-card__inner {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
}

.project-card__thumb,
.project-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card__video {
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

/* Degradado inferior en hover */
.project-card__inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.20) 45%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 4;
    pointer-events: none;
}
.project-card:hover .project-card__inner::after {
    opacity: 1;
}

/* Título centrado con outline */
.project-card__label {
    position: absolute;
    bottom: var(--card-label-bottom, 16px);
    left: 12px;
    right: auto;
    width: 58%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    padding: 0;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: clamp(8px, 0.7vw, 12px);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.90);
    z-index: 5;
    pointer-events: none;
    transition: color 0.4s ease;
}

.project-card:hover .project-card__label {
    color: rgba(255,255,255,0.90);
}

/* ── Hover — expande ────────────────────────────────── */
.project-card:hover {
    transform: scale(1.8) !important;
    z-index: 20;
    box-shadow: 0 28px 72px rgba(0,0,0,0.85), 0 8px 20px rgba(0,0,0,0.4);
}

.project-card:hover .project-card__video {
    opacity: 1;
}

/* Los demás se oscurecen y encogen */
.projects-grid:has(.project-card:hover) .project-card:not(:hover) {
    transform: scale(0.88) !important;
    filter: brightness(0.45);
    opacity: 0.55;
}

/* ── Cinta de logos de clientes ──────────────────────── */
.clients-strip {
    width: 80%;
    max-width: 1200px;
    overflow: hidden;
    margin-top: var(--clients-gap-top, 4vh);
    margin-bottom: var(--clients-gap-bottom, 8vh);
    /* Degradado en los bordes para que el loop sea suave */
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right,
        transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: var(--clients-spacing, 56px);
    width: max-content;
    /* Derecha → izquierda; -50% porque el track tiene 2 copias */
    animation: clients-scroll var(--clients-speed, 30s) linear infinite;
}

@keyframes clients-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Logo real (PNG sin fondo) */
.client-logo {
    flex-shrink: 0;
    height: var(--clients-logo-height, 32px);
    width: var(--clients-logo-width, auto);
    display: flex;
    align-items: center;
}

.client-logo img {
    height: 100%;
    width: var(--clients-logo-width, auto);
    object-fit: contain;
    filter: opacity(0.75);
    transition: filter 0.3s ease;
}

.client-logo img:hover {
    filter: opacity(1);
}

/* Placeholder provisional (sin imagen) */
.client-logo--placeholder {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 5px 14px;
    border-radius: 3px;
    white-space: nowrap;
}

/* =========================================
   BOTÓN DE CONTACTO (sobre el fondo del sitio)
   ========================================= */
.footer-contact-row {
    position: fixed;
    bottom: var(--contact-info-bottom, 4vh);
    right: var(--contact-info-right, 4.5vw);
    z-index: 150;
    text-align: right;
    transition: right 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.footer-contact-row.shift-left {
    right: calc(var(--contact-info-right, 4.5vw) + 20%);
}

/* Al cerrar el panel: los iconos esperan a que el texto desaparezca (2.2s = duración del fade) */
.top-right-control.panel-closing {
    transition: right 0.85s cubic-bezier(0.19, 1, 0.22, 1) 0.4s,
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sticker-wrapper.panel-closing {
    transition: right 1.65s cubic-bezier(0.19, 1, 0.22, 1) 0.4s,
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-contact-row.panel-closing {
    transition: right 1.2s cubic-bezier(0.19, 1, 0.22, 1) 0.4s;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    align-items: flex-end;
}

.footer-contact-info span,
.footer-contact-info a {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 100;
    font-size: clamp(0.52rem, 0.6vw, 0.68rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-contact-info a:hover {
    color: #c72a09;
}

.reel-wrapper {
    position: relative;
    cursor: pointer;
    width: 80%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    
    /* Bordes redondeados como el menú (Glassmorphism sutil) */
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    
    /* Estado inicial para la animación */
    transform: scale(0.8);
    opacity: 0;
    transition: box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.reel-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CAPA DEL BOTÓN PLAY --- */
.play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.3); /* Oscurece un poco el video antes de dar play */
    transition: all 0.4s ease;
    z-index: 10;
}

/* El círculo del botón */
.play-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1); /* Transparente */
    backdrop-filter: blur(10px); /* Efecto cristal */
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex; justify-content: center; align-items: center;
    transition: all 0.3s ease;
}

.play-icon {
    font-size: 30px;
    color: #fff;
    margin-left: 5px; /* Ajuste visual óptico */
}

.play-text {
    margin-top: 15px;
    font-family: 'Helvetica', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    opacity: 0.8;
}

/* --- INTERACCIONES --- */
.reel-wrapper:hover .play-circle {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

/* CLASE PARA CUANDO SE ESTÁ REPRODUCIENDO (OCULTAR BOTÓN) */
.reel-wrapper.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none; /* Permite hacer click en el video para pausar */
}

/* Estilo para el footer que ahora vive aquí */
.footer-final {
    margin-top: 40px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    opacity: 0; /* Aparecerá con el video */
    transition: opacity 0.5s ease;
}

/* Ajuste Light Mode para el video */
body.light-mode .reel-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* MODO CLARO (Light Mode) Ajustes */
body.light-mode .reel-container.active-focus {
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.1);
}
body.light-mode .footer-text {
    color: #333;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .reel-container { width: 95%; aspect-ratio: 9/16; /* Vertical en móvil si prefieres */ }
    #section-reel { height: 100vh; }
}

#about-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--about-panel-width);
    height: 100vh;
    background: transparent;
    z-index: 200; /* Por encima de todos los elementos de scroll */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    display: flex;
    align-items: flex-start;
    padding: var(--about-panel-top, 22vh) 2.5vw 2.5vw;
    box-sizing: border-box;
    overflow: hidden;
}

#about-side-panel.is-visible {
    opacity: 1; 
    pointer-events: auto;
}

#brutalist-text {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: var(--about-panel-font-weight, 100);
    font-size: var(--about-panel-text-size); /* Editar en config.js */
    line-height: var(--about-panel-text-line-height);
    text-transform: uppercase;
    text-align: var(--about-panel-text-align, right);
    color: #e8ddd4;
    word-break: break-word;
    max-width: 100%;
}

#brutalist-text span {
    transition: color 0.1s ease; /* Transición súper rápida para el glitch */
}


/* =========================================
   FRANJA LATERAL "MARQUEE"
   ========================================= */
.left-strip {
    position: fixed; top: 0; right: 0; width: var(--strip-panel-width); height: 100vh;
    background-color: #0088ff; z-index: 0; overflow: hidden;
    display: flex; justify-content: center; align-content: center;
    margin-right: 0;
    /* Usa la variable de velocidad de la pestaña para que se muevan igual */
    transition: margin-right var(--about-panel-speed) cubic-bezier(0.19, 1, 0.22, 1);
}

.left-strip.is-open {
    margin-right: 0; /* Se mantiene fija en el borde derecho */
}


.strip-track {
    display: flex;
    gap: 40px; /* Espacio entre las repeticiones de texto */
    
    /* MAGIA VERTICAL */
    writing-mode: vertical-rl; /* Texto en vertical */
    transform: rotate(180deg); /* Giramos para que se lea subiendo */
    
    /* Configuración de texto */
    white-space: nowrap;
    color: #a2d2ee;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 100; /* Bold */
    font-size: var(--strip-text-size);
    letter-spacing: 2px;
    text-transform: uppercase;
    
    /* Animación */
    animation: scrollVertical 15s linear infinite;
}

/* El separador (el puntito entre textos) */
.separator {
    color: rgba(255,255,255, 0.4);
    font-size: 10px;
    vertical-align: middle;
}

/* ANIMACIÓN INFINITA HACIA ARRIBA */
@keyframes scrollVertical {
    0% {
        /* Empieza abajo (o en su posición natural tras rotar) */
        transform: rotate(180deg) translateY(0);
    }
    100% {
        /* Se mueve hacia "arriba" (que en vertical rotado es Y negativo) */
        /* Ajusta este porcentaje dependiendo de cuánto texto hayas repetido.
           La idea es que cuando termine, el primer texto esté 
           exactamente donde estaba el segundo al inicio. */
        transform: rotate(180deg) translateY(-50%); 
    }
}

/* AJUSTE PARA MÓVILES (Opcional) */
@media (max-width: 768px) {
    .left-strip {
        width: 35px; /* Más delgada en celular */
    }
    .strip-track {
        font-size: var(--strip-text-size-mobile);
    }
    /* Ajustamos el header para que no choque con la franja en móvil */
    .header {
        left: 45px; 
    }
}

/* Contenedor del texto rotativo */
.circular-text {
    position: absolute;
    top: -15%;  /* Ajusta para centrar respecto a la rana */
    left: -15%; /* Ajusta para centrar respecto a la rana */
    width: 130%; /* Un poco más grande que la rana */
    height: 130%;
    pointer-events: none; /* Para que el click siga funcionando en la rana */
    z-index: -1; /* Detrás de la rana o delante, según prefieras (aquí detrás) */
    animation: spinText 40s linear infinite; /* Rotación lenta constante */
}

/* Estilo del texto SVG */
.circular-text svg {
    width: 100%;
    height: 100%;
    scale: 1.25;
    fill: var(--circular-text-color-mode); /* Color del texto */
    font-family: var(--sticker-font);
    font-weight: bold;
    font-size: var(--circular-text-size);
    letter-spacing: var(--circular-text-spacing);
    text-transform: uppercase;
    overflow: visible;
    transition: scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
}

/* Animación de giro para el texto */
@keyframes spinText {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AJUSTE PARA LIGHT MODE (Opcional: cambiar color del texto a negro) */
body.light-mode .circular-text svg {
    fill: #ff0000; 
}

@keyframes squashEject {
    0% { transform: scale(1); }
    40% { transform: scale(0.95, 1.05); filter: brightness(1.2); } /* Sutil compresion vertical */
    60% { transform: scale(1.02, 0.98); filter: brightness(1); } /* Sutil estiramiento horizontal */
    100% { transform: scale(1); }
}
.squash-eject { animation: squashEject 0.7s cubic-bezier(0.25, 1.5, 0.5, 1) forwards !important; }
.cloud-respawning { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; opacity: 1 !important; transform: translate(-50%, -50%) scale(1) !important; top: 0px !important; }

/* =========================================
   MENÚ RADIAL SVG (ESTILO EDITORIAL)
   ========================================= */
.logo-3d-wrapper {
    position: relative;
    z-index: 100;
}

/* ── ANILLO MENU GIRATORIO ───────────────────────────────────── */
.menu-ring-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--menu-ring-size, 160px);
    height: var(--menu-ring-size, 160px);
    /* translate es una propiedad CSS separada de transform:
       maneja el centrado + compensación del canvas p5 sin interferir
       con la animación rotate() que vive en transform */
    translate: calc(-50% + var(--menu-ring-offset-x, -29px)) calc(-50% + var(--menu-ring-offset-y, -29px));
    pointer-events: none;
    z-index: 8;
    animation: menuRingSpin var(--menu-ring-speed, 20s) linear infinite;
}

.menu-ring-arc {
    stroke: var(--menu-ring-color, rgba(255, 255, 255, 0.5));
    stroke-width: var(--menu-ring-stroke, 0.7);
}

.menu-ring-label {
    fill: var(--menu-ring-color, rgba(255, 255, 255, 0.5));
    font-size: var(--menu-ring-font-size, 9);
    font-family: var(--menu-ring-font-family, 'Helvetica', 'Arial', sans-serif);
}

@keyframes menuRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.radial-svg-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--menu-size, 500px);
    height: var(--menu-size, 500px);
    z-index: 10;
    /* translate: posicionado fijo, nunca se anima */
    translate: calc(-50% + var(--menu-offset-x)) calc(-50% + var(--menu-offset-y));
    will-change: scale, rotate, opacity;

    /* ESTADO OCULTO — propiedades individuales interpoladas de forma independiente
       evita la singularidad de matriz que causaba el drift del centro */
    opacity: 0;
    pointer-events: none;
    scale: 0.01;      /* nunca exactamente 0 → evita matriz singular */
    rotate: -180deg;
    transition: opacity 0.2s ease-out,
                scale   0.65s cubic-bezier(0.55, 0, 1, 0.45),
                rotate  0.65s cubic-bezier(0.55, 0, 1, 0.45),
                pointer-events 0s linear 0.2s;
}

/* ESTADO VISIBLE */
.logo-3d-wrapper:hover .radial-svg-menu,
.radial-svg-menu:hover {
    opacity: 1;
    pointer-events: auto;
    scale: var(--menu-scale-visible);
    rotate: 0deg;
    transition: opacity 0.7s cubic-bezier(0, 0, 0.2, 1),
                scale   0.8s cubic-bezier(0.34, 1.12, 0.64, 1),
                rotate  0.8s cubic-bezier(0.22, 1, 0.36, 1),
                pointer-events 0s linear 0.8s; /* espera a que termine la animación antes de activar hover --mag */
}

/* HOVER POR PALABRA (Crecimiento de tspan) */
.radial-svg-menu text {
    font-family: var(--menu-font-family, 'Courier New', Courier, monospace);
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.radial-svg-menu tspan {
    /* Tamaño base configurable, crece según --mag (0-1) al hacer hover */
    font-size: calc(var(--menu-text-size, 14px) + (var(--mag, 0) * var(--menu-text-size-hover, 22px)));
    /* Mezcla de gris a naranja basada en la magnificacion */
    fill: color-mix(in srgb, #c5c5c5, #ff4500 calc(var(--mag, 0) * 100%));
    filter: drop-shadow(0px 0px calc(var(--mag, 0) * 8px) rgba(255, 69, 0, 0.6));
    opacity: calc(1 - var(--ring-fade, 0));
    transition: opacity 0.3s ease;
}

.radial-svg-menu a {
    text-decoration: none;
}

/* Motor Parallax CSS */
#menu-parallax-group {
    transform-origin: 250px 250px;
    /* Variables inyectadas por JS */
    transform: translate(var(--px, 0px), var(--py, 0px));
    transition: transform 0.15s ease-out; /* Suavidad en el seguimiento */
}

/* Animaciones de rotacion independientes para cada anillo */
/* .ring transform-origin se actualiza dinámicamente por syncMenuPathRadiiFromCSS() */
.ring-1 { animation: spinRing 25s linear infinite; }
.ring-2 { animation: spinRingReverse 35s linear infinite; }
.ring-3 { animation: spinRing 45s linear infinite; }

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinRingReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Limpieza absoluta del overlay y headers */
#master-overlay, .creative-partner-header {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    pointer-events: none;
}

/* Header del home: logo grande centrado en la composición hero */
header.creative-partner-header {
    padding: 0;
    left: var(--logo-hero-pos-x, 50%);
    top: var(--logo-hero-pos-y, 32vh);
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 3;
    will-change: transform, opacity;
}

header.creative-partner-header .brand-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

header.creative-partner-header .logo {
    width: var(--logo-hero-size, 18vw);
    margin-bottom: 0;
}

/* Al hacer scroll: vuelve al estado compacto top-left */
.header.scrolled {
    transform: none;
}
/* Mantener el icono dentro del contenedor para conservar escala y alineacion */
.red-logo-breathing {
    position: relative;
    width: var(--breathing-icon-size);
    height: auto;
    display: block;
}

/* Asegurar integracion del video */
.video-reel-section {
    background: transparent !important; /* El video flota sobre el fondo general */
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 160px;
}

.video-container {
    width: 80%;
    max-width: 1000px;
    position: relative;
    left: var(--video-offset-x);
    top: var(--video-offset-y);
    border-radius: var(--video-corner-radius);
    overflow: hidden;
}

#master-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100; /* Siempre arriba */
    pointer-events: none; /* Permite hacer scroll a traves de las areas vacias */
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Reactivar eventos solo para los elementos interactivos */
.logo-3d-wrapper, .radial-svg-menu, #draggable-cloud {
    pointer-events: auto;
}

#scroll-content {
    position: relative;
    z-index: 51; /* Por debajo del master-overlay, pero encima del panel About */
    padding-top: var(--scroll-content-start-offset);
}
section {
    min-height: 100vh;
    background: #111;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#section-projects {
    min-height: unset;
    background: transparent;
    display: block;
}

/* Adaptacion del ecosistema para pantallas mas pequenas */
@media (max-width: 1200px) { :root { --eco-scale: 0.85; } }
@media (max-width: 900px) { :root { --eco-scale: 0.7; } }
@media (max-width: 600px) { :root { --eco-scale: 0.5; } }
@media (max-width: 400px) { :root { --eco-scale: 0.4; } }
/* Aplicamos la escala al contenedor principal como un "Zoom de camara" */
.logo-3d-wrapper {
    transform: scale(var(--eco-scale));
    transform-origin: center center; /* Asegura que se encoja hacia el centro */
}

/* =========================================================
   PARCHE DE BLINDAJE RESPONSIVE (MOVIL A 4K)
   ========================================================= */
/* 1. TEXTO FLUIDO SECCION 3D (Sobreescribe los rem fijos) */

/* 2. LIBERAR BOTONES SUPERIORES (UI) */
.top-right-control {
    width: var(--sticker-size) !important;
    height: var(--sticker-size) !important;
    transform-origin: top right;
}

/* 3. REORDENAMIENTO CELULAR Y TABLET */
@media (max-width: 900px) {
    /* A) Escalar UI para que quepa en la esquina de un telefono */
    .top-right-control { transform: scale(0.75); }
    .sticker-wrapper {
        right: calc(var(--spacing-edge) + var(--icons-left-shift) + 110px) !important;
    }
    .sticker-wrapper .sticker-effect,
    .sticker-wrapper .circular-text {
        transform: scale(0.7) rotate(var(--sticker-rotation)) !important;
    }

    /* B) Apilar la seccion 3D (El texto arriba, el modelo 3D abajo) */
    #section-3d {
        flex-direction: column !important;
        justify-content: center !important;
        padding-top: 60px !important;
        gap: 20px !important;
    }
    /* C) Matar los Offsets (Desplazamientos) que sacaban todo de la pantalla */
    #canvas-3d-container {
        position: relative !important; /* Vuelve al flujo normal en celular para apilarse arriba del texto */
        width: 100vw !important;
        height: 45vh !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
    }
    .content-3d {
        position: fixed !important; /* Se mantiene fijo también en móvil */
        width: 90vw !important;
        top: var(--content-3d-pos-y) !important;
        left: var(--content-3d-pos-x) !important;
        transform: none !important;
        text-align: center !important;
        padding: 0 !important;
    }
    .content-3d h2 {
        text-align: center !important;
        margin-bottom: 15px !important;
    }
}

/* =========================================
   MENÚ GLOBAL DE NAVEGACIÓN (waffle)
   ========================================= */
#global-nav {
    position: fixed;
    top: 2.2vh;
    right: calc(var(--strip-panel-width, 1.5vw) + 0.9vw);
    z-index: 2100;
}

/* ── Botón tres puntos verticales ────────────────────── */
.gnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.25s ease;
}

.gnav-btn span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.65);
    transition: background 0.25s ease, transform 0.25s ease;
}

.gnav-btn:hover,
.gnav-btn.is-open {
    background: rgba(255, 255, 255, 0.07);
}

.gnav-btn:hover span,
.gnav-btn.is-open span {
    background: #fff;
}

/* Separa ligeramente los puntos extremos al abrir */
.gnav-btn.is-open span:nth-child(1) { transform: translateY(-2px); }
.gnav-btn.is-open span:nth-child(3) { transform: translateY( 2px); }

/* ── Menú desplegable ─────────────────────────────────── */
.gnav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 6px 0;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gnav-menu.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.gnav-link {
    display: block;
    padding: 10px 22px;
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}

.gnav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 28px;
}

.gnav-link.gnav-active {
    color: #c72a09;
}



/* ============================================================
   SECCIÓN EQUIPO — #piiro-team-section
   Todos los selectores con prefijo pts- para evitar conflictos
   ============================================================ */

#piiro-team-section {
    background: transparent;
    margin-top: var(--team-section-gap, -20vh);
    --pts-ink: #141416;
    --pts-ink-soft: #2b2b30;
    --pts-mute: #8b847a;
    --pts-ghost: #c5bfae;
    font-family: 'DM Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--pts-ink);
}

/* --- Segundo modelo 3D --- */
#canvas-3d-container-2 {
    position: absolute;
    right: var(--model2-pos-x, 5%);
    top: var(--model2-pos-y, 50%);
    transform: translateY(-50%) scale(var(--model2-scale, 1));
    transform-origin: right center;
    width: var(--model2-width, 45vw);
    height: var(--model2-height, 75vh);
    pointer-events: auto;
    cursor: grab;
    z-index: 2;
}

/* --- Hero --- */
.pts-hero {
    position: relative;
    min-height: 100vh;
    padding: 130px 32px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 18vh;
}
.pts-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 400;
    position: relative;
    max-width: 520px;
    margin-bottom: auto;
    pointer-events: auto;
}
.pts-small-team {
    font-family: 'DM Sans', sans-serif;
    font-weight: 200;
    font-size: clamp(22px, 3.2vw, 48px);
    letter-spacing: 0.06em;
    line-height: 1.2;
    color: var(--pts-ghost);
    text-align: center;
    margin: 0;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.pts-small-team .pts-word {
    display: block;
    overflow: hidden;
}
.pts-small-team .pts-word > span { display: inline-block; }
.pts-word-line {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--pts-ghost);
    opacity: 0.3;
    margin: 10px 0;
}
.pts-big-results {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(11px, 0.9vw, 14px);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--pts-ghost);
    text-align: center;
    opacity: 0.65;
    max-width: 480px;
    margin-top: 32px;
    text-transform: none;
}

/* --- Cards Row --- */
.pts-cards-row {
    position: absolute;
    left: 0; right: 0;
    top: 55%;
    height: 320px;
    z-index: 3;
    pointer-events: none;
}
.pts-cards-row > * { pointer-events: auto; }

.pts-card {
    position: absolute;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 35%, #3a3a3a 70%, #555 100%);
    box-shadow: 0 30px 50px -16px rgba(0,0,0,.6), 0 14px 26px -8px rgba(0,0,0,.4),
        0 5px 10px -2px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.06), inset 0 -4px 8px rgba(0,0,0,.5);
    cursor: pointer;
    will-change: transform;
    transition: box-shadow .5s cubic-bezier(.6,0,.2,1);
}
.pts-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(155deg, rgba(255,255,255,.15) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.15) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 2;
}
.pts-card img {
    width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
    transition: filter 0.4s ease;
}
.pts-card:hover img {
    filter: contrast(0.88) saturate(0.75) sepia(0.18) brightness(0.5);
}
.pts-card-label {
    --pts-card-label-size: 15px;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: var(--pts-card-label-size);
    font-weight: 800;
    color: var(--pts-ghost, #e8ddd4);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.pts-card:hover .pts-card-label { opacity: 1; }

.pts-card-1 { width: 130px; height: 180px; left: 4%;  top: 30px; z-index: 1; }
.pts-card-2 { width: 160px; height: 220px; left: 12%; top: 50px; z-index: 2; }
.pts-card-3 { width: 200px; height: 270px; left: 22%; top: 20px; z-index: 4; }
.pts-card-4 { width: 150px; height: 200px; left: 36%; top: 70px; z-index: 3; }
.pts-card-5 { width: 230px; height: 310px; left: 44%; top:  0px; z-index: 5; }
.pts-card-6 { width: 160px; height: 215px; left: 59%; top: 55px; z-index: 3; }
.pts-card-7 { width: 175px; height: 240px; left: 70%; top: 30px; z-index: 4; }
.pts-card-8 { width: 130px; height: 175px; left: 84%; top: 50px; z-index: 2; }

/* --- Subline --- */
.pts-subline { margin-top: 48px; text-align: center; z-index: 4; position: relative; }
.pts-arrow-pill {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--pts-ink); color: #fafaf7; border: none;
    padding: 12px 20px 12px 24px; border-radius: 999px;
    font-family: 'DM Sans', inherit; font-size: 14px; font-weight: 500; cursor: pointer;
    box-shadow: 0 14px 24px -8px rgba(0,0,0,.4), 0 5px 10px -2px rgba(0,0,0,.2),
        inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 4px rgba(0,0,0,.4);
    transition: transform .4s cubic-bezier(.6,0,.2,1);
    text-transform: none;
}
.pts-arrow-pill:hover { transform: translateY(-2px); }
.pts-ar {
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(180deg, #d9351f, #f58b4e);
    display: flex; align-items: center; justify-content: center; color: #fff;
    transition: transform .4s cubic-bezier(.6,0,.2,1);
}
.pts-arrow-pill:hover .pts-ar { transform: rotate(45deg); }
.pts-subline-text { margin-top: 22px; font-size: 13px; color: var(--pts-mute); letter-spacing: .06em; }

/* --- Team section --- */
.pts-team-section {
    padding: 140px 40px 40px;
}
.pts-team-head {
    max-width: 1280px; margin: 0 auto 60px;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap;
}
.pts-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
    color: var(--pts-ghost); font-weight: 400; margin-bottom: 16px; opacity: 0.5;
}
.pts-eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #c72a09; box-shadow: 0 0 0 3px rgba(199,42,9,.2);
}
.pts-team-head h2 {
    font-family: 'DM Sans', sans-serif; font-weight: 200;
    font-size: clamp(22px, 2.8vw, 44px); line-height: 1.25;
    letter-spacing: 0.01em; max-width: 600px; color: var(--pts-ghost); text-transform: none;
}
.pts-team-head p { font-size: 13px; line-height: 1.6; color: var(--pts-ghost); opacity: 0.5; max-width: 320px; text-transform: none; }

.pts-team-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }

.pts-t-card {
    aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 35%, #3a3a3a 70%, #555 100%);
    position: relative;
    box-shadow: 0 24px 40px -16px rgba(0,0,0,.5), 0 10px 22px -6px rgba(0,0,0,.3),
        inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 6px rgba(0,0,0,.4);
    cursor: pointer;
    transition: transform .5s cubic-bezier(.6,0,.2,1), box-shadow .5s;
}
.pts-t-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(155deg, rgba(255,255,255,.12) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.12) 100%);
    pointer-events: none; z-index: 2;
}
.pts-t-card:hover { transform: translateY(-10px); }
.pts-t-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pts-t-meta {
    position: absolute; left: 14px; right: 14px; bottom: 14px;
    background: rgba(20,10,6,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: #fafaf7; padding: 12px 16px; border-radius: 14px; z-index: 3;
    transform: translateY(8px); opacity: 0;
    transition: opacity .4s, transform .4s cubic-bezier(.6,0,.2,1);
    border: 1px solid rgba(255,255,255,.12);
}
.pts-t-card:hover .pts-t-meta { transform: translateY(0); opacity: 1; }
.pts-nm { font-weight: 700; font-size: 14px; }
.pts-rl { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; letter-spacing: .03em; }

/* --- Grid de imágenes recto --- */
/* Wrapper relativo que contiene grid + flechas absolutas */
.pts-grid-wrapper {
    position: relative;
    max-width: 1280px;
    margin: 80px auto 80px;
}

/* Flechas absolutas: top:0 = borde superior del grid, bottom:0 = borde inferior */
.pts-arrow-wrap {
    position: absolute;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 20;
    pointer-events: none;
    transform: rotate(5deg);
    transform-origin: 50% 50%;
    color: rgba(255,255,255,0.22);
    transition: color 0.4s ease;
}
.pts-arrow-above { top: var(--arrow-above-y, 0px); }
.pts-arrow-below { bottom: calc(-1 * var(--arrow-below-y, 0px)); }
.pts-arrow-wrap svg { width: 100%; height: 100%; display: block; }

/* Flecha arriba reacciona a tarjetas 1 y 3 (borde superior del grid) */
.pts-grid-wrapper:has(.pts-img-item:nth-child(1):hover) .pts-arrow-above,
.pts-grid-wrapper:has(.pts-img-item:nth-child(3):hover) .pts-arrow-above {
    color: rgba(255,255,255,0.72);
}
/* Flecha abajo reacciona a tarjetas 2 y 4 (borde inferior del grid) */
.pts-grid-wrapper:has(.pts-img-item:nth-child(2):hover) .pts-arrow-below,
.pts-grid-wrapper:has(.pts-img-item:nth-child(4):hover) .pts-arrow-below {
    color: rgba(255,255,255,0.72);
}

.pts-img-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
    position: relative;
    z-index: 1;
    /* Padding vertical = altura de las flechas, para que no tapen el contenido */
    padding: 100px 0;
}
.pts-img-item {
    display: flex;
    flex-direction: column;
}
.pts-img-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.4s cubic-bezier(0.34, 1.12, 0.64, 1);
    transform-origin: center bottom;
    z-index: 1;
    position: relative;
}
.pts-img-item:hover .pts-img-inner {
    transform: scale(1.08);
    z-index: 10;
}
.pts-img-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    opacity: 0;
}
.pts-label-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    font-weight: 300;
    color: var(--pts-ghost);
    flex-shrink: 0;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.pts-label-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: var(--pts-ghost);
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    transition: color 0.25s ease, opacity 0.25s ease;
}
.pts-img-card {
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,.55), 0 8px 16px -6px rgba(0,0,0,.3);
}
/* Hover en item: labels en rojo */
.pts-img-item:hover .pts-label-circle {
    color: #c72a09;
    border-color: #c72a09;
}
.pts-img-item:hover .pts-label-text {
    color: #c72a09;
    opacity: 1;
}
.pts-img-desc {
    margin: 0;
    padding: 0 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--pts-ghost);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
.pts-img-item:hover .pts-img-desc {
    opacity: 0.65;
    max-height: 100px;
}
.pts-img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ── Tabla de etapas (bajo las flechas y tarjetas) ── */
.pts-process-block { display: none; }

.pts-stages-table {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-top: 0.5px solid rgba(255,255,255,0.16);
    padding-top: 24px;
}
.pts-stage-col {
    padding-right: 28px;
    border-right: 0.5px solid rgba(255,255,255,0.11);
    font-family: 'Helvetica', 'Arial', sans-serif;
}
.pts-stage-col:nth-child(2) { padding-left: 28px; }
.pts-stage-col:last-child   { border-right: none; padding-right: 0; padding-left: 28px; }
.pts-stage-title {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(244,237,222,0.65);
    margin-bottom: 6px;
    text-transform: none;
}
.pts-stage-col--active .pts-stage-title strong {
    font-weight: 700;
    color: rgba(244,237,222,0.92);
}
.pts-stage-dash { opacity: 0.35; }
.pts-stage-time {
    font-size: 11.5px;
    letter-spacing: 0.05em;
    color: rgba(244,237,222,0.32);
    margin-bottom: 14px;
}
.pts-stage-desc {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(244,237,222,0.35);
    text-transform: none;
}

/* --- Payment milestones --- */
.pts-payments {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-top: 0.5px solid rgba(255,255,255,0.12);
    margin-top: 36px;
    padding-top: 28px;
    font-family: 'Helvetica', 'Arial', sans-serif;
}
.pts-pay-col {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 28px;
    border-right: 0.5px solid rgba(255,255,255,0.11);
}
.pts-pay-col:nth-child(2) { padding-left: 28px; }
.pts-pay-col:last-child   { border-right: none; padding-right: 0; padding-left: 28px; }

/* Circles at the intersections of horizontal + vertical lines */
.pts-pay-col:not(:last-child)::before {
    content: '';
    position: absolute;
    top: calc(-28px - 3.5px);
    right: -3.75px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 0.75px solid rgba(244,237,222,0.42);
    z-index: 2;
}

/* Top: ENTREGA label + delivery description */
.pts-pay-top { margin-bottom: 20px; }

.pts-pay-entrega {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #c72a09;
    text-transform: uppercase;
    margin-bottom: 9px;
}
.pts-pay-desc {
    font-size: 13px;
    line-height: 1.65;
    color: rgba(244,237,222,0.32);
}

/* Bottom: COTIZACION + anticipo, right-aligned toward the border dot */
.pts-pay-cotz { text-align: right; }
.pts-pay-cotz-num {
    font-size: 11.5px;
    letter-spacing: 0.08em;
    color: rgba(244,237,222,0.50);
    margin-bottom: 4px;
}
.pts-pay-cotz-line {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
}
.pts-pay-cotz-sub {
    font-size: 11px;
    color: rgba(244,237,222,0.26);
}
.pts-pay-cotz-pct {
    font-size: 17px;
    font-weight: 300;
    color: rgba(244,237,222,0.50);
    letter-spacing: 0.01em;
}

/* --- Stats --- */
.pts-stats { padding: 0 40px 140px; }
.pts-stats-inner {
    max-width: 1360px; margin: 0 auto;
    background: rgba(20, 20, 22, 0.80); border-radius: 36px; padding: 60px 80px; color: #f4edde;
    display: flex; flex-direction: column;
    box-shadow: 0 40px 80px -30px rgba(20,8,0,.45), 0 16px 32px -12px rgba(20,8,0,.25),
        inset 0 1px 0 rgba(255,255,255,.08), inset 0 -3px 8px rgba(0,0,0,.5);
    position: relative; overflow: hidden;
}
.pts-stats-divider {
    border-top: 0.5px solid rgba(255,255,255,0.10);
    margin: 48px 0;
}
.pts-stats-bottom {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; align-items: end;
}
.pts-stats-inner::before,
.pts-stats-inner::after {
    content: none;
}
.pts-stats-inner h3 {
    font-family: 'DM Sans', sans-serif; font-weight: 700;
    font-size: clamp(28px, 3vw, 42px); line-height: 1.05;
    letter-spacing: -0.03em; position: relative; z-index: 1; text-transform: none;
}
.pts-stats-inner h3 em {
    font-style: italic; font-weight: 800;
    color: #f4edde;
}
.pts-stat-block { position: relative; z-index: 1; }
.pts-num {
    font-family: 'DM Sans', sans-serif; font-weight: 700;
    font-size: clamp(44px, 4.5vw, 68px); line-height: 1;
    letter-spacing: -0.04em; display: flex; align-items: baseline; gap: 4px;
}
.pts-num small { font-size: .42em; color: #8b847a; font-weight: 500; }
.pts-lbl {
    font-size: 12px; text-transform: uppercase; letter-spacing: .16em;
    color: #8b847a; margin-top: 14px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.12);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .pts-team-grid { grid-template-columns: repeat(2, 1fr); }
    .pts-stats-inner { padding: 50px 30px; }
    .pts-stats-bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 750px) {
    .pts-hero { padding: 80px 16px 40px; }
    .pts-cards-row { height: 220px; top: 52%; }
    .pts-card-1 { width: 80px;  height: 110px; left: 0%;  top: 20px; }
    .pts-card-2 { width: 90px;  height: 130px; left: 10%; top: 35px; }
    .pts-card-3 { width: 110px; height: 150px; left: 22%; top: 15px; }
    .pts-card-4 { width: 90px;  height: 120px; left: 36%; top: 50px; }
    .pts-card-5 { width: 130px; height: 180px; left: 46%; top: 0; }
    .pts-card-6 { width: 95px;  height: 130px; left: 62%; top: 40px; }
    .pts-card-7 { width: 100px; height: 140px; left: 74%; top: 20px; }
    .pts-card-8 { width: 80px;  height: 110px; left: 87%; top: 35px; }
    .pts-subline { margin-top: 120px; }
    .pts-team-section { padding: 80px 20px 40px; }
    .pts-team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pts-stats { padding: 20px 20px 60px; }
    .pts-stats-inner { padding: 40px 24px; }
    .pts-stats-bottom { grid-template-columns: 1fr 1fr; gap: 24px; }
}

/* ============================================================
   PANEL SERVICIOS — nota flotante estilo código
   ============================================================ */
.srv-note {
    position: fixed;
    top: 5vh;
    left: 3vw;
    width: clamp(280px, 28vw, 420px);
    background: rgba(10, 10, 12, 0.80);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: clamp(11px, 0.75vw, 13px);
    color: #c8c8c8;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 32px 64px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.05);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.srv-note-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    border-radius: 10px 10px 0 0;
}
.srv-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.srv-dot-r { background: #ff5f57; }
.srv-dot-y { background: #febc2e; }
.srv-dot-g { background: #28c840; }
.srv-filename {
    flex: 1;
    text-align: center;
    font-size: 11px;
    opacity: 0.4;
    letter-spacing: 0.05em;
}
.srv-close {
    background: none; border: none; color: rgba(255,255,255,0.25);
    font-size: 11px; cursor: pointer; padding: 0;
    transition: color 0.2s;
}
.srv-close:hover { color: rgba(255,255,255,0.7); }
.srv-note-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.srv-comment {
    color: #4e8a4e;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
}
.srv-comment-bottom { opacity: 0.7; }
.srv-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #e8e8e8;
    letter-spacing: 0.02em;
    margin: 0;
    font-family: inherit;
    text-transform: none;
}
.srv-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.srv-list li {
    display: flex;
    gap: 10px;
    line-height: 1.45;
    color: #a8a8a8;
}
.srv-key {
    color: #7aa2d4;
    flex-shrink: 0;
    font-weight: 600;
}
.srv-cta {
    margin: 0;
    color: #c57bdb;
    font-size: 0.9em;
}
.srv-cta a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(197,123,219,0.3);
    transition: border-color 0.2s;
}
.srv-cta a:hover { border-color: rgba(197,123,219,0.8); }
#srv-trigger {
    all: unset;
    cursor: pointer;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    position: relative;
    z-index: 500;
    pointer-events: auto;
    transition: color 0.25s ease;
}
#srv-trigger:hover,
#col-trigger:hover {
    color: #c72a09;
}
#col-trigger {
    all: unset;
    cursor: pointer;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    position: relative;
    z-index: 500;
    pointer-events: auto;
    transition: color 0.25s ease;
}

/* ── Línea blanca animada entre logo y texto rojo ── */
#cp-line {
    position: fixed;
    left: var(--cp-line-pos-x, 49.5vw);
    top: var(--cp-line-pos-y, 55vh);
    width: var(--cp-line-width, 22vw);
    height: 1px;
    background: rgba(255, 255, 255, 0.72);
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    pointer-events: none;
    z-index: 46;
    will-change: transform, opacity, clip-path;
}
