/* ======================================== */
/* CUSTOM_MAIN.CSS - НАСТРАИВАЙТЕ ЗДЕСЬ     */
/* ======================================== */

/* ========== ЛОКАЛЬНЫЕ ШРИФТЫ ========== */
@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-cyrillic-400.2b84fe61edc2.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-latin-400.33005609bb16.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-cyrillic-600.d175ed900175.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-latin-600.25bbe0051e60.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-cyrillic-700.5fffac32c626.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/source-sans-pro-v24-latin-700.7424e798b17c.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/montserrat-v31-cyrillic-500.69660091383d.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/montserrat-v31-latin-500.f96e8aab37e8.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/montserrat-v31-cyrillic-600.1531497cf6c6.woff2") format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/montserrat-v31-latin-600.9e606da1cbeb.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========== ПЕРЕМЕННЫЕ - ИЗМЕНЯЙТЕ ЦВЕТА ЗДЕСЬ ========== */
:root {
    --banner-surface: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.5));
    /* ОСНОВНЫЕ ЦВЕТА */
    --color-white: #ffffff;           /* Белый */
    --color-offwhite: #f8f9fa;        /* Светлый фон */
    --color-light: #e9ecef;            /* Светло-серый */
    --color-gray-light: #dee2e6;       /* Границы */
    --color-gray: #adb5bd;             /* Серый */
    --color-gray-dark: #6c757d;         /* Темно-серый */
    --color-dark: #343a40;              /* Основной темный */
    --color-black: #212529;             /* Почти черный */
    
    /* АКЦЕНТНЫЙ ЦВЕТ (измените на свой) */
    --color-primary: #0d6efd;           /* Синий - ОСНОВНОЙ ЦВЕТ */
    --color-primary-hover: #0a58ca;      /* Темнее при наведении */
    --color-primary-subtle: #e7f1ff;     /* Светлый фон */
    
    /* ВТОРИЧНЫЙ ЦВЕТ */
    --color-secondary: #343a40;          /* Темный */
    --color-secondary-hover: #212529;     /* Еще темнее */
    
    /* ТЕКСТ */
    --color-text: #ffffff;               /* БЕЛЫЙ текст */
    --color-text-light: #e0e0e0;          /* Светло-серый */
    --color-text-inverse: #343a40;        /* Темный текст */
    
    /* ГРАНИЦЫ */
    --color-border: rgba(255, 255, 255, 0.2); /* Полупрозрачная белая граница */
    
    /* ТЕНИ - регулируйте прозрачность */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
    
    /* АНИМАЦИИ */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    /* ОТСТУПЫ - меняйте под свой дизайн */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    --spacing-xxl: 4rem;     /* 64px */
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    min-height: 100dvh;
    background-color: #111820;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--color-text);
    background-color: #111820;
    isolation: isolate;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Keep the photograph in one viewport-sized layer. A fixed body background
 * behind backdrop-filter surfaces can leave horizontal repaint seams. */
body::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: -1px;
    right: -1px;
    bottom: auto;
    left: -1px;
    width: auto;
    height: calc(100vh + 2px);
    height: calc(100dvh + 2px);
    background-color: #111820;
    background-image: url("../images/background/background-1.c6f1bf98fda8.jpeg");
    background-image: var(
        --site-background-desktop,
        image-set(
            url("../images/background/variants/background-1-5b24872900-486588-w1920.f313201cda30.webp") type('image/webp') 1x,
            url("../images/background/variants/background-1-5b24872900-486588-w3426.02347347401f.webp") type('image/webp') 2x,
            url("../images/background/background-1.c6f1bf98fda8.jpeg") type('image/jpeg') 1x
        )
    );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateZ(0);
    pointer-events: none;
}

#page-wrapper {
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
}

/* ========== ОБЩИЙ СТИЛЬ ДЛЯ ВСЕХ БЛОКОВ ========== */
#header,
#intro [class*="col-"] section,
.box,
#main .box form,
.project-description,
.project-specs,
.about-section,
#order_form .box {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
    color: white;
}

/* ========== ТИПОГРАФИЯ ========== */
h1, h2, h3, h4 {
    color: white !important;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: var(--spacing-md);
    color: white;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

/* ========== ХЛЕБНЫЕ КРОШКИ ========== */
.site-breadcrumbs {
    margin-top: var(--spacing-sm);
}

.site-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(9, 20, 33, 0.48);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    list-style: none;
}

.site-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.9rem;
    line-height: 1.25;
}

.site-breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

.site-breadcrumbs a {
    color: #8ab9ff;
}

.site-breadcrumbs a:hover {
    color: #c5dcff;
}

.site-breadcrumbs span {
    overflow: hidden;
    max-width: min(36rem, 65vw);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== СИСТЕМА СЕТОК ========== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: calc(-1 * var(--spacing-sm));
}

.row > * {
    padding: var(--spacing-sm);
}

.col-1 { width: 8.333%; }
.col-2 { width: 16.666%; }
.col-3 { width: 25%; }
.col-4 { width: 33.333%; }
.col-5 { width: 41.666%; }
.col-6 { width: 50%; }
.col-7 { width: 58.333%; }
.col-8 { width: 66.666%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333%; }
.col-11 { width: 91.666%; }
.col-12 { width: 100%; }

