/* Screens for signed-out visitors. Nova's own stylesheet is served behind
   Authenticate, so these pages carry their own copy of the font and palette. */
@font-face {
    font-family: 'Leelawadee';
    src: url('/fonts/leelawadee-regular.woff2') format('woff2');
    font-weight: 100 550;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Leelawadee';
    src: url('/fonts/leelawadee-bold.woff2') format('woff2');
    font-weight: 551 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --sage: #e6edd4;
    --sage-deep: #dbe4c4;
    --illu: #e8edd8;
    --white: #ffffff;
    --ink: #304b53;
    --ink2: #4b6269;
    --ink3: #7a878c;
    --line: #e6e8ea;
    --line2: #cfd4d7;
    --orange: #ec5d38;
    --orange-hov: #ff3800;
    --orange-soft: #fdece7;
    --success: #2a9134;
    --red: #c9352a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: 'Leelawadee', 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.auth {
    display: flex;
    min-height: 100vh;
}

.auth-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.auth-head {
    height: 78px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 64px;
}

.auth-head img {
    height: 25px;
    width: auto;
    display: block;
}

.auth-switch {
    font-size: 14px;
    color: var(--ink2);
}

.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 64px;
    overflow: hidden;
}

.auth-col {
    width: 404px;
}

.auth-foot {
    height: 62px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 64px;
}

.auth-pitch {
    width: 520px;
    flex-shrink: 0;
    background-color: var(--illu);
    background-image: url('/img/register.svg');
    background-size: auto 92%;
    background-position: center bottom;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Signing in and registering carry the illustration; the screens you only
   pass through once are quiet and centred instead. */
.auth.is-centered .auth-pitch {
    display: none;
}

.auth.is-centered .auth-body {
    justify-content: center;
}

.auth.is-centered .auth-head,
.auth.is-centered .auth-foot {
    padding: 0 40px;
}

.auth.is-centered .auth-foot {
    justify-content: center;
}

/* Type */
h1.auth-title {
    margin: 0 0 26px;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ink);
}

h1.auth-title-sm {
    margin: 0;
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--ink);
}

.auth-lead {
    margin: 8px 0 26px;
    font-size: 15.5px;
    color: var(--ink2);
    line-height: 1.5;
}

.auth-note {
    margin: 16px 0 0;
    font-size: 13px;
    color: var(--ink3);
    line-height: 1.5;
}

a.auth-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--orange);
    text-decoration: none;
    cursor: pointer;
}

a.auth-link:hover {
    color: var(--orange-hov);
}

a.auth-link-sm {
    font-size: 13.5px;
}

/* Fields */
.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
}

.auth-field input {
    flex: 1;
    width: 100%;
    height: 48px;
    border-radius: 8px;
    border: 1px solid var(--line2);
    background: var(--white);
    padding: 0 14px;
    font-size: 15.5px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
}

.auth-field input::placeholder {
    color: var(--ink3);
}

.auth-field input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}

.auth-field input.has-error {
    border-color: var(--red);
}

.auth-field input.has-reveal {
    padding-right: 46px;
}

.auth-reveal {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--ink3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 7px 0 0;
    color: var(--red);
    font-size: 13.5px;
    font-weight: 600;
}

.auth-error svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Buttons */
.auth-btn {
    height: 50px;
    width: 100%;
    border-radius: 8px;
    border: none;
    font-size: 15.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
}

.auth-btn-primary {
    background: var(--orange);
    color: var(--white);
}

.auth-btn-primary:hover {
    background: var(--orange-hov);
}

.auth-btn-soft {
    background: var(--sage);
    color: var(--ink);
}

.auth-btn-soft:hover {
    background: var(--sage-deep);
}

.auth-btn-danger {
    background: var(--red);
    color: var(--white);
}

.auth-btn-danger:hover {
    background: #b02d23;
}

.auth-btn[disabled],
.auth-btn.is-busy {
    opacity: 0.6;
    cursor: default;
}

/* The rescue path out of "email already taken" - outline, not filled, because
   it is not this screen's main action. */
.auth-btn-handoff {
    margin-top: -8px;
    height: 44px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--orange);
    background: var(--orange-soft);
    color: var(--orange);
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
}

.auth-divider span:first-child,
.auth-divider span:last-child {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-divider em {
    font-size: 13px;
    font-style: normal;
    color: var(--ink3);
}

.only-phone {
    display: none;
}

/* Language pills */
.auth-langs {
    display: flex;
    gap: 4px;
    background: var(--sage);
    border-radius: 999px;
    padding: 3px;
}

.auth-langs a {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink2);
    text-decoration: none;
}

.auth-langs a.is-active {
    background: var(--white);
    color: var(--ink);
}

.auth-status {
    margin: -12px 0 22px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--success);
}

/* Sent confirmation */
.auth-sent-head {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--success);
}

.auth-sent-text {
    margin: 12px 0 22px;
    font-size: 15.5px;
    color: var(--ink2);
    line-height: 1.55;
}

.auth-sent-text strong {
    color: var(--ink);
}

/* Phone: no room for the illustration, so the form moves into cards. */
@media (max-width: 900px) {
    .auth {
        background: var(--sage);
    }

    .auth-pitch {
        display: none;
    }

    .auth-main {
        padding: 30px 20px 24px;
    }

    .auth-head {
        height: auto;
        padding: 6px 0 18px;
        justify-content: center;
    }

    .auth-head img {
        height: 23px;
    }

    .auth-head .auth-switch {
        display: none;
    }

    .auth-body {
        flex: 0 0 auto;
        display: block;
        padding: 0;
        overflow: visible;
    }

    .auth-col {
        width: 100%;
    }

    .auth-card {
        background: var(--white);
        border-radius: 14px;
        padding: 24px 20px;
    }

    h1.auth-title {
        margin: 0 0 22px;
        font-size: 24px;
        letter-spacing: -0.4px;
    }

    .auth-fields {
        gap: 16px;
    }

    .auth-aside {
        background: var(--white);
        border-radius: 14px;
        padding: 18px 20px;
        margin-top: 14px;
    }

    .auth-aside-title {
        font-size: 14.5px;
        font-weight: 700;
        margin-bottom: 14px;
    }

    /* On desktop the second way in is a divider plus a button inside the form
       column; on a phone it is the card below, so the pair goes away. */
    .auth-divider,
    .auth-btn-alt {
        display: none;
    }

    .auth-foot {
        height: auto;
        margin-top: auto;
        padding: 20px 0 0;
        justify-content: center;
    }

    .auth-langs a {
        padding: 5px 11px;
        font-size: 12.5px;
    }

    .only-wide {
        display: none;
    }

    .only-phone {
        display: inline;
        font-size: 13px;
    }
}

@media (min-width: 901px) {
    .auth-aside {
        display: none;
    }
}
