@font-face {
    font-family: 'CalibriCustom';
    src: url('/fonts/Calibri/calibri-regular.ttf') format('truetype');
    font-weight: 400; /* normal */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CalibriCustom';
    src: url('/fonts/Calibri/calibri-bold.ttf') format('truetype');
    font-weight: 700; /* bold */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CalibriCustom';
    src: url('/fonts/Calibri/calibri-italic.ttf') format('truetype');
    font-weight: 400; /* normal */
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'CalibriCustom';
    src: url('/fonts/Calibri/calibri-bold-italic.ttf') format('truetype');
    font-weight: 700; /* bold */
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Pribambas';
    src: url('/fonts/Pribambas/Pribambas-Regular.ttf') format('truetype');
    font-weight: normal; /* 400 */
    font-style: normal;
    font-display: swap;
}

:root {
    --main-blue: rgba(14, 175, 255, 1);
}

body {
    font-family: 'CalibriCustom', 'Calibri', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #001D2B;
}

.header__top {
    margin: 36px 0;
    display: flex;
}
.header__top-left {
    display: flex;
    justify-content: end;
    flex: 1;
}
.header__top-right {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.header__top-left img {
    margin: 20px 42px;
    width: 200px;
    height: auto;
    object-fit: contain;
}
.upload_check_header {
    color: white;
    background: var(--main-blue);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 15px 30px;
    border-radius: 15px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 30px;
    font-weight: bold;
    height: 60px;
}
.header__string {
    width: 100%;
    height: 58px;
    background-image: url("/img/string.png");
    background-repeat: repeat-x;
    background-position-x: center;
    background-size: contain;
}

h1, .h2 {
    font-family: 'Pribambas', sans-serif;
    font-size: 65px;
    text-transform: uppercase;
    text-align: center;
}

.h2 {
    margin-bottom: 40px;
}

.title {
    text-align: center;
    margin: 0 20px;
    color: #212121;
}

.title p {
    font-size: 30px;
}

.banner {
    margin-top: 60px;
    position: relative;
    display: flex;
    justify-content: center;
}

.banner img, .section_three img {
    width: 100%;
}

.banner__condition {
    background: white;
    border-radius: 25px;
    position: absolute;
    bottom: 25px;
    width: calc(100% - 40px);
    max-width: 1320px;
    display: flex;
    align-items: center;
    padding: 10px;
}

.banner__condition p {
    font-size: 24px;
    color: rgba(114, 114, 114, 1);
    margin-left: 10px;
}

.section_two {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.section_two__block-title {
    text-transform: uppercase;
}

.section_two__block-sum {
    font-family: 'Pribambas', sans-serif;
    font-size: 100px;
    color: var(--main-blue);
    line-height: 1;
    text-box: trim-both cap alphabetic;
    margin-top: 20px;
}

.date_block {
    margin-top: 20px;
    display: flex;
    align-self: end;
}

.date_block p {
    color: rgba(114, 114, 114, 1);
    text-align: right;
    text-transform: uppercase;
}

.date_block .dates {
    gap: 12px;
    display: flex;
    margin-top: 10px;
}

.date_block .dates .date {
    padding: 7px;
    border-radius: 10px;
    background: #212121;
    min-width: 50px;
    box-sizing: border-box;
    transition: background-color .4s ease;
}

.date_block .dates .date .date-number {
    display: flex;
    justify-content: center;
    height: 1.25em;
    line-height: 1.25em;
    overflow: hidden;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.date_block .dates .date .date-unit {
    font-size: 12px;
    text-align: center;
    transition: opacity .3s ease;
}

/* обратный отсчёт: каждая цифра в своей ячейке, при смене старая уезжает вверх, новая выезжает снизу */
.date-number .date-digit {
    position: relative;
    display: inline-block;
    width: .62em;
    height: 1.25em;
}

.date-number .date-digit > span {
    position: absolute;
    inset: 0;
    text-align: center;
    will-change: transform, opacity;
}

.date-number .date-digit > .is-in {
    animation: date-digit-in .5s cubic-bezier(.22, .9, .3, 1) both;
}

.date-number .date-digit > .is-out {
    animation: date-digit-out .5s cubic-bezier(.22, .9, .3, 1) both;
}

@keyframes date-digit-in {
    from { transform: translateY(85%); opacity: 0; filter: blur(2px); }
    to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes date-digit-out {
    from { transform: translateY(0); opacity: 1; filter: blur(0); }
    to { transform: translateY(-85%); opacity: 0; filter: blur(2px); }
}

/* розыгрыш завершён - плашки приглушаются */
.date_block.is-finished .dates .date {
    background: #9a9a9a;
}

@media (prefers-reduced-motion: reduce) {
    .date-number .date-digit > .is-in,
    .date-number .date-digit > .is-out {
        animation: none;
    }

    .date-number .date-digit > .is-out {
        display: none;
    }
}

.section_three {
    margin-top: 125px;
    position: relative;
    display: flex;
    justify-content: center;
}

.section_three .upload_check {
    position: absolute;
    top: -40px;
    text-transform: uppercase;
    border-radius: 30px;
    border: 7px solid black;
    padding: 30px 80px;
    font-size: 30px;
    font-weight: bold;
    color: black;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section_four {
    width: calc(100% - 40px);
    max-width: 1320px;
    margin: 0 auto;
}

.section_four .step {
    font-size: 65px;
}

.section_four .step_block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 30px;
    border: 5px solid black;
    padding: 30px 25px;
    color: rgba(114, 114, 114, 1);
    margin: 20px 0;
    gap: 20px;
    font-size: 18px;
}

.section_four .step_block .action_text {
    font-family: 'Pribambas', sans-serif;
    text-transform: uppercase;
    font-size: 58px;
    color: black;
    line-height: 1;
    /* Срезаем пустые метрики шрифта: блок = высота заглавных букв */
    text-box: trim-both cap alphabetic;
}

.section_actions {
    text-align: center;
    margin-top: 150px;
}

.action_blocks {
    width: calc(100% - 40px);
    max-width: 1320px;
    margin: 0 auto;
    margin-top: 65px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action_blocks .block > div {
    border: 5px solid black;
    border-radius: 30px;
    padding: 35px 25px;
}

.action_blocks .block img {
    width: auto;
    height: 300px;
}

.action_blocks .block p {
    font-size: 30px;
    font-family: 'Pribambas', sans-serif;
}

.action_blocks .block a {
    width: 100%;
    display: block;
    background: rgba(33, 33, 33, 1);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    padding: 10px;
    margin-top: 30px;
}

.section_questions {
    width: calc(100% - 40px);
    max-width: 1320px;
    margin: 0 auto;
    margin-top: 65px;
}

.questions {
    margin-top: 65px;
}

.questions .block {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 20px;
    padding: 30px 50px;
    border-radius: 30px;
    border: 1px solid rgba(114, 114, 114, 1);
}

.questions .block > div:first-child {
    flex: 1;
    min-width: 0;
}

.question {
    color: rgba(72, 72, 72, 1);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* Плавное раскрытие: grid 0fr -> 1fr */
.answer-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}

.answer {
    min-height: 0;
    overflow: hidden;
    color: rgba(114, 114, 114, 1);
    padding-top: 0;
    opacity: 0;
    transition: padding-top .35s ease, opacity .35s ease;
}

.questions .block.is-open .answer-wrap {
    grid-template-rows: 1fr;
}

.questions .block.is-open .answer {
    padding-top: 10px;
    opacity: 1;
}

/* Кнопка плюс/минус */
.questions__toggle {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-top: -2px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.questions__toggle::before,
.questions__toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 3px;
    margin: -1.5px 0 0 -18px;
    border-radius: 2px;
    background: var(--main-blue);
    transition: transform .35s ease, opacity .35s ease;
}

.questions__toggle::after {
    transform: rotate(90deg);
}

.questions .block.is-open .questions__toggle::after {
    transform: rotate(180deg);
    opacity: 0;
}

.questions__toggle:focus-visible {
    outline: 2px solid var(--main-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.section_contact {
    margin-top: 40px;
    margin-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    gap: 15px;
    font-size: 24px;
}

.section_contact p {
    color: rgba(72, 72, 72, 1);
    font-weight: bold;
}

.section_contact a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: var(--main-blue);
    align-items: center;
}

/* попап загрузки чека */
body.modal-open {
    overflow: hidden;
}
.check_modal[hidden] {
    display: none;
}
.check_modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.check_modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 29, 43, .6);
}
.check_modal__window {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 32px;
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.check_modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: 0;
    background: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: #001D2B;
}
.check_modal__title {
    margin: 0 0 20px;
    font-size: 32px;
    font-weight: 700;
}
.check_modal__body {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.check_modal__instruction {
    width: 45%;
    height: auto;
    border-radius: 10px;
}
.check_form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.check_form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.check_form label span {
    font-weight: 700;
}
.check_form input {
    font: inherit;
    font-size: 18px;
    padding: 10px 14px;
    border: 1px solid #cfdbe2;
    border-radius: 10px;
    outline: none;
}
.check_form input:focus {
    border-color: var(--main-blue);
}
.check_form__message:empty {
    display: none;
}
.check_form__message {
    padding: 12px 16px;
    border-radius: 10px;
}
.check_form__message.is-info {
    background: #eaf6fd;
}
.check_form__message.is-success {
    background: #e7f7dc;
    color: #2d6a0e;
}
.check_form__message.is-error {
    background: #fde4e1;
    color: #b42318;
}
.check_form__message a {
    color: inherit;
    font-weight: 700;
}
.check_form__submit {
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: var(--main-blue);
    border: 0;
    border-radius: 15px;
    padding: 15px 30px;
    cursor: pointer;
}
.check_form__submit:disabled {
    opacity: .6;
    cursor: wait;
}
.answer a {
    color: var(--main-blue);
}

@media (max-width: 1220px) {
    .action_blocks {
        flex-direction: column;
    }
}
@media (max-width: 700px) {
    .check_modal__window {
        padding: 24px 16px;
    }
    .check_modal__body {
        flex-direction: column;
    }
    .check_modal__instruction {
        width: 100%;
    }
}
@media (max-width: 992px) {
    .header__top-left img {
        margin: 20px 22px;
    }
    .upload_check_header {
        font-size: 20px;
        height: 40px;
    }
}
@media (max-width: 800px) {
    .header__top {
        flex-direction: column;
    }
    .header__top-left {
        justify-content: center;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }
    .section_three .upload_check {
        padding: 30px;
        font-size: 26px;
    }
}
@media (max-width: 500px) {
    .section_four .step_block .action_text {
        font-size: 30px;
    }
    .action_blocks .block img {
        width: 100%;
        height: auto;
    }
    .section_contact {
        flex-direction: column;
    }
}
@media (max-width: 420px) {
    .title h1 {
        margin-top: 20px;
    }
    .header__string {
        height: 38px;
    }
    .banner__condition p {
        font-size: 16px;
    }
    .section_three .upload_check {
        width: calc(100% - 40px);
    }
}
