/* ============================================================
   ШРИФТЫ
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,400;6..96,500;6..96,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500&family=Roboto+Condensed:wght@300;400;700&display=swap');

/* ============================================================
   ПЕРЕМЕННЫЕ
   ============================================================ */
:root {
    --font-main: 'Roboto', sans-serif;
    --font-nav: 'Roboto', sans-serif;
    --font-sub: 'Roboto', sans-serif;

    --color-text: #1a1919;
    --color-text-black: #000;
    --color-muted: #9b9b9b;
    --color-line: #000;

    --logo-margin-top: 36px;
    --logo-margin-bottom: 0px;

    --nav-max-width: 900px;
    --nav-font-size: 15px;
    --nav-letter-spacing: 1px;
    --nav-margin-top: 10px;
    --nav-padding-bottom: 18px;

    --header-padding-x: 120px;

    --footer-line-height: 1px;
}

/* ============================================================
   БАЗА
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-main);
    color: var(--color-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 var(--header-padding-x);
    background: #fff;
    flex-shrink: 0;
}

.header-top {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: var(--logo-margin-top);
}

/* ============================================================
   ЛОГОТИП
   ============================================================ */
.logo {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: var(--logo-margin-bottom);
}

.logo-main {
    display: block;
    height: 90px;
    width: auto;
    margin: 0 auto;
}

/* ============================================================
   МЕНЮ
   ============================================================ */
.main-nav {
    width: 100%;
    max-width: var(--nav-max-width);
    margin-left: auto;
    margin-right: auto;

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    font-family: var(--font-nav);
    font-size: var(--nav-font-size);
    font-weight: 300;
    letter-spacing: var(--nav-letter-spacing);
    text-transform: uppercase;

    margin-top: var(--nav-margin-top);
    padding-bottom: var(--nav-padding-bottom);
}

.main-nav a {
    text-align: center;
    color: var(--color-text-black);
    transition: color .2s ease;
}

.main-nav a:hover {
    color: var(--color-muted);
}

.main-nav a.active {
    color: var(--color-muted);
}

/* ============================================================
   ЛИНИЯ ПОД ШАПКОЙ
   ============================================================ */
.header-line {
    height: 1px;
    background: var(--color-line);
    width: 100%;
    flex-shrink: 0;
}

/* ============================================================
   ПЛАШКА НАГРАДЫ
   ============================================================ */
.award-badge {
    position: absolute;
    top: 0;
    right: 90px;
    z-index: 10;
}

.award-badge__img {
    display: block;
    height: 255px;
    width: auto;
    transition: opacity .3s ease-out;
}

/* ============================================================
   ГЛАВНАЯ: ГАЛЕРЕЯ
   ============================================================ */
.gallery {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #ddd;
    margin-top: 26px;
    margin-bottom: 26px;
}

.gallery__track {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}

.slide.is-active {
    opacity: 1;
}

.gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 16px;
    opacity: .55;
    transition: opacity .2s;
    z-index: 5;
    font-family: var(--font-main);
    text-shadow: 0 0 12px rgba(0,0,0,.5);
}

.gallery__arrow:hover {
    opacity: 1;
}

.gallery__arrow--prev { left: 14px; }
.gallery__arrow--next { right: 14px; }

/* ============================================================
   ПЛАШКА ОПИСАНИЯ СЛАЙДА
   ============================================================ */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 520px;
    height: 80px;
    background: #1A1919;
    color: #fff;
    padding: 12px 20px;
    box-sizing: border-box;

    transform: translateX(-100%);
    transition: transform .3s ease-out;
    z-index: 6;

    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.slide-caption.is-visible {
    transform: translateX(0);
}

.slide-caption__title {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;

    opacity: 0;
    transition: opacity .25s ease-out .25s;
}

.slide-caption__subtitle {
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 4px;

    opacity: 0;
    transition: opacity .25s ease-out .35s;
}

.slide-caption.is-visible .slide-caption__title,
.slide-caption.is-visible .slide-caption__subtitle {
    opacity: 1;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.footer-line {
    height: var(--footer-line-height);
    background: #000;
    width: 100%;
    flex-shrink: 0;
}

.footer-line--with-gap {
    margin-bottom: 26px;
}

.site-footer {
    background: #1A1919;
    height: 80px;
    width: 100%;
    flex-shrink: 0;
}

/* ============================================================
   СТРАНИЦА "АРХИТЕКТУРА"
   ============================================================ */
.projects-page {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 45px 0 0;
}

.projects-page__title {
    width: 980px;
    margin: 0 auto 14px;
    font-family: var(--font-main);
    font-size: 42px;
    font-weight: 500;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 465px);
    column-gap: 50px;
    row-gap: 70px;
    padding-bottom: 60px;
    justify-content: center;
}

