﻿.legacy-timeline-section {
    --nc-red: #b0121b;
    --nc-green: #1f7a3a;
    --legacy-ink: #0f172a;
    --legacy-muted: #475569;
    --legacy-border: rgba(15, 23, 42, 0.14);
    background: #fff;
    padding-top: clamp(56px, 7vw, 90px);
    padding-bottom: clamp(56px, 7vw, 90px);
}

.legacy-timeline-container {
    width: min(1160px, 92vw);
    margin: 0 auto;
}

.legacy-timeline-head {
    text-align: center;
    margin-bottom: clamp(1.1rem, 2.8vw, 2rem);
}

.legacy-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(176, 18, 27, 0.3);
    border-radius: 999px;
    padding: 0.28rem 0.72rem;
    color: #8f1d2d;
    background: rgba(176, 18, 27, 0.05);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legacy-timeline-head h2 {
    margin: 0.72rem 0 0.52rem;
    color: var(--legacy-ink);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.legacy-timeline-head p {
    margin: 0 auto;
    max-width: 68ch;
    color: var(--legacy-muted);
}

.legacy-exhibit {
    position: relative;
    border: 1px solid var(--legacy-border);
    border-radius: 24px;
    padding: clamp(1rem, 2.5vw, 2rem);
    overflow: hidden;
    overflow-x: clip;
    background:
        linear-gradient(145deg, rgba(176, 18, 27, 0.05), rgba(255, 255, 255, 0.95) 38%, rgba(31, 122, 58, 0.06) 100%);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.journey-slider {
    position: relative;
    width: 100%;
    z-index: 1;
}

.journey-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 0 52px;
    scrollbar-width: none;
}

.journey-track::-webkit-scrollbar {
    display: none;
}

.journey-slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-width: 100%;
}

.journey-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 5;
}

.journey-nav.prev {
    left: 8px;
}

.journey-nav.next {
    right: 8px;
}

.journey-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.journey-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.journey-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
}

.journey-dots .dot.active {
    background: rgba(0, 0, 0, 0.75);
}

.legacy-collage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.07;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0) 40%),
        radial-gradient(circle at 12% 18%, rgba(176, 18, 27, 0.26), rgba(176, 18, 27, 0) 38%),
        radial-gradient(circle at 84% 78%, rgba(31, 122, 58, 0.22), rgba(31, 122, 58, 0) 32%),
        url('../assets/hero-bg.png') center / cover no-repeat;
}

.legacy-exhibit-main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(250px, 0.43fr) minmax(0, 0.57fr);
    gap: clamp(0.95rem, 2.3vw, 1.8rem);
    align-items: stretch;
}

.legacy-portrait-wrap {
    position: relative;
    margin: 0;
    border-radius: 20px;
    border: 1px solid var(--legacy-border);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.72rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.13);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 220ms ease, opacity 220ms ease;
}

.legacy-portrait-wrap.is-updating {
    opacity: 0.7;
    transform: translateY(6px);
}

.legacy-portrait-spotlight {
    position: absolute;
    inset: 10% 8%;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.5), rgba(176, 18, 27, 0.1) 48%, rgba(31, 122, 58, 0.08) 76%, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.legacy-portrait-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: 14px;
    background: linear-gradient(180deg, #eef2f7, #e2e8f0);
    filter: none;
    transition: opacity 220ms ease, transform 220ms ease;
}

.legacy-portrait-img.is-legacy {
    filter: grayscale(100%);
}

.legacy-portrait-cap {
    margin-top: 0.52rem;
    font-size: 0.78rem;
    text-align: center;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.legacy-info-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--legacy-border);
    background: rgba(255, 255, 255, 0.92);
    padding: clamp(0.95rem, 2vw, 1.3rem);
    min-height: 100%;
    transition: transform 220ms ease, opacity 220ms ease;
}

.legacy-info-panel.is-updating {
    opacity: 0.7;
    transform: translateY(6px);
}

.legacy-name {
    margin: 0;
    font-size: clamp(1.24rem, 2.2vw, 1.82rem);
    line-height: 1.15;
    color: var(--legacy-ink);
}

