@font-face {
    font-family: 'Playfair Display';
    src: url('fonts/PlayfairDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('fonts/PlayfairDisplay-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Cormorant SC';
    src: url('fonts/CormorantSC-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Cormorant SC';
    src: url('fonts/CormorantSC-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg: #f6f4f1;
    --paper: #fbf8f1;
    --text: #13294b;
    --text-soft: #46556f;
    --muted: #7f8794;
    --line: rgba(19, 41, 75, 0.12);
    --blue: #13294b;
    --blue-2: #102232;
    --gold: #b79247;
    --white: #ffffff;

    --side: 140px;
    --logo-width: 110px;
    --logo-gap: 6px;
    --content-start: calc(var(--side) + var(--logo-width) + var(--logo-gap) - 10px);
    --content-end: var(--content-start);
    --content: 1180px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

.site-shell {
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, #ffffff 0%, #f7f5f1 46%, #f6f4f1 100%);
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
    background: linear-gradient(180deg, #13294b 0%, #102232 100%);
    color: #ffffff;
}

.header-inner {
    min-height: 76px;
    padding: 8px var(--content-end) 6px var(--side);
    display: grid;
    grid-template-columns: minmax(360px, 440px) 1fr auto;
    align-items: center;
    gap: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-logo {
    width: 120px;
    flex: 0 0 120px;
    filter: invert(1);
    transform: translateY(8px);
}

.brand-name {
    display: block;
    margin-left: -18px;
    padding-top: 0;
    font-family: "Cormorant SC", serif;
    font-size: 15px;
    line-height: 1.06;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 46px;
    padding-top: 0;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
    font-family: "Cormorant SC", serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 48px;
    height: 1px;
    background: #ffffff;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-menu-btn {
    display: none;
}

/* HERO */

.projects-page {
    padding: 70px var(--content-end) 120px var(--content-start);
    padding-bottom: 20px;
}

.projects-hero {
    margin-bottom: 46px;
}

.projects-hero-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 60px;
    align-items: end;
}

.projects-hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(56px, 5vw, 88px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.045em;
    color: var(--blue);
}

.projects-search {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
}

.projects-search span {
    font-size: 24px;
    line-height: 1;
    color: var(--blue);
}

.projects-search input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: "Playfair Display", serif;
    font-size: 15px;
    color: var(--blue);
}

.projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 34px;
    margin-top: 44px;
}

.projects-filter button {
    position: relative;
    border: none;
    background: transparent;
    color: var(--blue);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.projects-filter button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 0;
    height: 1px;
    background: var(--blue);
    transition: width 0.25s ease;
}

.projects-filter button:hover::after,
.projects-filter button.is-active::after {
    width: 100%;
}

/* PROJECTS LIST */

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.project-row {
    position: relative;

    display: grid;
    grid-template-columns: minmax(260px, 0.48fr) minmax(420px, 0.72fr);

    min-height: 280px;

    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(19, 41, 75, 0.08);
    border-radius: 14px;

    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.035);

    overflow: hidden;

    opacity: 0;
    transform: translateY(34px);

    transition:
        opacity 0.75s ease,
        transform 0.75s ease,
        box-shadow 0.25s ease;
}

.project-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-row:hover {
    box-shadow: 0 22px 58px rgba(19, 41, 75, 0.09);
}

.project-row:nth-child(even) {
    grid-template-columns: minmax(420px, 0.72fr) minmax(260px, 0.48fr);
}

.project-row:nth-child(even) .project-row-info {
    order: 2;
}

.project-row:nth-child(even) .project-row-image {
    order: 1;
}

.project-row-info {
    position: relative;
    z-index: 2;

    padding: 34px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-row-number {
    margin-bottom: 16px;

    font-family: "Playfair Display", serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1;

    color: rgba(19, 41, 75, 0.14);
}

.project-row-title {
    max-width: 320px;

    margin-bottom: 14px;

    font-family: "Playfair Display", serif;
    font-size: clamp(22px, 1.8vw, 30px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.035em;

    color: var(--blue);
}

.project-row-meta {
    max-width: 300px;

    margin-bottom: 24px;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 0.13em;
    text-transform: uppercase;

    color: var(--muted);
}

.project-row-link {
    display: inline-flex;
    align-items: center;
    gap: 32px;

    width: max-content;

    color: var(--blue);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.project-row-link span {
    font-size: 24px;
    line-height: 1;
    color: var(--gold);
}

.project-row-image {
    min-height: 280px;
    overflow: hidden;
}

.project-row-image img {
    width: 100%;
    height: 280px;

    object-fit: cover;

    filter: saturate(0.88) contrast(0.98);

    transition: transform 0.45s ease;
}

.project-row:hover .project-row-image img {
    transform: scale(1.035);
}

.empty-state {
    padding: 60px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}
/* ========================= */
/* PROJECT DETAIL */
/* ========================= */

.project-detail-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        320px;

    gap: 72px;

    align-items: start;
}

.project-detail {
    width: 100%;
    max-width: 980px;

    padding-top: 6px;
    padding-bottom: 90px;
}

.project-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    margin-bottom: 0;

    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--text-muted);

    transition: opacity 0.25s ease;
}

.project-back-link:hover {
    opacity: 0.72;
}

.project-detail h1 {
    width: 100%;
    max-width: none;

    margin: 34px 0 0;

    font-family: "Cormorant SC", serif;
    font-size: clamp(56px, 7vw, 50px);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.04em;

    color: var(--blue);
}

.project-detail-meta {
    display: flex;
    align-items: center;
    gap: 22px;

    margin-top: 18px;
    margin-bottom: 42px;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: #b08a43;
}

.project-detail-meta span {
    position: relative;
}

.project-detail-meta span:not(:last-child)::after {
    content: "";

    position: absolute;
    right: -12px;
    top: 50%;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: currentColor;

    transform: translateY(-50%);
}

/* ========================= */
/* COVER */
/* ========================= */

.project-article-cover,
.project-gallery-section,
.project-model-section {
    margin-top: 54px;
    margin-bottom: 54px;
}

.project-article-cover img {
    width: 100%;
    max-height: 720px;

    object-fit: cover;

    display: block;

    border-radius: 22px;
}

/* ========================= */
/* MODEL */
/* ========================= */

.project-model-wrap {
    position: relative;

    width: 100%;
    height: 620px;

    overflow: hidden;
    border-radius: 22px;

    background: #eef1f4;

    border: 1px solid rgba(19, 41, 75, 0.08);
}

.project-model-wrap model-viewer {
    width: 100%;
    height: 100%;

    display: block;

    background: #eef1f4;
}

/* ========================= */
/* GALLERY */
/* ========================= */

.project-gallery-main {
    height: 620px;

    overflow: hidden;
    border-radius: 22px;
}

.project-gallery-main img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.project-gallery-thumbs {
    display: flex;
    gap: 12px;

    margin-top: 16px;

    overflow-x: auto;
}

.project-gallery-thumb {
    width: 110px;
    height: 82px;

    padding: 0;

    overflow: hidden;

    border: none;
    border-radius: 12px;

    cursor: pointer;

    flex: 0 0 auto;

    background: transparent;
}

.project-gallery-thumb img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

.project-gallery-thumb:hover img {
    transform: scale(1.05);
    opacity: 0.88;
}

/* ========================= */
/* TEXT */
/* ========================= */

.project-detail-lead {
    max-width: 760px;

    margin-top: 46px;
    margin-bottom: 54px;

    font-size: 18px;
    line-height: 1.95;

    color: var(--text-soft);
}

.project-richtext,
.project-summary-block,
.project-model-caption-block {
     width: 100%;
    max-width: none;

    margin-top: 42px;
}

.project-richtext p,
.project-summary-block p,
.project-model-caption-block p {
    margin-bottom: 24px;

    font-size: 16px;
    line-height: 1.95;

    color: var(--text-soft);
}
.project-richtext .ql-align-center {
    text-align: center;
}

.project-richtext .ql-align-right {
    text-align: right;
}

.project-richtext .ql-align-justify {
    text-align: justify;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.project-sidebar {
    position: relative;
}

.project-sidebar-sticky {
    position: sticky;
    top: 120px;

    display: flex;
    flex-direction: column;
    gap: 0;

    padding-top: 6px;
}

.project-sidebar-label {
    display: inline-flex;
    align-items: center;

    margin-bottom: 26px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--blue);
}

.project-sidebar-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;

    padding: 18px 0;

    border-top: 1px solid rgba(19, 41, 75, 0.12);

    background: transparent;
    border-radius: 0;

    transition: opacity 0.25s ease;
}

.project-sidebar-card:last-child {
    border-bottom: 1px solid rgba(19, 41, 75, 0.12);
}

.project-sidebar-card:hover {
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.project-sidebar-image {
    width: 92px;
    height: 72px;

    overflow: hidden;
    border-radius: 10px;

    background: rgba(19, 41, 75, 0.08);
}

.project-sidebar-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    display: block;

    transition: transform 0.45s ease;
}

.project-sidebar-card:hover img {
    transform: scale(1.04);
}

.project-sidebar-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-sidebar-category {
    display: inline-block;

    margin-bottom: 8px;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: var(--gold);
}

.project-sidebar-content h3 {
    margin: 0;

    font-family: "Cormorant SC", serif;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 400;

    color: var(--blue);
}
/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 1100px) {

    .project-detail-layout {
        grid-template-columns: 1fr;
        gap: 54px;
    }

    .project-sidebar-sticky {
        position: relative;
        top: auto;
    }
}
/* FOOTER */

