:root {
    color-scheme: light;
    --bg: #eef5f4;
    --surface: #ffffff;
    --surface-soft: #e3efed;
    --ink: #101820;
    --muted: #5d6878;
    --line: #d9e2ea;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --copper: #b45309;
    --night: #0c131a;
    --shadow: 0 22px 55px rgba(16, 24, 32, 0.11);
    --shadow-soft: 0 14px 32px rgba(16, 24, 32, 0.08);
    --header-height: 76px;
    --radius: 8px;
    --max-width: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

strong {
    color: var(--ink);
    font-weight: 720;
}

::selection {
    background: rgba(15, 118, 110, 0.18);
}

.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
}

.skip-link:focus {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    z-index: 999;
    background: var(--surface);
    color: var(--ink);
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-height);
    color: #ffffff;
    transition: background 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(12, 19, 26, 0.88);
    box-shadow: 0 10px 35px rgba(12, 19, 26, 0.22);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(100% - 2rem, var(--max-width));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 760;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.primary-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 2.65rem;
    padding: 0 0.8rem;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 650;
    transition: background 180ms ease, color 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.74rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    background: currentColor;
    border-radius: 99px;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: end;
    overflow: hidden;
    background: var(--night);
    color: #ffffff;
}

.hero-media,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
    filter: saturate(0.92) contrast(1.08);
    transform: scale(1.02);
}

.hero-shade {
    background:
        linear-gradient(90deg, rgba(8, 13, 18, 0.92) 0%, rgba(8, 13, 18, 0.68) 39%, rgba(8, 13, 18, 0.16) 100%),
        linear-gradient(0deg, rgba(8, 13, 18, 0.92) 0%, rgba(8, 13, 18, 0) 38%);
}

.hero-content {
    position: relative;
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
    padding: calc(var(--header-height) + 3rem) 0 4.5rem;
}

.hero h1 {
    max-width: 11ch;
    margin: 0;
    font-size: clamp(3.2rem, 11vw, 8.8rem);
    line-height: 0.92;
    letter-spacing: 0;
    text-wrap: balance;
}

.hero p {
    max-width: 43rem;
    margin: 1.5rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 760;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    background: #ffffff;
    color: var(--night);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.16);
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 10rem));
    gap: 1px;
    width: min(100%, 34rem);
    margin: 3.2rem 0 0;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-facts div {
    padding: 1rem;
    background: rgba(12, 19, 26, 0.62);
}

.hero-facts dt {
    font-size: 1.05rem;
    font-weight: 820;
}

.hero-facts dd {
    margin: 0.15rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
}

.intro-section,
.era-section,
.closing-section,
.stats-section {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.intro-section {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
    gap: 2rem;
    padding: 4.5rem 0 2.5rem;
}

.intro-copy p {
    margin: 0;
    max-width: 54rem;
    color: var(--ink);
    font-size: clamp(1.28rem, 2vw, 1.85rem);
    line-height: 1.35;
    font-weight: 650;
    text-wrap: balance;
}

.intro-index {
    display: grid;
    align-content: center;
    gap: 0.6rem;
}

.intro-index span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 720;
}

.era-section,
.stats-section {
    padding: 5rem 0;
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

.era-section + .era-section,
.stats-section {
    border-top: 1px solid var(--line);
}

.section-header {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.era-range {
    margin: 0.25rem 0 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 820;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h2,
h3,
p {
    margin-top: 0;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(2rem, 4.5vw, 4.35rem);
    line-height: 1;
    letter-spacing: 0;
    text-wrap: balance;
}

.timeline {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 0 2rem;
}

.timeline::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 12;
    justify-self: end;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.timeline-item {
    position: relative;
    grid-column: 2;
    max-width: 56rem;
    padding: 0 0 2rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-2rem - 5px);
    top: 0.54rem;
    width: 11px;
    height: 11px;
    border: 2px solid var(--bg);
    border-radius: 50%;
    background: var(--copper);
    box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.42);
}

.timeline-item h3 {
    margin-bottom: 0.55rem;
    font-size: clamp(1.08rem, 1.6vw, 1.35rem);
    line-height: 1.25;
}

.timeline-item p {
    margin-bottom: 0.85rem;
    color: var(--muted);
    font-size: 1rem;
}

.timeline-item p:last-child {
    margin-bottom: 0;
}

.media-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
    gap: 1.25rem;
    align-items: end;
    margin: 1.5rem 0 0 14rem;
}

.media-block img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.media-block figcaption {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.media-block-split img {
    object-position: center 35%;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0 14rem;
}

.media-grid figure {
    min-width: 0;
    margin: 0;
}

.media-grid img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.media-grid figcaption {
    max-width: 34rem;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.closing-section {
    display: grid;
    grid-template-columns: minmax(16rem, 18rem) minmax(0, 1fr);
    gap: 3rem;
    padding: 5rem 0;
    border-top: 1px solid var(--line);
}

.closing-section h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    max-width: 8ch;
}

.closing-copy {
    max-width: 56rem;
}

.closing-copy p {
    color: var(--muted);
    font-size: 1.08rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    min-height: 15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stat-card:hover,
.stat-card:focus-within {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.4);
    box-shadow: var(--shadow);
}

.stat-label {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 820;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    color: var(--ink);
    font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: 0.95;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer {
    margin-top: 3rem;
    padding: 2.5rem 1rem;
    background: var(--night);
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.site-footer p {
    margin: 0.25rem 0;
}

.site-footer strong {
    color: #ffffff;
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(16, 24, 32, 0.12);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 900px) {
    :root {
        --header-height: 68px;
    }

    .nav-toggle {
        display: block;
    }

    .primary-nav {
        position: fixed;
        inset: var(--header-height) 0 auto 0;
        display: grid;
        gap: 0;
        padding: 0.5rem 1rem 1rem;
        background: rgba(12, 19, 26, 0.96);
        box-shadow: 0 22px 44px rgba(12, 19, 26, 0.3);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 220ms ease, opacity 220ms ease;
    }

    .primary-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .primary-nav a {
        min-height: 3.25rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0 0.25rem;
    }

    .intro-section,
    .section-header,
    .timeline,
    .closing-section {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        display: none;
    }

    .timeline-item {
        border-left: 1px solid var(--line);
        padding-left: 1.25rem;
    }

    .timeline-item::before {
        left: -6px;
    }

    .media-block {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .media-grid {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .intro-section,
    .era-section,
    .closing-section,
    .stats-section,
    .hero-content {
        width: min(100% - 1.25rem, var(--max-width));
    }

    .brand {
        font-size: 0.92rem;
    }

    .brand-mark {
        width: 2.25rem;
        height: 2.25rem;
    }

    .hero {
        min-height: 92svh;
    }

    .hero-shade {
        background:
            linear-gradient(90deg, rgba(8, 13, 18, 0.9) 0%, rgba(8, 13, 18, 0.72) 58%, rgba(8, 13, 18, 0.38) 100%),
            linear-gradient(0deg, rgba(8, 13, 18, 0.94) 0%, rgba(8, 13, 18, 0) 48%);
    }

    .hero h1 {
        max-width: 9ch;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .hero-facts {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }

    .intro-section {
        padding-top: 3.25rem;
    }

    .era-section,
    .closing-section,
    .stats-section {
        padding: 3.5rem 0;
    }

    .media-block img {
        aspect-ratio: 4 / 3;
    }

    .media-grid img {
        aspect-ratio: 4 / 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