/*
 * Content collections stay balanced when editors add or remove items.
 * Incomplete rows are centred and cards grow only to a readable width.
 */
.adaptive-grid {
    --adaptive-item-min: 260px;
    --adaptive-item-max: 370px;
    justify-content: center;
}

.adaptive-grid > * {
    flex: 1 1 var(--adaptive-item-min);
    width: auto;
    max-width: var(--adaptive-item-max);
}

.adaptive-grid-team {
    --adaptive-item-min: 250px;
    --adaptive-item-max: 340px;
}

.adaptive-grid-compact {
    --adaptive-item-min: 180px;
    --adaptive-item-max: 270px;
}

.project-grid > *,
.three-column-grid > * {
    flex: 0 0 33.333%;
    width: 33.333%;
    max-width: 33.333%;
}

/* ========== ШАПКА ========== */
#header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

header#header {
    padding: 2rem 0;
}

#header .site-brand {
    font-size: 2.5rem;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1.5rem;
    line-height: 0;
}

#header .site-brand a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    isolation: isolate;
    line-height: 0;
    color: white;
    outline-offset: 0.55rem;
}

#header .site-brand a:focus-visible {
    outline: 2px solid rgba(118, 215, 255, 0.95);
    border-radius: 10px;
}

/* ========== НАВИГАЦИЯ ========== */
.site-menu-toggle {
    display: none;
}

#nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#nav a {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    color: white;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Анимация при наведении на кнопки шапки */
#nav a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

#nav a:hover::before {
    width: 300px;
    height: 300px;
}

#nav a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Анимация для активной кнопки */
#nav .current a {
    background: var(--color-primary);
    color: white;
    animation: pulse 3s infinite;
}

#nav .current a:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
}

#nav .current a::before {
    display: none;
}

/* Анимация пульсации для активной кнопки */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

/* ========== БАННЕР ========== */
#banner {
    position: relative;
    overflow: hidden;
    background: var(--banner-surface);
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    border-radius: 8px;
    max-width: 1150px;
    margin: var(--spacing-lg) auto;
    width: 95%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shared vertical rhythm for the home, portfolio and about hero sections. */
section#header.page-hero {
    --hero-edge-space: 32px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--hero-edge-space);
    padding-block: var(--hero-edge-space);
}

.page-hero #banner {
    margin-block: 0;
}

.page-hero #intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    row-gap: var(--hero-edge-space);
}

.page-hero #intro > .intro-actions {
    margin: 0;
}

.page-hero .home-primary-actions > li {
    display: flex;
}

/* Анимация блика - настраивайте */
#banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 4s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 200%; }
}

#banner header {
    position: relative;
    z-index: 1;
}

#banner h1,
#banner h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#banner p {
    color: white;
    font-size: 1.25rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* ========== ПРЕИМУЩЕСТВА КОМПАНИИ ========== */
@media screen and (min-width: 737px) {
    .about-page .about-primary-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        width: min(100%, 36rem);
        margin-inline: auto;
    }

    .about-page .about-primary-actions > li {
        min-width: 0;
    }

    .about-page .about-primary-actions .button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 52px;
    }

    #intro.home-intro {
        width: 95%;
        max-width: 1150px;
        padding-inline: 0;
    }

    #intro .row.home-features {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        margin: 0;
    }

    #intro .home-features > [class*="col-"] {
        min-width: 0;
        width: auto;
        max-width: none;
        padding: 0;
    }

    #intro .home-features .home-feature-card,
    .project-grid .box,
    .cms-card {
        border-radius: 12px;
    }
}

#intro .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

#intro [class*="col-"] {
    flex: 1 1 300px;
    max-width: 350px;
}

#intro [class*="col-"] section {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#intro [class*="col-"] section:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

/* Стили для отступа */
.intro-actions {
    margin-top: var(--spacing-xl);
}

.home-primary-actions .button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    min-width: 200px;
}

/* СТИЛИ ДЛЯ ИКОНОК */
.featured-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem auto;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 3.5rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

#intro [class*="col-"] section:hover .featured-icon {
    background: var(--color-primary);
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 0 30px var(--color-primary);
}

/* Заголовки в карточках */
#intro [class*="col-"] h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    transition: color 0.3s ease;
    color: white;
}

#intro [class*="col-"] section:hover h2 {
    color: var(--color-primary);
}

/* Текст в карточках */
#intro [class*="col-"] p {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

#intro [class*="col-"] section:hover p {
    color: white;
}

