:root {
    --bg: #060b24;
    --bg-2: #0b1030;
    --surface: #111741;
    --surface-2: #161d4f;
    --cyan: #2ba9e0;
    --blue: #2b5ba8;
    --indigo: #252d6b;
    --text: #e8ecf8;
    --muted: #97a3cc;
    --border: rgba(43, 169, 224, 0.18);
    --gradient: linear-gradient(120deg, #2ba9e0 0%, #2b5ba8 55%, #252d6b 100%);
    --nav-h: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Sora', 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

::selection { background: var(--cyan); color: var(--bg); }

/* ---------- scroll progress ---------- */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: var(--gradient);
    z-index: 1001;
    transition: width .08s linear;
}

/* ---------- navbar ---------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.2rem, 5vw, 4rem);
    z-index: 1000;
    transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.scrolled {
    background: rgba(6, 11, 36, 0.82);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.nav-brand img { height: 44px; width: auto; filter: drop-shadow(0 0 12px rgba(43,169,224,.35)); }
.nav-brand span {
    font-weight: 700;
    font-size: 1.15rem;
    background: linear-gradient(90deg, #6fc9ef, #8aa2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    position: relative;
    transition: color .25s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--gradient);
    transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
    padding: .55rem 1.3rem;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(43, 91, 168, 0.5);
}
.nav-cta::after { display: none; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(43,169,224,.5); }
.burger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ---------- sections ---------- */
section { scroll-snap-align: start; scroll-margin-top: var(--nav-h); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 3rem); }
.section-tag {
    display: inline-block;
    font-size: .8rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cyan);
    border: 1px solid var(--border);
    padding: .35rem 1rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; line-height: 1.15; }
.section-title em {
    font-style: normal;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-sub { color: var(--muted); max-width: 620px; margin-top: .8rem; }

/* ---------- hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-h);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .5;
    animation: drift 14s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; background: #1c3d8f; top: -140px; left: -120px; }
.blob-2 { width: 420px; height: 420px; background: #124a75; bottom: -120px; right: -80px; animation-delay: -5s; }
.blob-3 { width: 300px; height: 300px; background: #252d6b; top: 40%; left: 55%; animation-delay: -9s; }
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 40px) scale(1.15); }
}
.grid-lines {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(43,169,224,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43,169,224,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}
.hero h1 {
    font-size: clamp(2.6rem, 7vw, 4.6rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .lema {
    margin-top: 1rem;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--cyan);
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hero p.desc { margin-top: 1.2rem; color: var(--muted); max-width: 520px; font-size: 1.05rem; }
.hero-actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s, background .25s;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 30px rgba(43, 91, 168, .55);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(43,169,224,.55); }
.btn-ghost {
    color: var(--text);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.02);
}
.btn-ghost:hover { border-color: var(--cyan); transform: translateY(-3px); }
.hero-logo-box { --logo-w: min(420px, 90%); display: flex; justify-content: center; position: relative; }
.hero-logo-box::before {
    content: '';
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(43,169,224,.28), transparent 65%);
    animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity:.8;} 50% { transform: scale(1.12); opacity:1;} }
.hero-logo {
    width: var(--logo-w);
    position: relative;
    filter: drop-shadow(0 20px 50px rgba(43, 91, 168, .55));
    animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-16px);} }
.scroll-hint {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    color: var(--muted); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
}
.mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--muted);
    border-radius: 14px;
    position: relative;
}
.mouse::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    border-radius: 4px;
    background: var(--cyan);
    animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1;} 70% { transform: translateY(12px); opacity: 0;} 100% { opacity: 0;} }

/* ---------- promociones / carrusel ---------- */
.promos { padding: 6.5rem 0; position: relative; background: var(--bg-2); }
.promos-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.carousel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    background: var(--surface);
}
.carousel-track { display: flex; transition: transform .65s cubic-bezier(.22,.8,.28,1); }
.slide {
    min-width: 100%;
    min-height: 420px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    position: relative;
}
.slide-content {
    padding: clamp(2rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.slide-badge {
    align-self: flex-start;
    font-size: .72rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fff;
    background: var(--gradient);
    padding: .35rem .9rem;
    border-radius: 999px;
    margin-bottom: 1.2rem;
}
.slide h3 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; font-weight: 700; }
.slide .slide-sub { color: var(--cyan); font-weight: 600; margin-top: .4rem; font-size: 1.05rem; }
.slide .slide-desc { color: var(--muted); margin: 1.1rem 0 1.8rem; max-width: 460px; }
.slide-media { position: relative; overflow: hidden; min-height: 260px; }
.slide-media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.slide-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--surface) 0%, transparent 45%);
}
.slide-media.placeholder {
    background:
        radial-gradient(circle at 70% 30%, rgba(43,169,224,.45), transparent 55%),
        radial-gradient(circle at 30% 80%, rgba(37,45,107,.9), transparent 60%),
        var(--gradient);
    display: flex; align-items: center; justify-content: center;
}
.slide-media.placeholder svg { width: 40%; opacity: .9; filter: drop-shadow(0 10px 30px rgba(0,0,0,.4)); }
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(6,11,36,.65);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 3;
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, transform .25s;
}
.carousel-btn:hover { background: var(--blue); transform: translateY(-50%) scale(1.08); }
.carousel-btn.prev { left: 1.1rem; }
.carousel-btn.next { right: 1.1rem; }
.carousel-dots {
    position: absolute;
    bottom: 1.2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: .55rem;
    z-index: 3;
}
.dot {
    width: 10px; height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    transition: width .3s, background .3s;
}
.dot.active { width: 28px; background: var(--cyan); }
.carousel-progress {
    position: absolute;
    left: 0; bottom: 0;
    height: 4px;
    background: var(--gradient);
    width: 0;
    z-index: 3;
}
.promos-empty {
    text-align: center;
    color: var(--muted);
    padding: 4rem 1rem;
    border: 1px dashed var(--border);
    border-radius: 24px;
}