.site-footer {
    position: relative;
    margin-top: 60px;
    padding: 10px var(--content-end) 10px var(--content-start);
    background: linear-gradient(180deg, var(--blue) 0%, var(--blue-2) 100%);
    color: #ffffff;
    transition: padding 0.3s ease;
}

.site-footer.is-form-collapsed {
    padding-top: 150px;
}

.footer-contact-card {
    position: absolute;
    left: 50%;
    top: -72px;
    z-index: 5;
    width: min(820px, calc(100% - 80px));
    min-height: 210px;
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 46px;
    padding: 34px 44px 36px;
    background: #f7f4ee;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 18px;
    color: #111111;
    transform: translateX(-50%);
    transform-origin: bottom center;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
    transition: top 0.3s ease, min-height 0.3s ease, padding 0.3s ease;
}

.footer-contact-card.is-collapsed {
    top: 46px;
    min-height: 92px;
    grid-template-columns: 1fr;
    padding: 26px 44px;
}

.footer-contact-info h2 {
    font-family: "Cormorant SC", serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.12;
    color: var(--blue);
    padding-right: 42px;
}

.footer-contact-line {
    width: 44px;
    height: 1px;
    margin: 18px 0 20px;
    background: var(--gold);
}

.footer-contact-info p {
    max-width: 230px;
    font-size: 12px;
    line-height: 1.75;
    color: #4d4a43;
}

