/* ==========================================================================
   1. CONFIGURACIÓN DE VARIABLES Y BASE
   ========================================================================== */
:root {
    --color-base: #000000;
    --color-brillo: #ffffff;
    --trans: 0.4s ease;

    /* Sistema tipográfico */
    --font-body:      'Architects Daughter', cursive;
    --font-destacado: 'Rock Salt', cursive;
    --font-cabecera:  'Permanent Marker', cursive;
}

body {
    background-color: var(--color-base);
    color: var(--color-brillo);
    transition: background-color var(--trans), color var(--trans);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.7;
}

/* ==========================================================================
   2. TIPOGRAFÍA, JERARQUÍAS Y TEXTOS
   ========================================================================== */
body, p, .lead, .small, .fs-4, .fs-5, .fs-6 {
    font-family: var(--font-destacado) !important; /* Rock Salt manda en textos generales */
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

h1, h2, h3, h4, .frase-marcador {
    font-family: var(--font-cabecera) !important;
    line-height: 1.2;
}

.font-destacado {
    font-family: var(--font-cabecera) !important;
    font-size: 2rem;
}

.font-destacado-sub {
    font-family: var(--font-destacado) !important;
    font-size: 1.3rem;
}

.texto-destacado {
    font-family: var(--font-destacado) !important;
    font-size: 0.85em;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: var(--color-brillo);
}

.texto-body {
    font-family: var(--font-body) !important;
    font-size: 1em;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: var(--color-brillo);
}

.p-footer {
    padding: 1rem 0.1rem;
    font-size: 0.8rem;
}

/* Frases manuscritas del Hero */
.frase-manuscrita {
    font-family: var(--font-destacado) !important;
    font-size: 1.4rem;
    color: var(--color-brillo);
    margin-bottom: 0.5rem;
}

.frase-marcador {
    font-size: 1.6rem;
    white-space: nowrap;
}

.frase-marcador .subrayado {
    font-family: var(--font-cabecera) !important;
    font-size: 1.1em;
    letter-spacing: 1px;
}

hr {
    position: relative;
    color: var(--color-brillo);
    padding: 1rem;
    opacity: 1;
    border: 0;
}

hr::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/hr.svg');
    mask-image: url('../img/hr.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
}

/* ==========================================================================
   3. COMPONENTES ORGÁNICOS Y MÁSCARAS DE RECORTE (CSS SHAPES)
   ========================================================================== */
.subrayado {
    position: relative;
    display: inline;
    padding-bottom: 0.1em;
}

.subrayado::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/subrayado.svg');
    mask-image: url('../img/subrayado.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.ovalo {
    position: relative;
    display: inline;
    padding: 0.2em 2em;
    letter-spacing: 2px;
}

.ovalo::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 110%;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/circulo.svg');
    mask-image: url('../img/circulo.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    margin-top: 3rem !important;
}

/* Bloque Efecto Papel Torn */
.papel {
    position: relative;
    color: var(--color-brillo);
    padding: 2rem;
}

.papel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/papel.svg');
    mask-image: url('../img/papel.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.papel > * {
    position: relative;
    z-index: 1;
}

.papel .cinta-wrap h1, 
.papel .cinta-wrap h2, 
.papel .cinta-wrap h3, 
.papel .cinta-wrap h4,
.papel .cinta-wrap span {
    background-color: var(--color-brillo) !important;
    color: var(--color-base) !important;
}

/* Bloques de Servicio / Cubos */
.cubo-servicio {
    position: relative;
    color: var(--color-brillo);
    padding: 2rem;
}

.cubo-servicio::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/cubo-servicio.svg');
    mask-image: url('../img/cubo-servicio.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.cubo-servicio > * {
    position: relative;
    z-index: 1;
}

.tarjeta-servicio {
    min-height: 320px;
}

.cinta-wrap {
    display: block;
    position: relative;
}

.cinta-wrap h1,
.cinta-wrap h2,
.cinta-wrap h3,
.cinta-wrap h4,
.cinta-wrap span {
    display: inline;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/cinta.svg');
    mask-image: url('../img/cinta.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    color: var(--color-base);
    padding: 0.15em 0.4em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Bloque Poster de Cierre */
.poster {
    position: relative;
    color: var(--color-brillo);
    padding: 5rem;
}

.poster::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/poster.svg');
    mask-image: url('../img/poster.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.poster > * {
    position: relative;
    z-index: 1;
}

/* Botones con Máscara */
.boton-agenda {
    position: relative;
    color: var(--color-brillo);
    margin: 1rem 2rem;
    text-decoration: none;
    padding-left: 1.4rem;
    font-size: 1.5rem !important;
    padding-top: 0.7rem !important;
    font-family: var(--font-cabecera) !important;
}

.boton-agenda::before {
    content: '';
    position: absolute;
    inset: 0;
    height: 60px;
    width: 90%;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/boton2.svg');
    mask-image: url('../img/boton2.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.boton-agenda > * {
    position: relative;
    z-index: 1;
}

.boton-form {
    position: relative;
    color: var(--color-brillo);
    margin: 1rem 2rem;
    text-decoration: none;
    padding-left: 1.4rem;
    font-family: var(--font-cabecera) !important;
    font-size: 1.5rem !important;
    padding-top: 0.9rem !important;
}

.boton-form::before {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-0.1rem); 
    height: 65px;
    width: 100%;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/boton1.svg');
    mask-image: url('../img/boton1.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.boton-form > * {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   4. CONTROL DE IMÁGENES, ELEMENTOS VECTORIALES E ICONOS
   ========================================================================== */
.tip {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    padding: 0.5rem 1rem; 
    flex-shrink: 0;
    position: relative;
    align-content: flex-start;
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/tip.svg');
    mask-image: url('../img/tip.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.tipcircle {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.5rem 1rem; 
    flex-shrink: 0;
    transform: translateY(0.4rem); 
    background-color: var(--color-brillo);
    -webkit-mask-image: url('../img/tipcircle.svg');
    mask-image: url('../img/tipcircle.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.numero {
    max-height: 2rem;
    align-content: flex-start;
    display: flex;
    margin-right: 1rem;
}

.ilustracion-claridad {
    max-width: 420px;
    width: 100%;
    height: auto;
}

.grafico-secuencia {
    max-width: 1000px;
    width: 100%;
    height: auto;
}

.tarjeta-atributos {
    max-width: 360px;
    width: 100%;
    height: auto;
}

.ilustracion-servicio {
    max-height: 110px;
}

.papel-rendimiento {
    max-width: 540px;
    width: 100%;
}

.img-canales-boceto {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
}

.img-enredo-centrada {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.img-rendimiento-boceto {
    max-width: 140px;
    height: auto;
}

.img-impresora-boceto {
    max-width: 100%;
    max-height: 220px;
    height: auto;
}

.img-poste-estructura {
    max-width: 100%;
    max-height: 480px;
    height: auto;
    object-fit: contain;
}

.img-flujo-linea {
    max-width: 100%;
    max-height: 160px;
    height: auto;
}

.img-cartel-ingenio {
    max-width: 100%;
    max-height: 150px;
    height: auto;
}

.img-esquema-ruido-final {
    max-width: 100%;
    max-height: 240px;
    height: auto;
}

.imagen-flotante {
    display: block;
    transform: translateY(140px); 
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   5. NAVEGACIÓN, DROPDOWNS Y ENGINE DE TEMAS
   ========================================================================== */
.navbar-custom {
    border-bottom: 1px solid var(--color-brillo);
    background-color: var(--color-base);
    transition: background-color var(--trans), border-color var(--trans);
}

.dropdown-toggle::after { display: none !important; }

.theme-toggle-btn {
    background: none; border: none; width: 45px; height: 45px; cursor: pointer; padding: 0;
}

.theme-grid-menu {
    background-color: var(--color-base) !important;
    border: 2px solid var(--color-brillo) !important;
    min-width: auto !important;
}

.theme-option {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
}

.theme-option:hover, .theme-option:focus, .theme-option:active {
    background: none !important;
    background-color: transparent !important;
}

.theme-option .swatch { 
    width: 40px; height: 40px; display: flex; align-items: center; 
    justify-content: center; cursor: pointer; transition: transform 0.2s; 
    background-color: var(--color-opcion-base);
    border: 2px solid var(--color-opcion-brillo);
}

.theme-option:hover .swatch { transform: scale(1.1); }

/* Control de pintado inyectado de SVGs generales */
svg path, svg rect, svg circle, svg ellipse, svg line, svg polyline, svg polygon {
    fill: var(--color-brillo);
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* Rostro del menú selector mantiene su propia lógica de color */
.theme-option .swatch svg path {
    fill: var(--color-opcion-brillo) !important;
}

/* ==========================================================================
   6. GRILLAS AD-HOC (Módulo La Mística)
   ========================================================================== */
.mistica-grid-superior {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.section-hero {
    background-color: var(--color-base);
    padding-left: 4.5rem;
    padding-right: 0;
    transition: background-color var(--trans);
}

.avatar-sketch {
    max-height: 85vh;
    width: auto;
    object-fit: contain;
    margin-right: -2rem;
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES (Ajustes de Pantalla Celular y Tablet)
   ========================================================================== */
@media (min-width: 768px) {
    .mistica-grid-superior {
        grid-template-columns: 5fr 4fr 3fr; 
        align-items: center;
    }
}

@media (max-width: 767.98px) {
    .section-hero {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .frase-marcador {
        white-space: normal; 
        font-size: 1.6rem;
    }

    .frase-manuscrita {
        font-size: 1.1rem;
    }
    
    .avatar-sketch {
        max-height: 45vh; 
        margin-right: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 991.98px) {
    div[style*="margin-top: -180px"] {
        margin-top: 0 !important;
    }
    
}
/* ==========================================================================
   ANIMACIONES DE MOVIMIENTO FÍSICO (REGLA DE ORO: COLOR 100% SÓLIDO)
   ========================================================================== */

/* 1. Movimiento asimétrico para tus cubos de servicio */
.cubo-servicio {
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* Los impares rotan a la izquierda y saltan */
.cubo-servicio:hover {
    transform: translateY(-6px) rotate(-1.5deg);
}

/* Los pares rotan a la derecha y saltan (rompe la simetría perfecta) */
.col:nth-child(even) .cubo-servicio:hover {
    transform: translateY(-6px) rotate(1.5deg);
}

/* El número de adentro acompaña el movimiento agrandándose un poco */
.cubo-servicio .numero {
    transition: transform 0.2s ease;
}
.cubo-servicio:hover .numero {
    transform: scale(1.15) rotate(-6deg);
}

/* 2. Motor de entrada por Scroll (Empuje en el espacio sin tocar opacidades) */
.animar-scroll {
    transform: translateY(40px) scale(0.99);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

/* Cuando entra en la pantalla, se calza en su posición real */
.animar-scroll.activo {
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   BOTONES DE GUERRILLA CON MÁSCARA (CORRECCIÓN DEFINITIVA TEXTO VIVO)
   ========================================================================== */
.btn-guerrilla {
    position: relative;
    display: inline-block;
    background: none !important; /* Quitamos el fondo directo para que no tape nada */
    border: none;
    padding: 0.6rem 2rem;
    font-family: var(--font-cabecera) !important;
    font-size: 1.25rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    color: var(--color-brillo) !important; /* El texto queda del color del fondo oscuro */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

/* La máscara de tiza va aquí separada, para que no destruya el texto */
.btn-guerrilla::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-brillo) !important; /* Brillo puro en el botón */
    z-index: -1; /* Se va al fondo */

    /* Tu máscara original boton.svg */
    -webkit-mask-image: url('../img/boton.svg');
    mask-image: url('../img/boton.svg');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Al pasar el mouse, solo físicas de movimiento rústico */
.btn-guerrilla:hover {
    transform: translateY(-3px) scale(1.04) rotate(-1deg);
    color: var(--color-brillo) !important;
}

/* Ajuste duro para que el <button> de los formularios no herede porquerías */
button.btn-guerrilla {
    width: auto;
    border: none;
    outline: none;
}

.boton-agenda:hover {
    transform: translateY(-3px) scale(1.04) rotate(-1deg);
    color: var(--color-brillo) !important;
}
.boton-form:hover {
    transform: translateY(-3px) scale(1.04) rotate(-1deg);
    color: var(--color-brillo) !important;
}

/* Banner de Cookies Rústico */
.cookie-banner-custom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 850px;
    background-color: var(--color-base, #111111);
    border: 2px solid var(--color-brillo, #ff0055);
    padding: 15px 25px;
    z-index: 99999;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.7);
    border-radius: 4px;
}

/* Ajuste rápido por si el botón necesita contraste */
.cookie-banner-custom button {
    background-color: var(--color-base, #ff0055);
    color: var(--color-brillo, #111111);
    border: none;
    font-weight: bold;
    transition: transform 0.2s ease;
}
.cookie-banner-custom button:hover {
    transform: scale(1.05);
}