/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

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

img { image-rendering: -webkit-optimize-contrast; }

ul {
    list-style: none;
}

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

button {
    font: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* ===== ROOT ===== */
:root {
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-muted: #6b6b6b;

    --radius: 20px;

    --container-width: 1560px;
    --container-padding: 20px;

    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
    --space-6: 80px;

    --dur-fast: 180ms;
    --dur-med: 300ms;
    --dur-slow: 600ms;
    --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== BODY ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
main {
    overflow: hidden;
    padding-bottom: 276px;
}
/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

section,
.problem-card,
.box,
.box2 {
    will-change: transform, opacity;
    /* Reduced motion support below */
}

.in-view {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity var(--dur-slow) var(--easing), transform var(--dur-slow) var(--easing);
}

.flex {
    display: flex;
    align-items: center;
}
.hero__content h1 {
    margin-top: 50px;
    margin-bottom: 25px;
}
.row {
    align-items: center;
    justify-content: space-between;
}

/* ===== TYPOGRAPHY ===== */
h1, .h1 {
    font-family: Golos Text, serif;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 0.7;
    font-weight: 600;
}

h2 {
    font-family: Golos Text, serif;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.1;
    font-weight: 500;
}

h3, .h3 {
    font-family: Golos Text, serif;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
}

/* ===== BUTTON ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #1c1c1c;
    padding: 12px 20px;
    border-radius: 999px;
    transition: transform var(--dur-fast) var(--easing), opacity var(--dur-fast) var(--easing), box-shadow var(--dur-fast) var(--easing);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

.hero, .control {
    position: relative;
    height: 100vh;
    min-height: 700px;
    color: #fff;
    display: flex;
    align-items: center;
    background: #f7f7f7;
    overflow: clip;
}
.lead {
    gap: 8px;
}
.lead span {
    text-decoration: underline;
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* затемнение */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    padding: 20px 0;
    height: 100%;
}

.hero p {
    margin-bottom: 32px;
    color: rgba(255,255,255,0.8);
}

.problems {
    padding: clamp(80px, 10vw, 200px) 0;
}

/* заголовок */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

/* сетка */
.problems__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 21px;
    list-style: none
}

.menu {
    gap: 75px
}

/* карточка */
.problem-card article {
    background: #F7F7F7;
    padding: 30px;
    height: 100%;
    transition: transform var(--dur-med) var(--easing), box-shadow var(--dur-med) var(--easing);
}
.problem-card article p {
    font-size: 17px;
}
/* hover как на дорогих сайтах */
.problem-card article:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

/* картинка blob */
.problem-card img {
    display: block;
    margin: 8px auto;
}

.logo_pos {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
}

/* плавность */
.hero,
.hero__content,
.hero__bg img,
.problems,
.problem-card {
    will-change: transform, opacity;
    transition: none;
}

/* стартовое состояние */
.problems {
    opacity: 0;
    transform: translateY(120px);
}

.problem-card {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
}

.control__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.control__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* затемнение */
.control::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

.control .container {
    position: relative;
    z-index: 2;
    padding: 60px 0 50px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.glass > p {
    color: #fff;
    font-size: 24px;
    line-height: 0.8;
}

.box .flex p {
    color: #fff;
    line-height: 1;
}

.glass {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    overflow: hidden;
    transform: translateZ(0);
}

.gap1 {
    gap: 20px;
}

.box {
    background: url("/img/back1.png") no-repeat;
    padding: 30px;
    width: 365px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mtp {
    margin-top: 22px;
}

.photo__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 200px;
    height: 836px;
    position: relative;
    overflow: hidden;
}

.photo__content h1 {
    margin-bottom: 15px;
}

.photo__content p {
    margin-bottom: 40px;
}

.photo__content img {
    position: absolute;
    bottom: -290px;
}

.relative {
    position: relative;
}

#work {
    background: #1F1F1F;
}

.line {
    background: rgba(255, 255, 255, 0.15);
    height: 1px;
    width: 100%;
    position: absolute;
    top: 10.5px;
}

.work__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0 200px 0;
}

.line2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 32px;
    gap: 20px;
}

.work__content h1 {
    color: #fff;
    margin-bottom: 50px;
}

.box2 {
    background: rgba(0, 0, 0, 0.12);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wrap {
    flex-wrap: wrap;
}

.gap4 {
    gap: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.h3 {
    font-family: Golos Text, serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 0.9;
}

.gap4 .h3 {
    margin-bottom: 80px;
}

.gap4 * {
    color: #fff
}

.form__content.loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
}

/* сам спиннер */
.form__content.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 36px;
    height: 36px;

    margin-top: -18px;
    margin-left: -18px;

    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;

    animation: spin 0.8s linear infinite;

    z-index: 2;
}

