@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('fonts/montserrat-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Диагональ между теннисом и паделом на ПК: x сверху и снизу экрана. */
    --split-top: 62%;
    --split-bottom: 40%;

    --tennis: #7fd321;
    --padel: #2aa8f2;
    --text: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #030a08;
    color: var(--text);
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    isolation: isolate;
}

/* ===== Фоны ===== */

.bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-repeat: no-repeat;
    background-size: cover;
}

.bg-tennis {
    background-color: #04110a;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.08) 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.18) 100%),
        url('images/tennis-court.webp');
    background-position: center, center, 0% 100%;
}

.bg-padel {
    z-index: -2;
    background-color: #06162d;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 40%, rgba(0, 0, 0, 0.35) 100%),
        url('images/padel-court.webp');
    background-position: center, 85% 50%;
    clip-path: polygon(var(--split-top) 0, 100% 0, 100% 100%, var(--split-bottom) 100%);
}

.seam {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* Разрез — слои-полосы вдоль диагонали: --a и --b — края полосы относительно линии
   (минус — в сторону тенниса). Размытие на обёртке, полоса — на вложенном <i>. */
.seam-glow,
.seam-line {
    position: absolute;
    inset: 0;
}

.seam-glow i,
.seam-line i {
    position: absolute;
    inset: 0;
    clip-path: polygon(
        calc(var(--split-top) + var(--a)) 0,
        calc(var(--split-top) + var(--b)) 0,
        calc(var(--split-bottom) + var(--b)) 100%,
        calc(var(--split-bottom) + var(--a)) 100%
    );
}

/* Широкое мягкое зелёное свечение на теннисной стороне. */
.seam-glow-tennis {
    --a: -18px;
    --b: 0px;
    filter: blur(11px);
    opacity: 0.32;
}

.seam-glow-tennis i {
    background: linear-gradient(180deg, #8cff3a 0%, #6cf04a 45%, #3fd38c 80%, rgba(47, 196, 255, 0.6) 100%);
}

/* Лёгкая голубая дымка со стороны падела. */
.seam-glow-padel {
    --a: 0px;
    --b: 8px;
    filter: blur(7px);
    opacity: 0.28;
}

.seam-glow-padel i {
    background: linear-gradient(180deg, #5fe0ff 0%, #2fb4ff 100%);
}

/* Плотный ореол вокруг линии. */
.seam-glow-core {
    --a: -3px;
    --b: 3px;
    filter: blur(5px);
    opacity: 0.85;
}

.seam-glow-core i {
    background: linear-gradient(180deg, #b6ff5a 0%, #7cf06a 45%, #45d6ff 100%);
}

/* Тонкая светлая сердцевина: к низу бледнеет. */
.seam-line {
    --a: -1px;
    --b: 1px;
}

.seam-line i {
    background: linear-gradient(180deg, #d4ff8a 0%, #b4ff8c 40%, rgba(150, 235, 255, 0.8) 80%, rgba(150, 235, 255, 0.55) 100%);
}

/* ===== Текст и кнопки ===== */

.content {
    position: absolute;
    left: 9.6vw;
    top: 56%;
    transform: translateY(-50%);
    z-index: 2;
}

h1 {
    margin: 0 0 clamp(24px, 4.5vh, 44px);
    font-weight: 700;
    font-size: clamp(32px, min(3.9vw, 8.2vh), 78px);
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: clamp(15px, 1.05vw, 19px);
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-tennis {
    background: linear-gradient(180deg, #8ee52c 0%, #5db51a 100%);
    border: 1.5px solid rgba(205, 255, 150, 0.85);
    box-shadow: 0 6px 22px rgba(110, 215, 40, 0.35);
}

.btn-padel {
    background: linear-gradient(180deg, #45bdff 0%, #1f8de4 100%);
    border: 1.5px solid rgba(175, 228, 255, 0.9);
    box-shadow: 0 6px 22px rgba(40, 160, 245, 0.35);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-tennis:hover,
.btn-tennis:focus-visible {
    box-shadow: 0 8px 28px rgba(130, 235, 50, 0.55);
}

.btn-padel:hover,
.btn-padel:focus-visible {
    box-shadow: 0 8px 28px rgba(60, 180, 255, 0.55);
}

.btn:focus-visible,
.news:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.arrow {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    transition: transform 0.2s ease;
}

.btn:hover .arrow,
.news:hover .arrow {
    transform: translateX(3px);
}

.news {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: clamp(24px, 4.5vh, 40px);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    font-size: clamp(16px, 1.1vw, 20px);
    text-decoration: none;
}

.news:hover {
    color: #fff;
}

.news-icon {
    width: 30px;
    height: 30px;
    flex: none;
    fill: currentColor;
}

/* ===== Телефон ===== */

.phone {
    position: absolute;
    bottom: 0;
    left: max(55%, calc(9.6vw + 640px));
    z-index: 1;
    line-height: 0;
}

.phone img {
    display: block;
    height: min(54vh, 30vw);
    width: auto;
    filter: drop-shadow(0 0 40px rgba(0, 0, 0, 0.55));
}

/* ===== Мобильные и планшеты в портрете ===== */

@media (max-width: 820px), (orientation: portrait) and (max-width: 1100px) {
    /* Сетка из двух строк: сверху теннис, снизу падел с текстом и кнопками.
       Фоны и разрез стоят в своих ячейках, отрицательные отступы заводят их за диагональ. */
    .hero {
        --rise: 14vw;
        --pad: 60px;

        display: grid;
        grid-template-columns: 100%;
        grid-template-rows: minmax(0, 1fr) auto;
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
    }

    .bg-tennis,
    .bg-padel,
    .seam {
        position: relative;
        inset: auto;
        grid-column: 1;
    }

    .bg-tennis {
        grid-row: 1;
        margin-bottom: calc(-1 * var(--rise) - 8px);
        background-image:
            linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.05) 100%),
            url('images/tennis-court.webp');
        background-position: center, 15% 100%;
    }

    .bg-padel {
        grid-row: 2;
        margin-top: calc(-1 * var(--rise));
        background-image:
            linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.5) 100%),
            url('images/padel-court.webp');
        background-position: center, 70% 70%;
        clip-path: polygon(0 var(--rise), 100% 0, 100% 100%, 0 100%);
    }

    /* Запас сверху под свечение над линией. */
    .seam {
        grid-row: 2;
        margin-top: calc(-1 * (var(--rise) + var(--pad)));
    }

    .seam-glow i,
    .seam-line i {
        clip-path: polygon(
            0 calc(var(--pad) + var(--rise) + var(--a)),
            100% calc(var(--pad) + var(--a)),
            100% calc(var(--pad) + var(--b)),
            0 calc(var(--pad) + var(--rise) + var(--b))
        );
    }

    .seam-glow-tennis {
        --a: -12px;
    }

    .seam-glow-padel {
        --b: 6px;
    }

    .seam-glow-tennis i {
        background: linear-gradient(90deg, #8cff3a 0%, #6cf04a 55%, #3fd38c 100%);
    }

    .seam-glow-core i {
        background: linear-gradient(90deg, #b6ff5a 0%, #7cf06a 55%, #45d6ff 100%);
    }

    .seam-line i {
        background: linear-gradient(90deg, #d4ff8a 0%, #b4ff8c 55%, #96ebff 100%);
    }

    .content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        grid-row: 2;
        grid-column: 1;
        /* Блок по центру падел-зоны по вертикали; зона не ниже 56% экрана. */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        min-height: 56svh;
        padding: 32px max(20px, calc((100% - 480px) / 2)) calc(32px + env(safe-area-inset-bottom));
    }

    .content .actions {
        align-self: stretch;
    }

    h1 {
        font-size: clamp(32px, 10vw, 52px);
        margin-bottom: 28px;
    }

    .actions {
        flex-direction: column;
        gap: 14px;
    }

    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }

    .news {
        margin-top: 24px;
        font-size: 16px;
    }

    .news-icon {
        width: 26px;
        height: 26px;
    }

    .phone {
        display: none;
    }
}

/* Телефон и планшет в портрете: лендинг ровно в видимую часть экрана (без панелей браузера),
   прокрутки нет — теннисная половина сжимается. */
@media (max-width: 820px) and (orientation: portrait), (orientation: portrait) and (max-width: 1100px) {
    .hero {
        height: 100vh;
        height: 100svh;
        min-height: 0;
    }
}

/* ===== Низкие горизонтальные экраны (телефон боком) ===== */

@media (orientation: landscape) and (max-height: 520px) and (min-width: 821px) {
    .hero {
        min-height: 360px;
    }

    .content {
        top: 50%;
    }

    .actions {
        gap: 12px;
    }

    .btn {
        padding: 11px 18px;
        font-size: 14px;
    }

    .news {
        margin-top: 16px;
        font-size: 14px;
    }

    .phone {
        left: max(60%, calc(9.6vw + 520px));
    }
}
