/* =========================================================
   WAVTEC CHILE — style.css
   Paleta: Azul Marinho (#0039A6) · Vermelho (#D52B1E) · Branco
   ========================================================= */

/* ─── VARIABLES ─── */
:root {
    --blue:        #0039A6;
    --blue-dark:   #002880;
    --blue-light:  #1a4db8;
    --red:         #D52B1E;
    --red-bright:  #FF3B2D;
    --white:       #FFFFFF;
    --off-white:   #F8F9FA;
    --gray-light:  #E8ECF0;
    --gray-mid:    #8A96A3;
    --dark:        #1A1A1A;
    --dark-bg:     #060d1f;
    --card-bg:     #0b1529;

    --font-main:  'Outfit', sans-serif;
    --font-code:  'Space Mono', monospace;
    --section-pad: 6rem 10%;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ─── NAV ─── */
nav {
    position: fixed; top: 0; width: 100%;
    padding: 0.6rem 10%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 2000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 2px 16px rgba(0,57,166,0.10);
    transition: all 0.3s;
}
nav.solid { box-shadow: 0 3px 24px rgba(0,57,166,0.18); }

.nav-logo img { height: 100px; transition: transform 0.3s; }
.nav-logo:hover img { transform: scale(1.05); }

.nav-links { display: flex; list-style: none; gap: 2.5rem; align-items: center; }
.nav-links a {
    color: var(--dark); text-decoration: none;
    font-size: 0.9rem; font-weight: 600;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

.nav-cta {
    background: var(--red); color: var(--white);
    padding: 0.75rem 1.6rem; border-radius: 8px;
    text-decoration: none; font-weight: 800;
    font-size: 0.88rem; text-transform: uppercase;
    letter-spacing: 0.5px; transition: 0.3s;
}
.nav-cta:hover {
    background: var(--red-bright);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(213,43,30,0.35);
}

.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 2001; }
.menu-toggle span { width: 28px; height: 2px; background: var(--dark); transition: 0.3s; }

/* ─── HERO ─── */
.hero {
    padding: 160px 10% 6rem;
    min-height: 100vh;
    display: flex; align-items: center; gap: 3rem;
    background: var(--dark-bg);
    position: relative; overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,57,166,0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,57,166,0.12) 1px, transparent 1px);
    background-size: 64px 64px;
}

