:root {
    --astro-email-bg: #000520;
    --astro-email-panel: #18296c;
    --astro-email-accent: #e3f16e;
    --astro-email-text: #ffffff;
    --astro-email-muted: #9e9e9e;
    --astro-email-input-border: #d4d4d4;
}

html {
    background: #101010;
}

.astro-email__shell {
    background: var(--astro-email-bg);
}

.astro-email__shell::after {
    content: "";
    position: absolute;
    inset: 434px 0 0;
    background: var(--astro-email-panel);
    z-index: 0;
    pointer-events: none;
}

.astro-email__back img {
    width: 25px;
    height: 25px;
}

.astro-email__panel {
    width: calc(100% + 64px);
    margin-top: 306px;
    margin-left: -32px;
    padding: 70px 72px 40px;
    background: var(--astro-email-panel);
    border-radius: 120px 120px 0 0;
}

.astro-email__title-wrap {
    position: absolute;
    top: 60px;
    left: 50%;
    width: min(320px, calc(100% - 80px));
    transform: translateX(-50%);
}

.astro-email__title {
    margin: 10px 0 0;
    color: var(--astro-email-text);
    font-family: "Oblata Display", "Times New Roman", Georgia, serif;
    font-size: 64px;
    line-height: 52px;
    font-weight: 400;
    text-align: center;
    letter-spacing: -0.15px;
}

.astro-flow__header-art {
    inset: 24px auto auto 0;
}

.astro-email__title span {
    display: block;
}

.astro-email__title-underline {
    position: absolute;
    left: -12px;
    bottom: -4px;
    width: 145px;
    height: auto;
}

.astro-email__error {
    position: absolute;
    top: 170px;
    left: 50%;
    width: min(320px, calc(100% - 80px));
    margin: 0;
    transform: translateX(-50%);
    color: #ffe2e2;
    text-align: center;
    font-size: 13px;
    line-height: 18px;
}

.astro-email__form {
    position: absolute;
    top: 240px;
    left: 50%;
    width: min(360px, calc(100% - 80px));
    transform: translateX(-50%);
}

.astro-email__field {
    display: block;
}

.astro-email__input {
    width: 100%;
    height: 58px;
    padding: 16px;
    border: 1px solid var(--astro-email-input-border);
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.astro-email__input::placeholder {
    color: #a3a3a3;
    opacity: 1;
}

.astro-email__input:focus {
    border-color: #b9c3ff;
    box-shadow: 0 0 0 4px rgba(227, 241, 110, 0.12);
}

.astro-email__submit {
    display: flex;
    justify-content: center;
    margin: 64px auto 0;
}

.astro-email__submit img {
    display: block;
    width: 85px;
    height: 85px;
}

.astro-email__legal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 470px;
    left: 50%;
    width: min(316px, calc(100% - 80px));
    margin: 0;
    transform: translateX(-50%);
    color: var(--astro-email-muted);
    text-align: center;
}

.astro-email__legal span {
    display: inline-block;
    text-align: center;
}

.astro-email__legal img {
    width: 11px;
    height: 12px;
    flex: 0 0 auto;
}