.legacy-museum-label {
    margin: 0;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(31, 122, 58, 0.35);
    background: rgba(31, 122, 58, 0.08);
    color: #165637;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.28rem 0.72rem;
}

.legacy-info-grid {
    display: grid;
    gap: 0.85rem;
}

.legacy-info-block h4 {
    margin: 0 0 0.28rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #334155;
}

.legacy-info-block h4::after {
    content: "";
    display: block;
    width: 56px;
    height: 2px;
    border-radius: 999px;
    margin-top: 0.34rem;
    background: linear-gradient(90deg, var(--nc-red), rgba(31, 122, 58, 0.65));
}

.legacy-info-block p {
    margin: 0;
    color: var(--legacy-muted);
}

.legacy-impact-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.legacy-impact-list li {
    position: relative;
    padding-left: 0.95rem;
    color: #1e293b;
}

.legacy-impact-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nc-green);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.15);
}

.legacy-info-actions {
    margin-top: auto;
    display: flex;
    gap: 0.62rem;
    flex-wrap: wrap;
}

.legacy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.63rem 1rem;
    border-radius: 11px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.legacy-btn-primary {
    border: 1px solid var(--nc-red);
    background: var(--nc-red);
    color: #fff;
}

.legacy-btn-secondary {
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: #fff;
    color: #0f172a;
}

.legacy-btn:hover {
    transform: translateY(-1px);
}

.legacy-btn-primary:hover {
    box-shadow: 0 10px 20px rgba(176, 18, 27, 0.2);
}

.legacy-btn-secondary:hover {
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.legacy-timeline-nav {
    position: relative;
    margin-top: clamp(1rem, 2.1vw, 1.4rem);
    padding-top: 1rem;
}

.legacy-timeline-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: rgba(15, 23, 42, 0.1);
}

.legacy-timeline-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 2px;
    width: var(--legacy-fill, 0%);
    background: linear-gradient(90deg, var(--nc-red), var(--nc-green));
    transition: width 320ms ease;
}

.legacy-timeline-track {
    display: flex;
    gap: 0.72rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.36rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.42) transparent;
    scroll-snap-type: x mandatory;
    max-width: 100%;
}

