:root {
    --bg: #f5f5f7;
    --primary: #00a060;
    --secondary: #0071e3;
    --accent: #7c3aed;
    --text: #1d1d1f;
    --text-muted: #6e6e73;
}

/* ===================== BASE ===================== */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    height: 100%;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-snap-type: y proximity;
    cursor: auto;
    height: 100%;
}

.font-space { font-family: 'Space Grotesk', sans-serif; }

/* ===================== MATRIX CANVAS (FONDO SUTIL EN TEMA CLARO) ===================== */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.10;
    mix-blend-mode: multiply;
}

/* ===================== CURSOR ===================== */
#cursor {
    width: 8px; height: 8px; background: var(--primary);
    position: fixed; border-radius: 50%; pointer-events: none;
    z-index: 9999; box-shadow: 0 0 10px var(--primary);
    top: 0; left: 0; transform: translate(-100px, -100px);
}
#cursor-f {
    width: 35px; height: 35px; border: 1px solid var(--secondary);
    position: fixed; border-radius: 50%; pointer-events: none;
    z-index: 9998; transition: transform 0.1s ease-out;
    top: 0; left: 0; transform: translate(-100px, -100px);
}

/* ===================== GLASSMORPHISM — iOS frosted white ===================== */
.glass {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
}

/* ===================== BOTONES GLOW (adaptado a tema claro) ===================== */
.btn-glow {
    background: #1d1d1f;
    border: 2px solid var(--primary);
    color: white !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    cursor: pointer;
}
.btn-glow:hover {
    background: var(--primary);
    color: white !important;
    box-shadow: 0 0 30px rgba(0, 160, 96, 0.35);
    transform: scale(1.02);
}

/* ===================== FORMULARIOS ===================== */
input, select, textarea {
    background-color: rgba(0, 0, 0, 0.04) !important;
    color: var(--text) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 15px !important;
    border-radius: 12px !important;
    width: 100%;
    outline: none;
    transition: 0.3s;
    cursor: auto;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 160, 96, 0.15);
}
input::placeholder, textarea::placeholder { color: rgba(0, 0, 0, 0.35) !important; }
select option { background-color: #fff; color: var(--text); }

/* ===================== FORM STEPS ===================== */
.step { display: none; }
.step.active { display: block; animation: fadeIn 0.4s forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== COLOR PICKER ===================== */
.color-bubble {
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; border: 3px solid transparent;
    transition: 0.2s; position: relative;
}
.color-bubble:hover { transform: scale(1.1); }
.color-bubble.selected {
    border-color: #1d1d1f !important;
    transform: scale(1.15);
    box-shadow: 0 0 15px currentColor;
}
.color-bubble.selected::after {
    content: '✓';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: bold; text-shadow: 0 0 5px black;
}

/* ===================== WHATSAPP ===================== */
.wa-btn {
    position: fixed; bottom: 30px; right: 30px;
    background: #25d366; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transition: 0.3s; cursor: pointer;
}
.wa-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

/* ===================== LANGUAGE TOGGLE (integrado en nav) ===================== */
.lang-btn { cursor: pointer; }

/* ===================== HERO ===================== */
.swiper-hero {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0; opacity: 0.72;
}
.swiper-slide { background-size: cover; background-position: center; }

/* ===================== SECCIONES ===================== */
section {
    scroll-snap-align: start;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    background: transparent;
}

/* Hero sin fondo — muestra el swiper y el matrix canvas */
#hero {
    background: transparent !important;
}

/* La banda de clientes */
.clients-band {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
}

/* Secciones individuales con fondos ligeramente diferenciados */
#hero    { background: transparent; }
#services  { background: rgba(255, 255, 255, 0.92); }
#locations { background: rgba(250, 250, 252, 0.90); }
#builder   { background: rgba(245, 245, 250, 0.90); }
#pricing   { background: rgba(255, 255, 255, 0.88); }
#founder   { background: rgba(250, 250, 252, 0.90); }
#faq       { background: rgba(255, 255, 255, 0.88); }
#contact   { background: rgba(245, 245, 247, 0.90); }

/* ===================== NAV ===================== */
nav.glass {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* ===================== HAMBURGER ===================== */
#hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
#hamburger-btn:hover { background: rgba(0,0,0,0.06); }

/* ===================== MOBILE MENU ===================== */
#mobile-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 40;
    padding: 80px 24px 28px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open {
    transform: translateY(0);
}

/* ===================== SCROLL PROGRESS BAR ===================== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: var(--scroll-progress, 0%);
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 10000;
    transition: width .1s;
}

/* ===================== NAV DOTS ===================== */
.nav-dot { position: relative; cursor: pointer; }
.nav-dot:hover::after {
    content: attr(title);
    position: absolute;
    right: 18px; top: 50%; transform: translateY(-50%);
    background: rgba(29, 29, 31, 0.9);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: .7rem; font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(0, 160, 96, 0.3);
    pointer-events: none;
}

/* ===================== FAQ ===================== */
.faq-toggle:hover { background: rgba(0,160,96,0.04) !important; }
.faq-body { animation: fadeIn .25s ease; }

/* ===================== MAPA LEAFLET (tema claro) ===================== */
#map {
    height: 450px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    position: relative;
    z-index: 20;
}
.leaflet-container {
    background: #f0f0f5 !important;
    font-family: 'Inter', sans-serif !important;
}
.leaflet-popup-content-wrapper {
    background: rgba(255,255,255,0.97) !important;
    border: 1px solid var(--secondary) !important;
    color: var(--text) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px !important;
    box-shadow: 0 0 20px rgba(0,113,227,0.15) !important;
}
.leaflet-popup-tip { background: var(--secondary) !important; }
.leaflet-popup-close-button { color: var(--text) !important; }
.leaflet-control-zoom a {
    background: rgba(255,255,255,0.95) !important;
    color: var(--primary) !important;
    border-color: rgba(0,0,0,0.1) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(0,160,96,0.12) !important;
}
.leaflet-control-attribution {
    background: rgba(255,255,255,0.8) !important;
    color: rgba(0,0,0,0.4) !important;
}
.leaflet-control-attribution a { color: rgba(0,0,0,0.6) !important; }

.map-marker-usa, .map-marker-peru {
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    animation: pulseMarker 2s ease-in-out infinite;
}
@keyframes pulseMarker {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,113,227,0.4); }
    50%       { box-shadow: 0 0 0 15px rgba(0,113,227,0); }
}

/* ===================== MODAL (tema claro) ===================== */
#modal-prompt {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    z-index: 9990;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#modal-prompt.active { display: flex; }
#modal-prompt .modal-box {
    background: #ffffff;
    border: 1px solid rgba(0,160,96,0.2);
    border-radius: 24px;
    padding: 40px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
#modal-prompt .prompt-text {
    background: rgba(0,160,96,0.04);
    border: 1px solid rgba(0,160,96,0.15);
    border-radius: 12px;
    padding: 20px;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    line-height: 1.8;
    color: var(--primary);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* ===================== RADAR MAP BACKUP ===================== */
.map-bg {
    background-color: #eaeaf0;
    background-image: radial-gradient(rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}
.radar-ping {
    position: absolute; border-radius: 50%;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    section { min-height: auto; padding-top: 80px; padding-bottom: 60px; }
    #hero    { min-height: 100vh; padding-top: 0; }
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    .grid-cols-3 { grid-template-columns: 1fr !important; }
}