@media (min-width: 381px) {
    body.astro-email-page {
        overflow: hidden;
    }

    .astro-email__shell {
        --astro-email-panel-top: clamp(152px, calc(29vh + 45px), 306px);
        --astro-email-panel-padding-top: clamp(24px, calc(9vh - 20px), 60px);
        --astro-email-panel-padding-bottom: clamp(10px, calc(4vh - 8px), 24px);
        --astro-email-side-gap: clamp(32px, 8vw, 40px);
        --astro-email-title-gap: clamp(16px, calc(7vh - 18px), 42px);
        --astro-email-form-gap: clamp(16px, calc(6vh - 14px), 40px);
        --astro-email-legal-gap: clamp(8px, calc(2.5vh - 4px), 18px);
        --astro-email-error-gap: clamp(8px, calc(2.4vh - 4px), 14px);
        --astro-email-panel-top: clamp(152px, calc(29svh + 45px), 306px);
        --astro-email-panel-padding-top: clamp(24px, calc(9svh - 20px), 60px);
        --astro-email-panel-padding-bottom: clamp(10px, calc(4svh - 8px), 24px);
        --astro-email-title-gap: clamp(16px, calc(7svh - 18px), 42px);
        --astro-email-form-gap: clamp(16px, calc(6svh - 14px), 40px);
        --astro-email-legal-gap: clamp(8px, calc(2.5svh - 4px), 18px);
        --astro-email-error-gap: clamp(8px, calc(2.4svh - 4px), 14px);
        height: 100vh;
        height: 100svh;
        min-height: 0;
    }

    .astro-email__shell::after {
        inset: clamp(338px, calc(var(--astro-email-panel-top) + 128px), 434px) 0 0;
    }

    .astro-email__panel {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: calc(100% - var(--astro-email-panel-top));
        min-height: 0;
        margin-top: var(--astro-email-panel-top);
        padding: 70px 72px 40px;
    }

    .astro-email__title-wrap {
        position: relative;
        top: auto;
        left: auto;
        width: min(320px, 100%);
        margin: 0 0 var(--astro-email-title-gap);
        transform: none;
    }

    .astro-email__title {
        margin: 0;
        font-size: clamp(38px, calc(4.3vh + 23px), 64px);
        line-height: clamp(40px, calc(3.7vh + 20px), 52px);
        font-size: clamp(38px, calc(4.3svh + 23px), 64px);
        line-height: clamp(40px, calc(3.7svh + 20px), 52px);
    }

    .astro-email__title-underline {
        left: 8px;
    }

    .astro-email__error {
        position: relative;
        top: auto;
        left: auto;
        width: min(320px, 100%);
        margin: 0 0 var(--astro-email-error-gap);
        transform: none;
    }

    .astro-email__form {
        position: relative;
        top: auto;
        left: auto;
        flex: 1 1 auto;
        display: grid;
        grid-template-rows: auto minmax(var(--astro-email-form-gap), 1fr) auto;
        align-items: center;
        width: min(360px, 100%);
        min-height: calc(143px + var(--astro-email-form-gap));
        transform: none;
    }

    .astro-email__field {
        width: 100%;
        grid-row: 1;
    }

    .astro-email__submit {
        grid-row: 3;
        margin: 0 auto;
    }

    .astro-email__legal {
        position: relative;
        top: auto;
        left: auto;
        width: min(316px, 100%);
        margin: var(--astro-email-legal-gap) auto 0;
        transform: none;
    }
}

@media (min-width: 381px) and (max-width: 400px) {
    .astro-email__shell {
        --astro-email-panel-top: clamp(146px, calc(26vh + 34px), 220px);
        --astro-email-panel-padding-top: clamp(18px, calc(7vh - 10px), 50px);
        --astro-email-panel-padding-bottom: clamp(8px, calc(3vh - 4px), 15px);
        --astro-email-side-gap: 32px;
        --astro-email-title-gap: clamp(14px, calc(5vh - 6px), 28px);
        --astro-email-form-gap: clamp(14px, calc(5vh - 2px), 30px);
        --astro-email-legal-gap: clamp(8px, calc(2vh - 2px), 14px);
        --astro-email-error-gap: clamp(6px, calc(2vh - 3px), 12px);
        --astro-email-panel-top: clamp(146px, calc(26svh + 34px), 220px);
        --astro-email-panel-padding-top: clamp(18px, calc(7svh - 10px), 50px);
        --astro-email-panel-padding-bottom: clamp(8px, calc(3svh - 4px), 15px);
        --astro-email-title-gap: clamp(14px, calc(5svh - 6px), 28px);
        --astro-email-form-gap: clamp(14px, calc(5svh - 2px), 30px);
        --astro-email-legal-gap: clamp(8px, calc(2svh - 2px), 14px);
        --astro-email-error-gap: clamp(6px, calc(2svh - 3px), 12px);
    }

    .astro-email__panel {
        width: calc(100% + 48px);
        margin-left: -24px;
        border-radius: 92px 92px 0 0;
    }

    .astro-email__title {
        font-size: clamp(34px, calc(4.5vh + 17px), 54px);
        line-height: clamp(36px, calc(4vh + 14px), 46px);
        font-size: clamp(34px, calc(4.5svh + 17px), 54px);
        line-height: clamp(36px, calc(4svh + 14px), 46px);
    }

    .astro-email__title-wrap,
    .astro-email__error,
    .astro-email__form,
    .astro-email__legal {
        width: 100%;
    }
}

