* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f6f7f9;
    --bg-secondary: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #495057;
    --accent: #ed1c24;
    --accent-hover: #d1181e;
    --accent-light: rgba(237, 28, 36, 0.07);
    --accent-gradient: linear-gradient(135deg, #ed1c24 0%, #ff3d45 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Градиентные слои */
.gradient-bg-1 {
    position: fixed;
    top: 5%;
    right: 3%;
    width: 28%;
    height: 35%;
    background: radial-gradient(circle at 50% 50%, rgba(237, 28, 36, 0.03) 0%, transparent 75%);
    border-radius: 60% 40% 50% 50%;
    z-index: -1;
    pointer-events: none;
    animation: float-bg 18s ease-in-out infinite;
}

.gradient-bg-2 {
    position: fixed;
    bottom: 8%;
    left: 4%;
    width: 25%;
    height: 28%;
    background: radial-gradient(circle at 50% 50%, rgba(26, 54, 93, 0.04) 0%, transparent 70%);
    border-radius: 45% 55% 50% 50%;
    z-index: -1;
    pointer-events: none;
    animation: float-bg-reverse 22s ease-in-out infinite;
}

@keyframes float-bg {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes float-bg-reverse {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(18px) rotate(-2deg);
    }
}

/* Хедер */
header {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    padding: 26px 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 16px 100px;
    background-color: rgba(255, 255, 255, 0.99);
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 27px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.logo-accent {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 46px;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

.btn,
button {
    background: var(--accent-gradient);
    color: #ffffff;
    padding: 14px 38px;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before,
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn:hover,
button:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #e62930 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:hover::before,
button:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-gradient);
    color: #ffffff;
}

/* Герой-блок */
.hero {
    background-color: var(--bg-secondary);
    padding: 200px 100px 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -5%;
    right: -5%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at 35% 50%, rgba(237, 28, 36, 0.27) 0%, transparent 85%);
    border-radius: 65% 35% 45% 55%;
    z-index: 0;
    animation: hero-float 16s ease-in-out infinite;
}

.hero__mascot {
    position: absolute;
    top: 150px;
    right: 0;
    width: 100%;
    max-width: 800px;
    height: auto;
}

@media screen and (max-width: 1500px) {
    .hero__mascot {
        right: -150px;
    }
}

@media screen and (max-width: 1200px) {
    .hero__mascot {
        right: -250px;
    }
}

@media screen and (max-width: 768px) {
    .hero__mascot {
        position: relative;
        top: 0;
        right: 0;
    }

    .hero::before {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
        bottom: -50px;
        left: 0;
        top: auto;
        right: auto;
    }
}

@keyframes hero-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

.hero-content {
    max-width: 730px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 26px;
    letter-spacing: -0.4px;
}

.hero h1 span {
    color: var(--accent);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 9px;
    left: 0;
    width: 100%;
    height: 13px;
    background-color: var(--accent-light);
    border-radius: 6px;
    z-index: -1;
}

.hero p {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 50px;
    max-width: 670px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 22px;
    margin-bottom: 70px;
}

.stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
    margin-top: 52px;
}

.stat-item {
    background-color: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--accent);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.stat-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Блок "Почему мы" */
.section {
    padding: 100px 100px;
}

.section-title {
    text-align: center;
    font-size: 42px;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

.why-us {
    background-color: var(--bg-primary);
    position: relative;
}

.why-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 32%;
    height: 100%;
    background: radial-gradient(circle at 80% 50%, rgba(26, 54, 93, 0.03) 0%, transparent 75%);
    z-index: 0;
}

.features-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-card {
    background-color: var(--bg-secondary);
    padding: 38px 30px;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(22px);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.feature-icon-box {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.feature-icon-box img {
    width: 100%;
    height: auto;
    max-width: 150px;
}

.feature-icon {
    font-size: 28px;
    color: var(--accent);
    font-weight: 700;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

/* Блок услуг */
.services {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1020px;
    margin: 0 auto;
}

.service-card {
    background-color: var(--bg-primary);
    padding: 38px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border-left: 3px solid transparent;
    opacity: 0;
    transform: translateX(-22px);
}

.service-card:nth-child(2n) {
    transform: translateX(22px);
}

.service-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.service-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent);
}

.service-card h3 {
    font-size: 26px;
    margin-bottom: 16px;
    color: var(--accent);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.service-btn {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 10px 24px;
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-btn:hover {
    background-color: var(--accent);
    color: #ffffff;
    transform: translateX(5px);
}

/* Блок кейсов */
.cases {
    background-color: var(--bg-primary);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1320px;
    margin: 0 auto;
}

.case-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(22px);
}

.case-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.case-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.case-image {
    height: 195px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.case-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.case-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-light) 0%, transparent 100%);
    opacity: 0.35;
}

