/**
 * layout.css
 * -----------------------------------------------------------------------
 * Estructura y posicionamiento de las grandes zonas del sitio: header,
 * hero, secciones, grid de emisoras, línea de tiempo y footer.
 * Mobile-first.
 * -----------------------------------------------------------------------
 */

/* ============================== HEADER ============================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-block: var(--sp-3);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-md);
    white-space: nowrap;
}

.brand__accent { color: var(--brand-gold); font-weight: 500; }

.main-nav {
    display: none;
}

.main-nav__list {
    display: flex;
    gap: var(--sp-6);
}

.main-nav__list a {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--t-fast) var(--ease);
    position: relative;
    padding-block: var(--sp-1);
}

.main-nav__list a:hover,
.main-nav__list a:focus-visible {
    color: var(--text-primary);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* =============================== HERO ================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 86vh;
    overflow: hidden;
    padding-block: var(--sp-8) var(--sp-9);
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carrusel de fondo del hero: 4 fotografías reales de marca, con un
   crossfade suave y continuo hecho sólo en CSS (sin JavaScript ni
   librerías de carrusel). Cada imagen ocupa una "ventana" de 6s dentro
   de un ciclo de 24s, con transición de opacidad entre ellas. */
.hero__slide {
    opacity: 0;
    animation: hero-crossfade 24s infinite;
}

.hero__slide:nth-of-type(1) { animation-delay: 0s; }
.hero__slide:nth-of-type(2) { animation-delay: 6s; }
.hero__slide:nth-of-type(3) { animation-delay: 12s; }
.hero__slide:nth-of-type(4) { animation-delay: 18s; }

@keyframes hero-crossfade {
    0%   { opacity: 0; }
    4%   { opacity: 1; }
    21%  { opacity: 1; }
    27%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Respeta la preferencia de reducir movimiento: se queda en la primera
   fotografía, sin animación. */
@media (prefers-reduced-motion: reduce) {
    .hero__slide { animation: none; opacity: 0; }
    .hero__slide:first-of-type { opacity: 1; }
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-scrim);
}

.hero__content {
    max-width: 720px;
}

.hero__title {
    font-size: var(--fs-3xl);
    color: #ffffff;
}

.hero__subtitle {
    font-size: var(--fs-md);
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.85);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.hero__support-hint {
    margin-top: var(--sp-4);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.75);
}

.hero__support-hint a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero__waveform {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    padding-bottom: var(--sp-2);
    opacity: 0.5;
}

.hero__waveform i {
    width: 4px;
    border-radius: 2px;
    background: var(--brand-gold);
    animation: waveform 1.6s ease-in-out infinite;
}

.hero__waveform i:nth-child(odd) { animation-duration: 1.1s; }
.hero__waveform i:nth-child(3n) { animation-duration: 1.4s; }
.hero__waveform i:nth-child(4n) { animation-duration: 0.9s; }

@keyframes waveform {
    0%, 100% { height: 6px; }
    50% { height: 34px; }
}

/* ============================== SECTIONS ============================== */
.section {
    padding-block: var(--sp-8);
}

.section--alt {
    background: var(--bg-elevated);
}

.section__title {
    font-size: var(--fs-2xl);
    max-width: 20ch;
}

.section__lead {
    font-size: var(--fs-md);
    max-width: 60ch;
    margin-bottom: var(--sp-6);
}

/* ========================== STATIONS GRID ============================ */
.stations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-5);
}

/* ============================ AHORA SUENA ============================= */
.ahora-suena {
    display: grid;
    gap: var(--sp-7);
}

/* ============================== TIMELINE =============================== */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding-left: var(--sp-5);
    border-left: 2px solid var(--border);
}

.timeline__item {
    position: relative;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--sp-5) - 5px);
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, var(--brand-gold));
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline__item.is-active::before {
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent);
}

.timeline__time {
    display: block;
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: var(--sp-1);
}

/* ================================ ABOUT ================================= */
.about__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    margin-top: var(--sp-5);
}

/* =============================== CONTACT ================================ */
.contact {
    display: grid;
    gap: var(--sp-7);
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    margin-top: var(--sp-5);
}

.contact__details li {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    color: var(--text-secondary);
}

.contact__details svg { color: var(--accent); flex-shrink: 0; }

/* ================================ FOOTER ================================= */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding-top: var(--sp-8);
    margin-bottom: 84px; /* deja espacio para la barra del reproductor */
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
    padding-bottom: var(--sp-7);
}

.footer-brand p {
    max-width: 40ch;
    margin-top: var(--sp-3);
}

.footer-nav h3,
.footer-contact h3 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: var(--sp-3);
}

.footer-nav ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.footer-nav a,
.footer-contact a {
    color: var(--text-secondary);
    transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--accent);
}

.site-footer__bottom {
    border-top: 1px solid var(--border);
    padding-block: var(--sp-4);
}

.site-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
}

@media (min-width: 640px) {
    .site-footer__bottom-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}