/* ========== КНОПКИ ========== */
.button {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-primary);
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
    pointer-events: none;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover {
    color: white;
    text-decoration: none;
    background: var(--color-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

.button.alt {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.button.alt:hover {
    background: rgba(255, 255, 255, 0.3);
}

.about-home-button {
    border: 1px solid rgba(67, 125, 196, 0.38);
    color: #fff;
    background: rgba(12, 18, 26, 0.86) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.about-home-button:hover,
.about-home-button:focus-visible {
    border-color: rgba(72, 137, 218, 0.72);
    background: rgba(18, 45, 78, 0.94) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.44), 0 0 0 3px rgba(30, 117, 255, 0.16);
}

.actions {
    display: flex;
    gap: 1rem;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== ПОРТФОЛИО ========== */
#main {
    padding: var(--spacing-xl) 0 var(--spacing-xxl) 0;
}

.major {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.major h2,
.legal-document .major h1 {
    font-size: 2.2rem;
    display: inline-block;
    position: relative;
    padding-bottom: 1rem;
    color: white;
}

.major h2::after,
.legal-document .major h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-primary);
}

.box {
    overflow: hidden;
    transition: var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.box:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.image-cover {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.image-cover > picture,
.project-grid .box {
    position: relative;
}

.project-card-type {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    overflow: hidden;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: white;
    background: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

.project-card-type--alternating {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    text-align: center;
    isolation: isolate;
    background: var(--color-primary);
}

.project-card-type--alternating::before {
    content: '';
    position: absolute;
    inset: -35%;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(160, 211, 255, 0.1) 0%, rgba(111, 188, 255, 0.06) 35%, rgba(111, 188, 255, 0) 72%);
    animation: project-badge-inner-pulse 3s ease-in-out infinite paused;
}

.project-card-type--alternating::after {
    content: '';
    position: absolute;
    top: -60%;
    bottom: -60%;
    left: -55%;
    z-index: 0;
    width: 45%;
    background: linear-gradient(100deg, rgba(184, 229, 255, 0) 8%, rgba(184, 229, 255, 0.12) 34%, rgba(184, 229, 255, 0.3) 50%, rgba(184, 229, 255, 0.12) 66%, rgba(184, 229, 255, 0) 92%);
    opacity: 0;
    transform: translateX(0) skewX(-15deg);
    animation: project-badge-inner-shine 3s ease-in-out infinite paused;
}

.project-card-type-description {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.project-card-type-label {
    position: relative;
    z-index: 1;
    grid-area: 1 / 1;
    min-width: 0;
    overflow: hidden;
    /* Match the full badge bounds so the text mask follows the shine. */
    padding: 0.3rem 0.8rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    animation-duration: 6s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-play-state: paused;
}

.project-card-type-label--work {
    animation-name: project-badge-work;
}

.project-card-type-label--type {
    clip-path: inset(0 100% 0 0);
    animation-name: project-badge-type;
}

.project-card-type--alternating.is-badge-visible:not(.is-document-hidden) .project-card-type-label,
.project-card-type--alternating.is-badge-visible:not(.is-document-hidden)::before,
.project-card-type--alternating.is-badge-visible:not(.is-document-hidden)::after {
    animation-play-state: running;
}

@keyframes project-badge-work {
    0%, 30% { clip-path: inset(0 0 0 -32.5%); }
    34% { clip-path: inset(0 0 0 8%); }
    42.5% { clip-path: inset(0 0 0 84.5%); }
    47.5%, 49.999% { clip-path: inset(0 0 0 129.5%); }
    50%, 80% { clip-path: inset(0 132.5% 0 0); }
    84% { clip-path: inset(0 92% 0 0); }
    92.5% { clip-path: inset(0 15.5% 0 0); }
    97.5%, 100% { clip-path: inset(0 -29.5% 0 0); }
}

@keyframes project-badge-type {
    0%, 30% { clip-path: inset(0 132.5% 0 0); }
    34% { clip-path: inset(0 92% 0 0); }
    42.5% { clip-path: inset(0 15.5% 0 0); }
    47.5%, 49.999% { clip-path: inset(0 -29.5% 0 0); }
    50%, 80% { clip-path: inset(0 0 0 -32.5%); }
    84% { clip-path: inset(0 0 0 8%); }
    92.5% { clip-path: inset(0 0 0 84.5%); }
    97.5%, 100% { clip-path: inset(0 0 0 129.5%); }
}

@keyframes project-badge-inner-pulse {
    0%, 100% { opacity: 1; transform: scale(1.1); }
    50% { opacity: 0.25; transform: scale(0.7); }
}

@keyframes project-badge-inner-shine {
    0%, 60% { opacity: 0; transform: translateX(0) skewX(-15deg); }
    68% { opacity: 0.65; transform: translateX(90%) skewX(-15deg); }
    85% { opacity: 0.65; transform: translateX(260%) skewX(-15deg); }
    95%, 100% { opacity: 0; transform: translateX(360%) skewX(-15deg); }
}

@media screen and (max-width: 736px) {
    .project-card-type {
        top: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        font-size: 0.75rem;
        line-height: 1.25;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card-type--alternating {
        display: flex;
        align-items: center;
        gap: 0.35em;
        padding: 0.3rem 0.8rem;
        background: var(--color-primary);
    }

    .project-card-type--alternating::before,
    .project-card-type--alternating::after {
        display: none;
        animation: none;
    }

    .project-card-type-label {
        padding: 0;
        animation: none;
        clip-path: none;
        opacity: 1;
        transform: none;
    }

    .project-card-type-label--work {
        flex-shrink: 0;
    }

    .project-card-type-label--type::before {
        content: '· ';
    }
}

.project-card-picture {
    display: block;
    width: 100%;
    height: 100%;
}

.image-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-cover:hover img {
    transform: scale(1.08);
}

.box header {
    padding: var(--spacing-md) var(--spacing-md) 0;
}

.box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.box p {
    padding: 0 var(--spacing-md);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.box footer {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

/* ========== СТРАНИЦА ПРОЕКТА ========== */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-slow);
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

/* ========== ФОРМЫ ========== */
#main .box form {
    padding: var(--spacing-lg);
    border-radius: 12px;
}

.gtr-uniform {
    margin: -1rem;
}

.gtr-uniform > * {
    padding: 1rem;
}

/* Поля формы */
input, textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

input:hover, textarea:hover, select:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: white;
}

/* ========== ABOUT SECTION ========== */
.about-section {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 12px;
}

.about-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-section .major {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.about-section .major h2 {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.about-section .major h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-primary);
}

.about-image-card {
    float: right;
    width: min(46%, 460px);
    aspect-ratio: 1 / 1;
    margin: 0 0 var(--spacing-md) var(--spacing-lg);
    overflow: hidden;
    border-radius: 12px;
    background: rgba(12, 18, 28, 0.7);
    box-shadow: var(--shadow);
    line-height: 0;
}

.about-image-card picture {
    display: block;
    width: 100%;
    height: 100%;
}

.about-image-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.about-image-card:hover img {
    transform: scale(1.02);
}

.about-image-card:hover {
    box-shadow: var(--shadow-hover);
}

.about-copy-flow::after {
    content: '';
    display: block;
    clear: both;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0 0 var(--spacing-md) 1.6rem;
    padding-left: 0.6rem;
}

.markdown-content li {
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-content blockquote {
    margin: 0 0 var(--spacing-md);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--color-primary);
    background: rgba(13, 110, 253, 0.1);
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-content code {
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
}

.markdown-content pre {
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
    padding: 1rem;
    border-radius: 8px;
    background: rgba(6, 10, 16, 0.85);
}

.markdown-content pre code {
    padding: 0;
    background: transparent;
}

.markdown-content hr {
    margin: var(--spacing-lg) 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== ПОДВАЛ ========== */
#footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
}

#footer h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--color-primary);
}

#footer p {
    color: rgba(255, 255, 255, 0.9);
}

.footer-left {
    text-align: left;
    width: 100%;
}

.footer-left .actions {
    justify-content: flex-start;
    padding-left: 0;
    margin-left: 0;
}

.footer-left .button {
    margin-left: 0;
}

/* Контакты */
.contact {
    list-style: none;
}

.contact li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-sm) 0;
}

.contact li:last-child {
    border-bottom: none;
}

.contact h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact h3 i {
    color: var(--color-primary);
}

.contact a {
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.contact a:hover {
    color: white;
    border-bottom-color: white;
}

.company-phones {
    display: grid;
    gap: 0.35rem;
}

.company-phones p {
    margin: 0;
}

/* Социальные сети */
.social-section {
    margin: 3rem 0 0;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.social-section h2 {
    color: white;
    margin-bottom: 2rem;
}

#footer .social-header h2::after {
    position: static;
    display: block;
    left: auto;
    bottom: auto;
    margin: 10px auto 0;
    transform: none;
}

.social-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

.social-card {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 500;
}

.social-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-card.vk:hover { background: #4a76a8; }
.social-card.telegram:hover { background: #0088cc; }
.social-card.youtube:hover { background: #ff0000; }
.social-card.rutube:hover { background: #34a7f0; }
.social-card.dzen:hover { background: #222222; }

/* Копирайт */
.copyright {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright-standalone {
    margin-top: 0;
}

.copyright p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.copyright .small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-document {
    max-width: 980px;
    margin: 2rem auto;
    padding: clamp(1.25rem, 4vw, 3rem);
}

.legal-operator {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
}

.legal-operator p {
    margin-bottom: 0.35rem;
}

.legal-document-text p {
    margin-bottom: 1rem;
}

.legal-basis {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box {
    animation: fadeInUp 0.6s ease forwards;
}

/* ========== АДАПТАЦИЯ ========== */
@media screen and (max-width: 980px) {
    .col-4-medium { width: 50%; }
    .col-6-medium { width: 50%; }
    .col-12-medium { width: 100%; }

    .project-grid > *,
    .three-column-grid > * {
        flex-basis: 50%;
        width: 50%;
        max-width: 50%;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media screen and (max-width: 736px) {
    .col-12-small { width: 100%; }

    #main .project-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        /* Match feature-card edges, accounting for the hero's 1px border. */
        margin: 0 calc(1px - 0.25rem);
    }

    #main .project-grid > [class*="col-"] {
        min-width: 0;
        width: 100%;
        max-width: none;
        padding: 0;
    }

    #main .project-grid .box {
        border-radius: 12px;
    }

    #main .project-grid .image-cover {
        height: auto;
        aspect-ratio: 16 / 9;
        flex: 0 0 auto;
    }

    #main .project-grid .actions,
    #main .project-grid .actions li {
        width: 100%;
        max-width: none;
    }

    .button,
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .form-button,
    .filter-btn {
        text-align: center !important;
    }

    .adaptive-grid > * {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
    }
    
    :root {
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    section#header.page-hero {
        --hero-edge-space: 16px;
    }

    .page-hero #banner {
        width: calc(100% - 2rem);
        padding: 1.5rem;
        border-radius: 12px;
        text-align: left;
    }

    .page-hero #banner > header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .page-hero #banner h1 {
        min-width: 0;
        max-width: 24rem;
        margin: 0;
        font-size: clamp(1.375rem, 6.4vw, 1.75rem);
        font-weight: 600;
        line-height: 1.25;
        text-wrap: balance;
        overflow-wrap: break-word;
    }

    .page-hero #banner p {
        min-width: 0;
        max-width: 40rem;
        margin: 0;
        font-size: 0.9375rem;
        font-weight: 400;
        line-height: 1.45;
    }

    #intro .home-features {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: 1fr;
        margin: 0 -4px;
        gap: 1rem;
    }

    #intro .home-features > [class*="col-"] {
        min-width: 0;
        padding: 0;
    }

    #intro .home-features .home-feature-card {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.5rem;
        align-content: center;
        padding: 1rem;
        border-radius: 12px;
        text-align: left;
    }

    #intro .home-feature-card > .featured-icon {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        width: 48px;
        height: 48px;
        margin: 0;
        font-size: 1.75rem;
        line-height: 1;
    }

    #intro .home-feature-card > .featured-icon::before {
        display: block;
        vertical-align: 0;
    }

    #intro .home-feature-card > header,
    #intro .home-feature-card > p {
        grid-column: 2;
        min-width: 0;
    }

    #intro .home-feature-card h2,
    #intro .home-feature-card > p {
        margin: 0;
    }
    
    #nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    #nav li {
        width: 100%;
        max-width: 300px;
    }
    
    #nav a {
        width: 100%;
        text-align: center;
    }

    header.site-header--mobile-ready {
        position: relative;
        z-index: 20;
    }

    #header.site-header--mobile-ready .site-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
    }

    .site-menu-toggle:not([hidden]) {
        position: absolute;
        top: 50%;
        right: 1rem;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-white);
        box-shadow: none;
        cursor: pointer;
        transform: translateY(-50%);
        -webkit-tap-highlight-color: transparent;
    }

    .site-menu-toggle .bi {
        display: block;
        font-size: 32px;
        line-height: 1;
    }

    .site-menu-toggle .bi::before {
        display: block;
        vertical-align: 0;
    }

    .site-menu-toggle:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
        border-radius: 4px;
    }

    .site-header--mobile-ready #nav {
        position: absolute;
        top: calc(100% - 0.5rem);
        right: 1rem;
        z-index: 30;
        width: 220px;
        max-width: calc(100vw - 2rem);
        max-height: calc(100dvh - 7rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 1px solid var(--color-border);
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.6);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        text-align: left;
    }

    .site-header--mobile-ready #nav[hidden] {
        display: none;
    }

    .site-header--mobile-ready #nav:not([hidden]) {
        animation: mobile-menu-reveal 180ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes mobile-menu-reveal {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .site-header--mobile-ready #nav ul {
        display: block;
    }

    .site-header--mobile-ready #nav li {
        max-width: none;
    }

    .site-header--mobile-ready #nav li + li {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .site-header--mobile-ready #nav a {
        display: flex;
        align-items: center;
        min-height: 52px;
        padding: 0.8rem 1.25rem 0.8rem 2rem;
        border: 0;
        border-radius: 0;
        color: var(--color-white);
        font-size: 1rem;
        font-weight: 600;
        text-align: left;
        animation: none;
        box-shadow: none;
    }

    .site-header--mobile-ready #nav a:hover,
    .site-header--mobile-ready #nav a:focus-visible {
        background: rgba(255, 255, 255, 0.08);
        color: var(--color-white);
        box-shadow: none;
        transform: none;
    }

    .site-header--mobile-ready #nav a:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: -3px;
    }

    .site-header--mobile-ready #nav .current a {
        background: rgba(13, 110, 253, 0.1);
    }

    .site-header--mobile-ready #nav .current a::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0.8rem;
        width: 3px;
        height: 24px;
        border-radius: 2px;
        background: var(--color-primary);
        transform: translateY(-50%);
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .actions li {
        width: 100%;
        max-width: 250px;
    }
    
    .actions .button {
        width: 100%;
    }

    #intro .home-primary-actions,
    .about-page .about-primary-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
        max-width: 508px;
        margin: 0 auto;
    }

    #intro .home-primary-actions > li,
    .about-page .about-primary-actions > li {
        min-width: 0;
        width: auto;
        max-width: none;
    }

    #intro .home-primary-actions .button,
    .about-page .about-primary-actions .button {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        height: 100%;
        padding: 0.8rem 0.75rem;
        white-space: nowrap;
    }
    
    #intro [class*="col-"] {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .social-card {
        width: 100%;
        justify-content: center;
    }
    
    .main-image { 
        height: 300px; 
    }
    
    .about-image-card {
        float: none;
        width: min(100%, 520px);
        margin: 0 auto var(--spacing-lg);
    }
}
/* Общие состояния изображений и системные сообщения */
.image-placeholder {
    display: flex;
    width: 100%;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.45);
    font-weight: 600;
}

