/* Archival home — desktop-first (from Figma node 34:256) */

@font-face {
    font-family: "Tiempos Text";
    src: url("fonts/tiempos-text-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Soehne";
    src: url("fonts/soehne-buch.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Soehne";
    src: url("fonts/soehne-kraftig.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* One screen: no document scroll; intro flexes; carousel fixed height */
html:has(body.is-home) {
    height: 100%;
    overflow: hidden;
}

body.is-home {
    background-color: #f7f7f4;
    color: #505050;
    font-family: "Tiempos Text", Georgia, serif;
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    box-sizing: border-box;
}

.home {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/* Header — “B” top right; short viewport: B left + rail right */
.home-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 16px;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

.home-header__rail {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
    min-width: 0;
    white-space: nowrap;
}

.home-header__rail a {
    font-family: "Soehne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
}

.home-header__rail a:hover {
    text-decoration: underline;
}

.home-logo {
    font-family: "Tiempos Text", Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    line-height: normal;
    color: #000000;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

/* Intro — body copy + vertical rail (fills space above carousel) */
.home-intro {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    min-height: 0;
    padding: 48px 16px;
    width: 100%;
    overflow: visible;
}

.home-intro__text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 600px;
    min-height: 0;
    font-family: "Tiempos Text", Georgia, serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 16px;
    color: #505050;
}

.home-intro__rail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 198px;
}

.home-intro__rail-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    white-space: nowrap;
    transform: rotate(90deg);
    transform-origin: center center;
}

.home-intro__rail a {
    font-family: "Soehne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
}

.home-intro__rail a:hover {
    text-decoration: underline;
}

.home-rail-meta {
    font-family: "Soehne", system-ui, sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #828282;
}

/* Carousel — fixed height (Figma), horizontal scroll for cards */
.home-carousel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    width: 100%;
    flex: 0 0 auto;
    height: 448px;
    min-height: 448px;
    max-height: 448px;
    overflow: hidden;
    box-sizing: border-box;
}

.home-carousel__track {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
    padding: 48px;
    height: 100%;
    width: max-content;
    min-width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.home-carousel__track::-webkit-scrollbar {
    display: none;
}

.home-card {
    flex: 0 0 auto;
    width: 254px;
}

.home-card__link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.home-card__link:hover .home-card__index {
    text-decoration: underline;
}

.home-card__link:focus-visible {
    outline: 1px solid #000000;
    outline-offset: 2px;
}

.home-card__image {
    aspect-ratio: 344 / 430;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #e8e8e4;
}

.home-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-card__meta {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
}

.home-card__index {
    font-family: "Soehne", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: normal;
    color: #000000;
    text-align: center;
    white-space: nowrap;
}

/* Desktop only: short *window* height — rail moves to header (mobile keeps rail in intro) */
@media (min-width: 768px) and (max-height: 720px) {
    .home-header {
        justify-content: space-between;
    }

    .home-header__rail {
        display: flex;
    }

    .home-intro__rail {
        display: none;
    }

    .home-intro {
        overflow: visible;
        justify-content: flex-start;
    }
}

/* Mobile: fixed intro height + carousel grows to fill viewport (browser chrome) */
@media (max-width: 767px) {
    .home-intro {
        flex: 0 0 auto;
        flex-grow: 0;
        flex-shrink: 0;
        height: 275px;
        min-height: 275px;
        max-height: 275px;
        padding: 16px;
        min-width: 0;
        overflow: hidden;
    }

    .home-intro__text {
        flex: 1 1 0;
        min-width: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .home-carousel {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
        justify-content: stretch;
    }

    .home-carousel__track {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        align-items: stretch;
        padding: 24px 16px;
    }

    .home-card {
        display: flex;
        flex-direction: column;
        min-height: 0;
        align-self: stretch;
    }

    .home-card__link {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
    }

    .home-card__image {
        flex: 1 1 auto;
        min-height: 0;
        aspect-ratio: unset;
    }
}
