@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #0a1931;
    --blue: #94b5de;
    --slate: #6c7c90;
    --light: #ebecf0;
    --gold: #8b745a;

    --white: #ffffff;
    --text: #18263b;
    --muted: #7b8797;
    --border: #dfe4eb;
    --danger: #b75c5c;
    --success: #527d69;

    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;

    background: var(--light);
    color: var(--text);

    font-family: 'Nunito Sans', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

.reset-page {
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(480px, 1.05fr);

    min-height: 100vh;
    overflow: hidden;
}

.reset-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 100vh;
    padding: 64px clamp(40px, 6vw, 100px);

    overflow: hidden;
    isolation: isolate;

    background: var(--navy);
}

.reset-shape {
    position: absolute;
    z-index: -1;

    width: 440px;
    height: 440px;

    right: -210px;
    top: -150px;

    border: 1px solid rgba(148, 181, 222, 0.16);
    border-radius: 50%;

    animation: resetFloat 12s ease-in-out infinite;
}

.reset-shape::after {
    content: '';

    position: absolute;
    inset: 35px;

    border: 1px solid rgba(139, 116, 90, 0.22);
    border-radius: 50%;
}

.reset-shape-two {
    width: 300px;
    height: 300px;

    right: -110px;
    top: 210px;

    border-color: rgba(139, 116, 90, 0.15);

    animation-delay: -4s;
    animation-duration: 15s;
}

.reset-brand-content {
    max-width: 510px;
    margin: auto 0;

    animation: resetEntrance 800ms ease both;
}

.reset-logo {
    display: block;
    width: min(100%, 440px);
    height: auto;
}

.reset-divider {
    width: 58px;
    height: 2px;
    margin: 48px 0 26px;

    background: var(--gold);
}

