@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-ThinItalic.otf') format('opentype');
    font-weight: 100;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-LightItalic.otf') format('opentype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-RegularItalic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-BoldItalic.otf') format('opentype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Aeonik';
    src: url('fonts/Aeonik-BlackItalic.otf') format('opentype');
    font-weight: 900;
    font-style: italic;
    font-display: swap;
}

/* Aeonik has no Cyrillic letters, so Bulgarian text uses Onest: a free (OFL) grotesk
   in the same spirit, all weights in one variable file. The browser only downloads it
   when the page shows Cyrillic text. To self-host later, download the file into fonts/
   and change the url. */
@font-face {
    font-family: 'Onest Cyrillic';
    src: url('https://cdn.jsdelivr.net/fontsource/fonts/onest:vf@5/cyrillic-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ================= Base ================= */
:root {
    --text: #5B5B5B;
    --text-soft: #8a8580;
    --line: #ddd6d0;
    --tint: #f6f2ef;
    --white: #fff;
    --header-h: 72px;
    --gutter: 32px;
    /* Latin letters in Aeonik, Cyrillic letters in Onest */
    --font: Aeonik, 'Onest Cyrillic', sans-serif;
}

/* while switching to English on load (see the script in <head>) */
.i18n-pending body { visibility: hidden; }

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    max-width: 1400px;
    margin: 0 auto;
    font-family: var(--font);
    font-weight: 300;
    color: var(--text);
    background: var(--white);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

section { scroll-margin-top: var(--header-h); }

/* ================= Header ================= */
.site-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    z-index: 50;
    transition: background-color .3s, box-shadow .3s;
}

    .site-header.scrolled {
        background: rgba(255, 255, 255, .88);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        box-shadow: 0 1px 0 var(--line);
    }

.navbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px var(--gutter);
    position: relative;
    min-height: var(--header-h);
}

.logo {
    font-weight: 300;
    font-size: 22px;
    font-family: var(--font);
    color: #5B5B5B;
    text-decoration: none;
    display: flex;
    align-items: baseline;
}

    .logo { margin-right: auto; }

    .logo .text1 {
        margin: 0 10px 0 4px;
    }

    .logo .text2 {
        font-weight: 100;
        text-wrap: nowrap;
    }

    /* sized in em so it scales with the text; bottom of "bor" sits on the text baseline */
    .logo img {
        width: auto;
        height: 1.14em;
        align-self: baseline;
    }

.nav-menu {
    font-weight: 300;
    font-size: 20px;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

    .nav-menu a {
        color: #5B5B5B;
        text-decoration: none;
        padding: 2px 14px;
        transition: background-color .2s;
    }

        .nav-menu a:hover,
        .nav-menu li.active a {
            background-color: #fff;
        }

.site-header.scrolled .nav-menu a:hover,
.site-header.scrolled .nav-menu li.active a {
    background-color: var(--tint);
}

/* ---------- Language switch (BG / EN) ---------- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 15px;
    letter-spacing: .06em;
    color: var(--text-soft);
}

    .lang-switch button {
        border: 0;
        background: none;
        padding: 4px 6px;
        font: inherit;
        letter-spacing: inherit;
        color: var(--text-soft);
        cursor: pointer;
        transition: color .2s;
    }

        .lang-switch button:hover { color: var(--text); }

        .lang-switch button[aria-pressed="true"] {
            color: var(--text);
            font-weight: 400;
            text-decoration: underline;
            text-underline-offset: 5px;
            text-decoration-thickness: 1px;
        }

.burger {
    display: none;
    border: 0;
    background: none;
    padding: 4px;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: var(--text);
}

/* ================= Home ================= */
#home {
    position: relative;
    background-image: url(bg.jpg);
    background-image: image-set(url(bg.webp) type("image/webp"), url(bg.jpg) type("image/jpeg"));
    background-size: cover;
    background-position: center;
    padding-top: var(--header-h);
}

.content img {
    width: 100%;
    height: auto;
    margin: 0 auto;
    position: relative;
    display: block;
}

.content {
    position: relative;
}

/* icons sit just under the bottom-right corner of the room in pic.webp
   (the room ends 15.4% from the image's right edge and 81.7% from its top) */