.hero::after {
    content: '';
    position: absolute;
    left: -80px; top: 50%;
    transform: translateY(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,57,166,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-visual {
    width: 46%; z-index: 1; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.hero-visual img {
    width: 100%; max-width: 480px;
    height: auto;
    filter: drop-shadow(0 0 45px rgba(0,86,251,0.45))
            drop-shadow(0 0 90px rgba(213,43,30,0.2));
}

.hero-content { width: 54%; z-index: 2; }

.hero-tag {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.82rem;
    color: var(--red);
    background: rgba(213,43,30,0.12);
    border: 1px solid rgba(213,43,30,0.3);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.4rem; font-weight: 900;
    line-height: 1.05; color: var(--white);
    margin-bottom: 1.6rem;
}
.hero-title em {
    font-family: var(--font-code);
    font-style: italic; font-weight: 300;
    color: var(--red);
}

.hero-sub {
    font-size: 1.2rem; color: rgba(255,255,255,0.65);
    font-weight: 300; line-height: 1.7;
    max-width: 560px; margin-bottom: 2.8rem;
    border-left: 3px solid var(--blue);
    padding-left: 1.4rem;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-block;
    background: var(--red); color: var(--white);
    padding: 1.1rem 2.6rem;
    border-radius: 8px; text-decoration: none;
    font-weight: 800; font-size: 1rem;
    text-transform: uppercase; letter-spacing: 1px;
    transition: 0.3s;
}
.btn-primary:hover {
    background: var(--red-bright);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(213,43,30,0.4);
}

.btn-ghost {
    display: inline-block;
    background: transparent;
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 1.1rem 2.4rem;
    border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 1rem;
    transition: 0.3s;
}
.btn-ghost:hover {
    border-color: var(--blue);
    color: var(--white);
    background: rgba(0,57,166,0.2);
}

/* ─── CLIENTS ─── */
.clients-section {
    padding: 5.5rem 10%;
    background: #0b1834;
    position: relative; overflow: hidden;
    border-top: 4px solid var(--red);
}
.clients-section::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,57,166,0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,57,166,0.15) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.clients-label {
    text-align: center; margin-bottom: 3.5rem;
    position: relative;
}
.clients-label p {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.clients-label h2 {
    font-size: 2.6rem; font-weight: 900; color: var(--white);
}
.clients-label h2 span { color: var(--red); }
.clients-label h2 em { color: rgba(255,255,255,0.55); font-style: italic; font-weight: 300; }

/* Marquee infinito */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
    gap: 5rem;
    align-items: center;
}
.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.client-item img {
    max-height: 48px;
    filter: grayscale(100%) brightness(10) opacity(0.35);
    transition: all 0.4s;
    flex-shrink: 0;
}
.client-item:hover img {
    filter: grayscale(0%) brightness(1) opacity(1);
    transform: scale(1.1);
}

/* ─── ABOUT ─── */
.about {
    display: flex; gap: 7rem; align-items: center;
    padding: var(--section-pad);
    background: linear-gradient(135deg, #0039A6 0%, #002478 60%, #001a5c 100%);
    position: relative; overflow: hidden;
}
.about::after {
    content: '';
    position: absolute; right: -120px; bottom: -120px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(213,43,30,0.2) 0%, transparent 70%);
    pointer-events: none;
}
.about-sidebar { width: 38%; position: relative; z-index: 1; }
.about-sidebar h2 { font-size: 3.2rem; font-weight: 900; line-height: 1.2; color: var(--white); }
.about-sidebar h2 em { color: var(--red); font-style: italic; }

.founder-tag {
    margin-top: 3rem;
    border-left: 4px solid var(--red);
    padding-left: 1.4rem;
}
.ft-label {
    font-family: var(--font-code);
    color: var(--red); font-size: 0.8rem;
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 2px; margin-bottom: 6px;
}
.ft-name { font-size: 1.4rem; font-weight: 700; color: var(--white); }
.ft-desc { color: rgba(255,255,255,0.6); font-size: 0.95rem; }

.about-body { width: 62%; font-size: 1.15rem; color: rgba(255,255,255,0.75); line-height: 1.85; display: flex; flex-direction: column; gap: 1.4rem; position: relative; z-index: 1; }
.about-body strong { color: var(--white); font-weight: 700; }

/* ─── SERVICES ─── */
.services {
    padding: var(--section-pad);
    background: #08112a;
    position: relative; overflow: hidden;
}
.services::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(0,57,166,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,57,166,0.1) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}
.services-header { text-align: center; margin-bottom: 4rem; position: relative; }
.services-header h2 { font-size: 3rem; font-weight: 900; color: var(--white); }
.services-header h2 em { color: var(--red); font-style: normal; }
.services-header p { color: rgba(255,255,255,0.5); margin-top: 0.8rem; font-size: 1.1rem; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.svc-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(8px);
    padding: 2rem 1.6rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative; overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.svc-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--red));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.35s ease;
}
.svc-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0,57,166,0.4);
    background: rgba(255,255,255,0.10);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.svc-card:hover::before { transform: scaleX(1); }

.svc-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(0,57,166,0.4), rgba(213,43,30,0.3));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.svc-card h3 { font-size: 1.5rem; font-weight: 800; color: var(--white); margin-bottom: 1.2rem; }
.svc-card ul { list-style: none; }
.svc-card li {
    position: relative; padding-left: 1.8rem;
    margin-bottom: 0.9rem; color: rgba(255,255,255,0.6); font-size: 0.98rem;
}
.svc-card li::before {
    content: '→';
    position: absolute; left: 0;
    color: var(--red); font-weight: 900;
    font-family: var(--font-code);
}

