/* ---------------------------------------------------------------------------
   leo-auth UI — ogma.is design language.
   The :root token block is the future shared layer with ogma-web; keep it
   liftable (no leo-auth-specific values inside it).
   Token values extracted from live ogma.is 2026-07-07 (see spec).
--------------------------------------------------------------------------- */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
    --og-ink: #13314A;
    --og-body: #234A6B;
    --og-blue: #3F84B0;
    --og-blue-deep: #33719C;
    --og-orange: #D67753;
    --og-bg: #EEF3F8;
    --og-surface: #FFFFFF;
    --og-border: rgba(19, 49, 74, .22);
    --og-hairline: rgba(19, 49, 74, .08);
    --og-muted: rgba(19, 49, 74, .66);
    --og-faint: rgba(19, 49, 74, .45);
    --og-error-bg: rgba(214, 119, 83, .12);
    --og-error-text: #A44A2A;
    --og-info-bg: rgba(63, 132, 176, .12);
    --og-info-text: #2C5E80;
    --og-font-display: "Instrument Serif", "Times New Roman", serif;
    --og-font-ui: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
    --og-font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--og-bg);
    color: var(--og-ink);
    font-family: var(--og-font-ui);
}

.card {
    width: 100%;
    max-width: 440px;
    background: var(--og-surface);
    border: 1px solid var(--og-hairline);
    padding: 48px 44px;
}

p {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--og-body);
}

.wordmark {
    margin: 0;
    font-family: var(--og-font-display);
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--og-ink);
}

.eyebrow {
    margin: 26px 0 14px;
    font-family: var(--og-font-mono);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--og-blue);
}

.eyebrow::before { content: "— "; }

h1 {
    margin: 0;
    font-family: var(--og-font-display);
    font-weight: 400;
    font-size: 38px;
    letter-spacing: -0.03em;
    line-height: .95;
    color: var(--og-ink);
}

h1 em {
    font-style: italic;
    color: var(--og-orange);
}

.sub { font-weight: 300; }

label {
    display: block;
    margin: 18px 0 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--og-muted);
}

input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 12px 13px;
    font-family: var(--og-font-ui);
    font-size: 15px;
    color: var(--og-ink);
    background: var(--og-surface);
    border: 1px solid var(--og-border);
    border-radius: 4px;
}

input:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--og-blue);
    outline-offset: 2px;
}

button {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 14px 26px;
    font-family: var(--og-font-ui);
    font-size: 14px;
    letter-spacing: .04em;
    color: #fff;
    background: var(--og-blue);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover { background: var(--og-blue-deep); }

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
    letter-spacing: .04em;
}

.links a { color: var(--og-blue-deep); text-decoration: none; }
.links a:hover { text-decoration: underline; }

.message {
    margin: 16px 0 0;
    padding: 10px 13px;
    border-radius: 4px;
    font-size: 13.5px;
    line-height: 1.5;
}

.message.error { background: var(--og-error-bg); color: var(--og-error-text); }
.message.info { background: var(--og-info-bg); color: var(--og-info-text); }

@media (max-width: 480px) {
    .card { padding: 36px 24px; }
    h1 { font-size: 32px; }
}

@keyframes og-spin { to { transform: rotate(360deg); } }

.card form.submitting input {
    opacity: .55;
    cursor: progress;
    pointer-events: none;
}

.card form.submitting button {
    color: transparent;          /* hide label, keep the button's size */
    background: var(--og-blue);  /* keep it solid blue despite the :disabled UA styling */
    opacity: 1;
    position: relative;
    cursor: progress;
    pointer-events: none;
}

.card form.submitting button::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.15em;
    height: 1.15em;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: var(--og-surface);   /* white segment spins on the blue button */
    border-radius: 50%;
    animation: og-spin .6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .card form.submitting button::after { animation: none; }
}
