/* AIDARA — Tech 3D */
:root {
    --bg: #070b14;
    --bg-card: rgba(17, 24, 39, 0.72);
    --bg-elevated: rgba(26, 34, 52, 0.75);
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --primary: #3b82f6;
    --accent: #06b6d4;
    --violet: #8b5cf6;
    --gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
    --radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --line: rgba(255, 255, 255, 0.09);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

#bg3d {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

body::before { /* respaldo si no hay WebGL + viñeta */
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(59,130,246,.18), transparent 55%),
        radial-gradient(ellipse at 85% 70%, rgba(139,92,246,.14), transparent 55%),
        var(--bg);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7, 11, 20, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    transition: background .3s;
}
.navbar.scrolled { background: rgba(7, 11, 20, 0.95); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem; font-weight: 700; letter-spacing: .04em;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.btn-nav {
    background: var(--gradient) !important; color: #fff !important;
    padding: 10px 20px !important; border-radius: 10px; font-weight: 600 !important;
    box-shadow: 0 0 24px rgba(59,130,246,.45);
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: 0; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); }

/* ---------- Botones ---------- */
.btn {
    display: inline-block; padding: 14px 28px; border-radius: 12px;
    text-decoration: none; font-weight: 600; transition: all .25s;
    border: none; cursor: pointer; font-size: 1rem; font-family: inherit; color: #fff;
}
.btn-primary { background: var(--gradient); box-shadow: 0 6px 28px rgba(59,130,246,.45); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 38px rgba(6,182,212,.55); }
.btn-outline { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.22); }
.btn-outline:hover { background: rgba(255,255,255,.08); border-color: var(--accent); }
.btn-whatsapp { background: linear-gradient(135deg,#16a34a,#22c55e); box-shadow: 0 6px 24px rgba(34,197,94,.35); }
.btn-whatsapp:hover { transform: translateY(-3px); }
.btn-large { padding: 16px 38px; font-size: 1.1rem; }
.btn-sm { padding: 10px 18px; font-size: .92rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 60px; position: relative; }
.hero-content { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }

.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.3);
    color: #7db4ff; padding: 6px 14px; border-radius: 20px;
    font-size: .85rem; font-weight: 600; margin-bottom: 20px;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.1; margin-bottom: 20px;
}
.hero h1 span, .grad {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; max-width: 520px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { position: relative; height: 520px; perspective: 1000px; }
#hero3d { position: absolute; inset: 0; cursor: grab; }
#hero3d canvas { width: 100%; height: 100%; display: block; }
#hero3d:active { cursor: grabbing; }

.floating-card {
    position: absolute; z-index: 2;
    background: rgba(17,24,39,.8); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    padding: 10px 18px; border-radius: 12px;
    font-weight: 600; font-size: .9rem; box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}
.card1 { top: 14%; left: 2%; }
.card2 { top: 64%; right: 0; animation-delay: 2s; }
.card3 { bottom: 8%; left: 18%; animation-delay: 4s; }
@keyframes float { 0%,100% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-14px) rotateX(8deg); } }

/* ---------- Ticker de tecnologías ---------- */
.ticker { border-block: 1px solid var(--line); background: rgba(7,11,20,.55); overflow: hidden; padding: 16px 0; }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: scroll 30s linear infinite; }
.ticker span { font-family: 'Space Grotesk', sans-serif; color: var(--text-muted); font-size: 1.05rem; white-space: nowrap; letter-spacing: .06em; }
.ticker span::before { content: "◆"; color: var(--accent); margin-right: 14px; font-size: .7rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { padding: 50px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat { padding: 24px 10px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--line); transform-style: preserve-3d; }
.stat h3 { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat p { color: var(--text-muted); font-size: .95rem; }

/* ---------- Secciones ---------- */
.section { padding: 90px 0; }
.section-dark { background: rgba(10, 16, 30, .72); backdrop-filter: blur(4px); border-block: 1px solid var(--line); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }
.text-center { text-align: center; }

/* ---------- Tarjetas con tilt 3D ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; margin-bottom: 48px; perspective: 1200px; }

.card, .stat {
    position: relative;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
    transition: transform .15s ease-out, border-color .3s, box-shadow .3s;
    will-change: transform;
}
.card {
    background: var(--bg-card); backdrop-filter: blur(10px);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; transform-style: preserve-3d;
}
.card::after { /* brillo que sigue al cursor */
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(6,182,212,.18), transparent 55%);
    opacity: 0; transition: opacity .3s;
}
.card.tilting { border-color: rgba(59,130,246,.5); box-shadow: var(--shadow), 0 0 40px rgba(59,130,246,.15); transition: transform .05s linear, border-color .3s, box-shadow .3s; }
.card.tilting::after { opacity: 1; }
.card-icon { font-size: 2.4rem; margin-bottom: 16px; transform: translateZ(40px); display: inline-block; }
.card h3 { font-size: 1.25rem; margin-bottom: 12px; transform: translateZ(25px); }
.card p { color: var(--text-muted); font-size: .95rem; }