/* ---------- servicios ---------- */
.services { padding: 6.5rem 0; }
.services-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.4rem;
}
.card {
    background: linear-gradient(160deg, var(--surface), rgba(17,23,65,.55));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem 1.7rem;
    position: relative;
    overflow: hidden;
    transition: transform .35s, border-color .35s, box-shadow .35s;
}
.card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(43,169,224,.22), transparent 70%);
    transition: transform .5s;
}
.card:hover { transform: translateY(-8px); border-color: rgba(43,169,224,.5); box-shadow: 0 24px 50px rgba(0,0,0,.45); }
.card:hover::before { transform: scale(1.8); }
.card-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.3rem;
    box-shadow: 0 8px 24px rgba(43,91,168,.5);
}
.card-icon svg { width: 28px; height: 28px; stroke: #fff; }
.card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; }
.card a.more {
    display: inline-block;
    margin-top: 1.1rem;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
}
.card a.more:hover { text-decoration: underline; }

/* ---------- nosotros ---------- */
.about { padding: 6.5rem 0; background: var(--bg-2); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.about-logo {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.stats {
    margin-top: 2.2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem 1rem;
    text-align: center;
}
.stat b {
    display: block;
    font-size: 1.7rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat span { color: var(--muted); font-size: .82rem; }
.checks { list-style: none; margin-top: 1.6rem; display: grid; gap: .8rem; }
.checks li { display: flex; gap: .7rem; align-items: flex-start; color: var(--muted); }
.checks svg { flex: none; width: 20px; height: 20px; stroke: var(--cyan); margin-top: 2px; }

/* ---------- contacto ---------- */
.contact { padding: 6.5rem 0 5rem; }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; margin-top: 3rem; }
.contact-info { display: grid; gap: 1rem; align-content: start; }
.info-item {
    display: flex; gap: 1rem; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    transition: transform .3s, border-color .3s;
}
.info-item:hover { transform: translateX(6px); border-color: rgba(43,169,224,.5); }
.info-item .ic {
    width: 44px; height: 44px; flex: none;
    border-radius: 12px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
}
.info-item .ic svg { width: 20px; height: 20px; stroke: #fff; }
.info-item b { display: block; font-size: .95rem; }
.info-item span { color: var(--muted); font-size: .85rem; }
form.quote {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: clamp(1.6rem, 4vw, 2.6rem);
    display: grid;
    gap: 1.1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: .85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(6,11,36,.6);
    color: var(--text);
    font: inherit;
    transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(43,169,224,.18);
}
.form-note { font-size: .8rem; color: var(--muted); }
.field .err { display: block; margin-top: .35rem; font-size: .78rem; color: #ff8a8a; }
.form-ok, .form-error {
    padding: .9rem 1.1rem;
    border-radius: 12px;
    font-size: .92rem;
}
.form-ok { background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .45); color: #b9f5cf; }
.form-error { background: rgba(255, 99, 99, .1); border: 1px solid rgba(255, 99, 99, .4); color: #ffc2c2; }

/* ---------- portada cargada desde el dashboard ---------- */
.hero.has-cover .hero-bg {
    background:
        linear-gradient(0deg, var(--bg) 0%, transparent 28%),
        linear-gradient(90deg, rgba(6, 11, 36, .94) 0%, rgba(6, 11, 36, .72) 55%, rgba(6, 11, 36, .45) 100%),
        var(--cover) center / cover no-repeat;
}
.hero.has-cover .blob { opacity: .25; }
.hero.has-cover .hero-inner { position: relative; }
.hero.has-cover .hero-logo-box::before {
    inset: auto;
    top: 50%; left: 50%;
    width: calc(var(--logo-w) * 1.6);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side,
        rgba(6, 11, 36, .88) 0%,
        rgba(6, 11, 36, .7) 40%,
        rgba(28, 61, 143, .3) 65%,
        rgba(43, 169, 224, 0) 100%);
    animation: halo 6s ease-in-out infinite;
}
@keyframes halo {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; }
    50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
.hero.has-cover .hero-logo {
    filter:
        brightness(1.2)
        drop-shadow(0 0 1px rgba(255, 255, 255, .6))
        drop-shadow(0 0 14px rgba(43, 169, 224, .75))
        drop-shadow(0 0 40px rgba(43, 169, 224, .4));
}

/* ---------- footer ---------- */
footer {
    scroll-snap-align: end;
    border-top: 1px solid var(--border);
    padding: 2.4rem 0;
    background: var(--bg-2);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.footer-inner img { height: 46px; }
.footer-inner p { color: var(--muted); font-size: .85rem; }
.footer-login {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .82rem;
    text-decoration: none;
    transition: border-color .25s, color .25s;
    margin-right: 72px;
}
.footer-login:hover { border-color: var(--cyan); color: var(--text); }

/* ---------- whatsapp flotante ---------- */
.wa-float {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    width: 60px; height: 60px;
    border-radius: 50%;
    background: #25d366;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
    z-index: 999;
    transition: transform .25s, box-shadow .25s;
    animation: wa-pulse 2.4s ease-out infinite;
}
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(37, 211, 102, .6); }
@keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55), 0 8px 24px rgba(37, 211, 102, .45); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, .45); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, .45); }
}

