:root {
    --bg: #F2F0ED;
    --gold: #C09C5E;
    --red: #EA222F;
    --neutral-50: #282828;
    --neutral-400: #B7B7B7;
    --font: "Bliss Pro", "Segoe UI", Arial, sans-serif;
}

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

html, body {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 49px 16px;
    font-family: var(--font);
}

/* Арка: тонкая внешняя рамка + толстая внутренняя */
.arch {
    position: relative;
    width: 475px;
    max-width: 100%;
    min-height: 703px;
    border: 3px solid var(--gold);
    border-radius: 800px 800px 0 0;
}

/* Внутренняя рамка — золотая «фольга»: градиент, вырезанный маской в кольцо */
.arch::before {
    content: "";
    position: absolute;
    inset: 4px 5px 2px;
    padding: 8px;
    border-radius: 800px 800px 0 0;
    background: linear-gradient(160deg, #C9A04A 0%, #F6D77A 18%, #D9AE4C 34%, #FBE08A 50%, #C99A3E 66%, #F4D06C 82%, #D4A947 100%);
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

.arch__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 342px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
    padding: 167px 0 40px;
}

.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 19px;
    width: 314px;
    max-width: 100%;
}

.logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 23px;
}

.logos img {
    display: block;
}

.intro__text {
    margin: 0;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.35;
    color: var(--gold);
    text-align: center;
    text-wrap: balance;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.login-form__error {
    margin: 0 0 -18px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--red);
    text-align: center;
}

.field__input,
.login-form__button {
    width: 100%;
    height: 48px;
    border-radius: 20px;
    background: var(--bg);
    font-family: inherit;
}

/* Поле с подписью, которая уезжает наверх после клика */
.field {
    position: relative;
    display: block;
}

.field__input {
    display: block;
    padding: 0 20px;
    border: 1px solid var(--neutral-400);
    font-size: 16px;
    color: var(--neutral-50);
    outline: none;
    transition: padding 0.2s ease;
}

.field__input::placeholder {
    color: transparent;
    transition: color 0.2s ease;
}

.field__label {
    position: absolute;
    left: 20px;
    top: 50%;
    translate: 0 -50%;
    font-size: 16px;
    line-height: 1;
    color: var(--neutral-50);
    pointer-events: none;
    transition: top 0.2s ease, translate 0.2s ease, font-size 0.2s ease;
}

.field:is(:focus-within, .is-touched, :has(.field__input:not(:placeholder-shown))) .field__input {
    padding-top: 14px;
}

.field:is(:focus-within, .is-touched, :has(.field__input:not(:placeholder-shown))) .field__input::placeholder {
    color: var(--neutral-400);
}

.field:is(:focus-within, .is-touched, :has(.field__input:not(:placeholder-shown))) .field__label {
    top: 8px;
    translate: 0 0;
    font-size: 10px;
}

.login-form__button {
    border: 2px solid var(--red);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red);
    cursor: pointer;
}

.login-form__button:hover {
    background: var(--red);
    color: var(--bg);
}

.support {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 1px;
    color: var(--gold);
    text-align: center;
}

.support p {
    margin: 0;
}

.support__contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 31px;
    height: 24px;
    font-weight: 300;
}

.support__contacts a {
    color: inherit;
    text-decoration: none;
}

.support__contacts a[href^="mailto"] {
    text-decoration: underline;
}

/* ---------- 480–767 (макет 480): поменьше подпись ---------- */

@media (max-width: 767px) {
    .intro__text { font-size: 14px; }
}

/* ---------- 360–479 (макет 360): арка 329×615, логотипы и форма компактнее ---------- */

@media (max-width: 479px) {
    body { padding: 43px 16px; }

    .arch { min-height: 615px; }

    .arch__content {
        gap: 32px;
        width: 272px;
        padding: 137px 0 34px;
    }

    .intro { gap: 16px; width: 245px; }

    .logos img:nth-child(1) { width: 122px; height: auto; }
    .logos img:nth-child(2) { width: 14px; height: auto; }
    .logos img:nth-child(3) { width: 63px; height: auto; }

    .login-form { gap: 24px; }

    .field__input,
    .login-form__button { height: 38px; }

    .login-form__button { font-size: 16px; }

    .support { gap: 8px; width: 204px; }

    .support__contacts {
        flex-direction: column;
        gap: 8px;
        height: auto;
    }
}
