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

:root {
    --bg-color: #f3f3f3;
    --text-color: #0f172a;
    --muted-color: #334155;
    --border-color: #d1d5db;
    --primary-color: #1e3a8a;
    --primary-hover: #1a3278;
    --white: #ffffff;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Header */
.site-header {
    background-color: var(--white);
    border-bottom: 1px solid #e5e7eb;
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--text-color);
}

.logo__image {
    height: 42px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.language-switcher__toggle {
    position: relative;
    width: 74px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #78a7de 0%, #5f90ce 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.language-switcher__toggle:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 12px rgba(30, 58, 138, 0.22);
}

.language-switcher__toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 3px rgba(30, 58, 138, 0.2);
}

.language-switcher__label {
    position: relative;
    z-index: 1;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.74);
    transition: color 0.2s ease;
}

.language-switcher__thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.24);
    transition: transform 0.22s ease;
}

.language-switcher__toggle--ru .language-switcher__label--ru,
.language-switcher__toggle--en .language-switcher__label--en {
    color: #ffffff;
}

.language-switcher__toggle--en .language-switcher__thumb {
    transform: translateX(40px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #eeeeef;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.header-actions .btn {
    min-width: 104px;
    height: 48px;
    padding: 0 20px;
    font-size: 0.95rem;
    border-radius: 12px;
}

.btn-large {
    min-width: 102px;
    height: 48px;
    padding: 0 22px;
    font-size: 0.95rem;
    border-radius: 12px;
}

/* Hero */
.hero {
    min-height: calc(100vh - 78px);
    display: flex;
    align-items: center;
}

.hero-inner {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 44px;
    align-items: center;
    padding-top: 24px;
    padding-bottom: 48px;
}

.hero-content {
    max-width: 560px;
    padding-left: 56px;
}

.hero-title {
    margin: 0 0 24px;
    font-size: 4.1rem;
    line-height: 0.98;
    font-weight: 700;
    letter-spacing: -0.04em;
    max-width: 560px;
    color: var(--text-color);
}

.hero-description {
    margin: 0 0 36px;
    max-width: 520px;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--muted-color);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 580px;
    height: 320px;
    object-fit: cover;
    border-radius: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .hero-content {
        padding-left: 40px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-image {
        height: 340px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 24px;
    }

    .header-inner {
        min-height: 80px;
    }

    .logo__image {
        height: 40px;
    }

    .header-actions .btn {
        min-width: 96px;
        height: 52px;
        padding: 0 18px;
    }

    .hero {
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 0;
        order: 1;
    }

    .hero-image-wrapper {
        order: 2;
    }

    .hero-title {
        font-size: 3.25rem;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-image {
        max-width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 16px;
        padding: 18px 0;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.05;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-large {
        width: 100%;
    }
}

/* Auth pages */
.auth-shell {
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.auth-main {
    padding: 56px 0 72px;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background-color: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    padding: 28px;
}

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

.auth-label {
    color: var(--text-color);
    font-weight: 600;
}

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    padding: 0 14px;
    color: var(--text-color);
    box-shadow: none;
}

.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
    outline: none;
}

.auth-status {
    margin-bottom: 14px;
    color: #0f766e;
    font-size: 0.95rem;
}

.auth-error {
    color: #b91c1c;
    font-size: 0.875rem;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-color);
    font-size: 0.95rem;
}

.auth-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    accent-color: var(--primary-color);
}

.auth-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-link {
    font-size: 0.92rem;
    color: var(--muted-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-submit-btn {
    min-width: 120px;
}

@media (max-width: 640px) {
    .auth-main {
        padding: 34px 0 48px;
    }

    .auth-card {
        padding: 20px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-submit-btn {
        width: 100%;
    }
}