.social {
    position: absolute;
    right: 15.4%;
    top: calc(81.7% + 12px);
    display: flex;
    gap: 6px;
}

    .social a {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        background: var(--white);
        transition: transform .2s;
    }

        .social a:hover { transform: translateY(-2px); }

    .social svg {
        width: 100%;
        height: 100%;
        fill: #ebecec;
        stroke: #898989;
        stroke-width: .82;
    }

        .social svg .dot { fill: #898989; stroke: none; }

/* ================= Sections (shared) ================= */
.page-section {
    padding: 110px var(--gutter);
}

    .page-section.tinted {
        background: var(--tint);
    }

.section-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 56px;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 300;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text);
}

    .section-title::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }



.section-intro {
    max-width: 560px;
    font-size: 20px;
    font-weight: 300;
    margin: -24px 0 56px;
}

/* ================= Services ================= */
.services-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
}

.service {
    padding: 28px 28px 36px 0;
    border-right: 1px solid var(--line);
    padding-left: 28px;
    transition: background-color .25s;
}

    .service:first-child { padding-left: 0; }
    .service:last-child { border-right: 0; }

    .service-num {
        display: block;
        font-size: 13px;
        letter-spacing: .1em;
        color: var(--text-soft);
        margin-bottom: 40px;
    }

    .service h3 {
        margin: 0 0 12px;
        font-size: 22px;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .service p {
        margin: 0;
        font-size: 16px;
        color: var(--text-soft);
    }

/* ================= Projects + carousel ================= */
.project {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

    .project + .project {
        margin-top: 110px;
    }

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

        .project.reverse .carousel { order: 2; }

.project-info .project-num {
    font-size: 64px;
    font-weight: 100;
    line-height: 1;
    color: #c9c0b8;
}

.project-info h3 {
    margin: 16px 0 6px;
    font-size: 28px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.project-info .meta {
    margin: 0 0 22px;
    font-size: 14px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.project-info p {
    font-size: 17px;
}

.carousel {
    position: relative;
    overflow: hidden;
    outline: none;
}

    .carousel:focus-visible {
        box-shadow: 0 0 0 2px var(--text-soft);
    }

.carousel-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1);
    cursor: zoom-in;
    touch-action: pan-y;
}

.slide {
    flex: 0 0 100%;
    aspect-ratio: 3 / 2;
    background: #ebe5e0;
}

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        user-select: none;
    }

.carousel-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: var(--white);
}

    .carousel-controls .counter {
        font-size: 14px;
        letter-spacing: .1em;
        padding: 0 10px;
        min-width: 78px;
        text-align: center;
    }

.arrow {
    width: 48px;
    height: 48px;
    border: 0;
    background: var(--white);
    cursor: pointer;
    position: relative;
    transition: background-color .2s;
}

    .arrow:hover { background: var(--tint); }

    /* thin line arrow */
    .arrow::before {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 10px;
        height: 10px;
        border-top: 1px solid var(--text);
        border-right: 1px solid var(--text);
    }

    .arrow.prev::before, .lb-prev::before { transform: translateX(2px) rotate(-135deg); }
    .arrow.next::before, .lb-next::before { transform: translateX(-2px) rotate(45deg); }

.carousel-dots {
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: flex;
    gap: 6px;
}

    .carousel-dots button {
        width: 22px;
        height: 14px;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
        position: relative;
    }

        .carousel-dots button::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            height: 1px;
            background: rgba(255, 255, 255, .7);
            transition: height .2s, background-color .2s;
        }

        .carousel-dots button.active::before {
            height: 3px;
            margin-top: -1px;
            background: var(--white);
        }

/* ================= Lightbox ================= */
.lightbox {
    border: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    background: rgba(250, 248, 246, .97);
    color: var(--text);
}

    .lightbox[open] {
        display: grid;
        place-items: center;
    }

    .lightbox::backdrop { background: transparent; }

    .lightbox img {
        max-width: calc(100vw - 160px);
        max-height: calc(100vh - 120px);
        object-fit: contain;
    }

    .lightbox .lb-prev,
    .lightbox .lb-next {
        position: fixed;
        top: 50%;
        margin-top: -24px;
    }

    .lightbox .lb-prev { left: 24px; }
    .lightbox .lb-next { right: 24px; }

.lb-close {
    position: fixed;
    top: 16px;
    right: 20px;
    border: 0;
    background: none;
    font-size: 40px;
    font-weight: 100;
    line-height: 1;
    color: var(--text);
    cursor: pointer;
}

.lb-counter {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    letter-spacing: .1em;
}