/* ---------- reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .8s cubic-bezier(.22,.8,.28,1), transform .8s cubic-bezier(.22,.8,.28,1);
    transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero p.desc { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-logo-box { order: -1; }
    .hero-logo-box { --logo-w: min(280px, 70%); }
    .hero.has-cover .hero-logo-box { padding-block: 2.5rem 1rem; }
    .slide { grid-template-columns: 1fr; }
    .slide-media { min-height: 200px; order: -1; }
    .slide-media::after { background: linear-gradient(0deg, var(--surface) 0%, transparent 45%); }
    .about-inner, .contact-inner { grid-template-columns: 1fr; }
    .nav-links {
        position: fixed;
        top: var(--nav-h); right: 0;
        flex-direction: column;
        background: rgba(6,11,36,.97);
        width: min(280px, 80vw);
        padding: 2rem;
        gap: 1.4rem;
        height: calc(100vh - var(--nav-h));
        transform: translateX(100%);
        transition: transform .35s;
        border-left: 1px solid var(--border);
    }
    .nav-links.open { transform: none; }
    .burger { display: block; }
    .scroll-hint { display: none; }
}
@media (max-width: 560px) {
    .hero { padding-bottom: 3rem; }
    .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
    .hero .lema { font-size: .85rem; letter-spacing: .08em; }
    .hero-logo-box { --logo-w: min(200px, 55%); }
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:last-child { grid-column: 1 / -1; }
    footer { padding-bottom: 6rem; }
    .footer-inner { flex-direction: column; text-align: center; gap: 1rem; }
    .footer-login { margin-right: 0; }
    .form-row { grid-template-columns: 1fr; }
    .carousel-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; scroll-snap-type: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
