.hob-main.hob-history-editorial-page {
    padding: 0;
}

.hob-history-editorial {
    /* Contain entry offsets during responsive rebuilds; clip keeps Rose sticky. */
    overflow-x: clip;
}

.hob-history-editorial {
    color: var(--hob-primary-color);
    font-family: "HOB Editorial", serif;
    font-style: italic;
    font-size: 18px;
    line-height: 1.65;
}

.hob-history-editorial .hob-history-section__title {
    margin: 0;
    color: var(--hob-primary-color);
    font-family: "HOB Editorial", serif;
    font-style: italic;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.25;
    text-wrap: balance;
}

.hob-history-section {
    padding-block: clamp(100px, 8vw, 150px);
    scroll-margin-top: var(--hob-header-height);
    overflow-wrap: anywhere;
}

.hob-history-section--white {
    background: #fff;
}

.hob-history-section--ivory {
    background: #f8f3f0;
}

/* The shared hob-container supplies the theme's width and page gutters. */
.hob-history-section__inner,
.hob-history-section__content,
.hob-history-section__media {
    min-width: 0;
}

.hob-history-section__content {
    display: grid;
    gap: 24px;
    align-content: center;
    width: 100%;
    max-width: 660px;
}

.hob-history-section--text .hob-history-section__content,
.hob-history-section--carousel > .hob-history-section__inner > .hob-history-section__content {
    max-width: 840px;
    margin-inline: auto;
    text-align: center;
}

.hob-history-section__date,
.hob-history-section__text,
.hob-history-carousel__caption {
    font: inherit;
}

.hob-history-section__date,
.hob-history-section__text > :last-child,
.hob-history-carousel__caption > :last-child {
    margin-bottom: 0;
}

.hob-history-section__text > :first-child {
    margin-top: 0;
}

.hob-history-section__emblem {
    width: min(100%, 160px);
    margin: 8px auto 0;
}

.hob-history-section--split .hob-history-section__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "media content";
    align-items: center;
    gap: clamp(70px, 6.25vw, 120px);
}

.hob-history-section--split.hob-history-section--media-right .hob-history-section__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "content media";
}

.hob-history-section--split .hob-history-section__content {
    grid-area: content;
    justify-self: center;
}

.hob-history-section__media {
    grid-area: media;
    display: grid;
    gap: 24px;
}

.hob-history-section__media-item {
    min-width: 0;
}

.hob-history-editorial .hob-history-section__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Empty media reserves the composition without requesting invented assets. */
.hob-history-section__media-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--hob-primary-color);
    opacity: 0.12;
}

/* Completed narrative sections; the later scaffolding keeps its base styles. */
.hob-history-section--narrative .hob-history-section__date {
    font-size: 13px;
    letter-spacing: 0.06em;
    opacity: 0.68;
}

.hob-history-section--narrative .hob-history-section__text > p {
    margin-bottom: 22px;
}

.hob-history-section--narrative .hob-history-section__text > p:last-child {
    margin-bottom: 0;
}

.hob-history-section--introduction,
.hob-history-section--interlude {
    padding-block: clamp(120px, 10vw, 150px);
}

.hob-history-section--introduction .hob-history-section__content {
    max-width: 820px;
    gap: clamp(30px, 2.5vw, 36px);
}

.hob-history-section--introduction .hob-history-section__emblem {
    width: clamp(60px, 5vw, 76px);
    margin: 0 auto;
}

.hob-history-section--interlude .hob-history-section__content {
    max-width: 800px;
}

.hob-history-section--diptych .hob-history-section__media:has(> :nth-child(2)) {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(14px, 1.5vw, 24px);
}

.hob-history-section--diptych .hob-history-section__media-item:nth-child(2) {
    margin-top: clamp(40px, 3.8vw, 60px);
}

.hob-history-section--expedition .hob-history-section__media-item:nth-child(2),
.hob-history-section--uranie .hob-history-section__media-item:nth-child(2) {
    width: 62%;
    justify-self: end;
    margin-top: 12px;
}

