@font-face {
    font-family: "Russo One";
    src: url("../fonts/RussoOne-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f4f4f2;
    --surface-dark: #050505;

    --text: #050505;
    --text-soft: #4d4d4d;
    --text-muted: #777777;

    --accent: #ff3b30;

    --border: rgba(5, 5, 5, 0.14);
    --border-dark: rgba(255, 255, 255, 0.12);

    --container-width: 1360px;
    --container-padding: 64px;

    --font-base: Inter, "Segoe UI", Arial, sans-serif;
    --font-display: "Russo One", Arial, sans-serif;

    --transition: 0.25s ease;
}

/* =========================
   BASE
========================= */

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

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.5;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    padding: 28px 0 60px;
}

.site-container {
    width: min(var(--container-width), calc(100% - var(--container-padding)));
    margin: 0 auto;
}

/* =========================
   TYPOGRAPHY BASE
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--text);
    font-weight: 800;
    line-height: 1.05;
}

p {
    margin-top: 0;
    color: var(--text-soft);
}

.text-accent {
    color: var(--accent) !important;
}

/* =========================
   HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 244, 242, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    min-height: 96px;
}

.site-brand {
    flex: 0 0 auto;
    position: relative;
    z-index: 60;
}

.site-brand__link {
    display: inline-flex;
    align-items: center;
}

.site-brand__logo {
    display: block;
    width: 220px;
    height: auto;
    object-fit: contain;
}

.site-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.site-nav__list {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.site-nav__item {
    margin: 0;
    padding: 0;
}

.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.site-nav__link:hover {
    color: var(--accent);
}

.site-nav__link:hover::after {
    width: 100%;
}

.site-nav__link--accent {
    color: var(--text);
}

.site-nav__link--accent:hover {
    color: var(--accent);
}

/* Бургер скрыт на компьютере, появляется только на мобильной версии */
.site-burger {
    display: none;
}

/* =========================
   DJANGO MESSAGES
========================= */

.messages-stack {
    margin-bottom: 24px;
}

.custom-alert {
    border: 1px solid transparent;
    border-radius: 0;
    padding: 14px 18px;
    font-weight: 700;
    box-shadow: none;
}

.alert-success.custom-alert {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.22);
    color: #146c43;
}

.alert-danger.custom-alert,
.alert-error.custom-alert {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.22);
    color: #a52834;
}

.alert-warning.custom-alert {
    background: rgba(240, 173, 0, 0.12);
    border-color: rgba(240, 173, 0, 0.22);
    color: #8b6800;
}

.alert-info.custom-alert {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.22);
    color: #0a58ca;
}

/* =========================
   FOOTER
========================= */

.site-footer {
    margin-top: 40px;
    background: var(--surface-dark);
    color: rgba(255, 255, 255, 0.95);
}

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 2.3fr);
    gap: clamp(42px, 5vw, 86px);
    padding: 48px 0 34px;
}

.site-footer__brand {
    max-width: 420px;
}

.site-footer__logo-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
}

.site-footer__logo-img {
    display: block;
    width: 190px;
    height: auto;
    object-fit: contain;
    filter: invert(1);
}

.site-footer__text {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
    line-height: 1.55;
}

.site-footer__nav {
    display: grid;
    grid-template-columns:
        minmax(120px, 0.82fr)
        minmax(130px, 0.82fr)
        minmax(260px, 1.28fr)
        minmax(170px, 0.98fr);
    gap: clamp(22px, 2.4vw, 38px);
    align-items: start;
}

.site-footer__column {
    min-width: 0;
}

.site-footer__column h4 {
    margin-bottom: 16px;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.site-footer__column a,
.site-footer__column span {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.58);
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
}

.site-footer__column a:hover {
    color: var(--accent);
}

/* =========================
   FOOTER RESPONSIVE
========================= */

@media (max-width: 1320px) {
    .site-footer__top {
        grid-template-columns: minmax(230px, 0.62fr) minmax(0, 2.38fr);
        gap: 44px;
    }

    .site-footer__nav {
        grid-template-columns:
            minmax(105px, 0.78fr)
            minmax(115px, 0.78fr)
            minmax(230px, 1.24fr)
            minmax(150px, 0.94fr);
        gap: 24px;
    }

    .site-footer__column a,
    .site-footer__column span {
        font-size: 0.7rem;
    }
}

