/* ========================= */
/*          BASE             */
/* ========================= */

* {
    box-sizing: border-box;
}
body,
html {
    height: 100%;
}

body {
    margin: 0;
    background: #000 url("../img/bg.webp") center/cover no-repeat fixed;
    color: #fff;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.page {
    min-height: 100svh;
    position: relative;
    overflow: hidden;
    /* Чтобы декор не вылезал за края */
    perspective: 1000px;
}

/* ========================= */
/*           LOGO            */
/* ========================= */

.logo {
    position: fixed;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    z-index: 10;
}

.logo img {
    width: 168px;
    height: auto;
    display: block;
}

/* ========================= */
/*       LEFT COLUMN         */
/* ========================= */

.left-col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;

    margin-left: clamp(32px, 6vw, 80px);
    padding-top: clamp(140px, 18vh, 220px);

    inline-size: fit-content;
    width: max-content;
    z-index: 2;
    /* Контент всегда над декором */
}

/* ========================= */
/*      HEADLINE IMAGE       */
/* ========================= */

.headline {
    width: min(610px, 44vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
    user-select: none;
    pointer-events: none;
}

/* ========================= */
/*         CTA BUTTON        */
/* ========================= */

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;

    width: 375px;
    height: 120px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;

    font-family: 'Sofia Sans Extra Condensed', sans-serif;
    font-style: normal;
    font-weight: 900;
    font-size: 40px;
    line-height: 48px;

    background: linear-gradient(180deg, #FF7C1E 0%, #F85A00 100%);
    transform: matrix(1, 0, -0.14, 0.99, 0, 0);

    box-shadow: 0 40px 60px rgba(248,90,0,0.28), 0 12px 24px rgba(0,0,0,.25);

    animation: ctaPopGlow 2.4s ease-in-out infinite;
    transition: background 0.2s ease;
}

/* CTA POP-GLOW ANIMATION */
@keyframes ctaPopGlow {
    0% {
        transform: matrix(1,0,-0.14,0.99,0,0) scale(1) translateY(0);
        filter: drop-shadow(0 0 0 rgba(255,124,30,0));
    }
    50% {
        transform: matrix(1,0,-0.14,0.99,0,0) scale(1.05) translateY(-4px);
        filter: drop-shadow(0 0 36px rgba(255,124,30,.45));
    }
    100% {
        transform: matrix(1,0,-0.14,0.99,0,0) scale(1) translateY(0);
        filter: drop-shadow(0 0 0 rgba(255,124,30,0));
    }
}

/* hover / active по ТЗ */
.cta:hover {
    background: linear-gradient(0deg, rgba(255,255,255,0.10), rgba(255,255,255,0.10)), linear-gradient(180deg, #FF7C1E 0%, #F85A00 100%);
}

.cta:active {
    background: linear-gradient(0deg, rgba(0,0,0,0.10), rgba(0,0,0,0.10)), linear-gradient(180deg, #FF7C1E 0%, #F85A00 100%);
}

/* ========================= */
/*      DECORATIVE CORNERS   */
/* ========================= */

.deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.2));
    animation: cornerFloat 8s ease-in-out infinite;
    will-change: transform;
}

/* позиции по ТЗ */
.deco-tl {
    top: -22px;
    left: -10px;
    width: clamp(160px, 18vw, 258px);
    animation-delay: 0s;
}
.deco-tr {
    top: -28px;
    right: -18px;
    width: clamp(220px, 30vw, 417px);
    animation-delay: 0.4s;
}
.deco-bl {
    bottom: -10px;
    left: -8px;
    width: clamp(240px, 38vw, 503px);
    animation-delay: 0.2s;
}
.deco-br {
    bottom: -18px;
    right: -12px;
    width: clamp(220px, 32vw, 410px);
    animation-delay: 0.6s;
}

/* “плавающая” анимация */
@keyframes cornerFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(-1.2deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ========================= */
/*   REDUCED MOTION SUPPORT  */
/* ========================= */

@media (prefers-reduced-motion: reduce) {
    .cta,
    .deco {
        animation: none !important;
    }
    .cta {
        filter: none;
        transform: matrix(1,0,-0.14,0.99,0,0);
    }
}

/* ========================= */
/*        RESPONSIVE         */
/* ========================= */

@media (max-width: 1024px) {
    .headline {
        width: min(380px, 60vw);
    }
    .cta {
        width: 200px;
        height: 64px;
        font-size: 20px;
        line-height: 26px;
    }
    .left-col {
        margin-left: clamp(32px, 6vw, 80px);
        padding-top: clamp(180px, 18vh, 220px);
    }
}

@media (max-width: 900px) {
    .deco {
        animation-duration: 7s;
    }
    .deco-tr {
        right: -30px;
    }
    .deco-br {
        right: -24px;
    }
}

@media (max-width: 768px) {

    body {
        margin: 0;
        background: #000 url("../img/bg2.webp") center/cover no-repeat fixed;
    }

    .logo {
        top: 32px;
    }

    .logo img {
        width: 104px;
    }

    /* Центрируем всю колонку */
    .left-col {
        margin-left: 0;
        padding-top: clamp(120px, 16vh, 180px);

        width: 100%;
        max-width: 100%;
        align-items: center;     /* ← центр по горизонтали */
        text-align: center;      /* ← текст и изображение по центру */
        gap: 24px;
    }

    /* Меняем изображение и центрируем */
    .headline {
        content: url("../img/txt2.png");
        width: min(448px, 88vw);
        margin-inline: auto;
    }

    /* Кнопка по центру */
    .cta {
        width: 200px;
        height: 64px;
        font-size: 20px;
        line-height: 24px;
        align-self: center;   /* ← гарантированно по центру */
        margin: 0 auto;       /* ← центрируем */
    }
}


@media (max-width: 560px) {
    .logo img {
        width: 90px;
    }
    .left-col {
        margin-left: 0;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding-top: 140px;
    }

    .headline {
        width: min(360px, 90vw);
        margin: 0 auto;
    }

    .cta {
        width: 200px;
        height: 64px;
        font-size: 20px;
        line-height: 26px;
    }

    .deco {
        filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
    }

    .deco-tl {
        width: clamp(120px, 28vw, 200px);
        top: -12px;
        left: -12px;
    }
    .deco-tr {
        width: clamp(180px, 42vw, 320px);
        top: 0px;
        right: -22px;
    }
    .deco-bl {
        width: clamp(180px, 60vw, 360px);
        bottom: -12px;
        left: -60px;
    }
    .deco-br {
        width: clamp(170px, 44vw, 330px);
        bottom: -16px;
        right: -18px;
    }
}
