/* BOTONES MAGNÉTICOS Y PREMIUM */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
}

.btn-xl {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--c-gold);
    color: #000;
    box-shadow: 0 4px 20px var(--c-gold-glow);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(229, 192, 123, 0.4);
    transform: translateY(-2px);
    background: var(--c-gold-light);
}

.btn-secondary {
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    border-color: var(--c-gold);
    background: rgba(229, 192, 123, 0.05);
}

/* BENTO GRID SYSTEM */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.col-span-2 {
    grid-column: span 2;
}

.row-span-2 {
    grid-row: span 2;
}

/* BENTO CARDS CON GLASS ANIMADO AL HOVER */
.bento-card {
    position: relative;
    background: var(--c-bg-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.bento-card:hover {
    transform: translateY(-5px);
}

.bento-card:hover::before {
    background: linear-gradient(135deg, var(--c-gold) 0%, rgba(255,255,255,0.05) 100%);
}

.bento-card::after,
.service-card::after,
.cta-container::after,
.form-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(229, 192, 123, 0.18) 0%, rgba(229, 192, 123, 0.06) 30%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-card:hover::after,
.service-card:hover::after,
.cta-container:hover::after,
.form-wrapper:hover::after {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.icon-wrapper {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    margin-top: auto;
}

.gold-tint { background: rgba(229, 192, 123, 0.05); border-color: var(--border-gold); }

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.bento-content p {
    color: var(--c-text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* HERO ABSTRACT DASHBOARD MOCKUPS */
.hero-abstract-ui {
    position: absolute;
    bottom: -100px;
    width: 100%;
    max-width: 800px;
    height: 300px;
    pointer-events: none;
    z-index: -1;
    perspective: 1000px;
}

.glass-panel {
    position: absolute;
    background: rgba(10, 16, 29, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.panel-1 {
    width: 300px; height: 200px;
    left: 10%; top: 20%;
    transform: rotateY(15deg) rotateX(10deg);
    padding: 1.5rem;
}

.panel-2 {
    width: 250px; height: 120px;
    right: 15%; top: 40%;
    transform: rotateY(-15deg) rotateX(5deg);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-color: var(--border-gold);
}

.panel-text { font-weight: 600; font-size: 1.2rem; }

.panel-header {
    width: 40px; height: 12px;
    border-radius: 6px;
    background: var(--border-glass);
    margin-bottom: 24px;
}

.panel-bars {
    display: flex; align-items: flex-end; gap: 8px; height: 100px;
}

.bar {
    width: 30px; border-radius: 4px; background: rgba(255,255,255,0.05);
}

.h-full { height: 100%; } .h-md { height: 60%; } .h-sm { height: 30%; }
.gold-bar { background: var(--grad-gold); box-shadow: 0 0 15px var(--c-gold-glow); }

/* ESCENA 3D DECORATIVA HERO */
.hero-3d-scene {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.orbital-ring {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(229, 192, 123, 0.22);
    box-shadow: 0 0 30px rgba(229, 192, 123, 0.15);
    transform-style: preserve-3d;
}

.ring-a {
    width: 520px;
    height: 260px;
    left: 8%;
    top: 20%;
    transform: rotateX(72deg) rotateY(-12deg);
    animation: orbitDrift 14s linear infinite;
}

.ring-b {
    width: 380px;
    height: 180px;
    right: 12%;
    top: 35%;
    transform: rotateX(72deg) rotateY(20deg);
    animation: orbitDrift 12s linear infinite reverse;
    border-color: rgba(59, 130, 246, 0.28);
}

.floating-object {
    position: absolute;
    transform-style: preserve-3d;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
}

.sphere-a,
.sphere-b {
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85) 0%, rgba(229, 192, 123, 0.55) 30%, rgba(168, 134, 64, 0.12) 100%);
}

.sphere-a {
    width: 84px;
    height: 84px;
    left: 12%;
    top: 54%;
    animation: float3d 8s ease-in-out infinite;
}

.sphere-b {
    width: 52px;
    height: 52px;
    right: 20%;
    top: 22%;
    animation: float3d 6s ease-in-out infinite reverse;
}

.cube-a {
    width: 72px;
    height: 72px;
    right: 8%;
    bottom: 20%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.18) 0%, rgba(229, 192, 123, 0.1) 100%);
    transform: rotateX(32deg) rotateY(26deg);
    animation: cubeSpin 10s linear infinite;
}

@keyframes orbitDrift {
    from { transform: rotateX(72deg) rotateY(-12deg) rotateZ(0deg); }
    to { transform: rotateX(72deg) rotateY(-12deg) rotateZ(360deg); }
}

@keyframes float3d {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -16px, 24px) scale(1.08); }
}

@keyframes cubeSpin {
    0% { transform: rotateX(32deg) rotateY(26deg) rotateZ(0deg); }
    100% { transform: rotateX(32deg) rotateY(26deg) rotateZ(360deg); }
}

@media (max-width: 990px) {
    .bento-grid { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }
}

/* SERVICES TRACK & GLOW CARDS */
.services-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.service-card {
    background: rgba(10, 16, 29, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    isolation: isolate;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.05);
    border-color: var(--border-gold);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}

.service-bg-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--c-gold-glow) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: blur(30px);
}

