:root {
    --color-bg: #f4f6f8;
    --color-surface: #ffffff;
    --color-text: #1a2332;
    --color-muted: #5c6b7a;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-border: #dde3ea;
    --color-accent: #0f766e;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(26, 35, 50, 0.08);
    --container: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    display: block;
    height: 36px;
    width: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: rgba(37, 99, 235, 0.08);
    text-decoration: none;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 72px 0;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: transform 0.1s linear;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: pulseShape 8s ease-in-out infinite;
}

.shape-1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: 10%;
}

.shape-2 {
    width: 180px;
    height: 180px;
    bottom: 10%;
    left: -40px;
    animation-delay: 2s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    top: 30%;
    left: 35%;
    animation-delay: 4s;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    max-width: 620px;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-image,
.section-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.hero-inner {
    max-width: 760px;
}

.hero-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    opacity: 0.85;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin: 12px 0 16px;
}

.hero-text {
    font-size: 1.125rem;
    opacity: 0.92;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero .btn-outline {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.section {
    padding: 64px 0;
}

.section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 32px;
    text-align: center;
}

.steps-grid,
.cards-grid,
.trust-grid {
    display: grid;
    gap: 20px;
}

.section-lead {
    max-width: 520px;
    margin: -16px auto 40px;
    text-align: center;
    color: var(--color-muted);
    font-size: 1.05rem;
}

.steps {
    background: linear-gradient(180deg, #f8fafc 0%, var(--color-bg) 100%);
}

.steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

.step-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card::after {
    content: '';
    position: absolute;
    top: 72px;
    right: -20px;
    width: 12px;
    height: 12px;
    border-top: 2px solid #cbd5e1;
    border-right: 2px solid #cbd5e1;
    transform: rotate(45deg);
    z-index: 2;
}

.step-card--3::after {
    display: none;
}

.step-card__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 24px;
}

.step-card--1 .step-card__head {
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
}

.step-card--2 .step-card__head {
    background: linear-gradient(135deg, #ccfbf1 0%, #f0fdfa 100%);
}

.step-card--3 .step-card__head {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.step-card__num {
    position: absolute;
    top: 16px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.step-card--2 .step-card__num {
    color: #0f766e;
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
}

.step-card--3 .step-card__num {
    color: #b45309;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.15);
}

.step-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.step-card__icon img {
    display: block;
    width: 96px;
    height: 96px;
}

.step-card__body {
    flex: 1;
    padding: 24px 24px 28px;
    border-top: 1px solid var(--color-border);
}

.step-card__body h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.step-card__body p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(26, 35, 50, 0.12);
}

.info-card,
.review-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.info-card:hover,
.review-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26, 35, 50, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
}

.card-icon {
    display: block;
    margin-bottom: 12px;
}

.card-num {
    display: inline-block;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.four-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.three-cols {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.benefits {
    background: var(--color-surface);
}

.benefits-grid,
.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.benefits-content h2,
.cta-content h2 {
    text-align: left;
    margin-bottom: 20px;
}

.benefits-visual,
.cta-visual {
    display: flex;
    justify-content: center;
}

.trust-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.trust-header h2 {
    margin-bottom: 0;
}

.trust-logo {
    animation: floatY 5s ease-in-out infinite;
}

.benefits-list {
    max-width: 640px;
    margin: 0 auto 24px;
    padding-left: 20px;
}

.benefits-list li {
    margin-bottom: 8px;
}

.benefits .btn {
    display: table;
    margin: 0 auto;
}

.review-card {
    margin: 0;
}

.review-card footer {
    margin-top: 16px;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.trust-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    text-align: left;
}

.link-more {
    display: inline-block;
    margin-top: 24px;
    font-weight: 600;
}

.cta-register {
    background: linear-gradient(180deg, #eef4ff 0%, #f4f6f8 100%);
}

.cta-list {
    max-width: 520px;
    margin: 0 auto 24px;
}

.cabinet-promo-inner {
    text-align: center;
}

.cabinet-promo {
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulseShape {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.float-animation {
    animation: floatY 6s ease-in-out infinite;
}

.float-animation-slow {
    animation: floatY 8s ease-in-out infinite;
}

.pulse-btn {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
    50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

.hero .pulse-btn {
    animation-name: pulseGlowHero;
}

@keyframes pulseGlowHero {
    0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 8px 32px rgba(255, 255, 255, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .float-animation,
    .float-animation-slow,
    .trust-logo,
    .shape,
    .pulse-btn {
        animation: none;
    }

    .btn:hover,
    .step-card:hover,
    .info-card:hover,
    .review-card:hover {
        transform: none;
    }
}

.site-footer {
    background: #152033;
    color: #cbd5e1;
    padding: 32px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-copy {
    margin: 16px 0 0;
    font-size: 0.9rem;
}

.auth-section {
    padding: 48px 0 72px;
}

.auth-box {
    max-width: 440px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-box h1 {
    margin-top: 0;
    font-size: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font: inherit;
}

.checkbox-label {
    display: flex !important;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400 !important;
}

.checkbox-label input {
    margin-top: 4px;
}

.btn-block {
    width: 100%;
}

.auth-alt {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.field-error {
    display: block;
    color: #b91c1c;
    font-size: 0.875rem;
    margin-top: 4px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .step-card::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 48px 0;
    }

    .hero-grid,
    .benefits-grid,
    .cta-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .hero-image {
        max-width: 280px;
    }

    .benefits-content h2,
    .cta-content h2 {
        text-align: center;
    }

    .benefits .btn {
        margin: 0 auto;
        display: table;
    }
}
