/* ============================================================
   Header + Footer.
   Layout, colours and typography are taken from the Figma design.
   ============================================================ */

/* =================================================================
   HEADER
   Figma: Frame 11 (1680×48) sits inside hero. We make it sticky and
   keep the same paddings (40px top/bottom, 120px outer padding).
   ================================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
}

.site-header__container {
    max-width: calc(var(--container-max) + (var(--content-padding-x) * 2));
    margin: 0 auto;
    padding: 28px var(--content-padding-x);
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Logo */
.site-header__logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-header__logo img {
    height: 32px;
    width: auto;
}

/* Nav: 3 tabs in the centre. Figma: Mulish 18 / 600, color #53596B. */
.site-header__nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.site-header__nav a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 18px;
    color: var(--color-text-muted);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.site-header__nav a:hover {
    color: var(--color-blue);
    border-color: var(--color-blue);
    opacity: 1;
}

/* Right side: "Личный кабинет" CTA + 3 white pill store buttons (162×48 r12) */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Personal-cabinet CTA — blue pill, leads to https://app.testoria.net.
   Same height as the store buttons so the row sits on a single baseline.
   The selector is scoped to .site-header__actions to defeat any inherited
   anchor styles (the global `a { color: inherit; }` rule otherwise wins
   on token-based defaults during cache warm-up). */
.site-header__actions a.site-header__cabinet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    background-color: var(--color-blue);
    color: #ffffff;
    border-radius: 12px;
    border-radius: var(--radius-btn, 12px);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(75, 159, 255, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.site-header__actions a.site-header__cabinet:hover {
    background-color: #3a8ae8;
    background-color: var(--color-blue-hover, #3a8ae8);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(75, 159, 255, 0.30);
    opacity: 1;
}

.site-header__actions a.site-header__cabinet svg {
    flex-shrink: 0;
    color: #ffffff;
}

.site-header__store-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 162px;
    height: 48px;
    background-color: #ffffff;
    border-radius: var(--radius-btn);
    box-shadow: 0 4px 14px rgba(21, 29, 38, 0.06);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-header__store-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(21, 29, 38, 0.10);
    opacity: 1;
}

    .site-header__store-link img {
        width: 22px;
        height: 22px;
        object-fit: scale-down;
    }

/* Mobile compact header */
.site-header__mobile {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.site-header__cabinet-mobile {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-blue);
    border-radius: var(--radius-btn);
    color: #ffffff;
}

@media (max-width: 1024px) {
    .site-header__nav {
        gap: 16px;
    }

    .site-header__store-link {
        width: 48px;
    }

    .site-header__store-link span {
        display: none;
    }

    .site-header__actions a.site-header__cabinet {
        padding: 0;
        width: 48px;
        gap: 0;
    }

    .site-header__actions a.site-header__cabinet span {
        display: none;
    }
}

@media (max-width: 720px) {
    .site-header__container > .site-header__logo,
    .site-header__nav,
    .site-header__actions {
        display: none;
    }

    .site-header__mobile {
        display: flex;
    }

    .site-header__container {
        padding: 16px var(--content-padding-x);
    }
}

/* =================================================================
   FOOTER
   Figma: footer instance — 1760×320, white, radius 40, three columns.
   - Column 1: «Доступно на платформах» + 3 store buttons + copyright
   - Column 2: Logo + ТЕСТОРИЯ word
   - Column 3: Two link sub-columns
   ================================================================= */
.site-footer {
    margin: 0 auto var(--section-gap);
    width: 100%;
    max-width: calc(var(--container-max) + (var(--content-padding-x) * 2));
    padding: 0 var(--content-padding-x);
}

.site-footer__container {
    background-color: #ffffff;
    border-radius: var(--radius-card-md);
    padding: 64px 80px;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto minmax(320px, 1fr);
    gap: 40px;
    align-items: stretch;
    box-shadow: var(--shadow-card);
}

/* Column 1 — platforms */
.site-footer__platforms {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.site-footer__platforms-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 20px;
    color: var(--color-text-muted);
    margin: 0;
}

.site-footer__store-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__store-buttons .btn {
    background-color: #ffffff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    height: 48px;
    min-width: 162px;
    font-size: 14px;
    font-weight: 600;
}

.site-footer__store-buttons .btn:hover {
    background-color: #f4f6fa;
    color: var(--color-text);
}

.site-footer__copyright {
    margin-top: auto;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    color: var(--color-text-subtle);
}

/* Column 2 — brand */
.site-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: center;
}

.site-footer__brand img {
    width: 120px;
    height: auto;
}

.site-footer__brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
    margin: 0;
}

/* Column 3 — links */
.site-footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

.site-footer__links-column a {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 18px;
    color: var(--color-text-muted);
    transition: color 0.15s ease;
}

.site-footer__links-column a:hover {
    color: var(--color-blue);
    opacity: 1;
}

@media (max-width: 1024px) {
    .site-footer__container {
        grid-template-columns: 1fr 1fr;
        padding: 40px 32px;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
        flex-direction: column;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .site-footer__container {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }

    .site-footer__links {
        grid-template-columns: 1fr;
    }
}