.site-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    width: min(28rem, calc(100% - 2rem));
}

.site-message {
    margin-bottom: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    color: #fff;
    background: #245f9e;
    box-shadow: var(--shadow);
}

.site-message.success { background: #287a45; }
.site-message.warning { background: #91640d; }
.site-message.error { background: #9b3030; }
.site-logo {
    max-height: 72px;
    width: auto;
    vertical-align: middle;
    transition:
        transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 320ms ease;
}
.site-logo-art {
    position: relative;
    display: block;
    width: clamp(264px, 30vw, 336px);
    max-width: calc(100vw - 2rem);
    line-height: 0;
    filter: drop-shadow(0 0 0 transparent);
    transition: filter 550ms ease;
}
.site-logo--selected {
    display: block;
    width: 100%;
    max-height: none;
    height: auto;
    transition: none;
}

@media screen and (max-width: 736px) {
    #header.site-header--mobile-ready .site-brand a {
        min-height: 44px;
    }

    #header.site-header--mobile-ready .site-logo-art {
        max-width: calc(100vw - 9rem);
    }
}

.site-logo-fill,
.site-logo-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    -webkit-mask: var(--logo-mask) center / 100% 100% no-repeat;
    mask: var(--logo-mask) center / 100% 100% no-repeat;
}
.site-logo-fill {
    background: #086bc6;
    transition: clip-path 850ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.site-logo-fill--left { clip-path: circle(0% at 20% 50%); }
.site-logo-fill--right { clip-path: circle(0% at 61% 72%); }
#header .site-brand a:focus-visible .site-logo-fill--left,
#header .site-brand--touch-filling .site-logo-fill--left {
    clip-path: circle(85% at 20% 50%);
}
#header .site-brand a:focus-visible .site-logo-fill--right,
#header .site-brand--touch-filling .site-logo-fill--right {
    clip-path: circle(85% at 61% 72%);
}
#header .site-brand:not(.site-brand--activating) a:focus-visible .site-logo-art,
#header .site-brand--touch-filling:not(.site-brand--activating) .site-logo-art {
    filter:
        drop-shadow(0 0 2px rgba(25, 132, 235, 0.28))
        drop-shadow(0 0 7px rgba(25, 132, 235, 0.18));
}
.site-brand--touch-filling .site-logo-fill {
    transition-duration: 650ms;
}
@media (hover: hover) and (pointer: fine) {
    #header .site-brand a:hover .site-logo-fill--left {
        clip-path: circle(85% at 20% 50%);
    }
    #header .site-brand a:hover .site-logo-fill--right {
        clip-path: circle(85% at 61% 72%);
    }
    #header .site-brand:not(.site-brand--activating) a:hover .site-logo-art {
        filter:
            drop-shadow(0 0 2px rgba(25, 132, 235, 0.28))
            drop-shadow(0 0 7px rgba(25, 132, 235, 0.18));
    }
}
.site-logo-flash {
    background: #1984eb;
    opacity: 0;
    transition: opacity 120ms ease-out;
}
.site-brand--activating .site-logo-flash {
    opacity: 0.55;
}
.site-brand--activating .site-logo-art {
    filter:
        drop-shadow(0 0 3px rgba(25, 132, 235, 0.42))
        drop-shadow(0 0 7px rgba(25, 132, 235, 0.24));
}
.site-brand--activating .site-logo-picture {
    filter:
        drop-shadow(0 0 3px rgba(25, 132, 235, 0.42))
        drop-shadow(0 0 7px rgba(25, 132, 235, 0.24));
}
.site-logo-picture { display: inline-block; line-height: 0; vertical-align: middle; }
.section-spacer { margin-top: 3em; }
.cms-about-image { max-width: 100%; }
.about-copy { font-size: 1.1rem; line-height: 1.8; }
.cms-card { text-align: center; padding: 2rem; }
.cms-icon { display: block; margin-bottom: 1rem; color: var(--color-primary); font-size: 4rem; }
.team-photo { width: 150px; height: 150px; margin: 1rem auto; border: 3px solid var(--color-primary); border-radius: 50%; object-fit: cover; }
.team-photo-picture { display: block; }
.team-position { color: var(--color-primary); font-weight: 600; }
.stats-section { padding: 3rem; border-radius: 12px; color: white; text-align: center; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); }
.stats-section h2, .stats-section h3 { color: white; }
.stats-section h3 { margin-bottom: .5rem; font-size: 3rem; }
.stats-section p { color: rgba(255,255,255,.9); font-size: 1.2rem; }