@media (max-width: 1180px) {
    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .site-footer__nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .site-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 34px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 30px;
    }

    .site-footer__top {
        padding: 38px 0 28px;
    }

    .site-footer__logo-img {
        width: 150px;
    }

    .site-footer__nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px;
    }
}

@media (max-width: 576px) {
    .site-footer__top {
        padding: 32px 0 24px;
    }

    .site-footer__nav {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .site-footer__column h4 {
        margin-bottom: 12px;
        font-size: 0.78rem;
    }

    .site-footer__column a,
    .site-footer__column span {
        font-size: 0.74rem;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1320px) {
    :root {
        --container-padding: 48px;
    }

    .site-header__inner {
        gap: 30px;
    }

    .site-brand__logo {
        width: 200px;
    }

    .site-nav__list {
        gap: 24px;
    }

    .site-nav__link {
        font-size: 0.78rem;
    }
}

@media (max-width: 1180px) {
    .site-header__inner {
        gap: 24px;
    }

    .site-brand__logo {
        width: 180px;
    }

    .site-nav__list {
        gap: 18px;
    }

    .site-nav__link {
        font-size: 0.72rem;
    }
}

@media (max-width: 992px) {
    :root {
        --container-padding: 32px;
    }

    .site-header__inner {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 18px;
        min-height: 84px;
    }

    .site-brand__logo {
        width: 170px;
    }

    .site-burger {
        width: 42px;
        height: 36px;
        display: inline-flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 7px;
        border: 0;
        background: transparent;
        cursor: pointer;
        padding: 0;
        position: relative;
        z-index: 60;
    }

    .site-burger span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text);
        transition: var(--transition);
    }

    .site-burger.is-active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .site-burger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .site-burger.is-active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .site-nav {
        grid-column: 1 / -1;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease;
    }

    .site-nav.is-open {
        max-height: 680px;
        opacity: 1;
    }

    .site-nav__list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        width: 100%;
        padding: 8px 0 10px;
    }

    .site-nav__item {
        width: 100%;
    }

    .site-nav__link {
        width: 100%;
        min-height: 46px;
        padding: 13px 0;
        border-bottom: 1px solid var(--border);
        font-size: 0.84rem;
        letter-spacing: 0.025em;
    }

    .site-nav__link::after {
        display: none;
    }

    .site-footer__top {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .site-footer__nav {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 24px;
    }

    body {
        font-size: 15px;
    }

    .site-main {
        padding: 18px 0 42px;
    }

    .site-header__inner {
        min-height: 78px;
    }

    .site-brand__logo {
        width: 150px;
    }

    .site-burger {
        width: 40px;
        height: 34px;
    }

    .site-footer {
        margin-top: 30px;
    }

    .site-footer__top {
        padding: 38px 0 28px;
    }

    .site-footer__logo-img {
        width: 150px;
    }
}

@media (max-width: 576px) {
    :root {
        --container-padding: 20px;
    }

    .site-main {
        padding: 16px 0 34px;
    }

    .site-header__inner {
        min-height: 72px;
        gap: 12px;
    }

    .site-brand__logo {
        width: 132px;
    }

    .site-burger {
        width: 38px;
        height: 32px;
        gap: 6px;
    }

    .site-nav__link {
        min-height: 44px;
        font-size: 0.78rem;
    }

    .custom-alert {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .site-footer__top {
        padding: 32px 0 24px;
    }

    .site-footer__column h4 {
        margin-bottom: 12px;
        font-size: 0.78rem;
    }

    .site-footer__column a,
    .site-footer__column span {
        font-size: 0.74rem;
    }
}

@media (max-width: 380px) {
    :root {
        --container-padding: 16px;
    }

    .site-brand__logo {
        width: 118px;
    }

    .site-burger {
        width: 34px;
        height: 30px;
    }

    .site-nav__link {
        font-size: 0.72rem;
    }
}