:root {
    --navy: #0B3C5D;
    --navy-dark: #082C45;
    --aqua: #12A4C9;
    --aqua-dark: #0B7FA0;
    --sky: #EAF6FB;
    --bg: #F6FAFC;
    --text: #1E2B37;
    --muted: #5B6B7A;
    --line: #DCE7EE;
    --wa: #168A47;
    --wa-dark: #117239;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(11, 60, 93, .08);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

.container { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
section { padding: 5rem 0; }

/* Íconos */
.icon {
    width: 1.25em; height: 1.25em; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .9rem 1.6rem; border-radius: 10px; font: inherit; font-weight: 600;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
    transition: background .2s, border-color .2s;
}
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-light:hover { background: rgba(255, 255, 255, .12); }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--aqua-dark); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: .5rem; cursor: pointer; }
.menu-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* Hero */
.hero {
    padding: 5.5rem 0 5rem;
    color: #fff;
    background:
        linear-gradient(105deg, rgba(8, 44, 69, .94) 0%, rgba(8, 44, 69, .78) 50%, rgba(8, 44, 69, .4) 100%),
        url('/assets/imagenes/joe-ciciarelli-08AJKJf75kw-unsplash.jpg') center / cover no-repeat;
}
.hero-inner { max-width: 640px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--aqua-dark); }
.hero .eyebrow { color: #7FD6EC; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; font-weight: 700; margin-bottom: 1.1rem; }
.hero p { font-size: 1.1rem; color: #DCEBF3; margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Confianza */
.trust { background: #fff; border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.trust-list { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; list-style: none; }
.trust-list li { display: flex; align-items: center; gap: .6rem; font-weight: 500; font-size: .95rem; color: var(--navy); }
.trust-list .icon { color: var(--aqua-dark); }

/* Encabezados de sección */
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); line-height: 1.2; color: var(--navy); margin: .4rem 0 .8rem; font-weight: 700; }
.section-head p { color: var(--muted); }

/* Tarjetas */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--sky); color: var(--aqua-dark); display: grid; place-items: center; margin-bottom: 1.1rem; }
.card-icon .icon { width: 24px; height: 24px; }
.card h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; }

