/* ============================================================
 * layout.css - container, header/footer, page sections
 * ========================================================= */

/* ====== CONTAINER ====== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--container-sm); }

/* ====== TOPBAR (utility strip) ====== */
.topbar {
    height: 4px;
    background: var(--gold);
    position: sticky;
    top: 0;
    z-index: 51;
}

/* ====== HEADER ====== */
.site-header {
    background: rgba(10,10,10,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 4px;
    z-index: 50;
}
.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0 .75rem;
}
.site-header__left  { display: flex; gap: 1.25rem; align-items: center; }
.site-header__right { display: flex; gap: 1.25rem; align-items: center; justify-content: flex-end; }

.brand {
    text-align: center;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.brand__logo {
    display: block;
    height: 64px;
    width: auto;
    filter: drop-shadow(0 4px 18px rgba(224,185,74,.18));
    transition: filter .3s ease, transform .3s ease;
}
.brand:hover .brand__logo {
    filter: drop-shadow(0 4px 24px rgba(224,185,74,.4));
    transform: scale(1.03);
}
.brand--footer .brand__logo { height: 88px; }

.icon-link {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
}
.icon-link svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.icon-link:hover { color: var(--gold); }

/* CTA "Inscríbete" del header: icono circular sobrio, solo visible en móvil (ver media query) */
.site-header__cta {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.site-header__cta svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.site-header__cta:hover { background: var(--gold); color: #0a0a0a; }

/* ====== NAV (drawer slide-in) ====== */
.nav-toggle {
    display: inline-flex;
    background: transparent;
    border: 0;
    color: var(--text);
    width: 40px;
    height: 40px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: color .2s ease;
}
.nav-toggle:hover { color: var(--gold); }
.nav-toggle svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; }

/* ====== NAV DRAWER (slide-in desde la derecha) ====== */
.nav--drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 88vw);
    background: var(--bg-2);
    border-left: 1px solid var(--gold-deep);
    box-shadow: -24px 0 60px rgba(0,0,0,.55);
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.2,.7,.2,1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    visibility: hidden;
}
.nav--drawer.is-open { transform: translateX(0); visibility: visible; }
.nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.nav__eyebrow {
    font-size: .7rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--gold);
    font-family: var(--font-sans);
    font-weight: 500;
}
.nav__close {
    background: transparent;
    border: 0;
    color: var(--text);
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease;
}
.nav__close:hover { color: var(--gold); }
.nav__close svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.nav__links {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    font-size: .9rem;
    letter-spacing: .28em;
    text-transform: uppercase;
    font-weight: 500;
}
.nav__links a {
    color: var(--text-soft);
    text-decoration: none;
    padding: .35rem 0;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease, padding-left .25s ease;
}
.nav__links a:hover,
.nav__links a.is-active {
    color: var(--gold);
    padding-left: .5rem;
    border-bottom-color: var(--border);
}
.nav__links a.nav__cta {
    margin-top: 1rem;
    align-self: flex-start;
    border: 1px solid var(--gold);
    padding: .85rem 1.5rem;
    color: var(--gold);
}
.nav__links a.nav__cta:hover,
.nav__links a.nav__cta.is-active {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
    padding-left: 1.5rem;
}
.nav__foot {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 95;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
body.no-scroll { overflow: hidden; }

/* ====== SECTIONS ====== */
.section { padding: var(--space-2xl) 0; position: relative; overflow: hidden; }
.section--tight { padding: var(--space-xl) 0; }
.section--invert { background: var(--invert-bg); color: var(--invert-text); }
.section--invert .text-muted { color: #6b6555; }
.section--invert a:hover { color: var(--gold-deep); }

.section--stage { isolation: isolate; }
.section--stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('/assets/img/stage.jpg') center/cover no-repeat;
    filter: sepia(.7) saturate(1.7) brightness(.7) contrast(1.05);
    opacity: .85;
}
.section--stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 58%, rgba(224, 185, 74, .12), transparent 62%),
        linear-gradient(
            180deg,
            var(--bg) 0%,
            rgba(10, 8, 5, 0.6) 16%,
            rgba(10, 8, 5, 0.42) 50%,
            rgba(10, 8, 5, 0.66) 84%,
            var(--bg) 100%
        );
}

.section-head { text-align: center; margin-bottom: var(--space-xl); position: relative; }
.section-head__title {
    position: relative;
    display: block;
}
.section-head__script {
    display: block;
    margin-top: 1.1rem;
    font-family: var(--font-sans);
    font-size: .75rem;
    color: var(--gold);
    letter-spacing: .45em;
    text-transform: uppercase;
    font-weight: 500;
    white-space: normal;
}
.section--invert .section-head__script { color: var(--gold-deep); }

