/* ============================================
   SQ-3I - Diseño inspirado en Apple
   ============================================ */

:root {
    --color-bg: #ffffff;
    --color-bg-dark: #000000;
    --color-bg-soft: #fbfbfd;
    --color-bg-gray: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-muted: #6e6e73;
    --color-text-light: #86868b;
    --color-text-on-dark: #f5f5f7;
    --color-accent: #0066cc;
    --color-accent-hover: #0077ed;
    --color-brand-red: #d62828;
    --color-brand-blue: #1d4ed8;
    --color-brand-yellow: #f4b400;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-border-dark: rgba(255, 255, 255, 0.12);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;

    --max-width: 1200px;
    --nav-height: 60px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }

/* ============================================
   Tipografía
   ============================================ */

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.text-gradient {
    background: linear-gradient(135deg, #6e6e73 0%, #1d1d1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-muted { color: var(--color-text-muted); }

/* ============================================
   Navegación flotante superior
   ============================================ */

.nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition:
        top 0.5s var(--ease-out),
        opacity 0.5s var(--ease-out),
        transform 0.5s var(--ease-out);
    width: auto;
}

.nav-container {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
    border-radius: 999px;
    padding: 6px 14px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: all 0.4s var(--ease-out);
}

.nav.scrolled .nav-container {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.12);
}

.nav-menu {
    display: flex;
    gap: 4px;
    list-style: none;
    align-items: center;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    opacity: 0.7;
    padding: 8px 14px;
    border-radius: 999px;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
}

.nav-menu a:hover { opacity: 1; }

.nav-menu a.active {
    opacity: 1;
    background: var(--color-text);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-left: -4px;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--color-text);
    transition: transform 0.3s var(--ease-smooth), opacity 0.3s var(--ease-smooth);
    transform-origin: center;
}

/* Botón activo → ✕ */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================
   Botón de idioma dentro del menú
   ============================================ */

.nav-lang-item {
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.nav-lang-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: all 0.3s var(--ease-smooth);
    overflow: hidden;
}

.nav-lang-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.08);
}

.nav-lang-btn:active {
    transform: scale(0.95);
}

.lang-flag {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    transform-origin: center;
    transition: transform 0.4s var(--ease-out);
    /* Tipografía emoji nativa con buen fallback */
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.lang-flag.flip {
    animation: flagFlip 0.5s var(--ease-out);
}

@keyframes flagFlip {
    0% { transform: rotateY(0); opacity: 1; }
    50% { transform: rotateY(90deg); opacity: 0.3; }
    100% { transform: rotateY(0); opacity: 1; }
}

/* ============================================
   Hero
   ============================================ */

.hero {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 80px) 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    background: #0a0a0c;
    color: var(--color-text-on-dark);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 1;
    pointer-events: none;
    filter: saturate(1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.42) 100%),
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 80%);
}

.hero-content {
    max-width: 1000px;
    z-index: 3;
    position: relative;
}

.hero-visual { z-index: 2; }
.hero-scroll-indicator { z-index: 3; }

.hero-title {
    font-size: clamp(40px, 7.5vw, 88px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 24px;
}

.hero-brand {
    font-size: clamp(67px, 11.2vw, 154px);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    line-height: 0.9;
    margin: 0 auto 24px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 8px 40px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s var(--ease-out) both;
}

.hero-line-1 {
    display: block;
    color: #ffffff;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 4px 28px rgba(0, 0, 0, 0.55);
    animation: fadeInUp 1s var(--ease-out) 0.1s both;
}

.hero-line-2 {
    display: block;
    background: linear-gradient(135deg, #6ea8ff 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s var(--ease-out) 0.25s both;
}

.hero-subtitle {
    font-size: clamp(18px, 2.3vw, 26px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto 40px;
    max-width: 700px;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.5),
        0 2px 18px rgba(0, 0, 0, 0.55);
    animation: fadeInUp 1s var(--ease-out) 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s var(--ease-out) 0.55s both;
}

.btn-primary,
.btn-secondary {
    font-size: 17px;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 999px;
    transition: all 0.3s var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    padding: 14px 24px;
}

.btn-secondary:hover {
    color: var(--color-accent-hover);
    transform: translateX(4px);
}

.hero .btn-secondary {
    color: #6ea8ff;
}

.hero .btn-secondary:hover {
    color: #8fbeff;
}

.hero-visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.28;
    mix-blend-mode: screen;
    animation: float 12s ease-in-out infinite;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--color-brand-blue);
    top: -150px;
    left: -150px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--color-brand-red);
    bottom: -100px;
    right: -100px;
    animation-delay: -4s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: var(--color-brand-yellow);
    top: 50%;
    left: 60%;
    animation-delay: -8s;
    opacity: 0.12;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 1s var(--ease-out) 0.8s both;
}

