/* --- Animation Container Styles (Shared) --- */
.scene,
.problem-scene {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 600px;
    margin: 0 auto;
    /* Responsive Scaling */
    transform-origin: bottom center;
}

/* Scale down on smaller screens to fit Hero/Problem sections */
@media (max-width: 500px) {

    .scene,
    .problem-scene {
        transform: scale(0.55);
        transform-origin: top center;
    }
}

/* --- Tower Image Styles --- */
.tower {
    width: 100%;
    height: auto;
    position: absolute;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Canvas Styles --- */
/* Target both generic canvas inside scene and specific classes */
.scene canvas,
.problem-canvas,
canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    max-width: 100%;
    height: auto;
}

/* --- Subsoil Canvas Styles --- */
#subsoil,
#problem-subsoil {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 21%;
    z-index: 0;
}

/* --- Main Page Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,700;0,800;0,900;1,300;1,700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8fafc;
    scroll-behavior: smooth;
}

.hero-gradient {
    background: linear-gradient(to bottom, #003D5C, #002a40);
}


.tower-glow {
    filter: drop-shadow(0 0 15px rgba(184, 212, 227, 0.3));
}

.step-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-card:hover {
    transform: translateY(-12px);
    border-color: #FFD700;
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.1);
}

.particle-canvas {
    pointer-events: none;
}

/* Animación de flujo de refinería */
@keyframes refineryFlow {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(120px);
        opacity: 0;
    }
}

.flow-particle {
    animation: refineryFlow 2s infinite linear;
}

/* Animación de rotación suave */
@keyframes slowRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotate-slow {
    animation: slowRotate 15s infinite linear;
}

/* --- Scroll Reveal Animations --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 0.5, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Retrasos secuenciales para tarjetas */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* --- Technology Card Micro-interactions --- */
.tech-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(255, 215, 0, 0.15), 0 0 15px -2px rgba(184, 212, 227, 0.1);
    border-color: rgba(255, 215, 0, 0.3) !important;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Efecto de destello al pasar el ratón */
.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 215, 0, 0.05),
            transparent);
    transition: all 0.6s ease;
}

.tech-card:hover::before {
    left: 100%;
}

.tech-card i {
    transition: all 0.4s ease;
}

.tech-card:hover i {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}