.project-card {
    width: 465px;
    display: block;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project-card__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1.78;
    overflow: hidden;
    background: #ddd;
    border-radius: 3px;
}

.project-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    transition: opacity .3s ease-out;
}

.project-card__play svg {
    width: 100%;
    height: 100%;
    display: block;
}

.project-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .4s ease-out;
}

.project-card:hover .project-card__cover img {
    transform: scale(1.03);
}

.project-card__title {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0px;
    margin-top: 17px;
    padding-left: 10px;
    text-transform: uppercase;
}

.project-card__subtitle {
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 300;
    padding-left: 10px;
    margin-top: 1px;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ПРОЕКТА
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-out, visibility 0s linear .3s;

    pointer-events: none;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease-out, visibility 0s linear 0s;

    pointer-events: auto;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.modal__content {
    position: relative;
    background: #fff;
    max-width: 90vw;
    max-height: 90vh;
    width: 85vw;
    padding: 15px 15px 15px;
    overflow: auto;
    z-index: 1;

    border-radius: 3px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

    transform: scale(0.95);
    transition: transform .3s ease-out;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #1a1919;
    padding: 4px 8px;

    opacity: 0;
    transition: opacity .2s ease-out;
    z-index: 2;

    width: 120px;
    height: 120px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.modal__close:hover {
    opacity: 1;
}

/* ============================================================
   ПЛАШКА ОПИСАНИЯ В МОДАЛЬНОМ ОКНЕ
   ============================================================ */
.modal__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: fit-content;
    min-width: 300px;
    max-width: 90%;
    min-height: 120px;
    background: #1A1919;
    color: #fff;
    padding: 15px 30px 20px;
    box-sizing: border-box;
    cursor: pointer;

    transform: translateX(-100%);
    transition: transform .3s ease-out;
    z-index: 6;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    overflow: hidden;

    border-top-right-radius: 4px;
}

.modal__caption.is-visible {
    transform: translateX(0);
}

.modal__caption-title {
    font-family: 'Bodoni Moda', serif;
    font-size: 45px;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.2;
    text-transform: uppercase;
}

.modal__caption-description {
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.4;
    margin-top: 3px;
}

.modal__gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 2.2;
    overflow: hidden;
    background: #ddd;
    border-radius: 3px;
}

.modal__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity .5s ease-in-out;
    will-change: opacity;
}

.modal__slide.is-active {
    opacity: 1;
}

/* Видео в модальном окне */
.modal__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    opacity: 0;
    transition: opacity .5s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.modal__video.is-active {
    opacity: 1;
    pointer-events: auto;
}

.modal__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 7;
    display: none;
    pointer-events: none;
}

.modal__spinner.is-visible {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 16px;
    opacity: .55;
    transition: opacity .2s;
    z-index: 5;
    text-shadow: 0 0 12px rgba(0,0,0,.5);
}

.modal__arrow:hover {
    opacity: 1;
}

.modal__arrow--prev { left: 14px; }
.modal__arrow--next { right: 14px; }

/* ============================================================
   FULLSCREEN-ПРОСМОТР КАРТИНКИ (LIGHTBOX)
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-out, visibility 0s linear .3s;
    pointer-events: none;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease-out, visibility 0s linear 0s;
    pointer-events: auto;
}

.lightbox__overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: pointer;
}

.lightbox__stage {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox__image {
    position: absolute;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity .5s ease-in-out;
    will-change: opacity;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox__image.is-active {
    opacity: 1;
}

/* Видео в lightbox */
.lightbox__video {
    position: absolute;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity .5s ease-in-out;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: none;
    pointer-events: none;
}

.lightbox__video.is-active {
    opacity: 1;
    display: block;
    pointer-events: auto;
}

.lightbox__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 3;
    display: none;
    pointer-events: none;
}

.lightbox__spinner.is-visible {
    display: block;
}

/* ============================================================
   ПОДПИСЬ ПОД КАРТИНКОЙ В LIGHTBOX
   ============================================================ */
