:root {
    --history-ink: #18262a;
    --history-muted: #647176;
    --history-paper: #f7f4ed;
    --history-surface: #ffffff;
    --history-teal: #2f7679;
    --history-teal-dark: #1f5558;
    --history-gold: #b79a62;
    --history-line: rgba(47, 118, 121, 0.24);
    --history-border: rgba(24, 38, 42, 0.14);
    --history-radius: 1.25rem;
    --history-shadow: 0 20px 60px rgba(24, 38, 42, 0.1);
}

.masca-history {
    overflow: clip;
    background: var(--history-paper);
    color: var(--history-ink);
}

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

.history-shell {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.history-section {
    padding-block: clamp(5rem, 9vw, 9rem);
}

.history-eyebrow,
.history-kicker,
.timeline-entry__label {
    margin: 0 0 0.8rem;
    color: var(--history-teal);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.35;
    text-transform: uppercase;
}

.history-hero {
    min-height: min(920px, 100svh);
    display: grid;
    align-items: center;
    padding-block: clamp(7rem, 12vw, 11rem) clamp(4rem, 8vw, 8rem);
    background:
        radial-gradient(circle at 88% 10%, rgba(47, 118, 121, 0.18), transparent 31rem),
        var(--history-paper);
}

.history-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    align-items: center;
}