.case-image-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.case-body {
    padding: 28px;
}

.case-body h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.case-body p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 18px;
    line-height: 1.6;
}

.case-result {
    display: inline-block;
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
}

/* Блок "О нас" */
.about {
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -500px;
    width: 800px;
    height: auto;
    aspect-ratio: 1/1;
    background: radial-gradient(circle at 35% 50%, rgba(237, 28, 36, 0.27) 0%, transparent 85%);
    border-radius: 58% 42% 32% 68%;
    z-index: 0;
}

@media screen and (max-width: 768px) {
    .about::before {
        width: 400px;
        right: -200px;
    }
}

.about-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-size: 40px;
    margin-bottom: 32px;
}

.about p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 32px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 62px;
}

.team-card {
    background-color: var(--bg-primary);
    padding: 34px 24px;
    border-radius: var(--border-radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.team-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--accent-light);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
    font-weight: 700;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.team-role {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Блок контактов */
.contacts {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(246, 247, 249, 0.98) 100%);
    padding: 100px 100px;
    position: relative;
}

.contacts::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 6%;
    width: 26%;
    height: 32%;
    background: radial-gradient(circle at 65% 50%, rgba(26, 54, 93, 0.04) 0%, transparent 72%);
    border-radius: 52% 48% 43% 57%;
    z-index: 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.9fr 1fr;
    gap: 60px;
    max-width: 1220px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-info h2 {
    font-size: 36px;
    margin-bottom: 42px;
}

.contact-details {
    margin-bottom: 42px;
}

.contact-row {
    margin-bottom: 20px;
}

.contact-label {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.contact-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .submit-btn {
    width: 100%;
    background: var(--accent-gradient);
    color: #ffffff;
    padding: 16px;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    margin-top: 10px;
}

.contact-form .submit-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #e62930 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Футер */
footer {
    background-color: var(--text-primary);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 100px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
}

.footer-about h3 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-links h4 {
    font-size: 17px;
    color: var(--accent);
    margin-bottom: 18px;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 11px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 15px;
    font-weight: 500;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.footer-docs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-docs a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-docs a:hover {
    color: #ffffff;
    transition: all 0.3s;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Адаптивность */
@media (max-width: 1200px) {

    header,
    .hero,
    .section,
    .contacts,
    footer {
        padding-left: 50px;
        padding-right: 50px;
    }

    .hero h1 {
        font-size: 48px;
    }
}

@media (max-width: 992px) {

    .features-grid,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    header {
        padding: 18px 20px;
        flex-direction: row;
        gap: 15px;
    }

    header nav {
        display: none;
    }

    header.scrolled {
        padding: 12px 20px;
    }

    nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 100px 20px 0px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .stats-box {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-grid,
    .team-grid,
    .cases-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 34px;
    }

    .section,
    .contacts,
    footer {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .service-card {
        padding: 20px;
    }

    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .footer-docs {gap: 10px;}
    .footer-docs a {font-size: 12px;}
}

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    header .btn {
        padding: 10px 28px;
        font-size: 14px;
    }

    .hero {
        padding: 140px 20px 0px;
    }
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal--open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal__content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal--open .modal__content {
    transform: translateY(0);
    opacity: 1;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__close:hover {
    color: #333;
}

.modal__title {
    margin-top: 0;
    margin-bottom: 24px;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--color-text);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.form-post {
    padding-top: 15px;
    font-size: 12px;
    opacity: 0.5;
}

.form-post a {
    color: var(--accent);
}

.send-status {
    margin-top: 12px;
    min-height: 24px;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.send-status:empty {
    opacity: 0;
}

.send-status:not(:empty) {
    opacity: 1;
}

.send-status--success {
    color: #28a745;
}

.send-status--error {
    color: #dc3545;
}

/* Поле с ошибкой */
input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

/* Статус сообщения */
.send-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.send-status--success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.send-status--error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}




.docs-page {
    min-height: 50vh;
}

.docs-page__wrapper {
    max-width: 1200px;
    padding: 50px;
    padding-top: 150px;
    padding-bottom: 100px;
    margin: 0 auto;
}

.docs-page h1 {
    margin-bottom: 10px;
    font-size: 26px;
}

.docs-page h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 20px;
}

.docs-page h3 {
    font-size: 18px;
}

.docs-page ul {
    padding-left: 25px;
    font-size: 14px;
}

.docs-page p {
    font-size: 14px;
}

@media screen and (max-width: 768px) {
    .docs-page__wrapper {
        padding-top: 120px;
        padding-left: 20px; 
        padding-right: 20px;
    }
}