/* Ash brand styles for the static sign-in pages. The same file is in every site under public/; check-email-link-pages.mjs checks that the copies match. */

@font-face {
    font-family: "Inter";
    src: url("/brand/Inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Serif";
    src: url("/brand/LibertinusSerif-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html.brand {
    --ash-page: #fbf9f6;
    --ash-screen: #f4f2ef;
    --ash-content-primary: #23201b;
    --ash-content-secondary: #66625c;
    --ash-content-on-inverse: #fffdfa;
    --ash-solid-inverse: #23201b;
    --ash-border: #dcd9d4;
    --ash-focus-ring: #26237b;
    background: var(--ash-screen);
}

html.brand body {
    margin: 0;
    max-width: none;
    padding: 0;
    background: var(--ash-screen);
    color: var(--ash-content-primary);
    font-family: "Inter", -apple-system, system-ui, sans-serif;
    font-weight: 425;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

.ash-screen {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
}

.ash-wordmark {
    display: block;
    width: 51px;
    height: 24px;
    margin: 0 0 32px;
    color: var(--ash-content-primary);
}

.ash-title {
    margin: 0 0 12px;
    font-family: "Libertinus Serif", Georgia, serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.ash-body {
    margin: 0 0 8px;
    color: var(--ash-content-secondary);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.25px;
}

.ash-body a {
    color: var(--ash-content-primary);
}

/* The illustration takes the space left between the text and the button, so the button stays on screen. */
.ash-illustration {
    position: relative;
    flex: 1 1 0;
    min-height: 120px;
    margin: 24px 0;
}

.ash-illustration img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ash-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ash-button {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border-radius: 16px;
    background: var(--ash-solid-inverse);
    color: var(--ash-content-on-inverse);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.32px;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.ash-button:active {
    transform: scale(0.98);
}

.ash-button-text {
    background: transparent;
    color: var(--ash-content-primary);
    min-height: 44px;
}

.ash-button:focus-visible {
    outline: 2px solid var(--ash-focus-ring);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

/* A computer shows the page as a phone-sized card in the middle of the window, as the onboarding website does. */
@media (min-width: 640px) and (min-height: 560px) {
    html.brand,
    html.brand body {
        background: var(--ash-page);
    }

    html.brand body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .ash-screen {
        width: 440px;
        min-height: 0;
        height: min(752px, calc(100vh - 48px));
        padding: 48px 24px 24px;
        border: 1px solid var(--ash-border);
        border-radius: 40px;
        background: var(--ash-screen);
        box-shadow: 0 24px 64px rgba(35, 32, 27, 0.08);
        overflow-y: auto;
    }
}

.ash-qr {
    width: 220px;
    margin: 32px auto;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dcd9d4;
    border-radius: 16px;
}

.ash-qr img,
.ash-qr canvas {
    display: block;
    width: 100%;
    height: auto;
}