/* ================= Contacts ================= */
.contact {
    background: url(bg.jpg) center / cover;
    background-image: image-set(url(bg.webp) type("image/webp"), url(bg.jpg) type("image/jpeg"));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-lead .big {
    font-size: clamp(32px, 4.4vw, 54px);
    line-height: 1.1;
    font-weight: 100;
    margin: 0 0 24px;
}

.contact-lead p {
    font-size: 18px;
    max-width: 440px;
}

.button {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 28px;
    background: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 16px;
    transition: background-color .2s, color .2s;
}

    .button:hover {
        background: var(--text);
        color: var(--white);
    }

.contact-list {
    margin: 0;
    background: rgba(255, 255, 255, .75);
    padding: 12px 32px;
}

    .contact-list div {
        display: grid;
        grid-template-columns: 110px 1fr;
        gap: 16px;
        padding: 18px 0;
        border-bottom: 1px solid var(--line);
    }

        .contact-list div:last-child { border-bottom: 0; }

    .contact-list dt {
        font-size: 13px;
        letter-spacing: .1em;
        text-transform: uppercase;
        color: var(--text-soft);
        padding-top: 4px;
    }

    .contact-list dd {
        margin: 0;
        font-size: 19px;
    }

        .contact-list dd a {
            text-decoration: none;
            border-bottom: 1px solid var(--line);
        }

            .contact-list dd a:hover { border-color: var(--text); }

/* ================= Footer ================= */
.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px var(--gutter);
    font-size: 14px;
    color: var(--text-soft);
    border-top: 1px solid var(--line);
}

    .site-footer a { text-decoration: none; }
    .site-footer a:hover { color: var(--text); }

/* ================= Tablet ================= */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service:nth-child(2) { border-right: 0; }
    .service:nth-child(3) { padding-left: 0; }
    .service:nth-child(n+3) { border-top: 1px solid var(--line); }

    .project,
    .project.reverse {
        grid-template-columns: 1fr;
        gap: 28px;
    }

        .project.reverse .carousel { order: 0; }

    .project-info .project-num { font-size: 48px; }
}

/* ================= Compact header (small laptops / tablets landscape) ================= */
@media (min-width: 769px) and (max-width: 1100px) {
    .navbar { gap: 24px; }
    .logo { font-size: 19px; }
    .logo .text1 { margin-right: 8px; }
    .nav-menu { font-size: 17px; gap: 2px; }
    .nav-menu a { padding: 2px 10px; }
}

/* narrow laptops / tablets: not enough room for the full logo, the menu and BG / EN */
@media (min-width: 769px) and (max-width: 960px) {
    .logo .text2 { display: none; }
    .nav-menu a { padding: 2px 7px; }
}

/* ================= Mobile ================= */
@media (max-width: 768px) {
    :root {
        --gutter: 20px;
        --header-h: 64px;
    }

    .navbar {
        padding: 16px var(--gutter);
    }

    .logo { font-size: 18px; }

    .burger {
        display: block;
        order: 1;   /* after the BG / EN switch */
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        z-index: 100;
    }

        .nav-menu.is-open {
            display: flex;
        }

        .nav-menu li a {
            display: block;
            padding: 14px 0;
        }

    .social { top: calc(81.7% + 8px); }
    .social a { width: 30px; height: 30px; }

    .page-section { padding: 72px var(--gutter); }
    .section-title { margin-bottom: 36px; }
    .section-intro { font-size: 18px; margin: -12px 0 36px; }

    .project + .project { margin-top: 72px; }

    .arrow { width: 40px; height: 40px; }
    .carousel-controls .counter { min-width: 64px; font-size: 12px; }
    .carousel-dots { left: 12px; bottom: 14px; }

    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-list { padding: 4px 20px; }
    .contact-list div { grid-template-columns: 1fr; gap: 2px; }

    .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
    .lightbox .lb-prev,
    .lightbox .lb-next { top: auto; bottom: 8px; margin: 0; }
    .lightbox .lb-prev { left: 8px; }
    .lightbox .lb-next { right: 8px; }
}

@media (max-width: 560px) {
    .logo .text2 { display: none; }

    .services-grid { grid-template-columns: 1fr; }
    .service, .service:nth-child(3) { padding: 24px 0; border-right: 0; }
    .service + .service { border-top: 1px solid var(--line); }
    .service-num { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .carousel-track { transition: none; }
}