.hob-history-section--narrative .hob-history-section__image {
    object-fit: contain;
}

.hob-history-section--uranie {
    padding-bottom: clamp(120px, 10vw, 150px);
}

.hob-history-section--uranie .hob-history-section__media-item {
    width: min(68%, 440px);
    justify-self: center;
}

.hob-history-section--document {
    padding-block: clamp(110px, 9vw, 145px);
}

.hob-history-section--archive-gallery {
    padding-block: clamp(125px, 10vw, 155px);
}

.hob-history-section--shipwreck.hob-history-section--without-media .hob-history-section__content {
    max-width: 760px;
}

.hob-history-section--separate-portraits {
    padding-block: clamp(115px, 9vw, 145px);
}

@media (min-width: 1025px) {
    .hob-history-section--split.hob-history-section--document .hob-history-section__inner {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    }
}

.hob-history-carousel {
    width: 100%;
    min-width: 0;
    margin-top: clamp(32px, 4vw, 64px);
}

/* All slides remain readable with JS disabled, missing Swiper, or one slide. */
.hob-history-carousel:not(.swiper-initialized) .hob-history-carousel__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.hob-history-carousel__slide {
    min-width: 0;
    height: auto;
}

.hob-history-carousel__figure {
    margin: 0;
}

.hob-history-carousel__caption {
    padding-top: 24px;
}

.hob-history-carousel__title {
    margin: 0 0 12px;
    font: inherit;
}

.hob-history-carousel__controls:not([hidden]) {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.hob-history-carousel__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--hob-primary-color);
    font: inherit;
}

.hob-history-carousel__button:disabled {
    cursor: default;
    opacity: 0.35;
}

.hob-history-carousel__button:focus-visible {
    outline: 2px solid var(--hob-primary-color);
    outline-offset: 4px;
}

.hob-history-carousel__button.swiper-button-lock {
    display: none;
}

/* Rose's media is the only sticky composition in History Editorial. */
.hob-history-section--rose-story {
    --hob-history-rose-sticky-top: calc(var(--hob-header-height) + var(--wp-admin--admin-bar--height, 0px) + 24px);
}

.hob-history-section--rose-story .hob-history-section__content {
    max-width: 520px;
}

.hob-history-section--rose-story .hob-history-section__text > p:not(:last-child) {
    margin-bottom: clamp(28px, 3vw, 40px);
}

.hob-history-section--rose-story .hob-history-section__media {
    isolation: isolate;
}

.hob-history-section--rose-story .hob-history-section__media-item--manuscript {
    width: 76%;
    justify-self: end;
}

.hob-history-section--rose-story .hob-history-section__media-item:only-child {
    width: 100%;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) > .hob-history-section__inner > .hob-history-section__content {
    max-width: 760px;
    margin-inline: 0;
    text-align: left;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) .hob-history-carousel__media {
    aspect-ratio: 4 / 5;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) .hob-history-section__image {
    height: 100%;
    object-fit: contain;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) .hob-history-carousel__slide--cover .hob-history-section__image {
    object-fit: cover;
}

.hob-history-section--archive-gallery .hob-history-carousel__caption {
    padding-top: 18px;
    font-size: 13px;
    line-height: 1.5;
}

.hob-history-section--archive-gallery .hob-history-carousel__caption p {
    margin: 0 0 8px;
}

.hob-history-section--archive-gallery .hob-history-carousel__caption > :last-child {
    margin-bottom: 0;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) .hob-history-carousel__button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 0;
    font-size: 18px;
}

:is(.hob-history-section--archive-gallery, .hob-history-section--legacy-gallery) .hob-history-carousel:not(.swiper-initialized) .hob-history-carousel__track:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 480px;
}

.hob-history-section--shipwreck .hob-history-section__media-item:nth-child(2) {
    width: 62%;
    justify-self: end;
    margin-top: 12px;
}

/* Contain the lateral entry offset without creating a scroll container. */
.hob-history-section--shipwreck,
.hob-history-section--separate-portraits {
    overflow-x: clip;
}