.reset-eyebrow,
.reset-kicker {
    display: block;

    margin: 0;

    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.reset-brand-content h1 {
    max-width: 430px;
    margin: 18px 0 22px;

    color: var(--white);

    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(38px, 3.5vw, 58px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.reset-brand-content p {
    max-width: 390px;
    margin: 0;

    color: rgba(235, 236, 240, 0.68);
    font-size: 15px;
    line-height: 1.8;
}

.reset-brand-footer {
    color: rgba(235, 236, 240, 0.42);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.reset-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 48px 32px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(148, 181, 222, 0.13),
            transparent 28%
        ),
        var(--light);
}

.reset-container {
    width: 100%;
    max-width: 430px;

    animation: resetEntrance 800ms 100ms ease both;
}

.reset-mobile-brand {
    display: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 42px;

    color: var(--slate);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;

    transition: color 180ms ease;
}

.back-link:hover {
    color: var(--navy);
}

.back-link svg {
    width: 17px;
    height: 17px;
}

.reset-heading {
    margin-bottom: 36px;
}

.reset-heading h2 {
    margin: 15px 0 12px;

    color: var(--navy);

    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(34px, 3vw, 44px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.reset-heading p {
    max-width: 390px;
    margin: 0;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.reset-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reset-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.reset-field label {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

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

.reset-input-icon {
    position: absolute;
    left: 17px;

    width: 19px;
    height: 19px;

    color: var(--slate);
    pointer-events: none;
}

.reset-input-wrapper input {
    width: 100%;
    height: 56px;

    padding: 0 48px 0 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;

    background: rgba(255, 255, 255, 0.84);
    color: var(--text);

    font-size: 14px;

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.reset-input-wrapper input:has(+ .reset-toggle-password) {
    padding-right: 52px;
}

.reset-input-icon + input {
    padding-left: 50px;
}

.reset-input-wrapper input::placeholder {
    color: #a3adba;
}

.reset-input-wrapper input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(148, 181, 222, 0.2);
}

.reset-toggle-password {
    position: absolute;
    right: 12px;

    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: var(--slate);
}

.reset-toggle-password:hover {
    background: var(--light);
    color: var(--navy);
}

.reset-toggle-password svg {
    width: 19px;
    height: 19px;
}

.reset-field-error {
    min-height: 0;

    color: var(--danger);
    font-size: 11px;
    font-weight: 700;
}

.reset-field.has-error .reset-input-wrapper input {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(183, 92, 92, 0.08);
}

.reset-alert {
    display: none;

    padding: 13px 15px;

    border: 1px solid rgba(183, 92, 92, 0.2);
    border-radius: 12px;

    background: rgba(183, 92, 92, 0.07);
    color: var(--danger);

    font-size: 12px;
    line-height: 1.5;
}

.reset-alert.is-visible {
    display: block;
    animation: resetAlertEntrance 250ms ease both;
}

.reset-success {
    display: none;
    align-items: flex-start;
    gap: 12px;

    padding: 15px;

    border: 1px solid rgba(82, 125, 105, 0.2);
    border-radius: 12px;

    background: rgba(82, 125, 105, 0.07);
    color: var(--success);

    font-size: 12px;
    line-height: 1.5;
}

.reset-success.is-visible {
    display: flex;
    animation: resetAlertEntrance 250ms ease both;
}

.reset-success strong,
.reset-success span {
    display: block;
}

.reset-success strong {
    margin-bottom: 2px;
    font-size: 12px;
}

.reset-success span {
    color: #668174;
    font-size: 11px;
}

.reset-success-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;

    width: 24px;
    height: 24px;

    border-radius: 50%;

    background: rgba(82, 125, 105, 0.13);
}

.reset-success-icon svg {
    width: 15px;
    height: 15px;
}

.reset-button {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    width: 100%;
    height: 58px;

    margin-top: 3px;

    border: 1px solid var(--navy);
    border-radius: var(--radius);

    background: var(--navy);
    color: var(--white);

    font-size: 13px;
    font-weight: 800;

    overflow: hidden;

    transition:
        transform 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.reset-button:hover {
    background: #122746;
    box-shadow: 0 12px 25px rgba(10, 25, 49, 0.16);
    transform: translateY(-1px);
}

.reset-button:active {
    transform: translateY(0);
}

.reset-button:disabled {
    cursor: wait;
}

.reset-button-arrow {
    width: 19px;
    height: 19px;

    transition: transform 180ms ease;
}

.reset-button:hover .reset-button-arrow {
    transform: translateX(3px);
}

.reset-button-loading {
    display: none;
    align-items: center;
    gap: 10px;
}

.reset-spinner {
    width: 16px;
    height: 16px;

    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;

    animation: resetSpin 700ms linear infinite;
}

.reset-button.is-loading .reset-button-label,
.reset-button.is-loading .reset-button-arrow {
    display: none;
}

.reset-button.is-loading .reset-button-loading {
    display: inline-flex;
}

.reset-footer {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-top: 42px;

    color: #a4adba;
    font-size: 11px;
    text-align: center;
}

.reset-footer-line {
    flex: 1;
    height: 1px;
    background: #dce1e8;
}

@keyframes resetEntrance {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes resetAlertEntrance {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes resetFloat {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-18px, 20px) rotate(8deg);
    }
}

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

@media (max-width: 1050px) {
    .reset-page {
        grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
    }

    .reset-brand-panel {
        padding: 48px;
    }

    .reset-logo {
        width: 100%;
    }

    .reset-brand-content h1 {
        font-size: 42px;
    }
}

@media (max-width: 760px) {
    .reset-page {
        display: block;
        min-height: 100vh;
    }

    .reset-brand-panel {
        display: none;
    }

    .reset-form-panel {
        align-items: flex-start;
        min-height: 100vh;
        padding: 34px 22px 28px;
    }

    .reset-container {
        max-width: 480px;
        margin: 0 auto;
    }

    .reset-mobile-brand {
        display: flex;
        justify-content: center;
        align-items: center;

        width: calc(100% + 44px);
        min-height: 148px;

        margin: -34px -22px 42px;

        padding: 28px 22px;

        background: var(--navy);

        overflow: hidden;
    }

    .reset-mobile-logo {
        display: block;
        width: min(100%, 310px);
        height: auto;
    }

    .back-link {
        margin-bottom: 34px;
    }

    .reset-heading {
        margin-bottom: 32px;
    }

    .reset-form {
        gap: 23px;
    }

    .reset-footer {
        margin-top: 36px;
    }
}

@media (max-width: 420px) {
    .reset-form-panel {
        padding: 26px 18px 24px;
    }

    .reset-mobile-brand {
        width: calc(100% + 36px);
        min-height: 132px;

        margin: -26px -18px 36px;

        padding: 24px 18px;
    }

    .reset-mobile-logo {
        width: 270px;
    }

    .reset-heading h2 {
        font-size: 32px;
    }

    .reset-heading p {
        font-size: 13px;
    }

    .reset-footer {
        gap: 9px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
