/* ============================================================
   PupiloChess — Shared Preview Styles v3
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --navy:       #060e1e;
    --navy-mid:   #0b1a32;
    --navy-card:  #0f2040;
    --blue:       #1a3a6b;
    --red:        #EE283B;
    --red-dark:   #c81e2f;
    --red-glow:   rgba(238,40,59,0.35);
    --rojo-marca:   #EE283B;   /* = --red. Todo el rojo del sitio es el de la marca (2026-10-09); botones rojos con texto en negrita */
    --rojo-marca-h: #c81e2f;
    --gold:       #f0c040;
    --gold-dim:   rgba(240,192,64,0.12);
    --white:      #ffffff;
    --gray:       #f5f7fa;
    --gray-mid:   #dde3ee;
    --text:       #1a202c;
    --text-mid:   #4a5568;
    --text-light: #8896ab;
    --glass:      rgba(255,255,255,0.05);
    --glass-b:    rgba(255,255,255,0.09);
    --header-h:   96px;
    --max:        1200px;
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 40px;
    --shadow-sm:  0 2px 12px rgba(0,0,0,0.14);
    --shadow-md:  0 10px 40px rgba(0,0,0,0.22);
    --shadow-lg:  0 24px 64px rgba(0,0,0,0.35);
    --shadow-red: 0 8px 32px rgba(238,40,59,0.45);
    --font-display: 'Bebas Neue', Impact, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.75rem;
}

.section { padding: 6rem 0; }
@media (min-width: 768px)  { .section { padding: 7rem 0; } }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }

