.home {
    background: radial-gradient(ellipse at 70% 40%, #f0e5d5, transparent 65%), #f8f4ec;
}

.home-container {
    width: calc(100% - 48px);
    max-width: 2400px;
    margin-inline: auto;
}

.home-hero {
    position: relative;
    width: calc(100% - 48px);
    max-width: 2400px;
    margin: 4px auto 20px;
    overflow: hidden;
    border-radius: 15px;
    isolation: isolate;
}

.home-hero__image {
    width: 100%;
    height: auto;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgb(29 22 15 / 55%), transparent 75%);
}

.home-hero__image {
    position: relative;
    z-index: -2;
}

.home-hero__copy {
    position: absolute;
    inset: 12% auto auto 4%;
    color: #fff9ee;
}

.home-hero__accent {
    display: block;
    width: 90px;
    height: 3px;
    margin-bottom: clamp(10px, 1.4vw, 22px);
    background: linear-gradient(90deg, #ddbd77, transparent);
}

.home-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(30px, 3.5vw, 78px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.home-hero p {
    margin-top: clamp(12px, 1.6vw, 28px);
    font-size: clamp(12px, 1.15vw, 23px);
    line-height: 1.45;
}

.home-project-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #ebe2d5;
    border-radius: 28px;
    background: rgb(255 253 248 / 65%);
    padding: 6px 18px;
    box-shadow: 0 2px 8px var(--color-shadow);
    font-size: 14px;
}

.home-project-nav__items {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.home-project-nav__items::-webkit-scrollbar {
    display: none;
}

.home-project-nav__link {
    flex: 0 0 auto;
    border-radius: 24px;
    padding: 10px 24px;
    white-space: nowrap;
    scroll-snap-align: start;
}

.home-project-nav__link:hover {
    background: #f0e5d1;
}

.home-project-nav__link[aria-current],
.home-project-nav__link[aria-current]:hover {
    background: linear-gradient(120deg, #9f7a3d, #88672f);
    color: white;
}

.home-project-nav__arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-ink);
    font: 32px Arial, sans-serif;
}

.home-project-nav__arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

.home-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.home-more:not(:has(button:not([hidden]))) {
    display: none;
}

.home-project-nav__empty {
    padding: 10px;
    color: var(--color-secondary);
}

.home-section {
    margin-top: 40px;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.home-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.home-section__heading h2 {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #433126;
    font-family: var(--font-heading);
    font-size: clamp(25px, 2.4vw, 36px);
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.home-section__heading h2::after {
    content: '';
    width: 90px;
    height: 3px;
    background: linear-gradient(90deg, #c59c54, transparent);
}

.home-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 24px 20px;
}

.home .video-card {
    border-radius: 9px;
    background: #fcf9f4;
}

.home .video-card__body {
    padding: 10px 12px 12px;
}

.home .video-card__title {
    font-size: 15px;
    line-height: 1.4;
}

.home .video-card__resolution {
    top: 7px;
    left: 8px;
    border-radius: 5px;
    background: linear-gradient(120deg, #a4874b, #806133);
    padding: 2px 8px;
    font-size: 13px;
}

.home-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 13px;
    color: #54525c;
    font-size: 11px;
}

.home-video-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.home-video-meta img {
    opacity: 0.65;
}

.home-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    gap: 16px;
}

.home-project {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 7px;
    aspect-ratio: 1.27;
    background: #423824;
    box-shadow: 0 3px 8px var(--color-shadow);
}

.home-project > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-project:hover > img {
    transform: scale(1.04);
}

.home-project::after {
    content: '';
    position: absolute;
    inset: 25% 0 0;
    background: linear-gradient(transparent, rgb(0 0 0 / 80%));
}

.home-project__caption {
    position: absolute;
    inset: auto 16px 12px;
    z-index: 1;
    color: white;
}

.home-project h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.home-project[aria-current] {
    outline: 3px solid var(--color-accent-gold);
    outline-offset: -3px;
}

.home-project__caption > span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.home-project__caption img {
    filter: invert(1);
}

.home-empty {
    grid-column: 1 / -1;
    padding: 24px;
    color: var(--color-secondary);
}

.home-preview {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.95fr;
    align-items: center;
    gap: 24px;
    margin-top: 38px;
    margin-bottom: 74px;
    border: 1px solid #e9dfd0;
    border-radius: 18px;
    background: rgb(255 253 248 / 65%);
    padding: 10px;
    box-shadow: 0 2px 10px var(--color-shadow);
}

.home-preview__intro {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 10px 20px 32px;
}

.home-preview__shield {
    flex: 0 0 48px;
    filter: invert(49%) sepia(43%) saturate(550%) hue-rotate(359deg);
}

.home-preview h2 {
    font-family: var(--font-heading);
    font-size: clamp(20px, 1.8vw, 28px);
    font-weight: 600;
    line-height: 1.15;
}

.home-preview__intro p {
    margin-top: 12px;
    color: var(--color-secondary);
    font-size: 14px;
}

.home-preview__features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-preview__features li {
    display: grid;
    justify-items: center;
    gap: 12px;
    border-left: 1px solid #e3d7c6;
    padding: 10px;
    font-size: 12px;
    text-align: center;
}

.home-preview__poster {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 4px;
    min-height: 176px;
    overflow: hidden;
    border-radius: 14px;
    padding: 20px;
    color: white;
    isolation: isolate;
}

button.home-preview__poster {
    width: 100%;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.home-preview-dialog {
    width: min(1100px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 16px;
    border: 0;
    border-radius: 16px;
    background: #171717;
    color: white;
}

.home-preview-dialog::backdrop {
    background: rgb(0 0 0 / 75%);
}

html:has(.home-preview-dialog[open]) {
    overflow: hidden;
}

.home-preview-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.home-preview-dialog__header h2 {
    margin: 0;
    font-size: clamp(16px, 2vw, 24px);
    overflow-wrap: anywhere;
}

.home-preview-dialog__close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid #777;
    border-radius: 50%;
    color: white;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.home-preview-dialog video {
    display: block;
    width: 100%;
    height: min(62dvh, 620px);
    background: black;
    object-fit: contain;
}

.home-preview-dialog__status {
    margin: 12px 0 0;
    font-size: 14px;
}

.home-preview-dialog__status:empty {
    display: none;
}

.home-preview__background {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-preview__poster::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(transparent, rgb(0 0 0 / 65%));
}

.home-preview__poster > strong {
    font-family: var(--font-heading);
    font-size: 20px;
}

.home-preview__poster > span:last-child {
    font-size: 11px;
}

.home-preview__play {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 3px;
    place-items: center;
    border: 1px solid white;
    border-radius: 50%;
    background: rgb(0 0 0 / 25%);
}

.home-preview__play img {
    filter: invert(1);
}

.home .site-footer {
    background: linear-gradient(120deg, #f1e7d5, #f9f4eb);
}

@media (max-width: 1150px) {
    .home-preview {
        grid-template-columns: 1fr 1fr;
    }

    .home-preview__features {
        grid-column: 1;
        grid-row: 2;
    }

    .home-preview__poster {
        grid-column: 2;
        grid-row: 1 / 3;
        min-height: 230px;
    }
}

@media (max-width: 900px) {
    .home-hero {
        min-height: 250px;
    }

    .home-hero__image {
        height: 250px;
        object-fit: cover;
        object-position: 58% center;
    }

    .home-hero__copy {
        inset: 28px auto auto 26px;
    }

    .home-hero h1 {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    .home-container,
    .home-hero {
        width: calc(100% - 32px);
    }

    .home-hero {
        min-height: 310px;
        margin-top: 8px;
    }

    .home-hero__image {
        height: 310px;
        object-position: 65% center;
    }

    .home-hero::after {
        background: linear-gradient(90deg, rgb(25 19 13 / 80%), rgb(25 19 13 / 15%));
    }

    .home-hero__copy {
        inset: 36px 20px auto;
    }

    .home-hero h1 {
        font-size: clamp(24px, 6.3vw, 36px);
        line-height: 1.18;
    }

    .home-hero p {
        margin-top: 22px;
        font-size: 13px;
    }

    .home-project-nav {
        gap: 10px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .home-project-nav__link {
        padding: 8px 14px;
    }

    .home-section {
        margin-top: 30px;
    }

    .home-section__heading {
        align-items: start;
        gap: 12px;
        margin-bottom: 18px;
    }

    .home-section__heading h2 {
        font-size: 24px;
    }

    .home-section__heading h2::after {
        display: none;
    }

    .home .text-link {
        gap: 4px;
        min-height: 30px;
        font-size: 12px;
    }

    .home-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-preview {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 40px;
    }

    .home-preview__intro {
        padding: 16px 10px;
    }

    .home-preview__features,
    .home-preview__poster {
        grid-column: auto;
        grid-row: auto;
    }

    .home-preview__features li:first-child {
        border-left: 0;
    }

    .home-preview__poster {
        min-height: 190px;
    }
}