@media screen and (max-width: 736px) {
    .about-page .about-section {
        margin: 0 calc(1px - 0.25rem);
        padding: 16px;
    }

    .about-page .about-section .major {
        margin-bottom: 16px;
    }

    .about-page .about-section .major h2 {
        margin: 0;
        padding-bottom: 10px;
        font-size: 28px;
        line-height: 1.2;
    }

    .about-page .about-section .major h2::after {
        width: 40px;
    }

    .about-page .about-section .about-image-card {
        float: none;
        width: min(100%, 520px);
        margin: 0 auto 16px;
    }

    .about-page .about-section .about-copy {
        font-size: 17px;
        line-height: 1.65;
    }

    .about-page .about-section p {
        margin-bottom: 12px;
        line-height: 1.65;
    }

    .about-page .about-section .markdown-content :is(h2, h3, h4) {
        margin: 0 0 12px;
        font-size: 20px;
        line-height: 1.4;
    }

    .about-page .about-section .markdown-content > :last-child {
        margin-bottom: 0;
    }

    .about-page .stats-section {
        margin-inline: calc(1px - 0.25rem);
        padding: 16px;
    }

    .about-page .stats-section .major {
        margin-bottom: 8px;
    }

    .about-page .stats-section .major h2 {
        margin: 0;
        padding-bottom: 12px;
        font-size: 24px;
        line-height: 1.2;
    }

    .about-page .stats-section .major h2::after {
        width: 40px;
    }

    #main .stats-grid {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        margin: 0;
    }

    #main .stats-grid > [class*="col-"] {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        min-height: 94px;
        width: auto;
        max-width: none;
        padding: 12px 6px;
        border-left: 1px solid rgba(255, 255, 255, 0.18);
    }

    #main .stats-grid > :nth-child(3n + 1) {
        border-left: 0;
    }

    #main .stats-grid > :nth-child(n + 4) {
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    #main .stats-grid[data-count="4"] > * {
        grid-column: span 3;
    }

    #main .stats-grid[data-count="4"] > :nth-child(odd) {
        border-left: 0;
    }

    #main .stats-grid[data-count="4"] > :nth-child(even) {
        border-left: 1px solid rgba(255, 255, 255, 0.18);
    }

    #main .stats-grid[data-count="4"] > :nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, 0.18);
    }

    #main .stats-grid[data-count="5"] > :nth-child(n + 4) {
        grid-column: span 3;
    }

    .about-page .stats-section h3 {
        margin: 0 0 8px;
        font-size: 28px;
        line-height: 1.1;
    }

    .about-page .stats-section p {
        margin: 0;
        font-size: 13px;
        line-height: 1.25;
        overflow-wrap: break-word;
    }
}