.service-card:hover .service-bg-glow {
    opacity: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: var(--c-text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.service-features {
    list-style: none;
    position: relative;
    z-index: 2;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--c-text);
}

.scale-highlight {
    background: rgba(15, 24, 43, 0.8);
    border-color: rgba(229, 192, 123, 0.15);
}

.scale-highlight:hover {
    transform: translateY(-12px) scale(1.05);
}

/* CTA FINAL OVERHAUL */
.cta-section {
    position: relative;
    padding: 150px 0;
    overflow: hidden;
    margin-top: 50px;
}

.cta-mesh-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(229, 192, 123, 0.1) 0%, transparent 60%);
    border-top: 1px solid var(--border-glass);
    z-index: 1;
}

.cta-container {
    position: relative;
    z-index: 2;
    background: rgba(10, 16, 29, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 5rem 3rem;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    isolation: isolate;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.cta-container:hover {
    transform: translateY(-4px);
    border-color: var(--border-gold);
}

.cta-title {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--c-text-muted);
}

/* CONTACT FORM */
.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
    position: relative;
    z-index: 2;
    background: rgba(10, 16, 29, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    isolation: isolate;
}

.form-wrapper:hover {
    border-color: var(--border-gold);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-muted);
}

.input-group input,
.input-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: var(--c-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--c-gold);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(229, 192, 123, 0.1);
}

.w-full { width: 100%; }
.mt-4 { margin-top: 1.5rem; }

/* FOOTER */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    background: rgba(10, 16, 29, 0.8);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.copyright {
    color: var(--c-text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
}

@media (max-width: 900px) {
    .services-track {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .service-card {
        padding: 2rem 1.25rem;
    }

    .service-card h3 {
        font-size: 1.35rem;
    }

    .service-card p {
        font-size: 1rem;
    }

    .scale-highlight,
    .scale-highlight:hover,
    .service-card:hover {
        transform: none;
    }

    .hero-abstract-ui {
        display: none;
    }

    .hero-3d-scene {
        opacity: 0.45;
    }

    .ring-a,
    .ring-b,
    .cube-a {
        display: none;
    }

    .sphere-a {
        width: 58px;
        height: 58px;
        left: 6%;
        top: 48%;
    }

    .sphere-b {
        width: 42px;
        height: 42px;
        right: 8%;
        top: 30%;
    }

    .cta-section {
        padding: 90px 0;
    }

    .cta-container {
        padding: 2.5rem 1.25rem;
        border-radius: 22px;
    }

    .cta-subtitle {
        font-size: 1.05rem;
    }

    .contact-form .form-grid {
        grid-template-columns: 1fr;
    }

    .contact-form .col-span-2 {
        grid-column: span 1;
    }

    .form-wrapper {
        padding: 2rem 1.25rem;
    }

    .footer-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .copyright {
        text-align: center;
    }
}

@media (hover: none) {
    .bento-card::after,
    .service-card::after,
    .cta-container::after,
    .form-wrapper::after {
        display: none;
    }
}

@media (max-width: 520px) {
    .btn-xl {
        width: 100%;
        padding: 1rem 1.1rem;
        font-size: 0.98rem;
    }

    .bento-card {
        padding: 1.5rem 1.15rem;
    }

    .bento-content h3 {
        font-size: 1.22rem;
    }

    .bento-content p {
        font-size: 0.98rem;
    }

    .icon-wrapper {
        width: 54px;
        height: 54px;
        font-size: 1.35rem;
        margin-bottom: 1.2rem;
    }

    .service-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1.25rem;
    }

    .footer-brand {
        font-size: 1.05rem;
    }
}
