/* Global styles for the Quadrilex site — dark theme (permanent, no toggle). */

:root {
    color-scheme: dark;

    /* Brand */
    --quadrilex-blue: #2e3192;
    --quadrilex-accent: #a855f7;
    --quadrilex-accent-strong: #4f46e5;
    --quadrilex-gradient: linear-gradient(90deg, #4f46e5 0%, #a855f7 100%);

    /* Surfaces, darkest to lightest. Every page is built from these three:
       --bg for the page itself, --surface-1 for alternating section bands,
       --surface-2 for cards sitting on top of either. */
    --bg: #0a0c18;
    --surface-1: #11142a;
    --surface-2: #191d3a;
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* Text */
    --text-primary: #f5f6fb;
    --text-secondary: #aab0c8;
    --text-muted: #767c98;
    /* Headings/labels that were brand indigo on a white background need a
       lighter tint on dark surfaces — #2e3192 itself is too close in
       luminance to --surface-2 to read as an accent. */
    --accent-text: #a5b4fc;

    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-secondary);
}

/* Margin reset only — no color here. Each page sets its own heading/body
   color against its own section background (hero sections stay white-on-
   gradient; content sections use --text-primary / --text-secondary). */
h1,
p {
    margin: 0;
}

/* Routes.razor's FocusOnNavigate moves focus to the page's h1 on every load
   (for screen readers). Keep that focus, but don't paint the browser's
   outline around the title. */
h1:focus {
    outline: none;
}

/* Blazor error / validation UI */

.validation-message {
    color: #ff6b6b;
    font-size: 0.875rem;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