.footer-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-form,
.footer-contact-line,
.footer-contact-info p {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-contact-card.is-collapsed .footer-form,
.footer-contact-card.is-collapsed .footer-contact-line,
.footer-contact-card.is-collapsed .footer-contact-info p {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.footer-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    border: 1px solid rgba(17, 17, 17, 0.18);
    background: transparent;
    padding: 10px 12px;
    font-family: Inter, Arial, sans-serif;
    font-size: 11px;
    color: #111111;
    outline: none;
}

.footer-form textarea {
    min-height: 62px;
    resize: vertical;
}

.footer-form button {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 34px;
    margin-top: 2px;
    border: none;
    background: transparent;
    color: #111111;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
}

.footer-form button span {
    font-size: 20px;
    line-height: 1;
    color: var(--gold);
}

.footer-form-toggle {
    position: absolute;
    right: 5px;
    top: 10px;
    left: auto;
    bottom: auto;
    z-index: 8;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(19, 41, 75, 0.16);
    border-radius: 50%;
    background: #f7f4ee;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transform: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.footer-shell {
    display: grid;
    grid-template-columns: 220px 180px 260px;
    gap: 70px;
    align-items: start;
    width: min(820px, calc(100% - 80px));
    margin: 0 auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

.footer-brand {
    width: 170px;
    height: 95px;
    overflow: hidden;
}

.footer-logo {
    width: 170px;
    height: auto;
    filter: invert(1);
    transform: translateY(-8px);
}

.footer-nav,
.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a,
.footer-contacts a,
.footer-contacts p {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 1px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.68);
}

.footer-bottom div {
    display: flex;
    gap: 28px;
}

/* SCROLL TOP */

.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(19, 41, 75, 0.18);
    border-radius: 50%;
    background: #f7f4ee;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.25s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    :root {
        --side: 30px;
        --logo-width: 92px;
        --content-start: 30px;
        --content-end: 30px;
    }

    .projects-hero-head {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .project-row,
    .project-row:nth-child(even) {
        grid-template-columns: 0.75fr 1fr;
    }
}

