/* =====================================================
   GURÚ ROJO | Tipografía Oficial BR Candor
   ===================================================== */

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Thin-BF65519844332d9.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-ThinItalic-BF6551984411c9e.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-ExtraLight-BF6551984402a12.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-ExtraLightItalic-BF6551984423a26.otf') format('opentype');
    font-weight: 200;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Light-BF6551984540128.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-LightItalic-BF6551984403a7c.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Regular-BF65519844306f6.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-RegularItalic-BF6551984425e5f.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Medium-BF655198440bb69.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-MediumItalic-BF65519844162a5.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-SemiBold-BF655198444222b.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-SemiBoldItalic-BF65519845dc383.otf') format('opentype');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Bold-BF6551984434a53.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-BoldItalic-BF65519844306fa.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-Black-BF655198441e922.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BR Candor';
    src: url('../fonts/BRCandor-BlackItalic-BF655198454b95c.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* =====================================================
   GURÚ ROJO | Estilos Globales
   Proyecto: New Branding 2027
   ===================================================== */

:root {
    --font-brand: 'BR Candor', 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --brand-navy: #151D2E;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
select,
textarea {
    font-family: var(--font-brand) !important;
}

/* Tipografía Oficial del Logotipo GURÚ ROJO (Aislamiento de Identidad de Marca) */
.font-logo {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.025em;
}

/* Modern Web Guidance: Soporte nativo de esquema de color y Scrollbar Estándar */
:root {
    color-scheme: light;
    --scrollbar-thumb: #D04050;
    --scrollbar-track: #E2E8F0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:root.dark, .dark {
    color-scheme: dark;
    --scrollbar-track: #151D2E;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

:root.light, .light {
    color-scheme: light;
}

/* Fallback para navegadores antiguos sin soporte nativo de scrollbar-color */
@supports not (scrollbar-color: auto) {
    :root {
        scrollbar-width: auto;
    }
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #E2E8F0;
    }
    .dark ::-webkit-scrollbar-track {
        background: #151D2E;
    }
    ::-webkit-scrollbar-thumb {
        background: #D04050;
        border-radius: 4px;
    }
}

/* ANIMACIÓN DEL PRELOADER: Aparición secuencial de aristas del hexágono a velocidad fluida (2.4s) */
@keyframes facetFade {
    0% {
        opacity: 0.1;
        transform: scale(0.85);
    }

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

    70%,
    100% {
        opacity: 0.2;
        transform: scale(0.92);
    }
}

.facet-anim-0 {
    animation: facetFade 2.4s infinite ease-in-out 0.0s;
}

.facet-anim-1 {
    animation: facetFade 2.4s infinite ease-in-out 0.2s;
}

.facet-anim-2 {
    animation: facetFade 2.4s infinite ease-in-out 0.4s;
}

.facet-anim-3 {
    animation: facetFade 2.4s infinite ease-in-out 0.6s;
}

.facet-anim-4 {
    animation: facetFade 2.4s infinite ease-in-out 0.8s;
}

.facet-anim-5 {
    animation: facetFade 2.4s infinite ease-in-out 1.0s;
}

@keyframes pulseLogoText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.animate-pulse-slow {
    animation: pulseLogoText 5s infinite ease-in-out;
}

@keyframes progressBar {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

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

/* ==========================================================================
   EFECTOS 3D DINÁMICOS & AMBIENTALES (HERO CARDS & CTA GURÚ ROJO)
   ========================================================================== */

.hero-perspective-container {
    perspective: 1000px;
}

.hero-card-3d {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.hero-card-3d .hero-card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero-card-3d.is-tilting .hero-card-glare {
    opacity: 1;
}

/* En Desktop: Inclinación interactiva al mover el mouse */
@media (hover: hover) and (pointer: fine) {
    .hero-card-3d.is-tilting {
        transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale3d(1.05, 1.05, 1.05) translateZ(12px);
        box-shadow: 0 16px 32px -8px rgba(208, 64, 80, 0.22), 0 8px 16px -4px rgba(0, 0, 0, 0.12);
        border-color: rgba(208, 64, 80, 0.5) !important;
        z-index: 10;
    }
}

/* En Celulares & Tablets: Flotación 3D Ambiental Suave (Desfasada) */
@keyframes heroFloat1 {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-6px) rotateZ(0.5deg); }
}

@keyframes heroFloat2 {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-8px) rotateZ(-0.6deg); }
}

@keyframes heroFloat3 {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-5px) rotateZ(0.4deg); }
}

@keyframes heroFloat4 {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-7px) rotateZ(-0.5deg); }
}

.hero-card-float-1 {
    animation: heroFloat1 4.2s ease-in-out infinite;
}

.hero-card-float-2 {
    animation: heroFloat2 4.8s ease-in-out infinite 0.4s;
}

.hero-card-float-3 {
    animation: heroFloat3 4.5s ease-in-out infinite 0.8s;
}

.hero-card-float-4 {
    animation: heroFloat4 5.0s ease-in-out infinite 0.2s;
}

/* Pausar animación si el usuario está interactuando con mouse */
.hero-card-3d.is-tilting {
    animation-play-state: paused !important;
}

/* Efecto Shimmer dinámico para el botón principal CTA */
.btn-hero-3d {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-hero-3d::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
    transform: rotate(25deg);
    animation: btnShimmer 5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes btnShimmer {
    0%, 25% { left: -150%; }
    45%, 100% { left: 150%; }
}

/* ==========================================================================
   ANIMACIÓN DE ENTRADA & GRADIENTE VIVO PARA EL TITULAR HERO (H1)
   ========================================================================== */

@keyframes heroTextReveal {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

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

.hero-title-top {
    display: inline-block;
    opacity: 0;
    animation: heroTextReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    will-change: transform, opacity, filter;
}

.hero-title-gradient {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(135deg, #D04050 0%, #FF384D 25%, #F59E0B 50%, #FF7A00 75%, #D04050 100%);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroTextReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards, heroGradientFlow 6s ease-in-out infinite 1.15s;
    will-change: transform, opacity, background-position, filter;
    transition: transform 0.3s ease, filter 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .hero-title-gradient:hover {
        transform: scale(1.02);
        filter: drop-shadow(0 6px 20px rgba(245, 158, 11, 0.35));
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-title-top,
    .hero-title-gradient {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   SCROLL REVEAL & 3D CARD INTERACTIVITY GLOBAL (CERO IMPACTO SEO / 60 FPS)
   ========================================================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* Interactive 3D Cards */
.interactive-3d-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.4, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.interactive-3d-card .card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 5;
}

.interactive-3d-card.is-tilting .card-glare {
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    .interactive-3d-card.is-tilting {
        transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale3d(1.025, 1.025, 1.025) translateZ(8px);
        box-shadow: 0 16px 32px -10px rgba(21, 29, 46, 0.15), 0 0 20px -5px rgba(208, 64, 80, 0.15);
        border-color: rgba(208, 64, 80, 0.45) !important;
        z-index: 10;
    }
}

/* Micro-animación de pulso para inputs en focus */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(208, 64, 80, 0.18) !important;
    border-color: #D04050 !important;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .interactive-3d-card {
        transform: none !important;
        transition: none !important;
    }
}


