/*
 * Skorenko Design — Django reconstruction of the existing WordPress design.
 * Original theme reference: Collective / StonedThemes.
 * Only the styles actually needed by this site are retained here.
 */

:root {
    --text: #151515;
    --muted: #999;
    --black: #0a0a0a;
    --white: #fff;
    --side-padding: 120px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    color: var(--text);
    background: var(--white);
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    -webkit-font-smoothing: subpixel-antialiased;
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    outline: 0;
}

p,
span {
    line-height: 21px;
}

img {
    border: 0;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}

button {
    font-family: inherit;
}

.site-frame {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

.page-container {
    padding-left: var(--side-padding);
    padding-right: var(--side-padding);
}


/* HEADER — original header-v6 */

.desktop-header {
    text-align: center;
    padding: 25px 30px;
}

.site-logo {
    display: block;
    padding: 25px 0;
    color: #151515;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.15;
}

.desktop-menu {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--text);
    text-align: center;
}

.desktop-menu a {
    position: relative;
    display: inline-block;
    line-height: 67px;
    padding: 0 20px;
    text-transform: uppercase;
    font-weight: 700;
}

.desktop-menu a:hover {
    text-decoration: underline;
}

.desktop-menu a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    margin-left: -2px;
    margin-top: 20px;
    border: 2px solid currentColor;
    opacity: 0;
}

.desktop-menu a.active::after,
.desktop-menu a:hover::after {
    opacity: 1;
}

.mobile-header {
    display: none;
}


/* FOOTER */

.site-footer {
    flex: 0 0 auto;
    margin-top: 60px;
    padding: 60px 0;
    overflow: hidden;
    color: #fff;
    background: var(--black);
}

.footer-inner {
    padding: 0 var(--side-padding);
}

.footer-contact {
    display: block;
    line-height: 24px;
}

.footer-icon {
    display: inline-block;
    width: 25px;
    font-weight: 400;
}


/* HOME */

.home-page {
    padding-top: 0;
    padding-bottom: 0;
}

/* Большая картинка */

.home-hero {
    width: 100%;
    margin-bottom: 10px;
}

.home-hero a {
    display: block;
    width: 100%;
}

.home-hero img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

/* Нижний слайдер */

.home-project-slider {
    position: relative;
    width: 100%;
    overflow: visible;
}

.home-project-viewport {
    width: 100%;
    overflow: hidden;
}

.home-project-track {
    display: flex;
    gap: 10px;
    transition: transform .45s ease;
}

.home-project-slide {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - 10px) / 2);
    min-width: 0;
    overflow: hidden;
}

.home-project-slide img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Стрелки */

.home-project-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;

    width: 42px;
    height: 58px;
    margin-top: -29px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #999;

    font-size: 38px;
    font-weight: 200;
    line-height: 54px;

    cursor: pointer;
    opacity: 1;
    transition: color .2s ease;
}

.home-project-arrow:hover {
    color: #151515;
}

.home-project-prev {
    right: 100%;
}

.home-project-next {
    left: 100%;
}

/* PROJECT LIST */

.projects-page {
    padding-top: 0;
}

.project-filters {
    position: relative;
    margin: 0 -30px 34px;
    padding: 48px 30px;
    background: #151515;
    text-align: center;
}

.filter-button {
    position: relative;
    margin: 0 18px;
    padding: 8px 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
    color: #fff;
}

.filter-button.active {
    border-color: transparent;
}

.filter-frame {
    position: absolute;
    z-index: 0;
    border: 1px solid #fff;
    pointer-events: none;
    transition:
        left .4s ease,
        top .4s ease,
        width .4s ease,
        height .4s ease;
}

.filter-button {
    z-index: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.project-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #eee;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    padding: 30px;
    background: rgba(0, 0, 0, 0);
    color: #fff;
    opacity: 0;
    transition: background .35s ease, opacity .35s ease;
}

.project-card:hover .project-card-overlay,
.home-project-slide:hover .project-card-overlay {
    background: rgba(0, 0, 0, .68);
    opacity: 1;
}

