:root {
    --archive-parchment: #e7dcc5;
    --archive-gold: #caa66c;
    --archive-ink: #0b0c0b;
}

body.animas-archive-page {
    margin: 0;
    background: var(--archive-ink);
    color: var(--archive-parchment);
    font-family: Georgia, "Times New Roman", serif;
}

.archive-hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: #15150f url("../images/archive/animas-archive-hero.png") center / cover no-repeat;
}

.archive-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 5, 4, .7), rgba(4, 5, 4, .08) 28%, rgba(4, 5, 4, .18) 62%, rgba(4, 5, 4, .78)),
        linear-gradient(90deg, rgba(3, 4, 3, .72), rgba(3, 4, 3, .28) 36%, transparent 67%);
}

.archive-header {
    position: absolute;
    z-index: 4;
    top: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: clamp(4.75rem, 7vw, 6.25rem);
    padding: .75rem clamp(1.25rem, 4vw, 5.5rem);
    background: linear-gradient(180deg, rgba(7, 8, 7, .9), rgba(7, 8, 7, .62) 74%, transparent);
    box-sizing: border-box;
}

.archive-nav {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.6vw, 3.4rem);
}

.archive-nav--left { justify-content: flex-end; padding-right: clamp(2rem, 5vw, 7rem); }
.archive-nav--right { justify-content: flex-start; padding-left: clamp(2rem, 5vw, 7rem); }

.archive-nav a {
    position: relative;
    color: var(--archive-parchment);
    font-family: var(--animas-font-display);
    font-size: clamp(.68rem, .92vw, 1rem);
    letter-spacing: .07em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
    transition: color 220ms ease, text-shadow 220ms ease;
}

.archive-nav a::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: -.55rem;
    left: 50%;
    height: 1px;
    background: var(--archive-gold);
    transition: right 220ms ease, left 220ms ease;
}

.archive-nav a:hover,
.archive-nav a:focus-visible {
    color: #fff0c7;
    text-shadow: 0 0 .75rem rgba(218, 169, 91, .75);
    outline: none;
}

.archive-nav a:hover::after,
.archive-nav a:focus-visible::after { right: 8%; left: 8%; }

.archive-brand {
    display: grid;
    place-items: center;
    width: clamp(3.25rem, 4.4vw, 4.5rem);
    height: clamp(3.8rem, 5.6vw, 5rem);
    overflow: hidden;
}

.archive-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: invert(91%) sepia(16%) saturate(458%) hue-rotate(354deg) brightness(95%) drop-shadow(0 0 .55rem rgba(202, 166, 108, .18));
}

.archive-mobile-trigger { display: none; }
.archive-mobile-menu { display: none; }

.archive-hero__copy {
    align-self: end;
    width: min(42rem, 48vw);
    margin: 0 0 clamp(3rem, 7vh, 6rem) clamp(1.5rem, 7vw, 8rem);
}

.archive-hero__copy h1 {
    max-width: 13ch;
    margin: 0;
    font-family: var(--animas-font-display);
    font-size: clamp(2.4rem, 5.4vw, 6.4rem);
    font-weight: 400;
    line-height: .94;
    letter-spacing: .01em;
    text-wrap: balance;
    text-shadow: 0 .18rem .7rem rgba(0, 0, 0, .78);
}

.archive-content {
    min-height: 0;
    background-color: #121310;
    background-image:
        linear-gradient(rgba(5, 6, 5, .42), rgba(5, 6, 5, .42)),
        url("../images/ui/basalto-volcanico-seamless.png");
    background-position: center, center;
    background-repeat: repeat, repeat;
    background-size: auto, 34rem;
}

.archive-discover {
    display: grid;
    gap: 0;
    width: min(50%, 48rem);
    margin: 0 auto;
    padding: 0;
}

.archive-discover__panel {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    background: #080908;
    box-shadow:
        -1.4rem 0 1.35rem rgba(0, 0, 0, .5),
        1.4rem 0 1.35rem rgba(0, 0, 0, .5);
    color: var(--archive-parchment);
    text-decoration: none;
}

.archive-discover__panel::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(90deg, rgba(1, 2, 1, .28), transparent 58%);
    transition: background 260ms ease;
}

.archive-discover__panel img {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 600ms cubic-bezier(.2, .7, .2, 1), filter 300ms ease;
}

.archive-discover__panel span {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: clamp(1.5rem, 7vw, 8rem);
    max-width: 10ch;
    color: #ecdfc0;
    font-family: var(--animas-font-display);
    font-size: clamp(1.5rem, 3.94vw, 4.5rem);
    font-weight: 400;
    letter-spacing: .02em;
    line-height: .9;
    text-shadow: 0 .15rem .85rem rgba(0, 0, 0, .9);
    text-transform: uppercase;
    transform: translateY(-50%);
    transition: color 220ms ease, text-shadow 220ms ease;
}

