:root {
    --background: #f2f2f2;
    --background-card: #e6e6e6;
    --logo-text: #1a1a1a;
    --logo-dots: teal;
    --gradient-big-start: rgba(25, 178, 145, 1);
    --gradient-big-end: rgba(25, 178, 145, 0);
    --gradient-small-start: rgba(178, 25, 109, 1);
    --gradient-small-end: rgba(178, 25, 109, 0);
    --font: 'Gilroy',
        'system-ui',
        '-apple-system',
        'Segoe UI',
        'Roboto',
        'Helvetica',
        'Arial',
        sans-serif;

    @media (prefers-color-scheme: dark) {
        --background: #1a1a1a;
        --background-card: #262626;
        --logo-text: #f2f2f2;
    }
}

@keyframes gradient-flow {
    0% {
        transform: translate(20%, 20%) scale(1);
        opacity: 0.8;
    }

    25% {
        transform: translate(25%, 22%) scale(1.05);
        opacity: 0.9;
    }

    50% {
        transform: translate(30%, 25%) scale(1.1);
        opacity: 1;
    }

    75% {
        transform: translate(27%, 28%) scale(1.1);
        opacity: 0.95;
    }

    100% {
        transform: translate(22%, 23%) scale(1.15);
        opacity: 0.85;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--logo-text);
    font-family: var(--font);
}

.content {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    position: relative;
    min-height: 100svh;
    z-index: 10;
}

.overflow {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;

    &::before {
        content: '';
        display: block;
        width: 25vw;
        aspect-ratio: 1 / 1;
        position: absolute;
        bottom: 0;
        left: 50%;
        translate: 25% 25%;
        border-radius: 50%;
        z-index: 1;
        background: radial-gradient(circle, var(--gradient-small-start) 0%, var(--gradient-small-end) 100%);
        filter: blur(100px);
        animation: gradient-flow 40s ease-in-out infinite alternate;
        overflow: hidden;
    }

    &::after {
        content: '';
        display: block;
        width: 50vw;
        aspect-ratio: 1 / 1;
        position: absolute;
        bottom: 0;
        right: 0;
        translate: 25% 25%;
        border-radius: 50%;
        z-index: 2;
        background: radial-gradient(circle, var(--gradient-big-start) 0%, var(--gradient-big-end) 100%);
        filter: blur(100px);
        animation: gradient-flow 40s ease-in-out infinite alternate;
        overflow: hidden;
    }
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    padding: 24px 0;
}

.header__logo {
    height: 60px;
    aspect-ratio: 3 / 1;
    align-self: start;
}

/* Hero */
.hero {
    padding: 32px 0;
}

.hero__title {
    align-self: center;
    font-size: 64px;
    font-weight: 800;
    margin: 0 auto 24px;
    line-height: 1.1;
    text-align: center;
    text-wrap: balance;
}

.hero__text {
    align-self: center;
    font-size: 32px;
    font-weight: 300;
    margin: 0 auto 48px;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

/* Card */
.card {
    display: flex;
    align-self: center;
    background: var(--background-card);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
}

.card__image {
    position: relative;
    display: flex;
    flex: 1 1 100%;
    width: 25%;
    max-width: 160px;

    img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.card__content {
    width: max-content;
    flex: 1 1 100%;
    padding: 24px 32px;
}

.card__title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 24px;
}

.card__button {
    height: 60px;
    padding: 8px 40px;
    border-radius: 12px;
    background: var(--logo-text);
    color: var(--background);
    border: none;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.card__button:hover {
    opacity: 0.7;
}

.modal {
    inset: 0;
    margin: auto;
    padding: 0;
    border: none;
    background: transparent;
    display: grid;
    place-items: center;

    &::backdrop {
        visibility: visible;
        background-color: rgba(25, 178, 145, 0.3);
        backdrop-filter: blur(10px);
    }

    @starting-style {
        &:popover-open {
            scale: 0;
            opacity: 0;
        }
    }

    &:popover-open {
        display: flex;
        flex-direction: column;
        scale: 1;
        opacity: 1;
        transition:
            opacity 0.25s,
            display 0.25s,
            overlay 0.25s,
            scale 0.25s;
    }

    &:not(:popover-open) {
        scale: 0;
        transition: opacity 0.25s,
            display 0.25s,
            overlay 0.25s,
            scale 0.25s;
    }
}

/* Контент модалки */
.modal__content {
    background: var(--background-card);
    color: var(--logo-text);
    border-radius: 16px;
    width: 300px;
    height: 360px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: popin 0.25s ease;
    overflow: hidden;

    #inlineModalFrame {
        width: 100%;
        height: 100%;
        border: 0;
    }
}

.close-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    place-items: center;
    background: var(--logo-text);
    color: var(--background-card);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 32px;
    line-height: 1;
    font-weight: lighter;
}

.close-btn:hover {
    opacity: 0.8;
}

/* Анимация появления */
@keyframes popin {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .overflow {
        &::before {
            width: 50vw;
            top: 50%;
            bottom: unset;
            translate: 0 0;

        }

        &::after {
            width: 75vw;
            top: 50%;
            bottom: unset;
            translate: 0 0;
        }
    }

    .header {
        padding: 20px 0 12px;
    }

    .header__logo {
        height: 30px;
    }

    .hero__title {
        font-size: 32px;
        margin-bottom: 16px;
    }

    .hero__text {
        font-size: 18px;
        margin-bottom: 32px;
    }

    .card {
        max-width: 320px;
    }

    .card__content {
        padding: 16px 24px;
    }

    .card__title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .card__button {
        height: 48px;
        padding: 8px 24px;
        font-size: 18px;
    }
}