:root {
    --primary-bg: #151315;
    --color-text: #CECACA;
}

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

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

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

html,
body {
    height: 100%;
    margin: 0;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100svh;

    /* учёт вырезов на iPhone (notch и нижняя панель Safari) */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.header,
.footer {
    flex-shrink: 0; /* фиксированные по содержимому */
}

.main {
    flex: 1 0 auto; /* растягивается на всё доступное пространство */

    /* отступы, учитывающие safe area внутри контента */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.main__container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


body {
    background-color: var(--primary-bg);
    color: var(--color-text);

    font-family: 'Gilroy', sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}


button {
    border: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    image-rendering: auto;
    -webkit-user-drag: none;
    user-select: none;
    object-position: center;
}

section {
    /* 1) Отложить рендеринг, пока секция далеко от вьюпорта */
    /*content-visibility: auto;*/

    /* 2) Включить содержательное (layout/paint/style) ограничение изоляции для subtree */
    /*contain: content; !* shorthand для layout + paint + style *!*/
}

.sidebar {
    display: none;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: 24px; /* для ≥960px */
}


/* ========================================
   MEDIA QUERIES - Адаптивность (Desktop-first)
   ======================================== */

/* ≤1599 */
@media (max-width: 1599px) {
    .container {

    }
}

/* ≤1439 */
@media (max-width: 1439px) {
    .container {

    }
}

/* ≤1279 */
@media (max-width: 1279px) {
    .container {
    }
}

/* ≤959 */
@media (max-width: 959px) {
    .main__container {
        gap: 12px;
    }

    .container {
        padding-inline: 12px; /* для <960px */
    }
}

/* ≤599 */
@media (max-width: 599px) {
    .container {

    }
}