@media (min-width: 737px) and (max-width: 1440px) {
    body::before {
        background-image: url("../images/background/background-1.c6f1bf98fda8.jpeg");
        background-image: var(
            --site-background-tablet,
            image-set(
                url("../images/background/variants/background-1-5b24872900-486588-w1440.b3b642528f44.webp") type('image/webp') 1x,
                url("../images/background/variants/background-1-5b24872900-486588-w2880.37b86bad39c5.webp") type('image/webp') 2x,
                url("../images/background/background-1.c6f1bf98fda8.jpeg") type('image/jpeg') 1x
            )
        );
    }
}

/* Compact informational tiles on the mobile About page. */
.about-advantages .advantage-details {
    display: contents;
}

@media screen and (max-width: 736px) {
    #main .about-advantages-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
        gap: 12px;
        margin: 0 calc(1px - 0.25rem);
    }

    #main .about-advantages-grid > [class*="col-"] {
        min-width: 0;
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .about-advantages .cms-card {
        position: relative;
        min-height: 124px;
        padding: 16px 8px;
        align-items: center;
        justify-content: center;
        gap: 12px;
        border-radius: 12px;
    }

    .about-advantages .cms-icon {
        flex: 0 0 auto;
        margin: 0;
        font-size: 40px;
        line-height: 1;
    }

    .about-advantages .cms-icon::before {
        display: block;
        vertical-align: 0;
    }

    .about-advantages .cms-card h3 {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.5em;
        max-width: 100%;
        margin: 0;
        font-size: 16px;
        line-height: 1.25;
        overflow-wrap: break-word;
    }

    .about-advantages .cms-card p {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        font-size: 13px;
        line-height: 1.3;
        visibility: hidden;
        overflow-wrap: break-word;
    }

    .about-advantages .advantage-details {
        display: grid;
        grid-template-areas: "detail";
        flex-grow: 1;
        width: 100%;
    }

    .about-advantages .advantage-details > * {
        grid-area: detail;
        transition: none;
    }

    .about-advantages .is-showing-description h3 {
        visibility: hidden;
    }

    .about-advantages .is-showing-description p {
        visibility: visible;
    }
}