/* Later careers: vertically separated portraits, distinct from the diptych. */
.hob-history-section--separate-portraits .hob-history-section__media:has(> :nth-child(2)) {
    gap: clamp(40px, 5vw, 72px);
}

.hob-history-section--separate-portraits .hob-history-section__media:has(> :nth-child(2)) > :first-child {
    width: min(68%, 360px);
}

.hob-history-section--separate-portraits .hob-history-section__media-item:nth-child(2) {
    width: min(58%, 300px);
    justify-self: end;
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
    .hob-history-section--rose-story .hob-history-section__inner {
        align-items: start;
    }

    .hob-history-section--rose-story .hob-history-section__media:has(.hob-history-section__media-item--portrait) {
        position: sticky;
        top: var(--hob-history-rose-sticky-top);
        width: min(100%, 680px);
        justify-self: center;
        align-self: start;
        gap: 0;
    }

    .hob-history-section--rose-story .hob-history-section__media-item--portrait .hob-history-section__image {
        max-height: min(52svh, calc(100svh - var(--hob-history-rose-sticky-top) - 64px));
    }

    /* A shared grid cell keeps both documents inside the sticky boundary,
       including when their intrinsic proportions differ. */
    .hob-history-section--rose-story .hob-history-section__media:has(> :nth-child(2)) > .hob-history-section__media-item {
        grid-area: 1 / 1;
        position: relative;
    }

    .hob-history-section--rose-story .hob-history-section__media:has(> :nth-child(2)) > .hob-history-section__media-item--portrait {
        width: 76%;
        margin-bottom: 32px;
        align-self: start;
        z-index: 2;
    }

    .hob-history-section--rose-story .hob-history-section__media:has(> :nth-child(2)) > .hob-history-section__media-item--manuscript {
        width: 44%;
        margin-top: 64px;
        align-self: end;
        z-index: 1;
    }

    .hob-history-section--rose-story .hob-history-section__media:has(.hob-history-section__media-item--portrait) .hob-history-section__media-item--manuscript .hob-history-section__image {
        max-height: min(34svh, calc((100svh - var(--hob-history-rose-sticky-top) - 64px) * 0.65));
    }
}

.hob-history-section--legacy-gallery .hob-history-carousel__caption {
    display: grid;
    gap: 12px;
}

.hob-history-section--legacy-gallery .hob-history-carousel__caption > * {
    margin: 0;
}

.hob-history-section--legacy-gallery .hob-history-section__date {
    font-size: 13px;
    letter-spacing: 0.06em;
    opacity: 0.68;
}

/* Legacy events without photographs remain typographic, with no empty frame. */
.hob-history-section--legacy-gallery .hob-history-carousel__slide--without-media .hob-history-carousel__figure {
    display: flex;
    align-items: flex-end;
    min-height: min(32vw, 420px);
}

.hob-history-section--legacy-gallery .hob-history-carousel__slide--without-media .hob-history-carousel__caption {
    max-width: 340px;
    padding: clamp(72px, 9vw, 132px) 0 32px;
}

/* A lone event is a static photograph: preserve its complete composition. */
.hob-history-section--legacy-gallery .hob-history-carousel__slide:only-child .hob-history-carousel__media {
    aspect-ratio: auto;
}

.hob-history-section--legacy-gallery .hob-history-carousel__slide:only-child .hob-history-section__image {
    height: auto;
}

.hob-history-section--atelier {
    padding-block: clamp(120px, 10vw, 150px);
}

.hob-history-section--atelier .hob-history-section__media-item {
    overflow: clip;
}

@media (min-width: 1025px) {
    .hob-history-section--atelier .hob-history-section__media-item:first-child .hob-history-section__image {
        aspect-ratio: 4 / 5;
        object-fit: cover;
        object-position: center;
    }
}

.hob-history-section--video {
    padding-block: clamp(90px, 8vw, 130px);
}

