@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Raleway", sans-serif;
    color: var(--text);
}

::-webkit-scrollbar {
    display: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

:root {
    --background: #000000;
    --text: #ffffff;
    --border: 3px dashed #ff0606;
    --popup-background: #212124;
    --error: #ff4444;
    --success: #4caf50;
}

body {
    background-color: var(--background);
    padding-bottom: 40px;
    overflow-x: hidden;
    width: 100vw;
}

html {
    overflow: auto;
    font-size: min(0.069vw, 1.325px); /* caps at ~1920px wide */
}

html:has(.popup:not(.popup_hidden)) {
    overflow: hidden;
}

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ─── HEADER ─────────────────────────────────────────────────── */

.header {
    height: 148px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15vw;
}

.header .header__title {
    font-size: 23rem;
    font-weight: 400;
    text-transform: uppercase;
}

.header .header__links {
    display: flex;
    align-items: center;
    gap: 27px;
}

.header .header__links .header__links__item {
    list-style: none;
    font-size: 17rem;
    font-weight: 600;
    text-transform: uppercase;
}

.header .header__links .header__links__close {
    display: none;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 20px;
    height: 20px;
}

.burger .burger__row {
    width: 100%;
    height: 2px;
    background-color: var(--text);
    border-radius: 4px;
}

/* ─── HERO ────────────────────────────────────────────────────── */

.first-block {
    position: relative;
    height: calc(100vh - 148px);
    display: flex;
    justify-content: center;
}

.first-block .first-block__code-background {
    position: absolute;
    top: -148px;
    left: 0;
    z-index: -1;
    width: 100vw;
}

.first-block .first-block__title {
    position: absolute;
    top: 4vw;
    left: 12vw;
    margin-top: 40px;
    width: 578px;
    font-size: 75rem;
    font-weight: 800;
}

.first-block .first-block__avatar {
    position: absolute;
    bottom: 0;
    right: 7.5vw;
    width: 44vw;
}

/* ─── GREETINGS ───────────────────────────────────────────────── */

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

.greetings .greetings__text {
    width: 100%;
    max-width: 949px;
    font-size: 58rem;
    font-weight: 400;
    text-align: center;
}

.greetings .greetings__tags {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 55px;
}

.greetings .greetings__tags .greetings__tags__item {
    position: relative;
    list-style: none;
    font-size: 24rem;
    font-weight: 700;
    border: var(--border);
    width: 300px;
    height: 115px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.greetings .greetings__tags .greetings__tags__item:after {
    content: "";
    position: absolute;
    bottom: -81px;
    right: -34px;
    background-image: url("../assets/cursor.png");
    background-size: cover;
    width: 101px;
    height: 131px;
}

/* ─── INFO SECTIONS ───────────────────────────────────────────── */

.info {
    margin: 150px 10vw 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info .info__title {
    width: 100%;
    font-size: 65rem;
    font-weight: 500;
    text-align: left;
    text-transform: uppercase;
}

.info .info__subtitle {
    width: 100%;
    padding-right: 34px;
    font-size: 18rem;
    font-weight: 400;
    text-align: right;
}

.info .info__block {
    min-height: 375px;
    margin-top: 15px;
    border: var(--border);
    width: 100%;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 90px;
}

.info .info__block .info__block__list {
    flex: 1 1 0;
    padding: 0 35px;
    font-size: 24rem;
    font-weight: 700;
    list-style-type: " — ";
    margin: 0 1vw;
}

.info .info__block .info__block__list .info__block__list__item {
    font-family: "Roboto Mono", monospace;
    margin: 20px 0;
}

.info .info__block .info__block__list .info__block__list__item.info__block__list__item_extra {
    margin-top: 60px;
}

.info .info__block .info__block__list .info__block__list__item .info__block__list__item__gray {
    color: lightgray;
}

.info .info__block .info__block__footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 53px 22px;
}

.info .info__block .info__block__footer .info__block__footer__price {
    max-width: 30vw;
    font-family: "Roboto Mono", monospace;
    font-size: 47rem;
    font-weight: 700;
    line-height: 21px;
}

.info .info__block .info__block__footer .info__block__footer__price .info__block__footer__price__small-font {
    font-family: "Roboto Mono", monospace;
    font-size: 18rem;
}

/* ─── BUTTON ──────────────────────────────────────────────────── */

.button {
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 21px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 18rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    transition: border 0.2s ease;
    color: lightgray;
    white-space: nowrap;
}

.button:hover {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* ─── FOOTER ──────────────────────────────────────────────────── */

.footer {
    margin-top: 85px;
    padding: 0 20vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .footer__title {
    font-size: 49rem;
    font-weight: 300;
}

.footer .footer__subtitle {
    margin-top: 60px;
    font-size: 30rem;
    font-weight: 200;
    cursor: pointer;
}

.footer .footer__links {
    margin-top: 42px;
    width: 950px;
    display: flex;
    justify-content: space-between;
}

.footer .footer__links .footer__links__item {
    list-style: none;
    font-size: 25rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

a {
    text-decoration: none;
}

.footer__mark {
    margin-top: 40px;
    font-size: 9rem;
    font-weight: 400;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.footer__mark span {
    width: 50%;
}

/* ─── POPUP ───────────────────────────────────────────────────── */

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.popup.popup_hidden {
    display: none;
}

.popup .popup__content {
    width: 522px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    background-color: var(--popup-background);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup .popup__content_hidden {
    display: none;
}

.popup .popup__content .popup__content__header {
    align-self: flex-end;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom-left-radius: 10px;
    min-width: 50%;
    height: 58px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
    padding: 20px;
}

.popup .popup__content .popup__content__header .popup__content__header__title {
    font-size: 18rem;
    font-weight: 400;
    font-family: "Roboto Mono", monospace;
}

/* ─── CLOSE BUTTON ────────────────────────────────────────────── */

.close {
    position: relative;
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;

    --close-color: var(--text);
}

.close.close_dark {
    --close-color: rgba(100, 100, 100, 1);
}

.close:hover {
    opacity: 1;
}

.close:before,
.close:after {
    position: absolute;
    left: 7px;
    content: " ";
    height: 20px;
    width: 1px;
    background-color: var(--close-color);
}

.close:before {
    transform: rotate(45deg);
}

.close:after {
    transform: rotate(-45deg);
}

/* ─── FORM ────────────────────────────────────────────────────── */

.form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 30px 24px;
}

.form .form__fields-container {
    max-width: 355px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 172px);
    grid-template-rows: repeat(3, 1fr) max-content;
    grid-gap: 24px 14px;
}

.form .form__fields-container > * {
    grid-column: 1 / 3;
}

.form > .form__fields-container > .field:nth-child(2) {
    grid-column: 1 / 2;
}

.form > .form__fields-container > .field:nth-child(3) {
    grid-column: 2 / 3;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field .field__label {
    width: max-content;
    font-family: "Roboto Mono", monospace;
    font-size: 18rem;
    font-weight: 400;
}

.field .field__input {
    height: 40px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.17);
    padding: 8px;
    outline: none;
    font-family: "Roboto Mono", monospace;
    font-size: 18rem;
    font-weight: 400;
    box-shadow: 4px 5px 4px 0px #00000066;
}

.field__error {
    font-family: "Roboto Mono", monospace;
    font-size: 11rem;
    color: var(--error);
    min-height: 14px;
    display: block;
}

/* ─── PROMO STATUS ────────────────────────────────────────────── */

.promo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.promo-wrapper .field__input {
    width: 100%;
}

.promo-spinner {
    position: absolute;
    right: 8px;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: none;
    animation: spin 0.7s linear infinite;
}

.promo-spinner.visible {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.field__promo-status {
    font-family: "Roboto Mono", monospace;
    font-size: 11rem;
    min-height: 14px;
    display: block;
    transition: color 0.2s ease;
}

.field__promo-status.status-success {
    color: var(--success);
}

.field__promo-status.status-error {
    color: var(--error);
}

/* ─── FORM MESSAGE ────────────────────────────────────────────── */

.form__message {
    width: 100%;
    max-width: 355px;
    padding: 10px 14px;
    border-radius: 4px;
    font-family: "Roboto Mono", monospace;
    font-size: 13rem;
    font-weight: 400;
    line-height: 1.5;
}

.form__message_hidden {
    display: none;
}

.form__message.message-error {
    background-color: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff8888;
}

.form__message.message-success {
    background-color: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #88cc88;
}

/* ─── CHECKBOX ────────────────────────────────────────────────── */

.field.field_checkbox {
    flex-direction: row;
    gap: 8px;
}

.field.field_checkbox .field__input {
    position: absolute;
    opacity: 0;
    z-index: -1;
    width: 18px;
    height: 18px;
}

.field.field_checkbox .field__check {
    position: relative;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid var(--background);
    border-radius: 4px;
    box-shadow: 2px 2px 4px 0px #00000066;
    cursor: pointer;
}

.field.field_checkbox .field__input:checked + .field__check::before,
.field.field_checkbox .field__input:checked + .field__check::after {
    position: absolute;
    content: "";
    background-color: var(--text);
}

.field.field_checkbox .field__input:checked + .field__check::before {
    width: 8px;
    height: 3px;
    transform: rotate(45deg);
    bottom: 5px;
    left: 2px;
}

.field.field_checkbox .field__input:checked + .field__check::after {
    width: 11px;
    height: 3px;
    transform: rotate(-45deg);
    bottom: 7px;
    left: 6px;
}

.field.field_checkbox .field__label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.68);
    font-size: 11rem;
    font-weight: 400;
    cursor: pointer;
}

/* ─── PDF FIELD ───────────────────────────────────────────────── */

.field.field_pdf {
    position: relative;
}

.field.field_pdf label.field__input {
    width: 162px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    text-wrap: nowrap;
    overflow: hidden;
}

.field.field_pdf input.field__input {
    position: absolute;
    bottom: 0;
    opacity: 0;
    z-index: -1;
}

/* ─── FORM FOOTER ─────────────────────────────────────────────── */

.form .form__footer {
    width: 100%;
    display: flex;
    justify-content: end;
}

.form .form__footer .button {
    height: 50px;
    text-transform: capitalize;
}

.form__footer__note {
    font-size: 14px;
    color: aliceblue;
    margin-top: 10px;
}

.form__footer__note_hidden {
    display: none;
}

/* ─── TABLET BREAKPOINT (432px – 1200px) ──────────────────────── */

@media (min-width: 432px) and (max-width: 1200px) {
    html {
        font-size: 0.12vw;
    }

    .header {
        padding: 0 6vw;
        height: 80px;
    }

    .first-block {
        height: calc(100vh - 80px);
    }

    .first-block .first-block__title {
        width: auto;
        max-width: 50vw;
        left: 6vw;
        top: 5vw;
        font-size: 60rem;
    }

    .first-block .first-block__avatar {
        width: 55vw;
        right: 2vw;
    }

    .greetings {
        margin-top: 60px;
        padding: 0 6vw;
    }

    .greetings .greetings__text {
        max-width: 100%;
        font-size: 40rem;
    }

    .greetings .greetings__tags {
        gap: 24px;
        flex-wrap: wrap;
        margin-top: 50px;
    }

    .greetings .greetings__tags .greetings__tags__item {
        font-size: 20rem;
        width: 220px;
        height: 90px;
    }

    .info {
        margin: 80px 6vw 0;
    }

    .info .info__title {
        font-size: 48rem;
    }

    .info .info__subtitle {
        font-size: 16rem;
    }

    .info .info__block {
        gap: 40px;
        min-height: 0;
    }

    .info .info__block .info__block__list {
        font-size: 18rem;
        padding: 0 20px;
    }

    .info .info__block .info__block__footer {
        padding: 0 30px 18px;
    }

    .info .info__block .info__block__footer .info__block__footer__price {
        font-size: 36rem;
        max-width: 50vw;
    }

    .button {
        height: 56px;
        padding: 0 28px;
        font-size: 16rem;
    }

    .footer {
        padding: 0 6vw;
        margin-top: 60px;
    }

    .footer .footer__links {
        width: 100%;
    }

    .footer .footer__links .footer__links__item {
        font-size: 18rem;
    }

    .footer .footer__title {
        font-size: 36rem;
    }

    .footer .footer__subtitle {
        font-size: 22rem;
        margin-top: 30px;
    }

    .footer__mark {
        font-size: 10rem;
    }

    .popup .popup__content {
        width: 90vw;
        max-width: 560px;
    }
}

/* ─── MOBILE BREAKPOINT (≤ 431px) ────────────────────────────── */

@media (max-width: 431px) {
    body {
        padding-bottom: 20px;
    }

    html {
        font-size: 0.5px;
    }

    .header .header__title {
        font-size: 50rem;
    }

    .header .header__links {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--background);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transform: translateX(-100vw);
        transition: transform 0.3s ease-in-out;
        z-index: 1;
    }

    .header .header__links.header__links_active {
        transform: translate(0);
    }

    .header .header__links .header__links__item {
        font-size: 40rem;
    }

    .header .header__links .header__links__close {
        display: initial;
        position: absolute;
        top: 64px;
        right: 15vw;
    }

    .burger {
        display: flex;
    }

    .first-block .first-block__code-background {
        width: initial;
        height: 100vh;
    }

    .first-block .first-block__title {
        width: min-content;
        font-size: 80rem;
    }

    .first-block .first-block__avatar {
        right: 0;
        width: 100vw;
    }

    .greetings .greetings__tags {
        flex-direction: column;
    }

    .greetings .greetings__tags .greetings__tags__item {
        font-size: 50rem;
    }

    .info {
        margin: 50px 10vw 0;
    }

    .info .info__block {
        min-height: 0;
        gap: 20px;
    }

    .info .info__block .info__block__list {
        margin: initial;
    }

    .info .info__block .info__block__list .info__block__list__item {
        margin: 10px 0;
    }

    .info .info__block .info__block__footer {
        padding: 0 30px 10px;
    }

    .info .info__block .info__block__footer .info__block__footer__price {
        font-size: 35rem;
        max-width: 50vw;
    }

    .button {
        height: 40px;
        padding: 0 15px;
    }

    .footer {
        margin-top: 20px;
    }

    .footer .footer__subtitle {
        margin-top: 10px;
    }

    .footer .footer__links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        justify-items: center;
        grid-gap: 15px;
    }

    .footer .footer__links .footer__links__item {
        font-size: 40rem;
    }

    .popup .popup__content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        overflow-y: auto;
        border: none;
    }

    .form {
        flex: 1 1 0;
        justify-content: center;
    }

    .form .form__footer .button {
        height: 50px;
        width: 100px;
        justify-content: center;
    }

    .form .form__fields-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