.archive-discover__panel--beginning span { left: auto; right: clamp(1.5rem, 7vw, 8rem); }
.archive-discover__panel--beginning::before { background: linear-gradient(270deg, rgba(1, 2, 1, .2), transparent 60%); }
.archive-discover__panel--animas span { left: clamp(1.5rem, 7vw, 8rem); }
.archive-discover__panel--teluria span { left: auto; right: clamp(1.5rem, 7vw, 8rem); }
.archive-discover__panel--teluria::before { background: linear-gradient(270deg, rgba(1, 2, 1, .24), transparent 60%); }
.archive-discover__panel--calling span {
    max-width: 8ch;
    color: #f4e9ce;
    right: 0;
    left: 0;
    width: max-content;
    margin: 0 auto;
    text-align: center;
}
.archive-discover__panel--calling::before {
    background: linear-gradient(90deg, rgba(7, 11, 7, .62), rgba(7, 11, 7, .18) 42%, transparent 68%);
}

/* Each title lives in the deliberate negative space of its own illustration. */
.archive-discover__panel--beginning span,
.archive-discover__panel--teluria span {
    right: 5%;
    left: auto;
    text-align: right;
}
.archive-discover__panel--animas span {
    right: auto;
    left: 5%;
    text-align: left;
}
.archive-discover__panel--calling span {
    right: 0;
    left: 0;
    margin-inline: auto;
    text-align: center;
}

.archive-discover__panel:hover img,
.archive-discover__panel:focus-visible img { transform: scale(1.025); filter: brightness(1.08); }
.archive-discover__panel:hover span,
.archive-discover__panel:focus-visible span {
    color: #fff0c7;
    text-shadow: 0 0 .12em rgba(255, 245, 210, .86), 0 0 .48em rgba(213, 152, 55, .76), 0 .15rem .85rem rgba(0, 0, 0, .9);
}
.archive-discover__panel:focus-visible { outline: 1px solid rgba(240, 210, 149, .85); outline-offset: 5px; }