@media (min-width: 381px) and (max-height: 600px) {
    .astro-email__shell {
        --astro-email-panel-top: clamp(108px, calc(18vh + 26px), 154px);
        --astro-email-panel-padding-top: 20px;
        --astro-email-panel-padding-bottom: 10px;
        --astro-email-title-gap: 14px;
        --astro-email-form-gap: 16px;
        --astro-email-legal-gap: 10px;
        --astro-email-error-gap: 8px;
        --astro-email-panel-top: clamp(108px, calc(18svh + 26px), 154px);
    }

    .astro-email__input {
        height: 56px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .astro-email__submit img {
        width: 80px;
        height: 80px;
    }

    .astro-email__form {
        min-height: calc(136px + var(--astro-email-form-gap));
    }
}

@media (min-width: 381px) and (max-height: 380px) {
    .astro-email__shell {
        --astro-email-panel-top: clamp(20px, calc(8vh - 2px), 34px);
        --astro-email-panel-padding-top: 8px;
        --astro-email-panel-padding-bottom: 8px;
        --astro-email-title-gap: 8px;
        --astro-email-form-gap: 8px;
        --astro-email-legal-gap: 4px;
        --astro-email-error-gap: 4px;
        --astro-email-panel-top: clamp(20px, calc(8svh - 2px), 34px);
    }

    .astro-email__title {
        font-size: 28px;
        line-height: 30px;
    }

    .astro-email__title-underline {
        width: 92px;
        left: 63px;
    }

    .astro-email__input {
        height: 48px;
        padding: 12px 14px;
    }

    .astro-email__submit img {
        width: 64px;
        height: 64px;
    }

    .astro-email__form {
        min-height: calc(112px + var(--astro-email-form-gap));
    }

    .astro-email__legal {
        font-size: 11px;
        line-height: 14px;
    }
}

@media (max-width: 380px) {
    body.astro-email-page {
        overflow: visible;
    }

    .astro-email__shell {
        height: auto;
        min-height: 0;
    }

    .astro-email__shell::after {
        inset: 408px 0 0;
    }

    .astro-email__panel {
        width: calc(100% + 48px);
        margin-top: 240px;
        margin-left: -24px;
        padding: 50px 56px 15px;
        border-radius: 92px 92px 0 0;
    }

    .astro-email__title-wrap {
        position: relative;
        top: auto;
        left: auto;
        width: 285px;
        max-width: 100%;
        margin: 0 auto 40px;
        transform: none;
    }

    .astro-email__title {
        margin-top: 0;
        font-size: 54px;
        line-height: 46px;
    }

    .astro-email__error {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        margin: 0 0 18px;
        transform: none;
    }

    .astro-email__form {
        position: static;
        top: auto;
        left: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        width: 100%;
        min-height: 0;
        transform: none;
    }

    .astro-email__submit {
        display: flex;
        margin-top: 0;
    }

    .astro-email__legal {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        margin: 25px auto 0;
        transform: none;
    }

    .astro-email__field {
        width: 100%;
    }

    .astro-email__title-underline {
        left: 8px;
        width: 130px;
    }
}
