/* ITGOMEZ — estilos compartidos */
:root {
    --bg-deep: #050814;
    --bg-card: #0a1020;
    --bg-elevated: #111827;
    --border: #1f2937;
    --text: #e8eaef;
    --muted: #9ca3b0;
    --cyan: #00d0ff;
    --purple: #b400ff;
    --gradient: linear-gradient(90deg, var(--cyan), var(--purple));
    --radius: 12px;
    --nav-h: 72px;
    --max-w: 1100px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-page-loading {
    overflow: hidden;
}

/* ——— Pantalla de carga (página / navegación) ——— */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #070b19;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loading-screen.loading-screen--done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen__logo-wrap {
    width: 250px;
    height: 250px;
    max-width: min(80vw, 250px);
    max-height: min(80vw, 250px);
    margin-bottom: 30px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(45deg, var(--cyan), var(--purple));
    box-shadow: 0 0 30px rgba(0, 208, 255, 0.4), 0 0 30px rgba(180, 0, 255, 0.4);
    animation: loading-pulse-glow 2s infinite alternate;
}

.loading-screen__logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #050814;
}

.loading-screen__text {
    text-align: center;
    max-width: 90%;
    margin-bottom: 40px;
}

.loading-screen__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.loading-screen__subtitle {
    font-size: 1.05rem;
    color: #a0a5b5;
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 36rem;
    margin: 0 auto;
}

.loading-screen__subtitle .highlight-cyan {
    color: var(--cyan);
    font-weight: 600;
}

.loading-screen__progress-outer {
    width: 400px;
    max-width: 80%;
    background-color: var(--bg-elevated);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 4px;
}

.loading-screen__progress-bar {
    height: 12px;
    width: 0%;
    border-radius: 20px;
    background: var(--gradient);
    box-shadow: 0 0 15px rgba(0, 208, 255, 0.8);
    transition: width 0.1s ease;
}

.loading-screen__percent {
    margin-top: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 208, 255, 0.5);
    font-family: ui-monospace, monospace;
}

@keyframes loading-pulse-glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 208, 255, 0.3), 0 0 20px rgba(180, 0, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 40px rgba(0, 208, 255, 0.6), 0 0 40px rgba(180, 0, 255, 0.6);
    }
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.85;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ——— Header / Nav ——— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 8, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    color: var(--text);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 208, 255, 0.45);
    box-shadow: 0 0 12px rgba(0, 208, 255, 0.2);
}

.brand span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(0, 208, 255, 0.08);
}

.nav-toggle {
    display: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

/* ——— Main ——— */
main {
    flex: 1;
    width: 100%;
}

.wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

/* ——— Hero ——— */
.hero {
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .lead {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--gradient);
    color: #050814;
}

.btn-primary:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 208, 255, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--cyan);
    border: 1px solid rgba(0, 208, 255, 0.35);
    margin-left: 0.5rem;
}

.btn-ghost:hover {
    opacity: 1;
    background: rgba(0, 208, 255, 0.08);
}

/* ——— Sections ——— */
.section-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--cyan);
}

.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: rgba(0, 208, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(180, 0, 255, 0.15);
    color: #d8a8ff;
    margin-bottom: 0.5rem;
}

/* ——— Page header (subpages) ——— */
.page-head {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.page-head h1 {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-head p {
    color: var(--muted);
}

/* ——— Script list ——— */
.script-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}

.script-item:last-child {
    border-bottom: none;
}

.script-item h3 {
    flex: 1 1 200px;
    font-size: 1.05rem;
}

.script-item .meta {
    color: var(--muted);
    font-size: 0.9rem;
    flex: 1 1 100%;
}

/* ——— About ——— */
.about-block {
    margin-bottom: 2rem;
}

.about-block h2 {
    font-size: 1.15rem;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.about-block p {
    color: var(--muted);
}

/* ——— Footer ——— */
.site-footer {
    margin-top: auto;
    padding: 1.5rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(10, 16, 32, 0.6);
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.site-footer a {
    color: var(--cyan);
}

/* ——— Mobile ——— */
@media (max-width: 720px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        background: rgba(5, 8, 20, 0.98);
        border-bottom: 1px solid var(--border);
        gap: 0;
        display: none;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 0.85rem 1rem;
    }

    .btn-ghost {
        margin-left: 0;
        margin-top: 0.75rem;
        display: inline-block;
    }

    .hero .btn + .btn {
        margin-left: 0;
    }
}
