/* =========================================================
   Base styles
   Global reset, body, typography, forms
   ========================================================= */

* {
    box-sizing: border-box;
}

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

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;

    margin: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    color: white;
    font-family: Inter, Arial, sans-serif;

    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 25%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 25%),
    #020617;
}

body::before {
    content: "";
    position: fixed;
    top: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    bottom: -250px;
    right: -250px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.10), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

::selection {
    background: #38bdf8;
    color: #020617;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #020617;
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.45);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.8);
}

main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px 80px;
    flex: 1 0 auto;
}

a {
    color: #38bdf8;
}

button {
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 16px;
    transition: 0.3s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.page-title {
    max-width: 900px;
    margin: 0 0 42px;

    font-size: clamp(38px, 5vw, 72px);
    line-height: 0.95;
    letter-spacing: -2.5px;
    font-weight: 900;

    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-subtitle,
.search-info,
.task-topic {
    font-size: 19px;
    line-height: 1.6;
    color: #94a3b8;
}

/* ---------- Base responsive ---------- */

@media (max-width: 768px) {
    main {
        padding: 28px 16px 90px !important;
        padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .page-title {
        font-size: 46px;
        line-height: 0.98;
        letter-spacing: -1.5px;
        margin-bottom: 28px;
    }
}

.site-footer {
    margin-top: auto;
    padding: 32px 20px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 24, 0.88);
}

.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 1.1fr;
    gap: 28px;
    align-items: start;
}

.site-footer-brand,
.site-footer-links,
.site-footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer-brand a {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.site-footer-brand span,
.site-footer-contacts span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    line-height: 1.5;
}

.site-footer-links a,
.site-footer-contacts a {
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-contacts a:hover {
    color: #ffffff;
}

.legal-page {
    width: min(920px, calc(100% - 32px));
    margin: 48px auto 0;
    padding: 42px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    color: #121827;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

.legal-page h1 {
    margin: 0 0 24px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
    color: #101525;
}

.legal-page h2 {
    margin: 30px 0 12px;
    font-size: 22px;
    line-height: 1.25;
    color: #172033;
}

.legal-page p {
    margin: 0 0 14px;
    color: #334155;
    font-size: 16px;
    line-height: 1.75;
}

@media (max-width: 860px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
    }

    .legal-page {
        padding: 28px 20px;
        border-radius: 22px;
    }
}

.cookie-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    max-width: 980px;
    margin: 0 auto;
    padding: 18px 20px;

    border-radius: 22px;

    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));

    border: 1px solid rgba(148, 163, 184, 0.22);

    box-shadow:
        0 24px 70px rgba(2, 6, 23, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    backdrop-filter: blur(16px);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-text {
    color: rgba(226, 232, 240, 0.82);

    font-size: 14px;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: #7dd3fc;

    font-weight: 800;
    text-decoration: none;

    border-bottom: 1px solid rgba(125, 211, 252, 0.35);
}

.cookie-banner-text a:hover {
    color: #e0f2fe;
    border-bottom-color: rgba(224, 242, 254, 0.75);
}

.cookie-banner-btn {
    flex: 0 0 auto;

    min-width: 122px;
    min-height: 46px;
    padding: 0 22px;

    border: 0;
    border-radius: 16px;

    background: linear-gradient(135deg, #38bdf8, #7c3aed);
    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 16px 36px rgba(56, 189, 248, 0.22),
        0 12px 30px rgba(124, 58, 237, 0.18);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.cookie-banner-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 20px 44px rgba(56, 189, 248, 0.28),
        0 14px 34px rgba(124, 58, 237, 0.24);
}

@media (max-width: 720px) {
    .cookie-banner {
        left: 14px;
        right: 14px;
        bottom: 14px;

        flex-direction: column;
        align-items: stretch;

        padding: 16px;
    }

    .cookie-banner-btn {
        width: 100%;
    }
}