.legacy-node-btn {
    flex: 0 0 auto;
    min-width: 164px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0.54rem 0.66rem;
    display: grid;
    gap: 0.2rem;
    text-align: left;
    scroll-snap-align: start;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.legacy-node-year {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 700;
}

.legacy-node-name {
    font-size: 0.92rem;
    font-weight: 700;
}

.legacy-node-btn.is-active {
    border-color: rgba(31, 122, 58, 0.65);
    background: linear-gradient(180deg, #fff, rgba(31, 122, 58, 0.07));
    transform: translateY(-1px);
}

.legacy-node-btn.is-active .legacy-node-year {
    color: var(--nc-red);
}

.legacy-quote {
    margin: 1rem 0 0;
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--legacy-border);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.96rem 1rem 0.9rem 1.1rem;
}

.legacy-quote-mark {
    position: absolute;
    left: 0.7rem;
    top: 0.16rem;
    font-size: 2.2rem;
    line-height: 1;
    color: rgba(176, 18, 27, 0.24);
}

.legacy-quote p {
    margin: 0;
    padding-left: 1.1rem;
    color: #1e293b;
    font-size: clamp(1rem, 1.25vw, 1.08rem);
}

.legacy-quote footer {
    margin-top: 0.5rem;
    padding-left: 1.1rem;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.legacy-node-btn:focus-visible,
.legacy-btn:focus-visible {
    outline: 2px solid rgba(31, 122, 58, 0.92);
    outline-offset: 2px;
}

@media (max-width: 980px) {
    .legacy-exhibit-main {
        grid-template-columns: 1fr;
    }

    .legacy-portrait-wrap {
        max-width: 430px;
        margin: 0 auto;
        width: 100%;
    }

    .legacy-info-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .legacy-exhibit {
        overflow: visible;
    }

    .legacy-exhibit-main,
    .legacy-info-panel,
    .legacy-info-grid {
        min-width: 0;
    }

    .legacy-timeline-head h2 {
        font-size: clamp(24px, 6.6vw, 36px);
        line-height: 1.12;
    }

    .legacy-timeline-head p,
    .legacy-name,
    .legacy-info-block p,
    .legacy-node-name,
    .legacy-quote p,
    .legacy-quote footer {
        white-space: normal;
        overflow: visible;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .legacy-collage {
        opacity: 0.05;
        background:
            linear-gradient(135deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0) 42%),
            radial-gradient(circle at 12% 18%, rgba(176, 18, 27, 0.2), rgba(176, 18, 27, 0) 40%),
            radial-gradient(circle at 84% 78%, rgba(31, 122, 58, 0.16), rgba(31, 122, 58, 0) 36%),
            url('../assets/hero-bg.png') center / cover no-repeat;
    }

    .legacy-museum-label {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .legacy-node-btn {
        min-width: 140px;
    }

    .legacy-node-year,
    .legacy-node-name {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .legacy-quote {
        padding: 0.85rem 0.9rem 0.8rem;
    }

    .legacy-quote-mark {
        position: static;
        display: block;
        line-height: 1;
    }

    .legacy-quote p,
    .legacy-quote footer {
        padding-left: 0;
    }

    .journey-track {
        padding: 0 12px;
    }

    .journey-nav {
        display: none;
    }
}

@media (max-width: 640px) {
    .legacy-timeline-section .legacy-timeline-container {
        width: 100%;
        max-width: 100%;
        padding-inline: 12px;
    }

    .legacy-exhibit {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        padding: 0.85rem 0.75rem;
    }

    .journey-track {
        padding: 0 4px;
    }

    .legacy-portrait-wrap {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0.5rem;
    }

    .legacy-portrait-img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .legacy-info-panel {
        width: 100%;
        max-width: 100%;
        padding: 0.95rem 0.85rem;
        gap: 0.8rem;
    }

    .legacy-info-grid {
        grid-template-columns: 1fr;
        gap: 0.72rem;
    }

    .legacy-info-block p {
        line-height: 1.55;
    }

    .legacy-timeline-track {
        display: flex;
        gap: 14px;
        width: max-content;
        min-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }

    .legacy-info-actions {
        grid-template-columns: 1fr;
    }

    .legacy-btn {
        width: 100%;
    }
}

@media (min-width: 900px) {
    .legacy-timeline-track {
        justify-content: center;
        width: 100%;
        min-width: 0;
        overflow: visible;
        scroll-snap-type: none;
    }
}

@media (max-width: 480px) {
    .legacy-timeline-section .legacy-timeline-container {
        padding-inline: 10px;
    }

    .legacy-exhibit {
        padding: 0.75rem 0.65rem;
        border-radius: 18px;
    }

    .legacy-timeline-head h2 {
        font-size: clamp(22px, 7.4vw, 30px);
        line-height: 1.1;
    }

    .legacy-node-btn {
        min-width: 132px;
        padding: 0.5rem 0.56rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .legacy-portrait-wrap,
    .legacy-portrait-img,
    .legacy-info-panel,
    .legacy-node-btn,
    .legacy-timeline-fill,
    .legacy-btn {
        transition: none !important;
        animation: none !important;
    }
}



@supports (background-image: image-set(url("../assets/hero-bg.webp") type("image/webp"), url("../assets/hero-bg.png") type("image/png"))) {
  .legacy-collage {
    background:
      linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0) 40%),
      radial-gradient(circle at 12% 18%, rgba(176, 18, 27, 0.26), rgba(176, 18, 27, 0) 38%),
      radial-gradient(circle at 84% 78%, rgba(31, 122, 58, 0.22), rgba(31, 122, 58, 0) 32%),
      image-set(
        url("../assets/hero-bg.webp") type("image/webp"),
        url("../assets/hero-bg.png") type("image/png")
      ) center / cover no-repeat;
  }
}