.project-card {
    display: block;
    min-width: 0;
    opacity: 1;
    transform: scale(1);
    transition:
        opacity .4s ease,
        transform .4s ease;
}

.project-card.is-hiding {
    opacity: 0;
    transform: scale(.96);
}

.project-card.is-showing {
    animation: project-card-in .5s ease both;
}

@keyframes project-card-in {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.project-card.is-hiding {
    opacity: 0;
    transform: scale(.96);
}

@keyframes project-card-in {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* Название и тип */

.project-card-info {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    transform: translateY(8px);
    transition: transform .35s ease;
}

.project-card:hover .project-card-info,
.home-project-slide:hover .project-card-info {
    transform: translateY(0);
}

.project-card-title {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.project-card-types {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
}


/* Белый уголок */

.project-card-corner {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
}

.project-card-corner::before,
.project-card-corner::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    background: #fff;
}

.project-card-corner::before {
    width: 0;
    height: 1px;
    transition: width .4s ease .18s;
}

.project-card-corner::after {
    width: 1px;
    height: 0;
    transition: height .4s ease .18s;
}

.project-card:hover .project-card-corner::before,
.home-project-slide:hover .project-card-corner::before {
    width: 46px;
}

.project-card:hover .project-card-corner::after,
.home-project-slide:hover .project-card-corner::after {
    height: 46px;
}
.load-more {
    display: block;
    margin: 35px auto 0;
    padding: 12px 20px;
    border: 0;
    background: transparent;
    color: #151515;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.load-more:hover {
    text-decoration: underline;
}


/* PROJECT DETAIL */

.project-detail {
    padding-top: 65px;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.project-heading {
    width: auto;
    max-width: none;
    margin: 0;
    padding-right: 20px;
}

.project-heading h1 {
    margin: 0 0 15px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
}

.project-title-line {
    width: 30px;
    height: 2px;
    margin: 0 0 28px;
    background: #151515;
}

.about-copy h1 {
    margin: 0 0 25px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.35;
}

.project-meta {
    margin-bottom: 25px;
    line-height: 21px;
}

.project-meta strong {
    font-weight: 700;
}

.project-description {
    max-width: 760px;
}

.project-description p {
    margin: 0 0 16px;
}

.project-gallery {
    width: 100%;
}

.gallery-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.gallery-lightbox-link {
    display: block;
    flex-grow: calc(var(--image-ratio));
    flex-basis: 0;
    min-width: 0;
    cursor: zoom-in;
}

.gallery-row > .gallery-lightbox-link:only-child {
    flex: 0 0 100%;
    width: 100%;
}

.gallery-row.gallery-row-half {
    width: calc(50% - 5px);
}

.gallery-row.gallery-row-half > .gallery-lightbox-link:only-child {
    flex: 0 0 100%;
    width: 100%;
}

.gallery-lightbox-link img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-row-half {
    width: calc(50% - 5px);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(0, 0, 0, .9);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;

    cursor: zoom-out;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;

    transform: scale(.97);
    transition: transform .3s ease;

    cursor: default;
}

.lightbox.is-open .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 25px;
    z-index: 1;

    padding: 0;
    border: 0;
    background: transparent;

    color: #fff;
    font-size: 38px;
    font-weight: 200;
    line-height: 1;

    cursor: pointer;
}

.project-bottom {
    width: 66.666666%;
    padding-top: 28px;
}

.project-types {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
}

.project-navigation {
    display: grid;
    grid-template-columns: 1fr 135px 1fr;

    width: calc(100% + 2 * var(--side-padding));
    margin-top: 60px;
    margin-left: calc(-1 * var(--side-padding));
    margin-right: calc(-1 * var(--side-padding));

    border-top: 1px solid #e5e5e5;
}

body:has(.project-detail) .site-footer {
    margin-top: 0;
}

.project-nav-item {
    min-height: 128px;
    display: flex;
    align-items: center;
    padding: 0 var(--side-padding);
}

.project-nav-item a {
    color: var(--text);
    text-decoration: none;
}

.project-nav-prev {
    justify-content: flex-start;
    text-align: left;
}

.project-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.project-nav-title,
.project-nav-label {
    display: block;
}

.project-nav-title {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.project-nav-label {
    color: #999;
    font-size: 11px;
    font-weight: 300;
}

.project-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 128px;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
}

.project-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 5px);
    grid-template-rows: repeat(3, 5px);
    gap: 2px;
    padding: 10px;
}