.about-team .team-details {
    display: contents;
}

@media screen and (max-width: 736px) {
    #main .about-team .adaptive-grid-team {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin: 0 calc(1px - 0.25rem);
    }

    #main .about-team .adaptive-grid-team > [class*="col-"] {
        container-type: inline-size;
        min-width: 0;
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .about-team .cms-card {
        position: relative;
        padding: 8cqw 7cqw 6cqw;
        gap: 3cqw;
        border-radius: 12px;
        align-items: center;
    }

    .about-team .team-photo-picture {
        flex: 0 0 auto;
        width: 64cqw;
        height: 64cqw;
        overflow: hidden;
        border: 1px solid var(--color-primary);
        border-radius: 50%;
    }

    .about-team .team-photo {
        display: block;
        width: 100%;
        height: 100%;
        margin: 0;
        border: 0;
        transform: scale(1.15);
    }

    .about-team .cms-card h3 {
        position: relative;
        min-height: calc(2.4em + 3cqw + 3px);
        width: 100%;
        margin: 0;
        padding-bottom: calc(3cqw + 3px);
        font-size: clamp(14px, 10.4cqw, 24px);
        line-height: 1.2;
        overflow-wrap: break-word;
    }

    .about-team .cms-card p {
        flex-grow: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        font-size: clamp(12px, 7.8cqw, 18px);
        line-height: 1.25;
        overflow-wrap: break-word;
    }

    .about-team .team-name-part {
        display: block;
    }

    .about-team .cms-card .team-position {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.5em;
        font-size: clamp(13px, 8.5cqw, 20px);
        font-weight: 400;
    }

    .about-team .cms-card .team-experience {
        display: flex;
        align-items: center;
        justify-content: center;
        visibility: hidden;
    }

    .about-team .cms-card h3::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 18cqw;
        height: 3px;
        border-radius: 2px;
        background: var(--color-primary);
        transform: translateX(-50%);
    }

    .about-team .team-details {
        display: grid;
        grid-template-areas: "detail";
        flex-grow: 1;
        width: 100%;
    }

    .about-team .team-details > p {
        grid-area: detail;
        transition: none;
    }

    .about-team .is-showing-experience .team-position {
        visibility: hidden;
    }

    .about-team .is-showing-experience .team-experience {
        visibility: visible;
    }

    .about-team .team-card-toggle:not([hidden]),
    .about-advantages .advantage-card-toggle:not([hidden]) {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 1;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: inherit;
        background: transparent;
        cursor: pointer;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .about-team .team-card-toggle:focus-visible,
    .about-advantages .advantage-card-toggle:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: -3px;
    }
}