/* ---------- Acerca de ---------- */
.about-preview { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; margin-bottom: 14px; }
.about-text p { color: var(--text-muted); }
.check-list { list-style: none; margin: 24px 0; }
.check-list li { padding: 8px 0 8px 28px; position: relative; color: var(--text-muted); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* cubo CSS 3D */
.about-visual { display: grid; place-items: center; height: 340px; perspective: 900px; }
.cube { width: 150px; height: 150px; position: relative; transform-style: preserve-3d; animation: spin 18s linear infinite; }
.cube div {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: .08em;
    background: linear-gradient(135deg, rgba(59,130,246,.22), rgba(6,182,212,.12));
    border: 1px solid rgba(6,182,212,.55); box-shadow: inset 0 0 30px rgba(6,182,212,.25), 0 0 20px rgba(59,130,246,.2);
    backdrop-filter: blur(2px);
}
.cube .f { transform: translateZ(75px); }
.cube .b { transform: rotateY(180deg) translateZ(75px); }
.cube .r { transform: rotateY(90deg) translateZ(75px); }
.cube .l { transform: rotateY(-90deg) translateZ(75px); }
.cube .t { transform: rotateX(90deg) translateZ(75px); }
.cube .bt { transform: rotateX(-90deg) translateZ(75px); }
@keyframes spin { from { transform: rotateX(-20deg) rotateY(0); } to { transform: rotateX(-20deg) rotateY(360deg); } }

/* ---------- CTA ---------- */
.cta { padding: 100px 0; text-align: center; background: linear-gradient(180deg, transparent, rgba(13,21,37,.85)); }
.cta h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 16px; }
.cta p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
footer { background: rgba(5,8,15,.92); padding: 60px 0 0; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
footer h3, footer h4 { margin-bottom: 16px; }
footer p, footer li { color: var(--text-muted); font-size: .95rem; }
footer ul { list-style: none; }
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* ---------- Formularios ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 14px 16px; background: rgba(26,34,52,.8);
    border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
    color: var(--text); font-family: inherit; font-size: 1rem;
}
.form-group select option { background: #111827; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.18); }
.form-group textarea { min-height: 140px; resize: vertical; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-grid h2 { margin-bottom: 24px; font-family: 'Space Grotesk', sans-serif; }
.contact-grid .card { margin-bottom: 20px; }

.page-header { padding: 80px 0 30px; text-align: center; }
.page-header h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.1rem, 5vw, 3rem); margin-bottom: 12px; }
.page-header p { color: var(--text-muted); font-size: 1.15rem; }

/* ---------- TIENDA ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 24px 0 48px; }
.chip {
    background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text-muted);
    padding: 8px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; transition: all .2s;
}
.chip:hover { color: #fff; border-color: var(--accent); }
.chip.on { background: var(--gradient); color: #fff; border-color: transparent; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; perspective: 1400px; }
.product { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-top {
    position: relative; height: 170px; display: grid; place-items: center;
    background:
        radial-gradient(circle at 50% 120%, var(--pc, #3b82f6), transparent 70%),
        linear-gradient(180deg, rgba(255,255,255,.04), transparent);
    border-bottom: 1px solid var(--line); transform-style: preserve-3d;
}
.product-top .card-icon { font-size: 3.6rem; transform: translateZ(60px); filter: drop-shadow(0 12px 18px rgba(0,0,0,.5)); animation: float 6s ease-in-out infinite; }
.product-badge { position: absolute; top: 14px; left: 14px; font-size: .75rem; font-weight: 700; background: var(--gradient); padding: 4px 12px; border-radius: 999px; transform: translateZ(30px); }
.product-cat { position: absolute; top: 14px; right: 14px; font-size: .75rem; color: var(--text-muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.3); }
.product-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { transform: none; font-size: 1.2rem; margin-bottom: 8px; }
.product-body > p { flex: 1; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 18px; }
.stack span { font-size: .75rem; padding: 3px 10px; border-radius: 6px; background: rgba(59,130,246,.12); color: #8fbaff; font-family: 'Space Grotesk', sans-serif; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-family: 'Space Grotesk', sans-serif; font-size: 1.45rem; font-weight: 700; }
.price small { display: block; font-size: .7rem; font-weight: 400; color: var(--text-muted); }
.product-actions { display: flex; gap: 8px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 20px; background: rgba(3,6,12,.82); backdrop-filter: blur(8px); }
.modal.open { display: grid; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.modal-box {
    width: min(960px, 100%); max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr;
    background: #0b1220; border: 1px solid rgba(255,255,255,.14); border-radius: 20px; box-shadow: var(--shadow), 0 0 80px rgba(59,130,246,.18);
    animation: pop .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: perspective(900px) rotateX(18deg) scale(.9); opacity: 0; } }
.viewer { position: relative; min-height: 360px; cursor: grab; background: radial-gradient(circle at 50% 40%, rgba(59,130,246,.22), transparent 65%); touch-action: none; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewer-hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: .78rem; color: var(--text-muted); pointer-events: none; }
.modal-info { padding: 32px 30px; }
.modal-info h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; margin: 6px 0 10px; }
.modal-info p { color: var(--text-muted); }
.modal-info ul { list-style: none; margin: 18px 0; }
.modal-info li { padding: 5px 0 5px 26px; position: relative; font-size: .95rem; }
.modal-info li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.modal-info .price { margin: 10px 0 18px; font-size: 1.8rem; }
.modal-info .product-actions { flex-wrap: wrap; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.5); color: #fff; font-size: 1.2rem; cursor: pointer; }
.modal-close:hover { background: rgba(255,255,255,.12); }
.modal-wrap { position: relative; width: min(960px, 100%); }

.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-top: 70px; }
.trust .card { padding: 24px; text-align: center; }
.trust .card-icon { font-size: 2rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px) rotateX(10deg); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.cards-grid .reveal.in, .shop-grid .reveal.in { transform: rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-content, .about-preview, .footer-grid, .contact-grid, .modal-box { grid-template-columns: 1fr; }
    .hero-content { text-align: center; }
    .hero p { margin-inline: auto; }
    .hero-buttons { justify-content: center; }
    .hero-visual { height: 380px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(7,11,20,.98); flex-direction: column; padding: 20px; gap: 16px;
        border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
    .hamburger { display: flex; }
    .footer-grid { text-align: center; }
    .viewer { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}