.section-head__sub {
    margin-top: 1rem;
    font-size: .8rem;
    letter-spacing: .4em;
    color: var(--muted);
    text-transform: uppercase;
}

/* ====== HERO (slider) ====== */
.hero {
    position: relative;
    min-height: 78vh;
    background: #000;
    overflow: hidden;
}

/* Each slide is absolutely stacked and fades in/out */
.hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.1s cubic-bezier(.4,0,.2,1), visibility 0s 1.1s;
    z-index: 0;
}
.hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s cubic-bezier(.4,0,.2,1);
    z-index: 1;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(.15) contrast(1.06) brightness(.92);
    transform: scale(1.02);
}
.hero__slide.is-active .hero__bg {
    animation: heroKenBurns 9s ease-out forwards;
}
@keyframes heroKenBurns {
    from { transform: scale(1.02); }
    to   { transform: scale(1.1); }
}

.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg,
            #000 0%,
            rgba(0,0,0,.95) 28%,
            rgba(0,0,0,.55) 55%,
            rgba(0,0,0,.1) 78%,
            rgba(0,0,0,.45) 100%
        ),
        linear-gradient(180deg,
            rgba(0,0,0,.4) 0%,
            transparent 28%,
            transparent 70%,
            rgba(0,0,0,.75) 100%
        );
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(224,185,74,.1), transparent 55%);
}
.hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: left;
}
.hero__inner > * { max-width: 760px; }
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 1.25rem;
    border: 1px solid rgba(224,185,74,.45);
    color: var(--gold);
    font-size: .65rem;
    letter-spacing: .4em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(6px);
    font-weight: 500;
    opacity: 0;
}
.hero__badge::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold);
    animation: heroPulseDot 2.4s ease-in-out infinite;
}
.hero__eyebrow {
    font-size: .72rem;
    letter-spacing: .55em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: block;
    opacity: 0;
}
.hero__title {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 12vw, 9.5rem);
    line-height: .9;
    color: #fff;
    letter-spacing: .03em;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
    text-shadow: 0 6px 40px rgba(0,0,0,.55);
    opacity: 0;
}
.hero__title-script {
    font-family: var(--font-sans);
    display: block;
    font-size: clamp(.95rem, 1.6vw, 1.2rem);
    color: var(--gold);
    letter-spacing: .9em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-left: .15em;
    font-weight: 500;
    opacity: 0;
}
.hero__rule {
    border: 0;
    border-top: 1px solid var(--gold);
    margin: 2.5rem 0 2rem;
    width: 90px;
    opacity: 0;
}
.hero__subtitle {
    font-size: .82rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin: 0 0 2.5rem;
    max-width: 42ch;
    line-height: 1.9;
    opacity: 0;
}
.hero__cta {
    display: inline-flex;
    opacity: 0;
}

/* Per-slide entrance: animations only run when slide is active.
   Removing/adding .is-active naturally restarts CSS animations. */