.archive-content__inner:not(:empty) {
    width: min(76rem, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.archive-scroll-mark {
    position: fixed;
    z-index: 8;
    right: 3rem;
    bottom: 2.5rem;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 4rem;
    padding: 0;
    border: 1px solid rgba(231, 220, 197, .42);
    border-radius: 2rem;
    background: rgba(8, 9, 8, .2);
    color: var(--archive-gold);
    cursor: pointer;
    backdrop-filter: blur(2px);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 240ms ease, visibility 0s linear 0s;
}

body.archive-menu-open .archive-scroll-mark {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.archive-scroll-arrow { width: 1.15rem; height: 2.75rem; overflow: visible; }
.archive-scroll-arrow path { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity 260ms ease; }
.archive-scroll-arrow__base path { stroke: rgba(231, 215, 174, .42); stroke-width: 1.15; }
.archive-scroll-arrow__glow { filter: drop-shadow(0 0 3px rgba(218, 169, 91, .95)); animation: archive-arrow-light 2.2s ease-in-out infinite; }
.archive-scroll-arrow__glow path { stroke: #f1d99d; stroke-width: 1.5; }
.archive-scroll-mark.is-at-start .archive-scroll-arrow__up,
.archive-scroll-mark.is-at-end .archive-scroll-arrow__down { opacity: 0; }
.archive-scroll-mark.is-at-start .archive-scroll-arrow__glow { animation-name: archive-arrow-light-down; }
.archive-scroll-mark.is-at-end .archive-scroll-arrow__glow { animation-name: archive-arrow-light-up; }

@keyframes archive-arrow-light {
    0%, 18% { clip-path: inset(49% 0); opacity: 0; }
    48% { clip-path: inset(0); opacity: 1; }
    76%, 100% { clip-path: inset(0); opacity: 0; }
}

@keyframes archive-arrow-light-up {
    0%, 18% { clip-path: inset(50% 0); opacity: 0; }
    48% { clip-path: inset(0 0 50%); opacity: 1; }
    76%, 100% { clip-path: inset(0 0 50%); opacity: 0; }
}

@keyframes archive-arrow-light-down {
    0%, 18% { clip-path: inset(50% 0); opacity: 0; }
    48% { clip-path: inset(50% 0 0); opacity: 1; }
    76%, 100% { clip-path: inset(50% 0 0); opacity: 0; }
}

@media (max-width: 760px) {
    body.archive-menu-open { overflow: hidden; }

    .archive-hero {
        display: block;
        min-height: auto;
        padding-top: calc(4.5rem + 56.25vw);
        background-color: #10110f;
        background-position: center 4.5rem;
        background-size: 100% auto;
    }

    .archive-hero::before { display: none; }

    .archive-header {
        height: 4.5rem;
        padding: .5rem 1.15rem;
        background: rgba(7, 8, 7, .96);
    }

    .archive-nav { display: none; }

    .archive-mobile-trigger {
        display: block;
        width: 2.6rem;
        height: 2.6rem;
        padding: .45rem;
        border: 0;
        background: transparent;
        color: var(--archive-parchment);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .archive-mobile-trigger svg {
        width: 100%;
        height: 100%;
        overflow: visible;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: color 220ms ease, filter 220ms ease;
    }

    .archive-mobile-trigger:hover svg,
    .archive-mobile-trigger:focus-visible svg {
        color: #f3dfad;
        filter: drop-shadow(0 0 .35rem rgba(218, 169, 91, .72));
    }

    .archive-mobile-trigger:focus-visible { outline: none; }
    .archive-mobile-trigger--menu { justify-self: start; }
    .archive-mobile-trigger--search { justify-self: end; }
    .archive-brand { width: 2.75rem; height: 3.65rem; }

    .archive-mobile-menu {
        position: fixed;
        z-index: 12;
        inset: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 5.5rem 2.25rem 3rem;
        background:
            radial-gradient(circle at 18% 10%, rgba(202, 166, 108, .15), transparent 30%),
            linear-gradient(145deg, rgba(37, 38, 34, .98), rgba(9, 10, 9, .995) 68%);
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition:
            transform 420ms cubic-bezier(.22, .75, .2, 1),
            opacity 300ms ease,
            visibility 0s linear 420ms;
        pointer-events: none;
    }

    .archive-mobile-menu::before {
        content: "";
        position: absolute;
        inset: 1rem;
        border: 1px solid rgba(231, 220, 197, .13);
        pointer-events: none;
    }

    .archive-mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        transition-delay: 0s;
        pointer-events: auto;
    }

    .archive-mobile-menu__close {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        width: 2.75rem;
        height: 2.75rem;
        padding: .65rem;
        border: 0;
        background: transparent;
        color: var(--archive-parchment);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .archive-mobile-menu__close svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.25;
        stroke-linecap: round;
    }

    .archive-mobile-menu nav {
        display: grid;
        gap: .6rem;
    }

    .archive-mobile-menu nav a {
        position: relative;
        padding: 1rem .5rem;
        color: var(--archive-parchment);
        font-family: var(--animas-font-display);
        font-size: clamp(1.35rem, 7vw, 2.05rem);
        letter-spacing: .04em;
        text-align: center;
        text-decoration: none;
        text-transform: uppercase;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        transition: color 220ms ease, text-shadow 280ms ease, filter 280ms ease;
    }

    .archive-mobile-menu nav a + a::before {
        content: "◆";
        position: absolute;
        top: -.38rem;
        left: 50%;
        color: rgba(202, 166, 108, .52);
        font-family: Georgia, serif;
        font-size: .34rem;
        transform: translateX(-50%) rotate(45deg);
    }

    .archive-mobile-menu nav a:hover,
    .archive-mobile-menu nav a:active,
    .archive-mobile-menu nav a:focus-visible {
        color: #f3dfad;
        filter: brightness(1.18);
        text-shadow:
            0 0 .08em rgba(255, 246, 216, .95),
            0 0 .28em rgba(232, 187, 105, .88),
            0 0 .72em rgba(185, 119, 42, .68),
            0 0 1.25em rgba(130, 74, 24, .44);
        outline: none;
    }

    .archive-hero__copy {
        width: auto;
        margin: 0;
        padding: 2.25rem 1.5rem 4.5rem;
        background: radial-gradient(circle at 25% 0%, rgba(119, 115, 91, .13), transparent 50%), #10110f;
    }

    .archive-hero__copy h1 { max-width: 9ch; font-size: clamp(2.6rem, 13vw, 4.5rem); }
    .archive-scroll-mark { right: 1.25rem; bottom: 1.5rem; }

    .archive-discover { width: 100%; gap: 0; padding: 0; }
    .archive-discover__panel { box-shadow: none; }
    .archive-discover__panel { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
    .archive-discover__panel span { left: 5%; font-size: clamp(1.425rem, 7.35vw, 2.7rem); }
    .archive-discover__panel--beginning span,
    .archive-discover__panel--teluria span { right: 5%; left: auto; }
    .archive-discover__panel--calling span {
        right: 0;
        left: 0;
        max-width: 8ch;
        margin: 0 auto;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .archive-scroll-arrow__glow { animation: none; opacity: .65; clip-path: none; }
    .archive-mobile-menu { transition: none; }
}