.hob-history-video__header {
    width: min(82vw, 1120px, 124.445vh);
    margin-bottom: clamp(24px, 2.5vw, 38px);
    margin-inline: auto;
}

.hob-history-video__frame {
    position: relative;
    width: min(82vw, 1120px, 124.445vh);
    aspect-ratio: 16 / 9;
    margin-inline: auto;
    overflow: hidden;
    isolation: isolate;
    background: #0d0d0d;
}

.hob-history-video__frame::after {
    content: "";
    position: absolute;
    inset: 55% 0 0;
    z-index: 1;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.hob-history-video__video,
.hob-history-video__poster {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hob-history-video__video {
    z-index: 0;
}

.hob-history-video__poster {
    z-index: 1;
    visibility: visible;
    opacity: 1;
    transition: opacity 400ms ease, visibility 0s linear 0s;
}

.hob-history-video--playing .hob-history-video__poster {
    visibility: hidden;
    opacity: 0;
    transition-delay: 0s, 400ms;
}

.hob-history-video--failed .hob-history-video__poster {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.hob-history-video__controls {
    position: absolute;
    right: clamp(14px, 2vw, 28px);
    bottom: clamp(12px, 1.8vw, 24px);
    z-index: 3;
    display: flex;
    align-items: center;
}

.hob-history-video__control {
    display: inline-grid;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 0;
    place-items: center;
    color: #fff;
    background: transparent;
    opacity: 0.82;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
    transition: opacity 160ms ease, transform 160ms ease;
}

.hob-history-video__control:disabled {
    cursor: default;
    opacity: 0.42;
}

.hob-history-video__control:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: -4px;
    opacity: 1;
}

.hob-history-video__control-icon {
    display: none;
    width: 42px;
    height: 42px;
}

.hob-history-video__control-svg {
    width: 100%;
    height: 100%;
}

.hob-history-video__control-svg .cls-1 {
    fill: currentColor;
}

.hob-history-video--muted .hob-history-video__control-icon--mute,
.hob-history-video__frame:not(.hob-history-video--muted) .hob-history-video__control-icon--volume,
.hob-history-video--paused .hob-history-video__control-icon--play,
.hob-history-video__frame:not(.hob-history-video--paused) .hob-history-video__control-icon--pause,
.hob-history-video__control-icon--fullscreen,
.hob-history-video--fullscreen .hob-history-video__control-icon--windowed {
    display: block;
}

.hob-history-video--fullscreen .hob-history-video__control-icon--fullscreen {
    display: none;
}

.hob-history-video__frame:fullscreen,
.hob-history-video__frame:-webkit-full-screen,
.hob-history-video__frame.hob-history-video--fallback-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: auto;
    margin: 0;
    background: #000;
}

.hob-history-video__frame:fullscreen .hob-history-video__video,
.hob-history-video__frame:fullscreen .hob-history-video__poster,
.hob-history-video__frame:-webkit-full-screen .hob-history-video__video,
.hob-history-video__frame:-webkit-full-screen .hob-history-video__poster,
.hob-history-video__frame.hob-history-video--fallback-fullscreen .hob-history-video__video,
.hob-history-video__frame.hob-history-video--fallback-fullscreen .hob-history-video__poster {
    object-fit: contain;
    object-position: center;
}

.hob-history-video__frame:fullscreen .hob-history-video__controls,
.hob-history-video__frame:-webkit-full-screen .hob-history-video__controls,
.hob-history-video__frame.hob-history-video--fallback-fullscreen .hob-history-video__controls {
    right: max(28px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
}

.hob-history-video__frame.hob-history-video--fallback-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
}

html.hob-history-video-fallback-active,
body.hob-history-video-fallback-active {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.hob-history-video__spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hob-history-video-spin 700ms linear infinite;
}

.hob-history-video--loading .hob-history-video__control--playback .hob-history-video__control-icon {
    display: none;
}

.hob-history-video--loading .hob-history-video__spinner {
    display: block;
}

@keyframes hob-history-video-spin {
    to { transform: rotate(360deg); }
}

@media (hover: hover) and (pointer: fine) {
    .hob-history-video__control:not(:disabled):hover {
        opacity: 1;
        transform: scale(1.04);
    }
}

.hob-history-section--conclusion {
    padding-block: clamp(120px, 10vw, 150px) clamp(72px, 6vw, 90px);
}

.hob-history-section--conclusion .hob-history-section__content {
    max-width: 800px;
    gap: clamp(30px, 2.5vw, 36px);
}

.hob-history-section--conclusion .hob-history-section__emblem {
    width: clamp(50px, 4vw, 75px);
    margin: 0 auto;
}

#hob-history-product-carousel {
    padding-block: 0 clamp(60px, 7vw, 88px);
    background: #f8f3f0;
}

