/* ========================================
   RESET Y VARIABLES
   ======================================== */

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

:root {
    --color-bg:           #0A0514;
    --color-bg-card:      #130D2A;
    --color-bg-card-alt:  #1A1035;
    --color-primary:      #9333EA;
    --color-primary-dark: #7E22CE;
    --color-secondary:    #6366F1;
    --color-accent:       #A855F7;
    --color-dark:         #0A0514;
    --color-dark-alt:     #130D2A;
    --color-dark-card:    #1A1035;
    --color-gray:         #9CA3AF;
    --color-light:        #2A2145;
    --color-white:        #ffffff;
    --color-pink:         #EC4899;
    --color-blue:         #3B82F6;
    --font-main:          'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --spacing-xs:    0.5rem;
    --spacing-sm:    1rem;
    --spacing-md:    1.5rem;
    --spacing-lg:    2rem;
    --spacing-xl:    3rem;
    --spacing-xxl:   4rem;
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:     0 8px 24px rgba(0,0,0,0.5);
    --shadow-glow:   0 0 20px rgba(147,51,234,0.4);
    --transition-fast:   0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow:   0.5s ease;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(147,51,234,0.4); }
    50%       { box-shadow: 0 0 40px rgba(147,51,234,0.8), 0 0 60px rgba(147,51,234,0.3); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideTextIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   BASE
   ======================================== */

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-white);
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 0% 0%,   rgba(147,51,234,0.18) 0px, transparent 55%),
        radial-gradient(ellipse at 100% 80%, rgba(99,102,241,0.15) 0px, transparent 55%);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

a { text-decoration: none; color: inherit; transition: var(--transition-fast); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; border: none; cursor: pointer; transition: var(--transition-fast); }
ul { list-style: none; }

/* Espaciado entre contenido y footer */
main {
    margin-bottom: var(--spacing-xxl);
}

@media (max-width: 768px) {
    main {
        margin-bottom: var(--spacing-xl);
    }
}

/* ========================================
   UTILIDADES
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}
@media (min-width: 768px) {
    .container { padding: 0 var(--spacing-lg); }
}
.text-center { text-align: center; }
.hidden { display: none; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ========================================
   BOTONES PRINCIPALES
   ======================================== */

.btn-primary,
.btn-secondary {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(147,51,234,0.45);
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(147,51,234,0.65);
}
.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(147,51,234,0.4);
    transform: translateY(-2px);
}

/* ========================================
   SECTION HEADER (compartido)
   ======================================== */

.section-header {
    margin-bottom: var(--spacing-xl);
    padding-left: var(--spacing-lg);
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(147,51,234,0.6);
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.section-header h2::after {
    display: none;
}

/* ========================================
   PAGE HERO (páginas internas)
   ======================================== */

@keyframes heroShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes heroParticleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50%       { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

@keyframes heroBadgeFade {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

.page-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--color-bg);
    text-align: center;
    padding: 5rem 0 4rem;
}

.page-hero .hero-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.page-hero .hero-background img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.14;
    filter: saturate(1.4) contrast(1.1);
    transition: transform 8s ease;
}
.page-hero:hover .hero-background img {
    transform: scale(1.04);
}

.page-hero .hero-deco-bg {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(10,5,20,0.55) 0%, transparent 40%, rgba(10,5,20,0.7) 100%),
        radial-gradient(ellipse at 20% 50%, rgba(147,51,234,0.32) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(99,102,241,0.26) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(168,85,247,0.2) 0%, transparent 50%);
}

.page-hero .hero-deco-bg::before,
.page-hero .hero-deco-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.page-hero .hero-deco-bg::before {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(147,51,234,0.18) 0%, transparent 70%);
    top: -60px; right: 10%;
    animation: float 9s ease-in-out infinite;
}
.page-hero .hero-deco-bg::after {
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
    bottom: 20px; left: 8%;
    animation: float 13s ease-in-out infinite reverse;
}

.page-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 100%;
    width: 100%;
    padding: 0 var(--spacing-lg);
    animation: fadeInUp 0.9s ease-out;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.page-hero .hero-content::before {
    content: '✦ ROOBAL ✦';
    display: block;
    font-size: 0.72rem;
    letter-spacing: 5px;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    opacity: 0.8;
    animation: heroBadgeFade 3s ease-in-out infinite;
}

.page-hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        #A855F7 30%,
        #ffffff 50%,
        #6366F1 70%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroShimmer 5s linear infinite;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.8;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
    padding-top: 1.2rem;
}

.page-subtitle::before {
    content: '';
    display: block;
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 0 auto 1.2rem;
    border-radius: 2px;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--color-primary) 30%,
        var(--color-secondary) 70%,
        transparent 100%
    );
    z-index: 5;
}

@media (max-width: 768px) {
    .page-hero {
        min-height: 380px;
        padding: 3.5rem 1rem 3rem;
    }
    .page-hero h1 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        letter-spacing: 2px;
    }
    .page-subtitle {
        font-size: 0.95rem;
    }
}

/* Focus / Accesibilidad */
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.fade-in { animation: fadeIn 0.6s ease-out; }
