/* ============================================================================
   ByNet Technologies — Estructura de páginas interiores
   Tokens de diseño, encabezado, pie y botones. La página principal lleva
   estos estilos en línea; las páginas interiores los toman de aquí.
   ============================================================================ */

:root {
    /* Colores principales */
    --primary: #0052FF;
    --primary-dark: #0041CC;
    --secondary: #00D9FF;
    --accent: #00FF88;
    --dark: #0A0E27;
    --dark-secondary: #151B3B;
    --light: #FFFFFF;
    --gray: #8B93B0;
    --gray-light: #E5E8F0;

    /* Tipografía */
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Bordes */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(0, 217, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Encabezado ───────────────────────────────────────────────────────────── */

.top-bar {
    background: var(--dark-secondary);
    padding: 0.5rem 2rem;
    font-size: 0.85rem;
    color: var(--gray);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-bar a {
    color: var(--gray);
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--secondary);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--light);
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    color: var(--secondary);
}

.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--light);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Botones ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-main);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--light);
    box-shadow: 0 4px 15px rgba(0, 82, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 255, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-outline:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-2px);
}

/* ── Encabezado de página ─────────────────────────────────────────────────── */

.page-header {
    padding: var(--spacing-lg) 2rem var(--spacing-md);
    background:
        linear-gradient(180deg, rgba(0, 82, 255, 0.12), transparent),
        var(--dark);
    text-align: center;
}

.page-header-inner {
    max-width: 820px;
    margin: 0 auto;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.75;
}

.migas {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem 0;
    font-size: 0.88rem;
    color: var(--gray);
}

.migas a {
    color: var(--gray);
    text-decoration: none;
}

.migas a:hover {
    color: var(--secondary);
}

.migas span {
    color: var(--light);
}

/* ── Pie ──────────────────────────────────────────────────────────────────── */

.site-footer {
    background: var(--dark-secondary);
    padding: var(--spacing-lg) 2rem var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--light);
}

.footer-col p,
.footer-col a {
    color: var(--gray);
    text-decoration: none;
    line-height: 1.9;
    font-size: 0.95rem;
}

.footer-col a {
    display: block;
}

.footer-col a:hover {
    color: var(--secondary);
}

.footer-bottom {
    max-width: 1400px;
    margin: var(--spacing-md) auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--dark-secondary);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav-menu.active {
        max-height: 420px;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
    }

    .nav-menu a::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 0.5rem 1.25rem;
    }

    .nav-container,
    .page-header,
    .site-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