/* ─── ¿POR QUÉ CHILE? ─── */
.porque-chile {
    position: relative;
    padding: 8rem 10%;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 85vh;
}
.porque-chile::before {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg,
            rgba(0,20,80,0.92) 0%,
            rgba(0,20,80,0.75) 55%,
            rgba(0,20,80,0.50) 100%),
        url('images/andes_bg.png') center center / cover no-repeat;
    z-index: 0;
}
.porque-chile::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--red), transparent);
}
.porque-content {
    position: relative; z-index: 1;
    max-width: 620px;
}
.porque-tag {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(213,43,30,0.5);
    padding-bottom: 0.5rem;
}
.porque-title {
    font-size: 3.8rem; font-weight: 900;
    color: var(--white); line-height: 1.1;
    margin-bottom: 1.5rem;
}
.porque-title span { color: var(--red); }
.porque-desc {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 3rem;
    border-left: 3px solid var(--red);
    padding-left: 1.2rem;
}

/* Stats grid */
.porque-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.4rem;
    margin-bottom: 3rem;
    width: 100%;
}
.stat-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2.2rem 1.6rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stat-card:hover {
    background: rgba(213,43,30,0.15);
    border-color: rgba(213,43,30,0.4);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(213,43,30,0.2);
}
.stat-number {
    font-size: 3rem; font-weight: 900;
    color: var(--red); line-height: 1;
    margin-bottom: 0.7rem;
    font-family: var(--font-code);
}
.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    max-width: 120px;
}

/* ─── FINAL CTA ─── */
.final-cta {
    padding: 7rem 10%; text-align: center;
    background: var(--blue);
    position: relative; overflow: hidden;
}
.final-cta::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}
.final-cta h2 {
    font-size: 3rem; font-weight: 900;
    color: var(--white); margin-bottom: 1rem;
    position: relative;
}
.final-cta h2 span { color: var(--red); }
.final-cta p {
    color: rgba(255,255,255,0.7); font-size: 1.15rem;
    margin-bottom: 2.5rem; position: relative;
}

.btn-final {
    display: inline-block;
    background: var(--red); color: var(--white);
    padding: 1.4rem 4rem; border-radius: 10px;
    text-decoration: none; font-weight: 900;
    font-size: 1.1rem; text-transform: uppercase;
    letter-spacing: 2px; position: relative;
    transition: 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 8px 30px rgba(213,43,30,0.4);
}
.btn-final:hover {
    background: var(--red-bright);
    transform: scale(1.07);
    box-shadow: 0 14px 40px rgba(213,43,30,0.6);
}

/* ─── FOOTER ─── */
footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 2.5rem 10%;
    font-family: var(--font-code);
    font-size: 0.85rem;
    border-top: 4px solid var(--red);
}
footer strong { color: rgba(255,255,255,0.9); }

/* ─── REVEAL ANIMATION ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: all 0.75s cubic-bezier(0.5,0,0,1); }
.reveal.on { opacity: 1; transform: translateY(0); }

/* ─── MOBILE ─── */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        padding-top: 140px; gap: 2rem;
        text-align: center;
    }
    .hero-visual, .hero-content { width: 100%; }
    .hero-visual img { max-width: 340px; margin: 0 auto; display: block; }
    .hero-title { font-size: 2.8rem; }
    .hero-sub { border-left: none; padding-left: 0; margin: 0 auto 2.5rem; }
    .hero-btns { justify-content: center; }
    .about { flex-direction: column; gap: 3rem; }
    .about-sidebar, .about-body { width: 100%; }
    .about-sidebar { text-align: center; }
    .founder-tag { border-left: none; border-top: 4px solid var(--red); padding: 1.2rem 0 0; display: inline-block; }
    .services-grid { grid-template-columns: 1fr; }
    .svc-card { padding: 1.8rem 1.4rem; }
    .porque-title { font-size: 2.4rem; }
    .porque-stats { grid-template-columns: repeat(2, 1fr); }
    .porque-chile { min-height: auto; }
    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 72px; right: -100%;
        height: calc(100vh - 72px); width: 100%;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(15px);
        flex-direction: column; justify-content: center;
        gap: 2rem; transition: 0.4s ease-in-out;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.4rem; }
    .nav-cta { display: none; }
    .final-cta h2 { font-size: 2.2rem; }
}