/*
 * Kinnu look for the auth server's pages. Tokens and measurements from the Kinnu design kit
 * and kinnu-web's sign-in (layouts/onboarding.vue, onboarding/ContentCard.vue,
 * signIn/Methods.vue, signIn/EnterMagicCode.vue). Plain CSS: the auth server has no Tailwind.
 */

:root {
    --font-header: "Zilla Slab", serif;
    --font-body: "Figtree", sans-serif;

    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-beige-100: #FFFAF2;
    --color-beige-300: #C6BFB1;
    --color-beige-500: #AEA390;
    --color-gray-100: #F7F7F7;
    --color-gray-400: #B2B2B2;
    --color-gray-600: #666666;
    --color-error: #E15262;
    --color-success: #3EA685;
    --color-section-divider: rgba(0, 0, 0, 0.1);
}

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

html, body { margin: 0; padding: 0; }

/* Page: warm paper with the subtle raster. */
body {
    min-height: 100dvh;
    background-color: var(--color-beige-100);
    background-image: url("/img/raster_40x40_30.png");
    background-size: 20px 20px;
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 22px;
    -webkit-font-smoothing: antialiased;
}

/* Type scale (headers are never bold). */
.text-h34 { font-family: var(--font-header); font-size: 34px; line-height: 42px; font-weight: 400; }
.text-h20 { font-family: var(--font-header); font-size: 20px; line-height: 26px; font-weight: 400; }
.text-p16 { font-family: var(--font-body); font-size: 16px; line-height: 22px; }
.text-p14 { font-family: var(--font-body); font-size: 14px; line-height: 20px; }
.bold { font-weight: 700; }

h1, h2, p { margin: 0; }

/* Logo, top left like kinnu-web's onboarding layout. */
.logo {
    position: fixed;
    top: 30px;
    left: 30px;
    width: 20px;
    height: 20px;
}
.logo img { width: 100%; height: 100%; display: block; }

/* Page column: title above the card. */
.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 98px 30px 60px;
}
.page-title {
    text-align: center;
    margin-bottom: 24px;
}

/* White card, lifted off the raster. */
.card {
    background: var(--color-white);
    border-radius: 20px;
    width: 100%;
    min-width: 0;
    max-width: 500px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.stack { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; }

/* Form controls. */
.input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 12px 16px;
    border: 1px solid var(--color-gray-400);
    border-radius: 10px;
    background: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-body);
    font-size: 16px;
    outline: none;
}
.input::placeholder { color: var(--color-gray-400); }
.input:focus { border-color: var(--color-black); box-shadow: 0 0 0 1px var(--color-black); }
.input.has-error { border-color: var(--color-error); }

.field-error {
    color: var(--color-error);
    font-size: 0.8rem;
    line-height: 1.2rem;
    text-align: right;
    margin-top: 6px;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    margin-top: 20px;
    padding: 0 24px;
    border: 1px solid var(--color-black);
    border-radius: 10px;
    background: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { opacity: 0.88; }
.button:focus-visible { outline: 2px solid var(--color-black); outline-offset: 2px; }

/* Secondary: outlined. */
.button.secondary {
    background: transparent;
    color: var(--color-black);
}

.link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.notice {
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--color-gray-100);
    font-size: 14px;
    line-height: 20px;
}
.notice.error { color: var(--color-error); }

.divider {
    border: 0;
    border-top: 1px solid var(--color-section-divider);
    margin: 0;
    width: 100%;
}

/* "Don't have an account? Create Account" */
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    padding-top: 40px;
}
/* Each phrase stays together; on narrow screens the row wraps between them. */
.footer-row > * { white-space: nowrap; }

.fine-print {
    margin-top: 30px;
    text-align: center;
    color: var(--color-beige-500);
}

.muted { color: var(--color-gray-600); }
.help { color: var(--color-beige-500); }

.icon-email-sent { width: 47px; height: auto; display: block; margin: 0 auto 30px; }

.mt-10 { margin-top: 40px; }
.mt-6 { margin-top: 26px; }
.mt-5 { margin-top: 20px; }

@media (min-width: 640px) {
    .page { padding-top: 140px; }
    .page-title { margin-bottom: 30px; }
    .card {
        width: 500px;
        padding: 40px;
        box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.1);
    }
}

@media (min-width: 760px) {
    .logo { top: 60px; left: 60px; width: 32px; height: 32px; }
}

@media (min-width: 768px) {
    .card { padding: 60px; }
}