/* анимация */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ошибка */
.input-error {
    border-bottom: 1px solid #ff4d4f !important;
}

/* текст ошибки */
.error {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #ff4d4f !important
}

.form__content {
    position: absolute;
    bottom: -60px;
    max-width: 750px;
    width: calc(100% - 32px);
    height: 500px;
    left: 0;
    right: 0;
    margin: auto;
    padding: 32px 75px;

    background: url("/img/b1.png") no-repeat;
    backdrop-filter:
        blur(22px)           /* Frost ~88 */
        saturate(180%)      /* Depth */
        contrast(105%);
    -webkit-backdrop-filter:
        blur(22px)
        saturate(180%)
        contrast(105%);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),   /* Depth */
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(255, 255, 255, 0.15);
}

.form__content * {
    color: #fff;
}

.form__content .h1, .form__content > p {
    margin-bottom: 47px;
    text-align: center;
}

#cta input {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    font-size: 16px;
    margin-bottom: 35px;
    outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.end {
    align-items: end;
}

.box3 a {
    font-size: 24px;
    font-weight: bold;
}

.gap2 {
    gap: 16px;
    margin-top: 45px;
}

.box3 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.box3 img {
    width: 136px;
}

.year {
    color: gray;
}

.stretch {
    align-items: stretch;
}

.logo__footer {
    margin-top: 90px;
    width: 100%;
}

.box_flex1 {
    margin-right: 151px;
}

.box_flex {
    display: flex;
    flex-direction: column;
}

.box_flex a {
    margin-bottom: 33px;
}

@media (max-width: 1024px) {
    .problems__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .line2, .gap4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero {
        min-height: 600px;
    }
}

@media (min-width: 992px) and (max-width: 1581px) {
    .control .container {
        padding: 60px 20px 50px 20px;
    }
    .logo_pos {
        left: 20px;
        width: calc(100% - 40px);
    }
    .photo__content {
        padding-top: 100px;
        height: 636px;
    }

    .hero .container {
        padding: 20px;
    }

    .hid-m {
        display: none!important;
    }

    .gap4 .h3 {
        margin-bottom: 40px;
    }

    .work__content {
        padding: 80px 0 100px 0;
    }

    main {
        padding-bottom: 176px;
    }

    .box_flex1 {
        margin-right: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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

    .hero__content {
        max-width: 100%;
    }

    .problems {
        padding: 80px 0;
    }

    .problems__list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .line2, .gap4 { grid-template-columns: 1fr; }

    .section-header {
        margin-bottom: 40px;
    }

    body {
        font-size: 16px;
    }

    .hid-s {
        display: none !important;
    }

    .container {
        padding: 0 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .logo_pos {
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        height: auto;
    }

    .photo__content h1 {
        text-align: center;
        line-height: 1;
    }

    .hero {
        padding: 0;
    }

    .hero .container {
        padding: 12px;
    }

    .problem-card article {
        padding: 20px;
    }

    .problem-card article p {
        font-size: 14px;
    }

    .control .container {
        padding: 32px 12px;
        justify-content: start;
    }

    .control {
        overflow: initial;
    }

    .gap1 {
        gap: 8px;
        flex-direction: column;
        margin-top: 32px;
    }

    .box {
        height: 178px;
    }

    .photo__content {
        height: 480px;
        padding-top: 60px;
    }

    .photo__content img {
        bottom: -178px;
    }

    .gap4 {
        gap: 12px;
    }

    .gap4 .h3 {
        margin-bottom: 40px;
    }

    .form__content {
        bottom: 57px;
        height: 474px;
        padding: 24px 20px 36px 20px
    }

    .work__content {
        padding: 80px 0 60px 0;
    }

    #form {
        height: 884px;
    }

    .form__bg {
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .form__bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .form__content .h1 {
        margin-bottom: 12px;
    }

    .form__content > p {
        margin-bottom: 24px;
    }

    main {
        padding-bottom: 100px;
    }

    .footer .stretch {
        flex-direction: column;
    }

    .row_m {
        flex-direction: row;
        margin-bottom: 55px;
    }

    .box_flex1 {
        margin-right: 0;
    }

    .mwrap {
        flex-direction: row!important;
    }

    .box_flex {
        width: 50%;
    }

    .box_flex a {
        margin-bottom: 22px;
    }

    .box3.end {
        align-items: start;
    }

    .gap2 {
        margin-top: 0;
        position: absolute;
        right: 12px;
    }

    .logo__footer {
        margin-top: 56px;
    }
}

@media (min-width: 992px) {

    .hid-x {
        display: none !important;
    }

}
