/* ============================================================
   BoxWeb — Estilos Principales
   ============================================================ */


/* ---- Reset & Base ---- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    font-family: 'Inter', sans-serif;
    background: #07111f;
    color: #fff;
    line-height: 1.6;
}


/* ---- Header & Navegación ---- */

header {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background: rgba(7, 17, 31, .8);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    z-index: 1000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -.3px;
}

.logo-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: linear-gradient(135deg, #1d4ed8, #4da3ff);
    box-shadow: 0 3px 10px rgba(37, 99, 235, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .3s;
    margin-right: 8px;
}

.logo-icon::before {
    content: '';
    width: 14px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 2px;
}

.logo:hover .logo-icon {
    transform: rotate(8deg) scale(1.1);
}

.logo-accent {
    color: #4da3ff;
}

.menu a {
    color: #ddd;
    text-decoration: none;
    margin-left: 30px;
    transition: .3s;
}

.menu a:hover {
    color: #4da3ff;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}


/* ---- WhatsApp Flotante ---- */

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 19px;
    border-radius: 50px;
    background: #25d366;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
    transition: transform .25s, box-shadow .25s;
}

.whatsapp-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .38);
}

.whatsapp-float span {
    font-size: 21px;
    line-height: 1;
}


/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top right, #1d4ed855, transparent 40%),
        radial-gradient(circle at bottom left, #2563eb44, transparent 35%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 60px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    color: #bfc9d8;
    font-size: 20px;
    margin-bottom: 35px;
}

.btn {
    display: inline-block;
    padding: 15px 28px;
    border-radius: 50px;
    text-decoration: none;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    transition: .3s;
}

.btn:hover {
    transform: translateY(-3px);
}


/* ---- Mockup del Hero ---- */

@keyframes mockup-float {
    0%, 100% {
        transform: perspective(1200px) rotateY(-5deg) rotateX(2deg) translateY(0px);
        box-shadow: 0 25px 70px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .2);
    }
    50% {
        transform: perspective(1200px) rotateY(-4deg) rotateX(1deg) translateY(-18px);
        box-shadow: 0 48px 90px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
    }
}

.mockup {
    position: relative;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(37, 99, 235, .5), rgba(13, 29, 52, .96) 45%, rgba(139, 92, 246, .35));
    animation: mockup-float 4s ease-in-out infinite;
}

.window {
    background: #fff;
    color: #111;
    border-radius: 14px;
    overflow: hidden;
}

.bar {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    background: #f5f7fb;
    border-bottom: 1px solid #e7ebf3;
}

.bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff6b6b;
}

.bar span:nth-child(2) {
    background: #ffd166
}

.bar span:nth-child(3) {
    background: #4ade80
}

.site-preview {
    padding: 19px;
    background: linear-gradient(145deg, #f8fbff, #eef4ff);
}

.preview-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #27364e;
    font-size: 9px;
    font-weight: 700;
}

.preview-brand {
    font-size: 13px;
    color: #2563eb;
    letter-spacing: .4px
}

.preview-menu {
    display: flex;
    gap: 10px;
    color: #718096
}

.preview-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 12px;
    align-items: center;
    min-height: 190px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 13px;
    background: linear-gradient(135deg, #142d61, #2563eb 62%, #60a5fa);
    color: #fff;
}

.preview-kicker {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #bfdbfe
}

.preview-title {
    margin: 7px 0;
    font-size: 19px;
    line-height: 1.05;
    font-weight: 800
}

.preview-copy {
    font-size: 9px;
    line-height: 1.5;
    color: #dbeafe
}

.preview-button {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 7px;
    background: #fff;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 800
}

.preview-visual {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 105px;
    padding: 12px 10px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
}

