/* Kachorovska Архів — landing */

.b-archive {
    --ar-red: #ca1521;
    background: #fffef8;
    color: var(--ar-red);
    font-family: 'Inter', sans-serif;
}

:where(.b-archive) p,
:where(.b-archive) h1,
:where(.b-archive) h2 {
    margin: 0;
}

.ar-container {
    width: 83.333%;
    max-width: 1200px;
    margin: 0 auto;
}

.ar-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ar-text {
    font-size: 12px;
    line-height: 1.6;
    text-transform: uppercase;
    text-align: justify;
}

/* ---------- hero ---------- */

.ar-hero {
    /* word size, offset under the header, gap word → intro and the word's final spot on the photo */
    --fs: 13.889vw;
    --ls: .96em;
    --word-top: 14px;
    --gap: 7.778vw;
    --word-end: 92.222vw;

    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

.ar-hero__word {
    position: absolute;
    top: 0;
    left: 2.43vw;
    z-index: 3;
    font-size: var(--fs);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: var(--ls);
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    transform: translate3d(0, var(--word-top), 0);
    will-change: transform;
}

.ar-hero__word span {
    margin-right: calc(-1 * var(--ls));
}

/* desktop: intro moves together with the word (JS translate) and passes over the photo */
.ar-hero__top {
    position: relative;
    z-index: 2;
    will-change: transform;
    padding-top: calc(var(--word-top) + var(--fs) * 1.1 + var(--gap));
    padding-bottom: 35px;
}

.ar-hero__intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.ar-hero__text {
    width: 49%;
    max-width: 588px;
}

.ar-hero__slogan {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ar-hero__photo {
    position: relative;
    z-index: 1;
}

.ar-hero__photo img {
    display: block;
    width: 100%;
    height: auto;
}

.ar-hero__word-end {
    position: absolute;
    top: var(--word-end);
    left: 0;
    width: 1px;
    height: 1px;
}

/* ---------- about ---------- */

.ar-about {
    padding-top: 35px;
}

.ar-about__lead {
    width: 49%;
    max-width: 588px;
}

.ar-about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 65px;
}

.ar-about__title {
    font-size: min(82px, 5.694vw);
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ar-about__text {
    padding-top: 6px;
}

.ar-about__text p + p {
    margin-top: 1.6em;
}

/* ---------- artefacts ---------- */

.ar-artefacts {
    padding: 138px 0 164px;
}

.ar-artefacts__title {
    margin-left: 2.917vw;
    font-size: 13.889vw;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ar-artefacts__title-mob {
    display: none;
}

.ar-artefacts__lead {
    width: 49%;
    max-width: 588px;
    margin-top: 130px;
}

.ar-list {
    margin-top: 97px;
}

.ar-item {
    border-top: 1px solid var(--ar-red);
}

.ar-item:last-child {
    border-bottom: 1px solid var(--ar-red);
}

.ar-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: 30px 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: inherit;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

.ar-item__head:focus-visible {
    outline: 1px dashed var(--ar-red);
    outline-offset: 4px;
}

.ar-item__title {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
    transition: opacity .2s;
}

.ar-item__head:hover .ar-item__title {
    opacity: .7;
}

.ar-item__year {
    flex-shrink: 0;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* image following the cursor over accordion heads (desktop only, created by JS) */
.ar-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s ease;
    will-change: transform;
}

.ar-cursor.is-visible {
    opacity: 1;
}

.ar-cursor img {
    display: block;
    height: auto;
}

.ar-item__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .5s ease;
}

.ar-item.is-open .ar-item__panel {
    grid-template-rows: 1fr;
}

.ar-item__clip {
    min-height: 0;
    overflow: hidden;
}

.ar-item__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 0 80px;
}

.ar-item__body--center {
    align-items: center;
}

.ar-item__media,
.ar-item__content {
    flex: 0 0 49%;
    max-width: 588px;
}

.ar-item__body--media-right .ar-item__media {
    order: 2;
}

.ar-item__media img {
    display: block;
    width: 100%;
    height: auto;
}

.ar-item__media--pair {
    display: flex;
    gap: 24px;
}

.ar-item__media--pair img {
    width: calc(50% - 12px);
}

.ar-item__content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.ar-item__desc {
    font-size: 12px;
    line-height: 1.4;
    text-align: justify;
}

.ar-item__desc p + p {
    margin-top: 1.4em;
}

.ar-item__thumbs {
    display: block;
    width: 100%;
    height: auto;
}

.ar-exhibition {
    margin-top: 180px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: .1em;
    text-transform: uppercase;
}

/* ---------- mobile ---------- */

@media (max-width: 767px) {
    .ar-container {
        width: auto;
        max-width: none;
        padding: 0 15px;
    }

    .ar-hero {
        --fs: 14.667vw;
        --ls: .84em;
        --word-top: 20px;
        --gap: 22.93vw;
        --word-end: 104.8vw;
    }

    .ar-hero__word {
        left: 3.2vw;
    }

    /* mobile: only the word moves, the intro stays put and the photo slides over it */
    .ar-hero__top {
        position: sticky;
        top: var(--ar-sticky-top, 0px);
        z-index: 0;
        padding-bottom: 24px;
    }

    .ar-hero__intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .ar-hero__text,
    .ar-about__lead,
    .ar-artefacts__lead {
        width: 100%;
        max-width: none;
    }

    .ar-text {
        font-size: 10px;
    }

    .ar-hero__slogan {
        font-size: 17px;
    }

    .ar-about {
        padding-top: 32px;
    }

    .ar-about__grid {
        display: block;
        margin-top: 15px;
    }

    .ar-about__title {
        font-size: 44px;
        line-height: 1.43;
    }

    .ar-about__text {
        padding-top: 22px;
    }

    .ar-artefacts {
        padding: 132px 0 60px;
    }

    .ar-artefacts__title {
        margin: 0;
        padding: 0 20px;
        font-size: 55px;
        letter-spacing: 0;
    }

    .ar-artefacts__title-desk {
        display: none;
    }

    .ar-artefacts__title-mob {
        display: block;
    }

    .ar-artefacts__title-mob > span {
        display: flex;
        justify-content: space-between;
    }

    .ar-artefacts__title-mob i {
        font-style: normal;
    }

    .ar-artefacts__lead {
        margin-top: 37px;
    }

    .ar-list {
        margin-top: 133px;
    }

    .ar-item__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 0;
    }

    .ar-item__title {
        font-size: 18px;
    }

    .ar-item__year {
        font-size: 33px;
    }

    .ar-item__body,
    .ar-item__body--center {
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
        padding: 30px 0 45px;
    }

    .ar-item__media,
    .ar-item__content {
        flex-basis: auto;
        max-width: none;
    }

    .ar-item__body--media-right .ar-item__media {
        order: 0;
    }

    .ar-item__media:not(.ar-item__media--pair) {
        margin: 0 -15px;
    }

    .ar-item__media--pair {
        gap: 7px;
    }

    .ar-item__media--pair img {
        width: calc(50% - 3.5px);
    }

    .ar-exhibition {
        margin-top: 72px;
    }
}
