:root {
    --bg-color: #1b0000;
    --text-main: #ffffff;
    --accent-gold: #ffd343;
    --accent-gold-deep: #e5a800;
    --card-bg: #222227;

    --page-max-width: 1200px;
    --border-radius-card: 32px;
}

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

[hidden] {
    display: none !important;
}

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

body {
    font-family: "Forum", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0b0000 url("assets/bg.jpg") center/cover no-repeat fixed;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    min-height: 100vh;
    color: var(--text-main);
    overflow-x: hidden;
}

/* ====== Layout страницы ====== */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* один экран с колесом */
.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.screen--wheel {
    align-items: flex-start;
    min-height: auto;
    padding: 32px 0 96px;
}

.page--popup-visible .screen--wheel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.screen__inner {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wheel-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 32px;
}

@media (min-width: 769px) {
    .wheel-layout {
        padding-bottom: 72px;
    }
}

.wheel-hero__logo img {
    height: 40px;
    width: auto;
    display: block;
}

.wheel-hero__title {
    margin: 0;
    font-family: "Forum", serif;
    font-size: 64px;
    font-style: normal;
    font-weight: 400;
    line-height: 90%;
    letter-spacing: 2.663px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #d9eef8 -11.43%, #ffe1a0 51.75%, #dfeeff 110.26%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 100%;
}

/* ====== Колесо ====== */

.wheel-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.wheel-stage__inner {
    position: relative;
    width: min(450px, 90vw);
    aspect-ratio: 1 / 1;
}

.wheel-stage__wheel {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transform-origin: calc(50% + 1.5px) calc(50% + 0.2px);
}

