:root {
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --sky: #0ea5e9;
    --dark: #020617;
    --soft: #f4f8ff;
    --text: #0f172a;
    --muted: #64748b;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, .16), transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(14, 165, 233, .18), transparent 30%),
        linear-gradient(180deg, #f8fbff, #eef6ff);
    overflow-x: hidden;
}

/* Navbar Transitions */
.navbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 35px rgba(15, 23, 42, .08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    letter-spacing: -1px;
}

.nav-link {
    position: relative;
    font-weight: 600;
    color: #334155;
    transition: color 0.3s;
}

.nav-link.active,
.nav-link:hover {
    color: var(--blue);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 3px;
    height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transition: .25s ease-in-out;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--sky));
    border: none;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .25);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(37, 99, 235, .35);
}

/* Hero & Animations */
.hero {
    min-height: 100vh;
    padding-top: 125px;
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -2px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--blue), var(--sky));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating animation para el Hero Card */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.glass-card {
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .14);
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite;
    /* Animación aplicada */
}

.glass-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    background: rgba(37, 99, 235, .18);
    filter: blur(70px);
    top: -90px;
    right: -80px;
}

.glass-card>* {
    position: relative;
    z-index: 2;
}

.mini-card {
    transition: .3s;
}

.mini-card:hover {
    transform: translateY(-6px);
}

/* Code Box con Copy Button */
.code-wrapper {
    position: relative;
}

.btn-copy {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.code-box {
    background: #020617;
    color: #bfdbfe;
    border-radius: 22px;
    padding: 24px;
    padding-top: 45px;
    /* Espacio para el botón de copia */
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 0.95rem;
}

/* Cards Servicios */
.icon-box {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #dbeafe;
    color: var(--blue);
    font-size: 1.6rem;
}

.service-card {
    transition: .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.service-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(37, 99, 235, .08);
    border-radius: 50%;
    top: -40px;
    right: -40px;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .08) !important;
}

.service-card:hover::after {
    transform: scale(1.5);
}

/* Sección Oscura */
.dark-section {
    background: var(--dark);
    border-radius: 36px;
    position: relative;
    overflow: hidden;
}

.dark-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(37, 99, 235, .25);
    filter: blur(90px);
    top: -120px;
    right: -100px;
}

.dark-section>* {
    position: relative;
    z-index: 2;
}

.step-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: .3s;
}

.step-card:hover {
    background: rgba(255, 255, 255, .11);
    transform: translateY(-5px);
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--blue-dark), var(--sky));
    box-shadow: 0 25px 70px rgba(37, 99, 235, .28);
    overflow: hidden;
    position: relative;
}

.cta-box::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, .18);
    border-radius: 50%;
    top: -120px;
    right: -80px;
}

footer {
    background: #020617;
}

/* Clases JS Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}