.scroll-arrow {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(8px); }
}

/* ============================================
   Secciones genéricas
   ============================================ */

.section {
    padding: 120px 24px;
    position: relative;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin-bottom: 64px;
    max-width: 900px;
}

.reveal,
.reveal-scale {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-scale {
    transform: translateY(60px) scale(0.96);
}

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

/* Indicador de sección activa al cambiar */
.section {
    transition: opacity 0.5s var(--ease-out);
}

/* ============================================
   Sección Nosotros
   ============================================ */

.section-about { background: var(--color-bg); }

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 32px;
}

.about-card {
    padding: 40px 32px;
    background: var(--color-bg-gray);
    border-radius: 24px;
    transition: transform 0.4s var(--ease-out);
}

.about-card:hover { transform: translateY(-4px); }

.about-number {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--color-brand-blue) 0%, var(--color-brand-red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    line-height: 1;
}

.about-card p {
    font-size: 17px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ============================================
   Sección Servicios
   ============================================ */

.section-services { background: var(--color-bg-soft); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.service-card {
    background: white;
    padding: 48px 40px;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-brand-blue), var(--color-brand-red), var(--color-brand-yellow));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 64px;
    height: 64px;
    color: var(--color-brand-blue);
    margin-bottom: 24px;
}

.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

.service-card p {
    font-size: 17px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ============================================
   Productos - grid 2 columnas, 80% pantalla
   ============================================ */

.section-products {
    background: var(--color-bg);
    padding: 120px 0;
}

.products-container {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.product-card {
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
    position: relative;
}

.product-card.dark {
    background: linear-gradient(160deg, #1d1d1f 0%, #2c2c2e 100%);
    color: var(--color-text-on-dark);
}

.product-card.light {
    background: linear-gradient(160deg, #f5f5f7 0%, #fbfbfd 100%);
    color: var(--color-text);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.product-card .product-visual {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: hidden;
    position: relative;
}

.product-card .product-content {
    padding: 40px 48px 48px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.product-card.dark .product-eyebrow { color: var(--color-brand-yellow); }
.product-card.light .product-eyebrow { color: var(--color-brand-blue); }

.product-card h3 {
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.product-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.78;
    margin-bottom: 24px;
}

.product-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.product-features li {
    font-size: 15px;
    line-height: 1.5;
    padding-left: 22px;
    position: relative;
    opacity: 0.85;
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 12px;
    height: 2px;
    background: currentColor;
    opacity: 0.5;
}

/* Imagen única o slideshow del producto */
.product-slideshow,
.product-img {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.product-card:hover .product-slideshow,
.product-card:hover .product-img {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.product-img {
    object-fit: cover;
    display: block;
}

.product-slideshow .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1s var(--ease-out), transform 5s ease-out;
    will-change: opacity, transform;
}

.product-slideshow .slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

/* Mockups CSS legacy (mantengo por si se reutilizan) */
.product-mock {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 220px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s var(--ease-out);
}

.product-card:hover .product-mock {
    transform: scale(1.04);
}

.mock-crate {
    background:
        repeating-linear-gradient(90deg, #8b6f47 0px, #a0825a 4px, #8b6f47 8px, #6d563a 12px),
        #8b6f47;
    box-shadow:
        inset 0 0 0 6px #6d563a,
        inset 0 0 0 8px #4a3a28,
        0 20px 50px rgba(0,0,0,0.4);
    transform: perspective(800px) rotateY(-8deg) rotateX(4deg);
}

.mock-crate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.4) 32%);
    border: 3px solid rgba(0,0,0,0.5);
    border-radius: 4px;
}

.mock-crate::after {
    content: 'HT';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    color: rgba(0,0,0,0.6);
    font-size: 16px;
    letter-spacing: 0.1em;
}

.mock-foam {
    background: linear-gradient(135deg, #c9b896 0%, #a89a7e 100%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    transform: perspective(800px) rotateY(6deg);
}

.mock-foam::before {
    content: '';
    position: absolute;
    inset: 14px;
    background:
        repeating-linear-gradient(0deg, #ec7e9c 0 28px, #d96283 28px 30px),
        repeating-linear-gradient(90deg, #ec7e9c 0 36px, #d96283 36px 38px);
    border-radius: 8px;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.2);
}

.mock-metal {
    background: linear-gradient(135deg, #8a8a8e 0%, #c7c7cc 50%, #8a8a8e 100%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: perspective(800px) rotateY(-6deg);
    position: relative;
}

.mock-metal::before {
    content: '';
    position: absolute;
    inset: 20%;
    border: 4px solid #5a5a5e;
    background:
        linear-gradient(90deg, transparent 45%, #5a5a5e 45%, #5a5a5e 55%, transparent 55%),
        linear-gradient(0deg, transparent 45%, #5a5a5e 45%, #5a5a5e 55%, transparent 55%);
}

.mock-label {
    background:
        repeating-linear-gradient(90deg,
            #ffffff 0 16px,
            #1d1d1f 16px 18px,
            #ffffff 18px 22px,
            #1d1d1f 22px 24px,
            #ffffff 24px 36px,
            #1d1d1f 36px 37px),
        #ffffff;
    box-shadow:
        inset 0 0 0 2px #d1d1d6,
        0 20px 50px rgba(0,0,0,0.15);
    border-radius: 12px;
    transform: perspective(800px) rotateX(18deg);
    position: relative;
}

.mock-label::after {
    content: '';
    position: absolute;
    top: 60%;
    left: 10%;
    right: 10%;
    height: 30%;
    background: linear-gradient(180deg, transparent, rgba(0, 102, 204, 0.15));
    border-radius: 4px;
}

/* Maquinado — superficie de aluminio con ranura central */
.mock-mill {
    background: linear-gradient(135deg, #c7c7cc 0%, #e5e5ea 45%, #aeaeb2 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: perspective(800px) rotateY(-6deg) rotateX(4deg);
    position: relative;
}

.mock-mill::before {
    content: '';
    position: absolute;
    inset: 18% 16%;
    background:
        repeating-linear-gradient(90deg, transparent 0 20px, rgba(0, 0, 0, 0.18) 20px 22px),
        linear-gradient(180deg, #d1d1d6 0%, #98989d 100%);
    border-radius: 6px;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.25),
        inset 0 -2px 0 rgba(255, 255, 255, 0.5);
}

.mock-mill::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #2c2c2e 0%, #1d1d1f 28%, #5a5a5e 32%, transparent 60%);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.18);
}

/* Corte láser — superficie oscura con haz láser brillante */
.mock-laser {
    background: linear-gradient(135deg, #1a1a1c 0%, #2c2c2e 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    transform: perspective(800px) rotateX(16deg);
    position: relative;
    overflow: hidden;
}

.mock-laser::before {
    content: '';
    position: absolute;
    inset: 28% 12%;
    background:
        linear-gradient(135deg,
            transparent 42%,
            rgba(255, 107, 0, 0.85) 47%,
            rgba(255, 220, 100, 1) 50%,
            rgba(255, 107, 0, 0.85) 53%,
            transparent 58%);
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.7)) drop-shadow(0 0 24px rgba(255, 100, 0, 0.45));
    border-radius: 4px;
}

.mock-laser::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(255, 140, 0, 0.18) 0%, transparent 60%),
        repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.03) 14px 15px);
}

/* Router CNC — superficie de madera con trayectoria de fresa */
.mock-router {
    background:
        linear-gradient(110deg, #c9a36a 0%, #b88a52 50%, #8b6630 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    transform: perspective(800px) rotateY(6deg) rotateX(4deg);
    position: relative;
    overflow: hidden;
}

.mock-router::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(85deg, transparent 0 10px, rgba(0, 0, 0, 0.10) 10px 12px),
        repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, 0.12) 22px 23px);
}

.mock-router::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64%;
    height: 56%;
    border: 3px dashed rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(0, 0, 0, 0.15);
}

/* Cuando hay un número impar de productos, la última tarjeta ocupa el ancho completo */
.products-grid .product-card:last-child:nth-child(odd),
.product-card--wide:last-child {
    grid-column: 1 / -1;
}

.product-card--wide:last-child .product-visual {
    height: 360px;
}

/* ============================================
   Sectores
   ============================================ */

.section-sectors { background: var(--color-bg-soft); }

.section-sectors .container {
    max-width: 1380px;
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    margin-top: 32px;
}

.sector-card {
    padding: 52px 36px;
    min-height: 320px;
    background: white;
    border-radius: 26px;
    text-align: left;
    transition: all 0.4s var(--ease-out);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.sector-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.sector-icon {
    width: 76px;
    height: 76px;
    color: var(--color-brand-blue);
    margin-bottom: 28px;
    padding: 18px;
    background: rgba(29, 78, 216, 0.08);
    border-radius: 18px;
}

.sector-icon svg { width: 100%; height: 100%; }

.sector-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.sector-card p {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.55;
}

/* ============================================
   Cultura
   ============================================ */

.section-culture {
    background: linear-gradient(135deg, #1d1d1f 0%, #2c2c2e 100%);
    padding: 180px 24px;
    color: var(--color-text-on-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-culture::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(214, 40, 40, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.culture-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.culture-accent {
    background: linear-gradient(135deg, var(--color-brand-yellow) 0%, var(--color-brand-red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.culture-rest {
    color: var(--color-text-on-dark);
    opacity: 0.95;
}

/* ============================================
   Clientes
   ============================================ */

.section-clients {
    background: var(--color-bg);
    text-align: center;
}

.section-clients .section-title {
    margin-left: auto;
    margin-right: auto;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.client-logo {
    padding: 16px 14px;
    background: var(--color-bg-gray);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    transition: all 0.4s var(--ease-out);
    overflow: hidden;
}

.client-logo img {
    max-width: 100%;
    max-height: 108px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.4) opacity(0.85);
    transition: filter 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.client-logo:hover {
    transform: translateY(-4px);
    background: white;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.client-logo:hover img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.04);
}

/* ============================================
   Contacto
   ============================================ */

.section-contact { background: var(--color-bg-soft); }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 32px;
}

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

.contact-card {
    padding: 48px 40px;
    background: white;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    transition: all 0.4s var(--ease-out);
    text-decoration: none;
    color: inherit;
    display: block;
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent);
}

.contact-icon {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
    margin-bottom: 24px;
}

.contact-icon svg { width: 100%; height: 100%; }

.contact-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.contact-value {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.4;
}

/* ============================================
   Bloque de instalaciones (ubicación + slideshow)
   ============================================ */

.facility-block {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.04);
}

.facility-info {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.facility-info .contact-icon {
    color: var(--color-accent);
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
}

.facility-info .contact-label {
    margin-bottom: 12px;
}

.facility-title {
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--color-text);
}

.facility-address {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 20px;
}

.facility-copy {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.facility-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-accent);
    align-self: flex-start;
    transition: all 0.3s var(--ease-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.facility-link:hover {
    color: var(--color-accent-hover);
    transform: translateX(4px);
}

/* Slideshow */
.facility-slideshow {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    background: #0f0f10;
}

.facility-slideshow .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.1s var(--ease-out), transform 6s ease-out;
    will-change: opacity, transform;
}

.facility-slideshow .slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.facility-slideshow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
    z-index: 2;
}

.slideshow-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.slideshow-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--ease-smooth);
}

.slideshow-dots button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slideshow-dots button.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: 64px 24px 32px;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border-dark);
}

.footer-logo {
    height: 144px;
    width: auto;
    display: block;
    border-radius: 10px;
}

.footer-tagline {
    font-size: 16px;
    color: var(--color-text-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    font-size: 14px;
    color: var(--color-text-light);
}

/* ============================================
   Animaciones
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación de "sobresaltado" al cambiar de sección */
@keyframes navPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.nav-menu a.active.pulse {
    animation: navPulse 0.5s var(--ease-out);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 968px) {
    .nav { top: 12px; }

    .nav-container { padding: 6px 14px; gap: 12px; }

    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: none;
    }

    .nav-lang-item {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }

    .section {
        padding: 80px 24px;
    }

    .about-grid,
    .services-grid,
    .contact-grid,
    .contact-grid--two,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .facility-block {
        grid-template-columns: 1fr;
    }

    .facility-info {
        padding: 40px 28px;
    }

    .facility-slideshow {
        min-height: 280px;
        aspect-ratio: 4/3;
    }

    .sectors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .products-container { width: 90%; }

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

    .client-logo { min-height: 110px; padding: 14px 12px; }
    .client-logo img { max-height: 86px; }

    .product-card .product-content { padding: 32px 28px 36px; }
    .product-card .product-visual { height: 220px; padding: 28px; }

    .section-culture { padding: 100px 24px; }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 1200px) and (min-width: 969px) {
    .sectors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .hero { padding: calc(var(--nav-height) + 60px) 20px 60px; }
    .sectors-grid { grid-template-columns: 1fr; }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin: 0 auto;
    }

    .btn-primary,
    .btn-secondary { justify-content: center; }

    .section-title { margin-bottom: 40px; }

    .about-number { font-size: 48px; }

    .products-container { width: 92%; }
}