.history-hero h1,
.history-section h2,
.timeline-entry h3 {
    margin-top: 0;
    color: var(--history-ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    text-wrap: balance;
}

.history-hero h1 {
    max-width: 8ch;
    margin-bottom: 1.5rem;
    font-size: clamp(2.8rem, 6.3vw, 6.3rem);
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 0.88;
}

.history-hero__intro {
    max-width: 34rem;
    margin: 0;
    color: var(--history-muted);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.55;
}

.history-hero__media,
.timeline-gallery figure {
    margin: 0;
}

.history-hero__media {
    position: relative;
}

.history-hero__media img,
.history-origin__media img,
.timeline-gallery img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.history-hero__media img {
    position: relative;
    z-index: 1;
    aspect-ratio: 1.18 / 1;
    border-radius: var(--history-radius);
    box-shadow: var(--history-shadow);
}

.history-hero figcaption,
.timeline-gallery figcaption {
    color: var(--history-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.history-hero figcaption {
    position: relative;
    z-index: 1;
    margin-top: 0.9rem;
}

.history-intro {
    background: var(--history-surface);
}

.history-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(3rem, 9vw, 9rem);
    align-items: start;
}

.history-section h2 {
    margin-bottom: 1.4rem;
    font-size: clamp(2.7rem, 5vw, 5rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 1;
}

.history-prose {
    columns: 2 18rem;
    column-gap: clamp(2rem, 4vw, 4rem);
}

.history-hero__intro,
.history-prose p,
.history-origin__copy p,
.history-timeline__header > p:last-child,
.timeline-entry__content > p,
.history-closing__inner > p {
    color: var(--history-muted);
    font-family: "Manrope", Arial, sans-serif;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.85;
}

.history-prose p {
    margin: 0 0 1.5rem;
    break-inside: avoid;
}

.history-origin__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: clamp(3rem, 8vw, 8rem);
    align-items: center;
}

.history-origin__media img {
    aspect-ratio: 1.15 / 1;
    border-radius: var(--history-radius);
    box-shadow: var(--history-shadow);
}

.history-origin__copy p {
    margin: 0 0 1.35rem;
}

.history-timeline-section {
    background: #eef1ed;
}

.history-timeline__header {
    max-width: 760px;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

.history-timeline__header > p:last-child {
    max-width: 42rem;
    margin-bottom: 0;
}

.history-timeline {
    position: relative;
    max-width: 1020px;
    margin-inline: auto;
}

.history-timeline::before {
    position: absolute;
    top: 0.8rem;
    bottom: 0;
    left: 11rem;
    width: 1px;
    background: var(--history-line);
    content: "";
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 5rem;
    padding-bottom: clamp(4.5rem, 8vw, 7rem);
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

.timeline-entry__marker {
    position: absolute;
    top: 0.55rem;
    left: calc(11rem - 0.48rem);
    width: 0.95rem;
    height: 0.95rem;
    border: 3px solid #eef1ed;
    border-radius: 50%;
    background: var(--history-teal);
    box-shadow: 0 0 0 1px var(--history-teal);
}

.timeline-entry__date {
    padding-top: 0.12rem;
    color: var(--history-teal-dark);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: right;
}

.timeline-entry__content {
    min-width: 0;
}

.timeline-entry h3 {
    max-width: 18ch;
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.03;
}

.timeline-entry__content > p {
    max-width: 45rem;
    margin: 0 0 1.25rem;
}

.timeline-entry--featured .timeline-entry__content {
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--history-border);
    border-radius: var(--history-radius);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 55px rgba(24, 38, 42, 0.07);
}

.timeline-entry--final .timeline-entry__marker {
    background: var(--history-gold);
    box-shadow: 0 0 0 1px var(--history-gold);
}

.timeline-gallery {
    display: grid;
    gap: 1rem;
    margin-top: 2.25rem;
}

.timeline-gallery--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-gallery--two {
    grid-template-columns: 1.28fr 0.72fr;
}

.timeline-gallery figure {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.timeline-gallery img {
    min-height: 230px;
    aspect-ratio: 4 / 3;
    border-radius: 0.85rem;
    filter: grayscale(1) sepia(0.08);
}

.timeline-gallery--two figure:last-child img {
    aspect-ratio: 3 / 4;
}

.history-closing {
    background: var(--history-teal-dark);
    color: white;
}

.history-closing__inner {
    max-width: 920px;
    text-align: center;
}

.history-closing .history-kicker,
.history-closing h2,
.history-closing__inner > p {
    color: white;
}

.history-closing__inner > p {
    max-width: 43rem;
    margin: 0 auto;
    opacity: 0.78;
}

.history-closing__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2.25rem;
}

.history-button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

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

.history-button--primary {
    background: white;
    color: var(--history-teal-dark);
}

.history-button--secondary {
    color: white;
}

.history-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.75, 0.3, 1);
}

.history-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 900px) {
    .history-hero {
        min-height: auto;
    }

    .history-hero__inner,
    .history-intro__grid,
    .history-origin__grid {
        grid-template-columns: 1fr;
    }

    .history-hero h1 {
        max-width: none;
    }

    .history-origin__media {
        order: 2;
    }

    .history-prose {
        columns: 1;
    }

    .history-timeline::before {
        left: 1rem;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding-left: 3.25rem;
    }

    .timeline-entry__marker {
        left: calc(1rem - 0.48rem);
    }

    .timeline-entry__date {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .history-shell {
        width: min(100% - 1.25rem, 1180px);
    }

    .history-hero {
        padding-top: 6rem;
    }

    .timeline-entry--featured .timeline-entry__content {
        padding: 1rem;
    }

    .timeline-gallery--four,
    .timeline-gallery--two {
        grid-template-columns: 1fr;
    }

    .timeline-gallery img,
    .timeline-gallery--two figure:last-child img {
        min-height: 0;
        aspect-ratio: auto;
    }

    .history-closing__actions {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .history-hero h1 {
        font-size: clamp(2.52rem, 12.6vw, 4.2rem);
    }

    .history-hero__intro,
    .history-prose p,
    .history-origin__copy p,
    .history-timeline__header > p:last-child,
    .timeline-entry__content > p,
    .history-closing__inner > p {
        font-size: 0.8rem;
        line-height: 1.75;
    }
}

@media (prefers-reduced-motion: reduce) {
    .history-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .history-button {
        transition: none;
    }
}

.history-story {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
    padding-top: clamp(2rem, 4vw, 3.5rem);
    border-top: 1px solid var(--history-border);
}

.history-story--1964,
.history-story--portrait {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
}

.history-story--sayonara {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
}

.history-story__copy h4 {
    margin: 0 0 1rem;
    color: var(--history-ink);
    font: inherit;
    font-size: clamp(1.45rem, 2.5vw, 2.1rem);
    font-weight: 600;
    line-height: 1.15;
}

.history-story__copy p {
    margin: 0 0 1.1rem;
    color: var(--history-muted);
    font-size: clamp(1rem, 1.4vw, 1.13rem);
    line-height: 1.8;
}

.history-story__gallery {
    display: grid;
    gap: 1rem;
}

.history-story__gallery--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-story figure,
.history-story__wide-image {
    margin: 0;
}

.history-story img,
.history-story__wide-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.85rem;
    object-fit: cover;
}

.history-story__gallery img {
    aspect-ratio: 4 / 3;
}

.history-story__feature-image img {
    aspect-ratio: 4 / 3;
}

.history-story__wide-image {
    margin-top: clamp(1.5rem, 4vw, 3rem);
}

.history-story__wide-image img {
    max-height: 620px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.48);
}

.history-story figcaption,
.history-story__wide-image figcaption {
    margin-top: 0.65rem;
    color: var(--history-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Keeps the hero image clean; no decorative gold outline. */
.history-hero__media::before {
    content: none;
}

@media (max-width: 760px) {
    .history-story--1964,
    .history-story--portrait,
    .history-story--sayonara,
    .history-story__gallery--two {
        grid-template-columns: 1fr;
    }
}
