:root {
    --bg-color: #020617;
    --card-bg: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary: #1e293b;
    --accent: #818cf8;
    --gold: #facc15;
    --container-width: 800px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Header */
header {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 20;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-color);
}

/* Main */
main {
    flex: 1;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--text-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    position: relative;
    z-index: 20;
}

/* El HTML original se oculta visualmente, pero Pretext lo usa como fuente
   para renderizar el texto en el canvas. visibility:hidden conserva la caja
   y el scroll real (no rompe el layout, que fue el bug de la v1). */
.content {
    font-size: 1.125rem;
    color: var(--text-muted);
    visibility: hidden;
}

.content p {
    margin-bottom: 1.5rem;
}

.cta-group {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 20;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn.primary {
    background-color: var(--primary);
    color: var(--bg-color);
}

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

.btn.gold {
    background-color: var(--gold);
    color: #3a2800;
}

.btn.gold:hover {
    background-color: #fde047;
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: var(--secondary);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Sections for other pages */
.section-title {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 20;
}

/* Canvas de Pretext: ocupa toda la ventana, debajo del texto interactivo */
#pretext-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    pointer-events: none; /* deja pasar los clics a los botones/enlaces */
}

.hero {
    position: relative;
    z-index: 10;
}

@media (max-width: 640px) {
    .hero h2 {
        font-size: 2.25rem;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .cta-group {
        flex-direction: column;
    }
}