.project-nav-grid span {
    display: block;
    width: 5px;
    height: 5px;
    background: #999;
}

.project-nav-grid:hover span {
    background: #555;
}

.project-types {
    margin-top: -9px;
    margin-bottom: 16px;
    color: #999;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}


/* ABOUT */


.about-page {
    padding-top: 65px;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(220px, 31%) minmax(0, 1fr);
    gap: 45px;
    align-items: start;
}

.about-photo {
    display: block;
    width: 100%;
    height: auto;
}

.about-copy {
    max-width: none;
}

.about-copy p {
    margin: 0 0 16px;
}

.about-copy h2 {
    margin: 35px 0 18px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.about-copy li {
    line-height: 21px;
}

.about-copy ul,
.about-copy ol {
    margin-top: 12px;
    margin-bottom: 20px;
}

.site-header {
    border-bottom: 1px solid #ededed;
}

body:has(.home-page) .site-header,
body:has(.projects-page) .site-header {
    border-bottom: 0;
}

/* 404 */

.error-page {
    min-height: 48vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-code {
    font-size: 72px;
    font-weight: 200;
    line-height: 1;
}

.error-page h1 {
    margin: 20px 0;
    font-size: 18px;
    font-weight: 400;
}

.error-home-link {
    font-weight: 700;
    text-transform: uppercase;
}

.error-home-link:hover {
    text-decoration: underline;
}

.empty-state {
    min-height: 300px;
    display: grid;
    place-items: center;
    color: #999;
}

/* Technical files */

.technical-files {
    margin-top: 32px;
}

.technical-files-title {
    margin-bottom: 12px;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.technical-file {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 11px 14px;

    border: 1px solid #d5d5d5;
    border-radius: 3px;
    background: #f7f7f7;

    color: #555;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;

    transition: background-color 0.2s, border-color 0.2s;
}

.technical-file:hover {
    background: #eeeeee;
    border-color: #c5c5c5;
    color: #151515;
}

.home-mobile-projects {
    display: none;
}


/* RESPONSIVE — follows the original theme's 1024px header switch */

@media (max-width: 1024px) {
    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .mobile-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100px;
        padding: 15px 30px;
        color: #151515;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 32px;
        font-weight: 400;
        line-height: 1.15;
        text-align: center;
        border-bottom: 1px solid #e5e5e5;
    }

    .mobile-logo-name {
        white-space: nowrap;
        font: inherit;
        line-height: inherit;
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: max-content;
        margin: 35px auto;
        padding: 0;
        background: transparent;
    }

    .mobile-menu a {
        position: relative;
        display: block;
        padding: 5px 0;
        color: #151515;
        font-size: 13px;
        font-weight: 400;
        line-height: 24px;
        text-transform: uppercase;
    }

    .mobile-menu a.active {
        color: #151515;
    }

    .mobile-menu a.active::before {
        content: "";
        position: absolute;
        top: 50%;
        right: calc(100% + 12px);
        width: 4px;
        height: 4px;
        margin-top: -2px;
        background: #151515;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    :root {
        --side-padding: 15px;
    }

    .site-footer {
        margin-top: 30px;
        padding: 15px 0;
    }

    .footer-inner {
        padding: 0 15px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card-image {
        aspect-ratio: auto;
    }

    .project-card img {
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    /* PROJECT CARDS — mobile */

    .project-card-image {
        position: relative;
    }

    .project-card-overlay,
    .project-card:hover .project-card-overlay {
        position: absolute;
        inset: 0;
        display: block;
        padding: 0;

        background: linear-gradient(
            to top,
            rgba(0, 0, 0, .85) 0%,
            rgba(0, 0, 0, .55) 15%,
            rgba(0, 0, 0, 0) 35%
        );

        color: #fff;
        opacity: 1;
    }

    .project-card-info,
    .project-card:hover .project-card-info {
        left: 15px;
        right: 15px;
        bottom: 12px;
        transform: none;
    }

    .project-card-title {
        margin-bottom: 0;
        color: #fff;
        font-size: 13px;
        font-weight: 500;
    }

    .project-card-types {
        display: none;
    }

    .project-card-corner {
        display: none;
    }

    .project-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-heading,
    .project-gallery,
    .project-bottom {
        width: 100%;
    }

    .gallery-row {
        flex-direction: column;
    }

    .gallery-lightbox-link,
    .gallery-row-half {
        width: 100%;
    }

    .project-navigation {
        grid-template-columns: 1fr;
    }

    .project-nav-item.next {
        text-align: left;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-photo-column {
        max-width: 480px;
    }

    .slider-arrow {
        opacity: .65;
    }

    .home-slide img {
        max-height: none;
    }

    .home-project-slide {
        flex-basis: 100%;
    }

    .home-project-track {
        gap: 0;
    }

    .home-project-arrow {
        opacity: .65;
    }

    /* HOME — mobile */

    body:has(.home-page) .mobile-menu {
        margin-top: 30px;
        margin-bottom: 45px;
    }

    body:has(.home-page) .home-hero {
        margin-bottom: 10px;
    }

    body:has(.home-page) .home-project-slider {
        height: calc(100dvh - var(--home-slider-top, 0px));
        min-height: 250px;
        overflow: hidden;
    }

    body:has(.home-page) .home-project-viewport {
        width: 100%;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    body:has(.home-page) .home-project-track {
        display: flex;
        flex-direction: column;
        gap: 10px;
        height: auto;
        transition: transform .45s ease;
    }

    body:has(.home-page) .home-project-slide {
        flex: 0 0 auto;
        width: 100%;
    }

    body:has(.home-page) .home-project-slide img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    body:has(.home-page) .home-project-arrow {
        display: none;
    }

    body:has(.home-page) .site-footer {
        margin-top: 0;
    }

    body:has(.home-page) .home-hero,
    body:has(.home-page) .home-project-slider {
        display: none;
    }

    body:has(.home-page) .home-mobile-projects {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    body:has(.home-page) .home-mobile-project {
        position: relative;
        display: block;
        width: 100%;
        overflow: hidden;
    }

    body:has(.home-page) .home-mobile-project img {
        display: block;
        width: 100%;
        height: auto;
    }

    body:has(.home-page) .home-mobile-project::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, .85) 0%,
            rgba(0, 0, 0, .55) 15%,
            rgba(0, 0, 0, 0) 35%
        );
        pointer-events: none;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
    }

    /* Главная — мобильная */

    body:has(.home-page) .mobile-menu {
        margin-bottom: 25px;
    }

    body:has(.home-page) .site-footer {
        margin-top: 30px;
    }

    body:has(.projects-page) .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
    }

    body:has(.projects-page) .project-filters {
        position: fixed;
        top: var(--mobile-header-height, 0px);
        left: var(--side-padding);
        right: var(--side-padding);
        z-index: 900;

        margin-bottom: 0;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    body:has(.projects-page) .projects-page {
        padding-top: calc(
            var(--mobile-header-height, 0px) +
            var(--mobile-filters-height, 0px) +
            15px
        );
    }

    body:has(.home-page) .home-mobile-project-title {
        position: absolute;
        left: 15px;
        right: 15px;
        bottom: 12px;
        z-index: 1;

        color: #fff;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.4;
    }

    body:has(.project-detail) .project-nav-prev {
        padding-top: 15px;
    }

    body:has(.project-detail) .project-detail {
        padding-top: 30px;
    }

    body:has(.project-detail) .project-navigation {
        margin-top: 30px;
    }

    body:has(.project-detail) .project-nav-item,
    body:has(.project-detail) .project-nav-center {
        min-height: 75px;
    }

}

.project-card[hidden] {
    display: none;
}
