/* =====================================================
   InduSEC Automatismos — Cinematic Design System
   Production-ready · GSAP-powered animations
===================================================== */

:root {
    /* Colores principales */
    --bg: #000000;
    --accent: #2997ff;
    --status: #10b981;
    --text-main: #f5f5f7;
    --text-dim: #86868b;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Fuentes */
    --font-body: 'Sora', sans-serif;
    --font-display: 'Barlow Condensed', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Espaciado */
    --container-max: 1280px;
    --section-padding: 10rem 0;
}

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

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
}

/* Scroll Progress Bar */
.scroll-bar, .scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--status));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 0.95rem;
    border: none;
}

.btn--primary {
    background: var(--accent);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(41, 151, 255, 0.3);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
}

.btn--outline:hover {
    background: var(--glass);
    border-color: var(--accent);
}

.btn--sm {
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
}

.btn--whatsapp {
    background: #25d366;
    color: white;
}

.btn--whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(0px);
}

.header--scrolled {
    padding: 0.8rem 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.logo__img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(41, 151, 255, 0.15));
}

.header--scrolled .logo__img {
    width: 40px;
    height: 40px;
}

.logo__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
    line-height: 1;
}

.logo__tagline {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* Hero Logo Badge */
.hero__logo-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(41, 151, 255, 0.3));
    opacity: 0.85;
    z-index: 2;
}

.nav {
    display: flex;
    gap: 2.5rem;
}

.nav__link {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link.active {
    color: var(--accent);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

.hamburger.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    border-left: 1px solid var(--glass-border);
}

.mobile-menu.is-open {
    right: 0;
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu__link {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-family: var(--font-display);
    transition: color 0.3s;
}

.mobile-menu__link:hover {
    color: var(--accent);
}

.mobile-menu__footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #000 0%, #050510 100%);
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 70% 30%, rgba(41, 151, 255, 0.08) 0%, transparent 50%);
    top: -25%;
    right: -25%;
    pointer-events: none;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--status);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.hero__label-dot {
    width: 8px;
    height: 8px;
    background: var(--status);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--status);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 0.95;
    font-weight: 800;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero__title span {
    display: block;
}

.hero__title-main {
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__title-accent {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.hero__desc {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 550px;
    margin-bottom: 3rem;
}

.hero__actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Section */
.section {
    padding: var(--section-padding);
}

/* First section on subpages (no page-hero) */
.section--first {
    padding-top: 160px;
}

.section-header {
    margin-bottom: 5rem;
    text-align: center;
}

.section-label {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-top: 1rem;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: var(--y, 0);
    left: var(--x, 0);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    border-color: rgba(41, 151, 255, 0.3);
    transform: translateY(-4px);
}

.service-card__icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

.service-card__desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.service-card__extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    border-top: 1px solid var(--glass-border);
    padding-top: 0;
}

.service-card.active .service-card__extra {
    max-height: 200px;
    opacity: 1;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.tech-spec {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--status);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(41, 151, 255, 0.1);
}

.product-card__img {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, rgba(41, 151, 255, 0.1) 0%, rgba(41, 151, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-card__img i {
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.product-card:hover .product-card__img i {
    opacity: 0.8;
    transform: scale(1.1);
}

.product-card__body {
    padding: 1.5rem;
}

.product-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.product-card__desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.product-card__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

.tag--blue {
    background: rgba(41, 151, 255, 0.2);
    color: var(--accent);
}

.tag--green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status);
}

.tag--orange {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.tag--steel {
    background: rgba(107, 130, 160, 0.2);
    color: var(--text-dim);
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(41, 151, 255, 0.1);
}

.project-card__img {
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
}

.project-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.project-card__overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    backdrop-filter: blur(8px);
}

.project-card__body {
    padding: 1.5rem;
}

.project-card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-card__desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.project-card__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
}

.spec-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
}

.project-card__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Stats Section */
.stats {
    background: #050505;
    padding: 8rem 0;
    border-top: 1px solid #111;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.stat-value sup {
    color: var(--accent);
    font-size: 1.5rem;
}

.stat-label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-top: 1rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #0a0a0a 0%, #000 100%);
    border-radius: 40px;
    padding: 6rem 4rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.cta-box h2 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.cta-box p {
    color: var(--text-dim);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Footer */
.footer {
    background: #000;
    padding: 5rem 0;
    border-top: 1px solid #111;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 300px;
}

.footer__social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.footer__heading {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer__link:hover {
    color: var(--accent);
}

.footer__link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid #111;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #444;
}

.footer__copy,
.footer__credit {
    margin: 0;
}

.footer__credit em {
    color: var(--text-dim);
}

/* Floating WhatsApp */
.float-wa {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
    animation: floatPulse 3s ease-in-out infinite;
}

@keyframes floatPulse {
    0%, 100% { box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 10px 35px rgba(37, 211, 102, 0.5); }
}

.float-wa:hover {
    transform: scale(1.1);
}

/* Back to Top */
.back-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-60 {
    margin-top: 4rem;
}

/* =====================================================
   Responsive
===================================================== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .hero__grid,
    .services-grid,
    .products-grid,
    .projects-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .header__cta {
        display: none;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section--first {
        padding-top: 130px;
    }
    
    .cta-box {
        padding: 4rem 2rem;
    }
    
    .footer__grid {
        grid-template-columns: 1fr;
    }
    
    .footer__bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero__logo-badge {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 768px) and (max-width: 991px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}