/**
 * Scrollytelling Timeline - Immersive scroll-driven band history
 * Uses era colors from design-tokens.css
 */

/* ========================================
   Layout: Full-page sections + sidebar
   ======================================== */

.scrollytelling {
    position: relative;
    background: var(--color-bg-base, #030303);
    overflow-x: hidden;
}

/* Sidebar navigation - fixed left */
.scrollytelling-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0.75rem;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 0 12px 12px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: none;
}

.era-dot {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.4s var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
}

.era-dot::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.6875rem;
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.era-dot:hover::after {
    opacity: 1;
}

.era-dot.active {
    transform: scale(1.4);
    border-color: var(--current-era-color, var(--color-primary, #dc2626));
    background: var(--current-era-color, var(--color-primary, #dc2626));
    box-shadow: 0 0 16px var(--current-era-glow, rgba(220, 38, 38, 0.5));
}

.era-dot.active::after {
    opacity: 1;
    color: var(--current-era-color, var(--color-primary, #dc2626));
}

/* Year counter */
.year-counter {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    z-index: 100;
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    transition: color 0.6s;
}

/* Progress bar */
.scrollytelling-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    z-index: calc(var(--z-header, 1000) + 1);
    background: var(--current-era-color, var(--color-primary, #dc2626));
    transition: background-color 0.6s;
}

/* ========================================
   Hero intro section
   ======================================== */

.scrollytelling-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.scrollytelling-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, var(--color-bg-base, #030303) 80%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-inner h1 {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(3rem, 10vw, 7rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 0.95;
    margin-bottom: 1rem;
}

.hero-year-range {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.3em;
    color: var(--color-primary, #dc2626);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary, #d1d5db);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-indicator i {
    font-size: 1.25rem;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   Era sections
   ======================================== */

.era-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(4rem, 8vh, 8rem) clamp(2rem, 6vw, 6rem);
    padding-left: clamp(4rem, 8vw, 8rem);
    overflow: hidden;
}

.era-section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s;
    z-index: 0;
}

.era-section.is-active::before {
    opacity: 1;
}

/* Era-specific background tints */
.era-section[data-era="1978"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.55 0.06 240 / 0.08) 0%, transparent 60%);
}
.era-section[data-era="1982"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.55 0.12 145 / 0.08) 0%, transparent 60%);
}
.era-section[data-era="1984"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.65 0.16 55 / 0.08) 0%, transparent 60%);
}
.era-section[data-era="1987"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.55 0.22 25 / 0.1) 0%, transparent 60%);
}
.era-section[data-era="1990"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.75 0.14 85 / 0.08) 0%, transparent 60%);
}
.era-section[data-era="1995"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.45 0.15 300 / 0.08) 0%, transparent 60%);
}
.era-section[data-era="2011"]::before {
    background: radial-gradient(ellipse at 30% 50%, oklch(0.92 0.02 85 / 0.06) 0%, transparent 60%);
}

/* OKLCH fallbacks */
@supports not (color: oklch(0 0 0)) {
    .era-section[data-era="1978"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(107, 122, 141, 0.08) 0%, transparent 60%); }
    .era-section[data-era="1982"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(61, 139, 94, 0.08) 0%, transparent 60%); }
    .era-section[data-era="1984"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(212, 135, 42, 0.08) 0%, transparent 60%); }
    .era-section[data-era="1987"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 60%); }
    .era-section[data-era="1990"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(212, 160, 32, 0.08) 0%, transparent 60%); }
    .era-section[data-era="1995"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(107, 33, 168, 0.08) 0%, transparent 60%); }
    .era-section[data-era="2011"]::before { background: radial-gradient(ellipse at 30% 50%, rgba(245, 240, 224, 0.06) 0%, transparent 60%); }
}

/* Era content */
.era-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.era-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--current-era-color, rgba(255, 255, 255, 0.15));
    border-radius: 2px;
    color: var(--current-era-color, rgba(255, 255, 255, 0.6));
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

.era-year-title {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    margin-bottom: 0.25rem;
    color: var(--current-era-color, var(--text-primary, #fff));
    opacity: 0;
    transform: translateY(30px);
}

.era-name {
    font-family: var(--font-editorial, 'Playfair Display', Georgia, serif);
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary, #d1d5db);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
}

.era-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary, #d1d5db);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
}

/* Albums in each era */
.era-albums {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
}

.era-album {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary, #d1d5db);
    text-decoration: none;
    transition: background 0.3s, border-color 0.3s;
}

.era-album:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--current-era-color, rgba(255, 255, 255, 0.2));
}

.era-album i {
    font-size: 0.75rem;
    color: var(--current-era-color, var(--color-primary, #dc2626));
}

/* Key events list */
.era-events {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    opacity: 0;
    transform: translateY(20px);
}

.era-events li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary, #d1d5db);
}

.era-events li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--current-era-color, var(--color-primary, #dc2626));
    opacity: 0.6;
}

/* Parallax album covers (decorative, right side) */
.era-parallax-cover {
    position: absolute;
    right: clamp(2rem, 8vw, 10rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.12;
    pointer-events: none;
}

.era-parallax-cover img {
    width: clamp(200px, 25vw, 400px);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Memorial era (2011) special styling */
.era-section.era-memorial {
    text-align: center;
    justify-content: center;
}

.era-section.era-memorial .era-content {
    max-width: 700px;
    margin: 0 auto;
}

.era-section.era-memorial .era-year-title {
    color: var(--era-2011, #f5f0e0);
}

.memorial-dates {
    font-family: var(--font-editorial, 'Playfair Display', Georgia, serif);
    font-size: 1.25rem;
    color: var(--color-amber, #f59e0b);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
}

/* Divider between eras */
.era-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent);
}

/* ========================================
   Outro / CTA
   ======================================== */

.scrollytelling-outro {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.scrollytelling-outro h2 {
    font-family: var(--font-display, 'Bebas Neue', sans-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.scrollytelling-outro .cta-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.scrollytelling-outro .cta-link {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--text-primary, #fff);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.3s, border-color 0.3s;
}

.scrollytelling-outro .cta-link:hover {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.4);
}

/* ========================================
   Responsive: mobile
   ======================================== */

@media (max-width: 768px) {
    /* Sidebar becomes top bar */
    .scrollytelling-sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
        padding: 0.5rem 1rem;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .era-dot {
        width: 10px;
        height: 10px;
    }

    .era-dot::after {
        display: none;
    }

    /* Sections */
    .era-section {
        padding: clamp(6rem, 10vh, 8rem) 1.5rem 4rem;
        min-height: auto;
        min-height: 100svh;
    }

    .era-content {
        max-width: 100%;
    }

    /* Parallax covers move behind and shrink */
    .era-parallax-cover {
        right: 1rem;
        opacity: 0.06;
    }

    .era-parallax-cover img {
        width: 150px;
    }

    /* Year counter */
    .year-counter {
        right: 1rem;
        bottom: 1rem;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .era-year-title {
        font-size: 2.5rem;
    }

    .hero-inner h1 {
        font-size: 3rem;
    }

    .era-albums {
        flex-direction: column;
    }
}

/* ========================================
   Reduced motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .era-label,
    .era-year-title,
    .era-name,
    .era-description,
    .era-albums,
    .era-events,
    .memorial-dates {
        opacity: 1;
        transform: none;
    }

    .scroll-indicator {
        animation: none;
    }

    .era-parallax-cover {
        transform: translateY(-50%);
    }
}