/* ── Eyebrow ──────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1px solid rgba(240,192,64,0.22);
    border-radius: 100px;
    padding: 0.32rem 1rem;
    margin-bottom: 1.1rem;
}
.eyebrow--red   { color: var(--red); background: rgba(238,40,59,0.1); border-color: rgba(238,40,59,0.22); }
.eyebrow--white { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }

/* ── Typography ───────────────────────────────────────────── */
.title {
    font-family: var(--font-display);
    line-height: 1.0;
    letter-spacing: 0.03em;
}
.title--xl  { font-size: clamp(3.5rem, 9vw, 6.5rem); }
.title--lg  { font-size: clamp(2.8rem, 6vw, 4.8rem); }
.title--md  { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.title--sm  { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.title--white    { color: var(--white); }
.title--dark     { color: var(--navy); }
.title--gradient {
    background: linear-gradient(135deg, #fff 30%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.05rem;
    line-height: 1.82;
    max-width: 560px;
    margin: 0.85rem auto 0;
}
.subtitle--light { color: rgba(255,255,255,0.65); }
.subtitle--dark  { color: var(--text-mid); }

.section-header { text-align: center; margin-bottom: 4rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.28s var(--ease);
    white-space: nowrap;
    padding: 0.875rem 1.85rem;
    background: none;
    position: relative;
    overflow: hidden;
}
.btn--lg { padding: 1.1rem 2.4rem; font-size: 0.95rem; }
.btn--sm { padding: 0.6rem 1.3rem; font-size: 0.8rem; }

.btn--red {   /* «Ver cursos»: rojo de la marca #EE283B y texto en negrita por contraste (decisión de la usuaria, 2026-10-09) */
    background: var(--rojo-marca);
    color: var(--white);
    border-color: var(--rojo-marca);
    font-weight: 700;
    box-shadow: 0 8px 28px rgba(238,40,59,0.35);
}
.btn--red:hover {
    background: var(--rojo-marca-h);
    border-color: var(--rojo-marca-h);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(238,40,59,0.45);
    color: var(--white);
}
.btn--outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.38);
}
.btn--outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.75);
    transform: translateY(-3px);
    color: var(--white);
}
.btn--azul { background: #2f6db5; color: var(--white); border-color: #2f6db5; }
.btn--azul:hover { background: #24599a; border-color: #24599a; transform: translateY(-2px); color: var(--white); }
.btn--white {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
    font-weight: 800;
}
.btn--white:hover {
    background: #e8edf5;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--navy);
}
.btn--outline-red {
    background: transparent;
    color: #2f6db5;
    border-color: rgba(47,109,181,0.55);
}
.btn--outline-red:hover {
    background: #2f6db5;
    border-color: #2f6db5;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(47,109,181,0.35);
}
.btn--ghost-navy {
    background: transparent;
    color: var(--navy);
    border-color: rgba(10,22,40,0.35);
}
.btn--ghost-navy:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

/* ── Header ───────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 9000;
    background: rgba(6,14,30,0.92);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.4s var(--ease), border-color 0.4s;
}
.header--top {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.75rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.logo__icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(240,192,64,0.55));
    transition: filter 0.3s;
}
.logo:hover .logo__icon { filter: drop-shadow(0 0 18px rgba(240,192,64,0.8)); }
.logo__text {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: 0.06em;
    color: var(--white);
    line-height: 1;
}
.logo__text .accent { color: var(--gold); }

.nav { display: none; align-items: center; gap: 0.15rem; list-style: none; }
.nav__link {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    padding: 0.48rem 0.95rem;
    border-radius: var(--r-sm);
    transition: all 0.2s;
}
.nav__link:hover,
.nav__link.active { color: var(--white); background: rgba(255,255,255,0.09); }
.nav__cta {
    background: var(--rojo-marca) !important;
    color: var(--white) !important;
    font-weight: 700 !important;
    margin-left: 0.75rem;
    box-shadow: 0 4px 18px rgba(238,40,59,0.35);
    border-radius: var(--r-sm);
}
.nav__cta:hover { background: var(--rojo-marca-h) !important; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(238,40,59,0.45) !important; }

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px; height: 16px;
    background: none; border: none;
    cursor: pointer; padding: 0;
}
.hamburger__bar {
    width: 100%; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: all 0.3s; transform-origin: center;
}
.hamburger.active .hamburger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active .hamburger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: rgba(6,14,30,0.98);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 1rem 1.75rem 1.75rem;
    z-index: 8900;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.mobile-nav.open { display: block; }
.mobile-nav__list { list-style: none; display: flex; flex-direction: column; gap: 0.2rem; }
.mobile-nav__link {
    display: block;
    font-size: 0.88rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    padding: 0.9rem 1rem; border-radius: var(--r-sm);
    transition: all 0.2s;
}
.mobile-nav__link:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.mobile-nav__cta {
    background: var(--rojo-marca);
    color: var(--white) !important;
    font-weight: 700;
    text-align: center; margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .hamburger { display: none; }
    .nav { display: flex; }
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer__body { padding: 5rem 0 3.5rem; }
.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 4.5rem; } }

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.06em;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1;
}
.footer__logo .accent { color: var(--gold); }
.footer__logo .icon { filter: drop-shadow(0 0 8px rgba(240,192,64,0.5)); }
.footer__desc { line-height: 1.8; max-width: 300px; color: rgba(255,255,255,0.45); }
.footer__heading {
    font-family: var(--font-body);
    font-size: 0.64rem; font-weight: 800;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255,255,255,0.9); margin-bottom: 1.5rem;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer__link { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer__link:hover { color: var(--white); }
.footer__social-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer__social-link {
    display: inline-flex; align-items: center; gap: 0.65rem;
    color: rgba(255,255,255,0.45); transition: color 0.2s;
}
.footer__social-link:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 1.5rem 0; }
.footer__bottom-inner {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; text-align: center;
    font-size: 0.78rem; color: rgba(255,255,255,0.28);
}
@media (min-width: 768px) {
    .footer__bottom-inner { flex-direction: row; justify-content: space-between; }
}

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
    position: relative;
    background: var(--navy);
    overflow: hidden;
    padding: calc(var(--header-h) + 5rem) 0 4.5rem;
    text-align: center;
}
.page-hero__bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(26,58,107,0.7) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 80% 80%, rgba(238,40,59,0.12) 0%, transparent 60%);
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    letter-spacing: 0.04em;
    color: var(--white);
    margin: 0.75rem 0 1rem;
    line-height: 1;
}
.page-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.62);
    max-width: 500px; margin: 0 auto;
    line-height: 1.8;
}

/* ── Fade-in ──────────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in--d1 { transition-delay: 0.1s; }
.fade-in--d2 { transition-delay: 0.22s; }
.fade-in--d3 { transition-delay: 0.34s; }
.fade-in--d4 { transition-delay: 0.46s; }

/* ── Header Actions (cart + account) ─────────────────── */
.header__actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-right: 0.75rem;
}
.hdr-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: var(--r-sm);
    color: rgba(255,255,255,0.75);
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}
.hdr-icon:hover { background: rgba(255,255,255,0.09); color: var(--white); }
.hdr-icon__badge {
    position: absolute;
    top: 5px; right: 5px;
    min-width: 17px; height: 17px;
    border-radius: 100px;
    background: var(--red);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}
@media (min-width: 768px) { .header__actions { margin-right: 0; } }

/* ── Logo image sizing ────────────────────────────────── */
.logo-img {
    height: 80px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,0.5));
    transition: filter 0.3s, opacity 0.3s;
}
.logo:hover .logo-img { opacity: 0.85; }