@media screen and (max-width: 400px) {
    .about-team .cms-card {
        padding-inline: 4px;
    }
}

@media screen and (max-width: 359px) {
    .about-team .cms-card .team-position {
        font-size: 12px;
    }
}

/* Mobile motion and scrolling performance */
@media (max-width: 736px), (hover: none) and (pointer: coarse) {
    body::before {
        background-image: url("../images/background/background-1.c6f1bf98fda8.jpeg");
        background-image: var(
            --site-background-mobile,
            image-set(
                url("../images/background/variants/background-1-5b24872900-486588-w768.23c9bbfb58f9.webp") type('image/webp') 1x,
                url("../images/background/variants/background-1-5b24872900-486588-w1536.61c0843dd0ca.webp") type('image/webp') 2x,
                url("../images/background/background-1.c6f1bf98fda8.jpeg") type('image/jpeg') 1x
            )
        );
    }

    #page-wrapper {
        min-height: 100dvh;
    }

    #header,
    #intro [class*="col-"] section,
    .box,
    #main .box form,
    .project-description,
    .project-specs,
    .about-section,
    #order_form .box {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Decorative infinite animations needlessly consume mobile GPU time. */
    #banner::before,
    #nav .current a,
    .box {
        animation: none;
    }

    #nav a::before,
    .button::before {
        display: none;
    }

    #nav a,
    .button,
    .box,
    .image-cover img,
    .gallery-item,
    .featured-icon,
    .social-card,
    .main-image-container,
    .main-image,
    .spec-item,
    .gallery-thumbnail {
        transition-duration: 120ms !important;
        transition-timing-function: ease-out !important;
    }

    #nav a:hover,
    #nav .current a:hover,
    #intro [class*="col-"] section:hover,
    #intro [class*="col-"] section:hover .featured-icon,
    .button:hover,
    .box:hover,
    .image-cover:hover img,
    .gallery-item:hover,
    .social-card:hover,
    .main-image-container:hover,
    .spec-item:hover,
    .gallery-thumbnail:hover img {
        transform: none !important;
    }
}

@media screen and (max-width: 359px) {
    #intro .home-primary-actions .button,
    .about-page .about-primary-actions .button {
        padding-inline: 0.25rem;
    }

    .page-hero #banner {
        padding: 1.25rem 1rem;
    }

    #intro .home-features .home-feature-card {
        column-gap: 0.75rem;
        padding: 0.75rem;
    }

    .site-menu-toggle:not([hidden]) {
        right: 4px;
    }
}

/* Respect the operating system accessibility preference on every device. */
@media (hover: none), (pointer: coarse) {
    .button::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-logo-fill,
    .site-logo-flash {
        transition: none;
    }
    .site-brand--activating .site-logo-art {
        filter: none;
    }

    body.page-leaving #page-wrapper {
        transform: none;
        opacity: 0.82;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.project-card-copy-full { display: none; }

/* Desktop banners follow the approved compact mobile composition. */
@media screen and (min-width: 737px) {
    #intro .home-features .home-feature-card {
        background: var(--banner-surface) !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    #intro .home-feature-card h2 {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 3.2em;
        line-height: 1.6;
    }

    .page-hero #banner {
        padding: 2rem;
        border-radius: 12px;
        text-align: left;
    }

    .page-hero #banner > header {
        display: grid;
        gap: 0.875rem;
    }

    .page-hero #banner h1 {
        margin: 0;
        font-size: 2.125rem;
        font-weight: 600;
        line-height: 1.25;
    }

    .page-hero #banner p {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 400;
        line-height: 1.5;
    }

    .project-grid .box h3 {
        display: flex;
        align-items: center;
        height: 3.2em;
        min-height: 0;
        margin-bottom: 0.5rem;
        line-height: 1.6;
        overflow: hidden;
    }

    .project-grid .project-card-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .project-grid .project-card-copy {
        line-height: 1.6;
    }

    .project-grid .project-card-copy-full {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        height: 4.8em;
        overflow: hidden;
    }

    .project-grid .project-card-copy-excerpt { display: none; }
}

@media screen and (min-width: 737px) and (max-width: 980px) {
    #intro .home-feature-card h2 { min-height: 4.8em; }
}