@media (max-width: 900px) {
    :root {
        --side: 18px;
        --content-start: 18px;
        --content-end: 18px;
    }

.site-header {
    min-height: auto;
}

.header-inner {
    min-height: 82px;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 18px;
    gap: 10px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    transform: none;
}

.brand-logo {
    width: 82px;
    flex: 0 0 82px;
    transform: none;
}

.brand-name {
    display: block;
    margin-left: -12px;
    max-width: 210px;
    padding-top: 0;
    font-size: 10px;
    line-height: 1.12;
    text-align: left;
    color: #ffffff;
}


.main-nav {
    position: fixed;
    right: 18px;
    top: 78px;
    z-index: 120;

    display: none;
    width: 210px;
    padding: 18px;

    flex-direction: column;
    align-items: flex-start;
    gap: 14px;

    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(19, 41, 75, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.main-nav.is-open {
    display: flex;
}

.main-nav a {
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--blue);
}

.main-nav a::after {
    background: var(--blue);
}

.mobile-menu-btn {
    right: 18px;
    top: 18px;
    z-index: 150;
    display: flex;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--gold);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 18px;
    height: 2px;
    background: var(--blue);
}

    .projects-page {
        padding: 46px 18px 90px;
    }

    .projects-hero h1 {
        font-size: clamp(42px, 12vw, 58px);
    }

    .projects-filter {
        gap: 22px;
    }

    .project-row,
    .project-row:nth-child(even) {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .project-row:nth-child(even) .project-row-info,
    .project-row:nth-child(even) .project-row-image {
        order: initial;
    }

    .project-row-info {
        padding: 30px 22px;
    }

    .project-row-image {
        min-height: 240px;
    }

    .project-row-title {
        font-size: 30px;
    }

    .site-footer {
        margin-top: 80px;
        padding: 20px 18px 22px;
    }

    .site-footer.is-form-collapsed {
        padding-top: 150px;
    }

    .footer-contact-card {
        top: -58px;
        width: calc(100% - 36px);
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px 22px;
        border-radius: 18px;
    }

    .footer-contact-card.is-collapsed {
        top: 46px;
        min-height: 86px;
        padding: 24px 22px;
    }

    .footer-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-shell {
        width: 100%;
        display: grid;
        grid-template-columns: 80px 1fr 1fr;
        gap: 16px;
        align-items: start;
        padding-top: 26px;
        margin: 0;
    }

    .footer-brand {
        width: 88px;
        height: 62px;
    }

    .footer-logo {
        width: 118px;
        transform: translateY(-8px);
    }

    .footer-nav,
    .footer-contacts {
        gap: 8px;
    }

    .footer-nav a,
    .footer-contacts a,
    .footer-contacts p {
        font-size: 8px;
        line-height: 1.35;
        letter-spacing: 0.08em;
    }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 18px;
        font-size: 8px;
    }

    .footer-bottom div {
        gap: 14px;
    }
}