:root {
    /* Premium Color Palette */
    --primary-blue: #0052CC;
    --primary-dark: #003D99;
    --primary-light: #0066FF;
    --secondary-navy: #1B2B4A;
    --secondary-dark: #0F1A2E;
    --accent-orange: #FF6B35;
    --accent-gold: #FFB627;
    --success-green: #06C167;

    /* Neutral Colors */
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --bg-white: #FFFFFF;
    --bg-light: #F7FAFC;
    --bg-ultra-light: #FBFCFD;
    --border-color: #E2E8F0;

    /* Premium Effects */
    --gradient-primary: linear-gradient(135deg, #0052CC 0%, #0066FF 100%);
    --gradient-secondary: linear-gradient(135deg, #1B2B4A 0%, #2D3E5F 100%);
    --gradient-accent: linear-gradient(135deg, #FF6B35 0%, #FFB627 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(0, 82, 204, 0.95) 0%, rgba(27, 43, 74, 0.9) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(27, 43, 74, 0.95) 0%, rgba(15, 26, 46, 0.9) 100%);

    /* Advanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-colored: 0 10px 40px rgba(0, 82, 204, 0.2);

    /* Spacing System */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 64px;
    --spacing-2xl: 96px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;

    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Premium Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 82, 204, 0.3);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(255, 107, 53, 0.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: white;
    color: var(--primary-blue);
    border-color: white;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.header--scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-navy);
}

.logo__icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-colored);
}

.logo__text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__list {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav__link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav__link:hover {
    color: var(--primary-blue);
}

.nav__link:hover::after {
    width: 100%;
}

.header__contacts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.header__phone {
    font-weight: 700;
    color: var(--secondary-navy);
    font-size: 1.05rem;
}

.header__email {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--spacing-2xl);
    /* Removed transition and transform here to avoid scroll lag */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Increased height to allow movement without gaps */
    background: url('img/hero.jpg') center/cover;
    opacity: 0.15;
    z-index: 0;
    will-change: transform;
    transform: translateY(var(--hero-bg-pos, 0));
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-white), transparent);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
}

.hero__badge::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--success-green);
    border-radius: 50%;
    font-size: 12px;
}

.hero h1 {
    color: white;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero h1 span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    max-width: 600px;
}

.hero__actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat {
    text-align: center;
}

.hero__stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 8px;
}

.hero__stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Section Styles */
section {
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1), rgba(0, 102, 255, 0.1));
    border-radius: 100px;
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    color: var(--secondary-navy);
    margin-bottom: var(--spacing-sm);
}

.section-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* About Section */
.about {
    background: var(--bg-ultra-light);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about__image-wrapper {
    position: relative;
}

.about__image {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    height: 600px;
    background: url('img/about_final.jpg') center/cover;
    box-shadow: var(--shadow-2xl);
}

.about__image-badge {
    position: absolute;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
}

.about__image-badge-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    display: block;
}

.about__image-badge-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.about__content h2 {
    margin-bottom: var(--spacing-md);
}

.about__text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.9;
}

.about__features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.about__feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: white;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--success-green);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.about__feature:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.about__feature-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--success-green), #00D47E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.about__feature-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Services Section */
.services {
    background: white;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1), rgba(0, 102, 255, 0.05));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-base);
}

.service-card:hover .service-card__icon {
    background: var(--gradient-primary);
    transform: scale(1.05);
}

.service-card__icon svg {
    color: var(--primary-blue);
    transition: var(--transition-base);
    filter: drop-shadow(0 2px 4px rgba(0, 82, 204, 0.1));
}

.service-card:hover .service-card__icon svg {
    color: white;
    transform: rotate(-5deg) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.3));
}

.service-card h3 {
    color: var(--secondary-navy);
    margin-bottom: var(--spacing-sm);
    font-size: 1.4rem;
    transition: var(--transition-base);
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Calculate Section */
.calculate {
    background: linear-gradient(135deg, #F0F4FF 0%, #E6EDFF 100%);
    position: relative;
    overflow: hidden;
}

.calculate::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 82, 204, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.calculate__box {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-2xl);
    position: relative;
    overflow: hidden;
}

.calculate__box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-primary);
}

.form {
    margin-top: var(--spacing-lg);
}

.form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.form__group label {
    display: block;
    font-weight: 600;
    color: var(--secondary-navy);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form__group input,
.form__group select {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-base);
    background: var(--bg-ultra-light);
}

.form__group input:focus,
.form__group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
}

.form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form__checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.form__checkbox label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.form__checkbox a {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--secondary-navy);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer__brand .logo {
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer__brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 400px;
}

.footer__section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

.footer__section a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    transition: var(--transition-base);
}

.footer__section a:hover {
    color: white;
    transform: translateX(4px);
}

.footer__bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer__bottom a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
}

.footer__bottom a:hover {
    color: white;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }

    .about__grid {
        gap: var(--spacing-lg);
    }
}

@media (max-width: 768px) {

    .header__contacts,
    .nav {
        display: none;
    }

    .hero {
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .about__grid {
        grid-template-columns: 1fr;
    }

    .about__image {
        height: 400px;
    }

    .calculate__box {
        padding: var(--spacing-md);
    }

    .form__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .footer__section a {
        justify-content: center;
    }
}