/* Quiénes somos + galería */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.about h2.left { margin-top: .5rem; }
.about p { color: var(--muted); margin-bottom: 1rem; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.gallery figure { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--sky); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: .8rem; bottom: .8rem; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 600; padding: .3rem .75rem; border-radius: 999px; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.step { text-align: center; }
.step-num { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 1.25rem; display: grid; place-items: center; margin: 0 auto 1rem; }
.step h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* Zonas */
.zones { background: var(--sky); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; max-width: 760px; margin: 0 auto; list-style: none; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-size: .92rem; font-weight: 500; color: var(--navy); }

/* Contacto */
.contact { background: var(--navy); color: #fff; }
.contact .eyebrow { color: #7FD6EC; }
.contact h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-info p { color: #C9DCE8; margin-bottom: 1.5rem; }
.contact-actions { display: flex; flex-direction: column; gap: .9rem; max-width: 320px; }

.form-card { background: #fff; color: var(--text); border-radius: var(--radius); padding: 2rem; }
.form-card h3 { color: var(--navy); margin-bottom: 1.25rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
.field input, .field select, .field textarea {
    width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line);
    border-radius: 10px; font: inherit; background: #fff; color: var(--text);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(18, 164, 201, .2);
}
.form-note { font-size: .8rem; color: var(--muted); margin-top: .75rem; text-align: center; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #9FB6C6; padding: 1.75rem 0; font-size: .88rem; text-align: center; }

/* Flotantes */
.wa-float {
    position: fixed; right: 24px; bottom: 24px; z-index: 90;
    width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff;
    display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.wa-float .icon { width: 32px; height: 32px; }
.mobile-bar { display: none; }

/* Responsive */
@media (max-width: 768px) {
    section { padding: 3.5rem 0; }
    body { padding-bottom: 56px; }

    .menu-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; padding: .5rem 1.25rem 1.25rem; border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .nav-links li a:not(.btn) { display: block; padding: .85rem 0; }
    .nav-links li:last-child { padding-top: .5rem; }

    .hero { padding: 3.5rem 0; }
    .hero-cta .btn { width: 100%; }
    .trust-list { justify-content: flex-start; }

    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .gallery { grid-template-columns: 1fr; }

    .wa-float { display: none; }
    .mobile-bar {
        display: grid; grid-template-columns: 1fr 1fr;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, .15);
    }
    .mobile-bar a {
        display: flex; align-items: center; justify-content: center; gap: .5rem;
        padding: .95rem; font-weight: 600; color: #fff; text-decoration: none;
    }
    .mobile-bar .mb-wa { background: var(--wa); }
    .mobile-bar .mb-call { background: var(--navy); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* ==========================================================
   ANIMACIONES Y EFECTOS
   ========================================================== */

/* --- Entrada del hero (al cargar la página) --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}
.hero-inner > * { animation: fadeUp .8s ease both; }
.hero-inner > :nth-child(1) { animation-delay: .05s; }
.hero-inner > :nth-child(2) { animation-delay: .15s; }
.hero-inner > :nth-child(3) { animation-delay: .3s; }
.hero-inner > :nth-child(4) { animation-delay: .45s; }

/* --- Aparición al hacer scroll --- */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
    transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* --- Header: sombra al scrollear --- */
.site-header { transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(11, 60, 93, .12); }

/* --- Links del menú: subrayado animado --- */
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after {
    content: '';
    position: absolute; left: 0; bottom: -4px;
    width: 100%; height: 2px;
    background: var(--aqua);
    transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

/* --- Botones --- */
.btn { transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .22); }
.btn:active { transform: translateY(-1px); }

/* --- Tarjetas de servicios --- */
.card {
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 38px rgba(11, 60, 93, .16);
    border-color: var(--aqua);
}
.card-icon { transition: background .3s ease, color .3s ease, transform .3s ease; }
.card:hover .card-icon {
    background: var(--aqua);
    color: #fff;
    transform: scale(1.1) rotate(-6deg);
}

/* --- Fotos: zoom suave --- */
.about-img { overflow: hidden; border-radius: var(--radius); }
.about-img img,
.gallery img { transition: transform .6s ease; }
.about-img:hover img { transform: scale(1.05); }
.gallery figure { box-shadow: var(--shadow); transition: box-shadow .3s ease; }
.gallery figure:hover { box-shadow: 0 16px 34px rgba(11, 60, 93, .22); }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption { transition: transform .3s ease, background .3s ease; }
.gallery figure:hover figcaption { transform: translateY(-4px); background: var(--aqua-dark); }

/* --- Proceso y zonas --- */
.step-num { transition: transform .3s ease, background .3s ease; }
.step:hover .step-num { transform: scale(1.12); background: var(--aqua); }
.chip { transition: background .25s ease, color .25s ease, transform .25s ease, border-color .25s ease; }
.chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-3px); }

/* --- Formulario: foco más marcado --- */
.field input, .field select, .field textarea { transition: border-color .2s, box-shadow .2s; }

/* ==========================================================
   WHATSAPP LLAMATIVO
   ========================================================== */

/* Botones verdes grandes: pulso de halo */
@keyframes waPulse {
    0%   { box-shadow: 0 0 0 0 rgba(22, 138, 71, .6); }
    70%  { box-shadow: 0 0 0 18px rgba(22, 138, 71, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 138, 71, 0); }
}
.hero .btn-wa,
.contact-info .btn-wa { animation: waPulse 2s infinite; }
.hero .btn-wa:hover,
.contact-info .btn-wa:hover { animation: none; }

/* Botón flotante (escritorio): anillos que se expanden + ícono que se sacude */
@keyframes waRing {
    0%   { transform: scale(1);   opacity: .6; }
    80%  { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}
.wa-float { transition: transform .25s ease; }
.wa-float:hover { transform: scale(1.1); }
.wa-float::before,
.wa-float::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    background: var(--wa);
    z-index: -1;
    animation: waRing 2.2s ease-out infinite;
}
.wa-float::after { animation-delay: 1.1s; }

@keyframes waWiggle {
    0%, 70%, 100% { transform: rotate(0); }
    74% { transform: rotate(-14deg); }
    78% { transform: rotate(12deg); }
    82% { transform: rotate(-10deg); }
    86% { transform: rotate(8deg); }
    90% { transform: rotate(0); }
}
.wa-float .icon { animation: waWiggle 4s ease-in-out infinite; }

/* Barra inferior en celular: el botón verde "respira" */
@keyframes waBlink {
    0%, 100% { background: var(--wa); }
    50%      { background: #20B65D; }
}
.mobile-bar .mb-wa { animation: waBlink 1.6s ease-in-out infinite; }
.mobile-bar .mb-wa .icon { animation: waWiggle 4s ease-in-out infinite; }

/* ==========================================================
   ACCESIBILIDAD: sin animaciones si el usuario las desactivó
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}