/* ===== VARIABLES CSS (Ryōcode Theme) ===== */
:root {
    /* Colores principales - Paleta Cyberpunk Red/Black */
    --color-primary: #e60000;
    --color-primary-dark: #b30000;
    --color-primary-light: #ff3333;
    --color-secondary: #ffffff;
    --color-accent: #00f3ff;
    /* Un toque de cian para contraste tech */

    /* Colores de fondo */
    --color-bg-primary: #050505;
    --color-bg-secondary: #0a0a0a;
    --color-bg-tertiary: #111111;
    --color-bg-dark: #000000;
    --color-bg-card: rgba(20, 20, 20, 0.95);

    /* Colores de texto */
    --color-text-primary: #ffffff;
    --color-text-secondary: #e0e0e0;
    --color-text-muted: #888888;
    --color-text-light: #ffffff;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #e60000 0%, #ff1a1a 100%);
    --gradient-secondary: linear-gradient(135deg, #333 0%, #555 100%);
    --gradient-hero: linear-gradient(180deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 1) 100%);

    /* Sombras (Glow Effects) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 10px 40px rgba(230, 0, 0, 0.2);
    /* Red Glow */
    --shadow-card: 0 5px 20px rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 10px var(--color-primary);

    /* Tipografía */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-family: var(--font-body);
    /* Default */

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1.1rem;
    /* Un poco más grande para mejor lectura */
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;
    --spacing-3xl: 8rem;

    /* Bordes */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
    --border-radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index */
    --z-header: 100;
    --z-modal: 200;
    --z-tooltip: 300;

    /* Contenedor */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Header height */
    --header-height: 5rem;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(230, 0, 0, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.03), transparent 25%);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

/* ===== UTILIDADES ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section__header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section__subtitle {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 0 5px rgba(230, 0, 0, 0.5);
}

.section__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.section__description {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    font-weight: 700;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn--primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px rgba(230, 0, 0, 0.4);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(230, 0, 0, 0.7);
}

.btn--secondary {
    background: var(--color-bg-card);
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--secondary:hover {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px var(--color-primary);
}

.btn--outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn--outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 10px rgba(230, 0, 0, 0.3);
}

.btn--full {
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 0, 0, 0.2);
    z-index: var(--z-header);
    transition: all var(--transition-normal);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav__link {
    position: relative;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    /* Ajustado */
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 5px var(--color-primary);
    transition: width var(--transition-normal);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-primary);
    text-shadow: 0 0 5px var(--color-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle,
.nav__close {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.nav__toggle:hover,
.nav__close:hover {
    color: var(--color-primary);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Placeholder BG - Se puede cambiar por imagen real o video */
    background: #000;
    overflow: hidden;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 1;
}

/* Efecto de 'blobs' o luces de fondo estilo Ryocode */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 0;
}

.hero__container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-top: var(--header-height);
}

.hero__badge {
    display: inline-block;
    background: rgba(230, 0, 0, 0.1);
    border: 1px solid var(--color-primary);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-full);
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(230, 0, 0, 0.2);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-6xl);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.hero__title .highlight {
    color: var(--color-primary);
    text-shadow: 0 0 20px var(--color-primary);
}

.hero__subtitle {
    font-size: var(--font-size-2xl);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
}

.hero__description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.hero__buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: var(--font-size-xs);
    z-index: 2;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* ===== ESTADÍSTICAS RÁPIDAS ===== */
.quick-stats {
    background: var(--color-bg-tertiary);
    /* Dark gray background */
    padding: var(--spacing-xl) 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
    display: block;
    color: var(--color-primary);
    text-shadow: 0 0 10px var(--color-primary);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SECCIONES GENERALE (Welcome, Services) ===== */
.welcome__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.welcome__text {
    /* ... */
}

.welcome__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: white;
}

.feature-icon {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.welcome__image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

/* Servicios Grid */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    /* Red Glow */
}

.service-card__icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--color-primary);
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.service-card__description {
    color: var(--color-text-muted);
}


/* ===== FOOTER ===== */
.footer {
    background: var(--color-bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid #222;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo .logo-text {
    font-size: 1.5rem;
}

.footer__description {
    margin-top: 1rem;
    color: var(--color-text-muted);
}

.footer__title {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer__list li {
    margin-bottom: 0.8rem;
}

.footer__link {
    color: var(--color-text-secondary);
    transition: 0.3s;
}

.footer__link:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #555;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE (MOBILE) - CLAVE PARA EL USUARIO ===== */
@media screen and (max-width: 968px) {
    .hero__title {
        font-size: 3.5rem;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .welcome__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .welcome__features {
        max-width: 400px;
        margin: 2rem auto;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {

    /* MENÚ MÓVIL ESTILO CATILLUC (FIXED) */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        padding: 6rem 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
        border-left: 1px solid var(--color-primary);
        transition: 0.4s ease;
        z-index: 200;
        display: flex;
        flex-direction: column;
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .nav__link {
        font-size: 1.2rem;
        display: block;
        width: 100%;
    }

    .nav__toggle {
        display: block;
        z-index: 101;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
        color: var(--color-primary);
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .stats__grid {
        grid-template-columns: 1fr;
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}