.preview-visual span {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(#93c5fd, #fff);
}

.preview-visual span:nth-child(1) {
    height: 35%
}

.preview-visual span:nth-child(2) {
    height: 58%
}

.preview-visual span:nth-child(3) {
    height: 46%
}

.preview-visual span:nth-child(4) {
    height: 82%;
    background: linear-gradient(#fbbf24, #fff)
}

.preview-visual span:nth-child(5) {
    height: 68%
}

/* ---- Secciones ---- */

section {
    padding: 50px 0;
}

section:not(.hero) {
    padding-top: 80px;
}

.title {
    text-align: center;
    margin-bottom: 60px;
}

.title h2 {
    font-size: 42px;
    line-height: 1.2;
}


/* ---- Servicios ---- */

.cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 25px;
}

.card {
    grid-column: span 2;
    background: #101b2b;
    padding: 35px;
    border-radius: 18px;
    transition: .3s;
    border: 1px solid rgba(255, 255, 255, .05);
}

.card:hover {
    transform: translateY(-8px);
    border-color: #2563eb;
}

.card h3 {
    margin-bottom: 15px;
}

.card:nth-last-child(-n+2) {
    grid-column: span 3;
}


/* ---- Tecnologías ---- */

.tech {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tech span {
    position: relative;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: linear-gradient(145deg, #14243d, #0e192a);
    transition: transform .3s, border-color .3s, box-shadow .3s;
}

.tech span::before {
    content: '✦';
    position: absolute;
    top: 18px;
    left: 20px;
    color: #60a5fa;
    font-size: 24px;
}

.tech span::after {
    content: '';
    position: absolute;
    width: 88px;
    height: 88px;
    top: -42px;
    right: -35px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .18);
    filter: blur(2px);
}

.tech span:hover {
    transform: translateY(-6px);
    border-color: #4da3ff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

.tech span:nth-child(2)::before,
.tech span:nth-child(6)::before {
    color: #facc15
}

.tech span:nth-child(3)::before,
.tech span:nth-child(7)::before {
    color: #a78bfa
}

.tech span:nth-child(4)::before,
.tech span:nth-child(8)::before {
    color: #4ade80
}

.tech b {
    position: relative;
    z-index: 1;
    font-size: 18px;
}

.tech small {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    color: #9fb0c8;
    font-size: 12px;
}


/* ---- Carrusel ---- */

.carousel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 25px;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, .4);
    background: rgba(37, 99, 235, .15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: background .25s, border-color .25s, opacity .25s;
    flex-shrink: 0;
}

.carousel-btn:hover:not(:disabled) {
    background: #2563eb;
    border-color: #2563eb;
}

.carousel-btn:disabled {
    opacity: .3;
    cursor: default;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    padding: 0;
    transition: background .25s, width .25s, border-radius .25s;
}

.carousel-dot.active {
    width: 26px;
    border-radius: 4px;
    background: #2563eb;
}


/* ---- Proyectos ---- */

.project-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: #101b2b;
    transition: transform .3s, border-color .3s;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #2563eb;
}

.project-visual {
    height: 190px;
    overflow: hidden;
}

.project-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.project-info {
    padding: 24px
}

.project-tag {
    display: inline-block;
    margin-bottom: 10px;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 21px
}

.project-info p {
    color: #b8c4d6;
    font-size: 14px
}

.project-result {
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}


/* ---- CTA ---- */

.cta {
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 30px;
    padding: 70px 40px;
}

.cta h2 {
    margin-bottom: 24px;
    font-size: 42px;
    line-height: 1.2;
}

.cta>p:first-of-type {
    margin: 0 auto 30px;
    max-width: 620px;
}


/* ---- Footer ---- */

footer {
    padding: 40px 0;
    text-align: center;
    color: #8d9aad;
}

@keyframes menu-drop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ---- Responsive ---- */

@media (max-width: 900px) {

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero h1 {
        font-size: clamp(36px, 10vw, 42px);
    }

    nav {
        position: relative;
        padding: 14px 0;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        width: 100vw;
        transform: translateX(-50%);
        flex-direction: column;
        gap: 0;
        padding: 8px 5% 16px;
        background: rgba(7, 17, 31, .98);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, .07);
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
        z-index: 999;
    }

    .menu.is-open {
        display: flex;
        animation: menu-drop .25s ease;
    }

    .menu a {
        margin: 0;
        padding: 15px 4px;
        font-size: 16px;
        font-weight: 600;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
        transition: color .2s, padding-left .2s;
    }

    .menu a:last-child {
        border-bottom: none;
    }

    .menu a:hover {
        color: #4da3ff;
        padding-left: 10px;
        background: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: 125px 0 70px;
    }

    .mockup {
        margin: 8px 8px 24px 0;
        padding: 14px;
        animation: none;
        transform: none;
    }

    .preview-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .preview-visual {
        height: 78px;
    }

    .tech {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card,
    .card:nth-last-child(-n+2) {
        grid-column: span 1;
    }

    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        padding: 13px 16px;
    }

}