.lightbox__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    padding: 20px;
    z-index: 2;

    opacity: 0;
    transition: opacity .8s ease-out;
    pointer-events: none;
}

.lightbox__caption.is-visible {
    opacity: 1;
}

.lightbox__caption-title {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.3;
}

.lightbox__caption-description {
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.3;
    margin-top: 4px;
    color: #bbb;
}

.lightbox__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    padding: 4px 8px;
    z-index: 2;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity .2s ease-out;
}

.lightbox:hover .lightbox__close {
    opacity: 1;
}

.lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 56px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 20px;
    opacity: .55;
    transition: opacity .2s;
    z-index: 2;
    text-shadow: 0 0 12px rgba(0,0,0,.5);
}

.lightbox__arrow:hover {
    opacity: 1;
}

.lightbox__arrow--prev { left: 20px; }
.lightbox__arrow--next { right: 20px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1200px) {
    :root {
        --header-padding-x: 60px;
    }
}

@media (max-width: 900px) {
    :root {
        --nav-max-width: 900px;
        --nav-font-size: 10px;
        --nav-margin-top: 24px;
        --header-padding-x: 24px;
        --logo-margin-top: 20px;
    }
    
    .main-nav {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .award-badge {
        right: 20px;
    }

    .award-badge__img {
        height: 140px;
    }

    .slide-caption {
        width: 100%;
        height: auto;
        padding: 12px 16px;
    }

    .projects-page {
        padding: 40px 24px 0;
    }

    .projects-page__title {
        width: 100%;
        margin: 0 0 40px;
        font-size: 36px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        row-gap: 60px;
    }

    .project-card {
        width: 100%;
        max-width: 465px;
    }

    .modal__content {
        padding: 24px;
    }
}

/* ============================================================
   СТРАНИЦА "ИНТЕРЬЕРЫ" — ОТДЕЛЬНАЯ ВЫСОТА КАРТОЧЕК
   ============================================================ */
body[data-page="interiors"] .project-card__cover {
    aspect-ratio: 1.34;   /* ← МЕНЯЙ ЗДЕСЬ. Чем меньше — тем выше карточка. */
}

/* Модальное окно на странице "Интерьеры" */
body[data-page="interiors"] .modal__gallery {
    aspect-ratio: 1.9;   /* ← МЕНЯЙ ЗДЕСЬ */
}

/* ============================================================
   СТРАНИЦА "О НАС"
   ============================================================ */
.about-page {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 45px 24px 60px;
}

.about-page__inner {
    width: 920px;
    max-width: 100%;
    margin: 0 auto;
}

.about-page__title {
    font-family: var(--font-main);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1.15;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.about-page__heading {
    font-family: var(--font-main);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-transform: uppercase;
    margin-top: 60px;
    margin-bottom: 24px;
}

.about-page__text {
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 20px;
}

.about-page__list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-text);
}

.about-page__list li {
    padding-left: 0;
}

.about-page__list li::before {
    content: '– ';
}

.about-page__awards {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 120px;
    margin: 30px 0 40px;
}

.about-page__awards img {
    width: 300px;
    height: 450px;
    object-fit: contain;
    display: block;
    filter: grayscale(100%) contrast(110%);
}

.about-page__link {
    color: inherit;
    text-decoration: underline;
    transition: opacity .2s ease;
}

.about-page__link:hover {
    opacity: 0.6;
}

/* ============================================================
   СТРАНИЦА "КОНТАКТЫ"
   ============================================================ */
.contacts-page {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.contacts-page__image {
    width: 1920px;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    line-height: 0;
}

.contacts-page__image img {
    width: 100%;
    height: auto;
    display: block;
}

.contacts-page__inner {
    width: 900px;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 24px 60px;
    transform: translateX(-65px);
}

.contacts-page__title {
    font-family: var(--font-main);
    font-size: 42px;
    font-weight: 450;
    letter-spacing: -1.8px;
    line-height: 1.0;
    text-transform: none;
    margin-bottom: 24px;
}

.contacts-page__text {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 4px;
}


/* ============================================================
   ПЛАВНЫЙ ПЕРЕХОД МЕЖДУ СТРАНИЦАМИ (FADE)
   ============================================================ */
main {
    opacity: 0;
    transition: opacity .3s ease-out;
}
body.is-ready main { opacity: 1; }
body.is-leaving main { opacity: 0; }