@media (max-width: 1024px) {
    .hob-history-section {
        padding-block: clamp(64px, 8.5vw, 90px);
    }

    .hob-history-section--introduction,
    .hob-history-section--interlude {
        padding-block: clamp(80px, 10vw, 90px);
    }

    .hob-history-section--uranie {
        padding-bottom: 90px;
    }

    .hob-history-section--uranie .hob-history-section__media-item {
        width: min(76%, 440px);
    }

    .hob-history-section--atelier,
    .hob-history-section--video,
    .hob-history-section--conclusion {
        padding-block: clamp(80px, 10vw, 90px);
    }

    .hob-history-section--split .hob-history-section__inner,
    .hob-history-section--split.hob-history-section--media-right .hob-history-section__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "media" "content";
        gap: clamp(28px, 4vw, 40px);
    }

    .hob-history-carousel:not(.swiper-initialized) .hob-history-carousel__track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 600px) {
    /* Larger, staggered portraits keep faces readable on narrow phones. */
    .hob-history-section--diptych .hob-history-section__media:has(> :nth-child(2)) {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .hob-history-section--diptych .hob-history-section__media:has(> :nth-child(2)) > :first-child {
        width: 76%;
    }

    .hob-history-section--diptych .hob-history-section__media-item:nth-child(2) {
        width: 66%;
        margin-top: 0;
        justify-self: end;
    }
}

/* No fabricated media or empty column when a completed section lacks images. */
.hob-history-section--split.hob-history-section--without-media .hob-history-section__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "content";
}

@media (max-width: 767px) {
    .hob-history-editorial {
        font-size: clamp(16px, 4.2vw, 18px);
    }

    .hob-history-editorial .hob-history-section__title {
        font-size: clamp(28px, 7.2vw, 32px);
    }

    .hob-history-section__content {
        gap: 20px;
    }

    .hob-history-video__controls {
        right: 50%;
        bottom: 8px;
        transform: translateX(50%);
    }

    .hob-history-video__header,
    .hob-history-video__frame {
        width: min(100%, 420px);
    }

    .hob-history-video__frame {
        aspect-ratio: 4 / 5;
    }

    .hob-history-video__video,
    .hob-history-video__poster {
        object-fit: cover;
        object-position: center;
    }

    .hob-history-video__frame:fullscreen .hob-history-video__controls,
    .hob-history-video__frame:-webkit-full-screen .hob-history-video__controls,
    .hob-history-video__frame.hob-history-video--fallback-fullscreen .hob-history-video__controls {
        right: 50%;
        bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
        transform: translateX(50%);
    }

    .hob-history-video__control {
        width: 56px;
        height: 56px;
    }

    .hob-history-video__control-icon {
        width: 44px;
        height: 44px;
    }

    .hob-history-section--uranie .hob-history-section__media-item {
        width: min(82%, 360px);
    }

    .hob-history-section--legacy-gallery .hob-history-carousel__slide--without-media .hob-history-carousel__figure {
        min-height: 100vw;
    }

    .hob-history-carousel:not(.swiper-initialized) .hob-history-carousel__track {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hob-history-carousel .swiper-wrapper {
        transform: none;
    }

    .hob-history-editorial *,
    .hob-history-editorial *::before,
    .hob-history-editorial *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
