:root {
    --navy-1: #0d1b3d;
    --navy-2: #103a5f;
    --green: #00bb94;
    --green-d: #0a9d7d;
    --blue: #2563eb;
    --violet: #7c3aed;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e6eaf0;
    --bg: #f7f9fc;
    --card: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(13, 27, 61, .18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ---------------- Nav ---------------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-word { display: block; }
.nav-links { margin-left: auto; display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
    white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-primary { background: var(--green); color: #04231c; }
.btn-primary:hover { background: var(--green-d); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 187, 148, .35); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }

/* ---------------- Hero ---------------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 80% -10%, #1b4a78 0%, transparent 60%),
                linear-gradient(150deg, var(--navy-1) 0%, var(--navy-2) 100%);
    color: #fff;
}
.hero-inner { position: relative; z-index: 2; padding: 96px 24px 108px; max-width: 820px; }
.badge {
    display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
    letter-spacing: .3px; color: #b9f4e6; background: rgba(0, 187, 148, .16);
    border: 1px solid rgba(0, 187, 148, .35); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 18px; letter-spacing: -1.5px; font-weight: 800; }
.hero .grad { background: linear-gradient(90deg, #00bb94, #6ee7c7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #cdd8ea; max-width: 620px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 20px; color: #93a4c0; font-size: 14px; }
.hero-glow { position: absolute; right: -120px; bottom: -160px; width: 520px; height: 520px; z-index: 1;
    background: radial-gradient(circle, rgba(0, 187, 148, .25) 0%, transparent 62%); filter: blur(20px); }

/* ---------------- Sections ---------------- */
.section { padding: 84px 0; }
.section-alt { background: linear-gradient(180deg, #fff, var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 12px; letter-spacing: -.8px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------------- Cards ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin: 16px 0 8px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }

.chip { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.chip .ico { width: 26px; height: 26px; }
.chip-green { background: rgba(0, 187, 148, .12); color: var(--green-d); }
.chip-blue { background: rgba(37, 99, 235, .12); color: var(--blue); }
.chip-violet { background: rgba(124, 58, 237, .12); color: var(--violet); }

/* ---------------- Modulos ---------------- */
.mod { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: var(--card);
    border: 1px solid var(--line); border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.mod:hover { transform: translateY(-3px); border-color: var(--green); }
.mod .ico { width: 22px; height: 22px; color: var(--navy-2); flex: none; }

/* ---------------- Opcional (badge en modulo) ---------------- */
.mod-opt .opt { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .4px;
    text-transform: uppercase; color: var(--muted); background: #eef2f7; border: 1px solid var(--line);
    border-radius: 999px; padding: 3px 9px; }

/* ---------------- Galeria de capturas + lightbox ---------------- */
.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.gshot { display: block; width: 100%; text-align: left; padding: 0; border: none; background: none; cursor: zoom-in; font: inherit; }
.gshot .shot { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.gshot:hover .shot { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.shot-bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: #0f1b33; }
.shot-bar span { width: 11px; height: 11px; border-radius: 50%; }
.shot-bar span:nth-child(1) { background: #ff5f57; }
.shot-bar span:nth-child(2) { background: #febc2e; }
.shot-bar span:nth-child(3) { background: #28c840; }
.gshot img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gshot-cap { display: flex; align-items: center; gap: 10px; margin: 13px 2px 0; font-weight: 600; color: var(--ink); font-size: 14px; }
.gzoom { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--green-d); opacity: 0;
    transition: opacity .15s; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.gzoom .ico { width: 15px; height: 15px; }
.gshot:hover .gzoom, .gshot:focus-visible .gzoom { opacity: 1; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 12, 27, .9); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; padding: 32px; animation: lbfade .18s ease; }
.lightbox[hidden] { display: none; }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { margin: 0; max-width: 1200px; width: 100%; }
.lb-figure img { display: block; width: 100%; height: auto; max-height: 82vh; object-fit: contain; border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-figure figcaption { text-align: center; color: #e2e8f0; margin-top: 16px; font-weight: 600; }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background .15s, transform .15s; }
.lb-close:hover { background: rgba(255, 255, 255, .24); transform: scale(1.08); }
.lb-close { top: 22px; right: 26px; width: 44px; height: 44px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.lb-nav:hover { background: rgba(255, 255, 255, .24); transform: translateY(-50%) scale(1.08); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-close .ico, .lb-nav .ico { width: 24px; height: 24px; }

/* ---------------- App (marcos de telefono) ---------------- */
.phones { display: flex; justify-content: center; align-items: center; gap: 30px; flex-wrap: wrap; }
.phone { background: #0b1220; border-radius: 38px; padding: 8px; box-shadow: var(--shadow-lg); flex: none; }
.phone img { display: block; width: 208px; height: auto; border-radius: 30px; }
.phone-lead { transform: scale(1.09); z-index: 2; box-shadow: 0 34px 74px rgba(13, 27, 61, .3); }
.app-store-row { display: flex; justify-content: center; margin-top: 42px; }

/* ---------------- Accesos ---------------- */
.access-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    padding: 34px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; position: relative; overflow: hidden; }
.access-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.access-card h3 { margin: 18px 0 10px; font-size: 1.45rem; }
.access-card p { color: var(--muted); margin: 0 0 20px; }
.access-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
.access-go .ico { width: 18px; height: 18px; transition: transform .18s; }
.access-card:hover .access-go .ico { transform: translateX(5px); }
.access-admin::before, .access-worker::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; }
.access-admin::before { background: linear-gradient(90deg, var(--blue), #60a5fa); }
.access-worker::before { background: linear-gradient(90deg, var(--green), #6ee7c7); }
.access-admin:hover .access-go { color: var(--blue); }
.access-worker:hover .access-go { color: var(--green-d); }

.app-cta { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px;
    background: rgba(13, 27, 61, .03); border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px; }
.app-cta-text { display: flex; align-items: center; gap: 12px; color: var(--muted); max-width: 440px; }
.app-cta-text .ico { width: 24px; height: 24px; color: var(--navy-2); flex: none; }
.app-cta-text strong { color: var(--ink); }
.playstore { display: inline-flex; align-items: center; gap: 12px; background: #0f172a; color: #fff; border-radius: 12px;
    padding: 10px 20px; flex: none; transition: transform .15s, box-shadow .15s; }
.playstore:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15, 23, 42, .3); }
.playstore .ps-ico { width: 24px; height: 26px; display: block; }
.ps-lines { display: flex; flex-direction: column; line-height: 1.15; }
.ps-lines small { font-size: 10px; letter-spacing: 1px; color: #cbd5e1; }
.ps-lines b { font-size: 18px; font-weight: 700; }

/* ---------------- Footer ---------------- */
.footer { background: var(--navy-1); color: #c7d2e6; padding: 56px 0 26px; margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-brand p { color: #8ea0bf; max-width: 320px; margin: 14px 0 0; }
.footer-col h4 { color: #fff; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 14px; }
.footer-col a { display: block; color: #b8c4da; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--green); }
.footer-legal { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; color: #7d8db0; font-size: 13px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
    .nav-links { display: none; }
    .hero-inner { padding: 68px 24px 78px; }
    .footer-inner { grid-template-columns: 1fr; gap: 26px; }
    .section { padding: 60px 0; }
    .app-cta { flex-direction: column; text-align: center; }
    .app-cta-text { justify-content: center; }
    .gallery { grid-template-columns: 1fr; }
    .phone-lead { transform: none; }
    .lightbox { padding: 14px; }
    .lb-nav { width: 40px; height: 40px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-close { top: 12px; right: 14px; width: 40px; height: 40px; }
}
