@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/outfit-latin-wght-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
}

:root {
    --color-navy: #002038;
    --color-navy-soft: #0a2c47;
    --color-teal: #00b2b0;
    --color-teal-dark: #007c7a;
    --color-teal-light: #cdefee;
    --color-page: #f1f5f9;
    --color-surface: #ffffff;
    --color-border: #d5dde5;
    --color-text: #002038;
    --color-text-muted: #52647a;
    --color-icon: #7a8a99;
    --color-danger: #b42318;
    --color-danger-light: #fde7e4;
    --font-heading: 'Outfit', Arial, sans-serif;
    --font-body: 'Atkinson Hyperlegible', Arial, sans-serif;
    --radius: 10px;
}

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

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-page);
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.link {
    color: var(--color-teal-dark);
    font-weight: 700;
    text-decoration: none;
}

.link:hover,
.link:focus-visible {
    text-decoration: underline;
}

/* Auth screens: text on the left, form on the right */

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

.auth-aside {
    position: relative;
    flex: 0 0 43%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    overflow: hidden;
    color: #ffffff;
    background: var(--color-navy);
}

.auth-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--color-navy-soft);
}

.auth-circle-top {
    top: -200px;
    right: -200px;
    width: 420px;
    height: 420px;
}

.auth-circle-bottom {
    right: -160px;
    bottom: -300px;
    width: 480px;
    height: 480px;
}

.auth-logo {
    position: relative;
    display: block;
    width: 300px;
    max-width: 100%;
    height: auto;
}

.auth-pitch,
.auth-benefits {
    position: relative;
}

.auth-headline {
    margin: 0 0 16px;
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    line-height: 1.15;
}

.auth-tagline {
    max-width: 400px;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #c5d2de;
}

.auth-benefits {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #e6edf3;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.auth-benefits .icon {
    color: var(--color-teal);
}

.auth-main {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 32px 32px;
}

.locale-switcher {
    position: absolute;
    top: 24px;
    right: 32px;
    display: flex;
    gap: 4px;
}

.locale-switcher a {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: none;
}

.locale-switcher a:hover,
.locale-switcher a:focus-visible {
    background: #e3e9ef;
    color: var(--color-navy);
}

.locale-switcher a.is-active {
    background: var(--color-navy);
    color: #ffffff;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.auth-title {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
}

.auth-subtitle {
    margin: 0 0 28px;
    color: var(--color-text-muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.input-with-icon {
    position: relative;
    color: var(--color-icon);
}

.input-with-icon > .icon {
    position: absolute;
    top: 13px;
    left: 13px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    background: var(--color-surface);
}

.form-input.has-toggle {
    padding-right: 44px;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px var(--color-teal-light);
}

.form-input.is-invalid {
    border-color: var(--color-danger);
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--color-danger-light);
}

.form-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--color-danger);
}

.password-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--color-icon);
    background: none;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--color-navy);
    background: #eef2f6;
}

.password-toggle-slash {
    display: none;
}

.password-toggle.is-revealed .password-toggle-slash {
    display: inline;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--color-navy);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-navy);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-navy-soft);
}

.btn-primary:focus-visible,
.password-toggle:focus-visible,
.locale-switcher a:focus-visible,
.icon-button:focus-visible {
    outline: 2px solid var(--color-teal);
    outline-offset: 2px;
}

.auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0;
    font-size: 12px;
    color: var(--color-icon);
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-footer {
    margin: 0;
    font-size: 14px;
    text-align: center;
    color: var(--color-text-muted);
}

/* The logo file has an opaque navy background: keep the top circle away from it on narrow panels */
@media (max-width: 1100px) {
    .auth-circle-top {
        display: none;
    }

    .auth-aside {
        padding: 40px;
    }

    .auth-headline {
        font-size: 30px;
    }
}

@media (max-width: 760px) {
    .auth-layout {
        flex-direction: column;
    }

    .auth-aside {
        flex: none;
        padding: 20px 24px;
    }

    .auth-pitch,
    .auth-benefits,
    .auth-circle {
        display: none;
    }

    .auth-logo {
        width: 220px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 64px 24px 32px;
    }

    .locale-switcher {
        top: 16px;
        right: 24px;
    }
}

/* Temporary page shown after login until the real home screen exists */

.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    background: var(--color-surface);
}

.placeholder-page img {
    max-width: 100%;
    height: auto;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-navy);
    background: var(--color-surface);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--color-page);
}