.wheel-stage__arrow {
    position: absolute;
    width: 62px;
    height: 99px;
    left: 18px;
    top: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

/* ====== Кнопки ====== */

.btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    padding: 14px 32px;
    border-radius: 999px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn span {
    white-space: nowrap;
}

.btn--primary {
    display: flex;
    width: min(295px, 80vw);
    height: 56px;
    padding: 14px 30.58px 15px 29.42px;
    justify-content: center;
    align-items: center;
    border-radius: 1000px;
    background: linear-gradient(180deg, #ffd343 -20.54%, #f5dc87 20.13%, #ffd343 71.29%, #f8d974 116.07%);
    box-shadow:
        0 2px 3.3px rgba(0, 0, 0, 0.25),
        0 1px 11.2px rgba(0, 0, 0, 0.25),
        0 1px 2px rgba(255, 255, 255, 0.8) inset,
        0 -1.6px 1px rgba(0, 0, 0, 0.35) inset,
        0 2px 9.9px rgba(255, 255, 255, 0.34) inset;
    color: #9f372c;
    text-align: center;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: #9f372c;
    font-family: "Forum", serif;
    font-size: 29.961px;
    line-height: 90%;
    letter-spacing: 0.899px;
    text-transform: uppercase;
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn--primary:active {
    transform: translateY(1px);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.wheel-layout__cta {
    margin-top: 8px;
}

/* ====== POPUP ====== */

.popup {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 40;
}

.popup--open {
    pointer-events: auto;
    opacity: 1;
}

.popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 0, 0, 0.1);
}

.popup__body {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: visible;
    z-index: 2;
}

.popup-card {
    position: relative;
    width: 550px;
    z-index: 3;
    border-radius: 64px;
    background: #212121;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 72px 48px 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup--open .popup-card {
    transform: scale(1);
    opacity: 1;
}

.popup-card__content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.popup-card__eyebrow {
    margin: 0 0 24px;
    color: #c2c2c2;
    font-family: "Onest", sans-serif;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.popup-card__emphasis {
    margin: 0;
    color: #e7b100;
    font-family: "Forum", serif;
    font-size: 72px;
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 3.006px;
    text-transform: uppercase;
}

.popup-card__description {
    margin: 8px 0 24px;
    color: #fff;
    font-family: "Forum", serif;
    font-size: 44px;
    font-weight: 400;
    letter-spacing: 3.082px;
    line-height: 0.9;
    text-transform: uppercase;
}

.popup-card__timer {
    margin: 0;
    color: #c2c2c2;
    font-family: "Onest", sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 110%;
}

.popup-card__timer--notice {
    margin-top: 8px;
    font-size: 20px;
    letter-spacing: 0.08em;
}

.popup-card__cta {
    margin-top: 44px;
    display: flex;
    width: 437.232px;
    height: 83px;
    padding: 0 24px;
    align-items: center;
    justify-content: center;
    border-radius: 1482.143px;
    background: linear-gradient(180deg, #ffd343 -20.54%, #f5dc87 20.13%, #ffd343 71.29%, #f8d974 116.07%);
    box-shadow:
        0 2.964px 4.891px rgba(0, 0, 0, 0.25),
        0 1.482px 16.6px rgba(0, 0, 0, 0.25),
        0 1.482px 2.964px rgba(255, 255, 255, 0.8) inset,
        0 -2.371px 1.482px rgba(0, 0, 0, 0.35) inset,
        0 2.964px 14.673px rgba(255, 255, 255, 0.34) inset;
    color: #9f372c;
    font-family: "Forum", serif;
    font-size: 44.407px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 1.332px;
    line-height: 90%;
    -webkit-text-stroke-width: 1.48px;
    -webkit-text-stroke-color: #9f372c;
}

.popup-card__cta:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 6px;
}
.popup__gift {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center;
    transition:
        transform 0.5s ease 0.1s,
        opacity 0.3s ease 0.1s,
        left 0.5s ease 0.1s,
        top 0.5s ease 0.1s;
}

.popup__gift img {
    width: clamp(120px, 20vw, 260px);
    height: auto;
    display: block;
}

.popup--open .popup__gift--tl {
    opacity: 1;
    left: 30%;
    top: 21%;
    transform: translate(-50%, -50%) scale(2.5);
}

.popup--open .popup__gift--tr {
    opacity: 1;
    left: 68%;
    top: 20%;
    transform: translate(-50%, -50%) scale(1.3) rotate(4deg);
}

.popup--open .popup__gift--bl {
    opacity: 1;
    left: 31%;
    top: 79%;
    transform: translate(-50%, -50%) scale(1.5) rotate(-51deg);
}

.popup--open .popup__gift--br {
    opacity: 1;
    left: 66%;
    top: 85%;
    transform: translate(-50%, -50%) scale(2) rotate(19deg);
}

/* ====== Мобилка ====== */

@media (max-width: 768px) {
    .screen__inner {
        padding: 24px 16px 32px;
    }

    .screen--wheel {
        padding: 24px 0 64px;
    }

    .wheel-layout {
        gap: 24px;
    }

    .wheel-hero__logo img {
        height: 32px;
    }

    .wheel-hero__title {
        font-size: clamp(40px, 12vw, 64px);
        letter-spacing: 1.8px;
    }

    .wheel-stage__inner {
        width: min(360px, 88vw);
    }

    .btn--primary {
        width: min(260px, 90vw);
        height: 52px;
        font-size: 24px;
        letter-spacing: 0.6px;
    }

    .popup-card {
        width: min(90vw, 420px);
        height: auto;
        padding: 48px 24px 40px;
        border-radius: 40px;
    }

    .popup-card__eyebrow {
        font-size: 24px;
        letter-spacing: 0.6px;
        margin-bottom: 16px;
    }

    .popup-card__emphasis {
        font-size: clamp(36px, 11vw, 64px);
    }

    .popup-card__description {
        font-size: clamp(28px, 9vw, 40px);
        margin: 16px 0;
    }

    .popup-card__timer {
        font-size: 20px;
    }

    .popup-card__cta {
        width: min(90%, 320px);
        font-size: 24px;
        height: 64px;
        letter-spacing: 0.8px;
    }

    .popup__gift img {
        width: 150px;
    }

    .popup--open .popup__gift--tl {
        left: 18%;
        top: 20%;
        transform: translate(-50%, -50%) scale(1.5);
    }

    .popup--open .popup__gift--tr {
        left: 78%;
        top: 18%;
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
    }

    .popup--open .popup__gift--bl {
        left: 20%;
        top: 82%;
        transform: translate(-50%, -50%) scale(1.2) rotate(-30deg);
    }

    .popup--open .popup__gift--br {
        left: 76%;
        top: 86%;
        transform: translate(-50%, -50%) scale(1.4) rotate(12deg);
    }
}
.confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