.hero__slide.is-active .hero__badge        { animation: heroFadeUp .9s    cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__eyebrow      { animation: heroFadeUp .9s .08s cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__title        { animation: heroFadeUp 1.1s .18s cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__title-script { animation: heroFadeUp 1s   .28s cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__rule         { animation: heroExpand 1.3s .38s cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__subtitle     { animation: heroFadeUp 1s   .45s cubic-bezier(.2,.7,.3,1) both; }
.hero__slide.is-active .hero__cta          { animation: heroFadeUp 1s   .55s cubic-bezier(.2,.7,.3,1) both; }

/* ====== Slider nav + dots ====== */
.hero__slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(224,185,74,.4);
    background: rgba(10,10,10,.55);
    backdrop-filter: blur(8px);
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
    opacity: .85;
}
.hero__slider-nav:hover { background: var(--gold); color: #0a0a0a; border-color: var(--gold); opacity: 1; }
.hero__slider-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.hero__slider-nav--prev { left: 1.5rem; }
.hero__slider-nav--next { right: 1.5rem; }

.hero__slider-dots {
    position: absolute;
    bottom: 5rem;
    left: max(3rem, 7vw);
    z-index: 4;
    display: flex;
    gap: .75rem;
}
.hero__slider-dots button {
    width: 26px;
    height: 2px;
    border: 0;
    background: rgba(255,255,255,.22);
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: width .35s ease, background .3s ease;
}
.hero__slider-dots button:hover { background: rgba(224,185,74,.55); }
.hero__slider-dots button.is-active {
    background: rgba(224,185,74,.25);
    width: 64px;
}
.hero__slider-dots button.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left center;
    animation: heroDotProgress 6.5s linear forwards;
}
@keyframes heroDotProgress {
    to { transform: scaleX(1); }
}
.hero[data-paused] .hero__slider-dots button.is-active::after {
    animation-play-state: paused;
}
.hero__scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: .6rem;
    letter-spacing: .5em;
    color: var(--gold);
    text-transform: uppercase;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    opacity: 0;
    animation: heroFadeUp 1s .8s cubic-bezier(.2,.7,.3,1) both, heroPulse 2.6s 1.5s ease-in-out infinite;
}
.hero__scroll::after {
    content: '';
    width: 1px;
    height: 38px;
    background: linear-gradient(180deg, var(--gold), transparent);
}
.hero__sidebar {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    font-size: .65rem;
    letter-spacing: .55em;
    color: var(--gold);
    text-transform: uppercase;
    z-index: 3;
    white-space: nowrap;
    opacity: 0;
    animation: heroFadeUp 1s 1s cubic-bezier(.2,.7,.3,1) both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroExpand {
    from { width: 0; opacity: 0; }
    to   { width: 90px; opacity: 1; }
}
@keyframes heroPulse {
    0%, 100% { opacity: .35; }
    50%      { opacity: 1; }
}
@keyframes heroPulseDot {
    0%, 100% { opacity: 1;  transform: scale(1); }
    50%      { opacity: .35; transform: scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__badge, .hero__eyebrow, .hero__title, .hero__title-script,
    .hero__rule, .hero__subtitle, .hero__cta, .hero__scroll, .hero__sidebar {
        animation: none !important; opacity: 1 !important;
    }
    .hero__slide { transition: opacity .15s ease; }
    .hero__slide.is-active .hero__bg { animation: none; }
    .hero__slider-dots button.is-active::after { animation: none; }
    .hero__rule { width: 90px; }
}

/* Mobile: hide arrows, smaller dots, taller hero */
@media (max-width: 760px) {
    .hero__slider-nav { display: none; }
    .hero__slider-dots { left: 50%; transform: translateX(-50%); bottom: 4.5rem; }
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: 88vh;
    }
    .hero__bg { background-position: 50% 22%; }
    .hero__bg::before {
        background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.92) 100%);
    }
    .hero__inner {
        padding: 0 1.5rem var(--space-2xl);
        text-align: center;
        align-self: end;
        margin: 0 auto;
    }
    .hero__rule { margin: 2rem auto; }
    .hero__subtitle { margin: 0 auto 2rem; max-width: 38ch; }
    .hero__sidebar { display: none; }
}
@media (max-width: 480px) {
    .hero { min-height: 82vh; }
    .hero__inner { padding: 0 1.25rem var(--space-xl); }
    .hero__title { font-size: clamp(2.9rem, 15vw, 5rem); }
    .hero__title-script { letter-spacing: .3em; font-size: .78rem; margin-top: 1.1rem; }
    .hero__badge { letter-spacing: .2em; font-size: .56rem; padding: .45rem .9rem; margin-bottom: 1.5rem; }
    .hero__eyebrow { letter-spacing: .35em; font-size: .64rem; }
    .hero__subtitle { font-size: .78rem; letter-spacing: .16em; margin-bottom: 2rem; }
    .hero__cta { width: 100%; }
}

/* ====== FOOTER ====== */
.site-footer {
    background: #050505;
    border-top: 1px solid var(--border);
    padding: var(--space-xl) 0 var(--space-md);
    color: var(--muted);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}
.site-footer__brand .brand__mark { color: var(--text); }
.site-footer__title {
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 1rem;
    font-weight: 600;
}
.site-footer__list { list-style: none; padding: 0; margin: 0; }
.site-footer__list li { margin-bottom: .55rem; font-size: .9rem; }
.site-footer__list a:hover { color: var(--gold); }

.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--muted-2);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 880px) {
    .site-header__inner { grid-template-columns: 1fr auto 1fr; gap: .75rem; padding: .85rem 0; }
    .site-header__right { gap: .75rem; }
    .site-header__right .icon-link { display: none; }
    .site-header__cta { display: inline-flex; }
    .brand__logo { height: 50px; }
    .hero { min-height: 70vh; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .section { padding: var(--space-xl) 0; }
    .section-head { margin-bottom: var(--space-lg); }
    .section-head__script { font-size: 1.5rem; letter-spacing: .3em; margin-top: .85rem; }
}
@media (max-width: 400px) {
    .section-head__script { font-size: 1.2rem; letter-spacing: .22em; }
}
@media (max-width: 520px) {
    .site-footer__grid { grid-template-columns: 1fr; }
}
