@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("fonts/dm-sans-latin-300-normal.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/dm-sans-latin-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/dm-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
    font-family: "DM Serif Display";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "DM Serif Display";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/dm-serif-display-latin-400-italic.woff2") format("woff2");
}

:root {
    --font-body: "DM Sans", "Aptos", "Segoe UI", sans-serif;
    --font-heading: "DM Serif Display", Georgia, serif;
    --color-text: #0e1520;
    --color-text-muted: #4a5568;
    --color-text-subtle: #8a9ab0;
    --color-bg: #f5f7fa;
    --color-bg-muted: #eaeff5;
    --color-surface: #ffffff;
    --color-accent: #1a3a5c;
    --color-accent-mid: #2563a8;
    --color-accent-soft: #e4edf7;
    --color-accent-ink: #1a3a5c;
    --color-white: #ffffff;
    --color-border: rgba(26, 58, 92, 0.12);
    --color-success: #1d6c3f;
    --color-error: #a83b31;
}

.site-header__brand-dark {
    display: none;
}

html[data-theme="dark"] .site-header__brand-dark {
    display: block;
}

html[data-theme="dark"] .site-header__brand-light {
    display: none;
}

html[data-theme="dark"] {
    --color-text: #e9ecef;
    --color-text-muted: #a6adb6;
    --color-text-subtle: #6e7783;
    --color-bg: #131518;
    --color-bg-muted: #191c20;
    --color-surface: #1c2025;
    --color-accent: #1d4166;
    --color-accent-mid: #2f74c0;
    --color-accent-soft: #1c2836;
    --color-accent-ink: #85aede;
    --color-border: rgba(255, 255, 255, 0.12);
    --color-success: #6fcf97;
    --color-error: #ef8a80;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --color-text: #e9ecef;
        --color-text-muted: #a6adb6;
        --color-text-subtle: #6e7783;
        --color-bg: #131518;
        --color-bg-muted: #191c20;
        --color-surface: #1c2025;
        --color-accent: #1d4166;
        --color-accent-mid: #2f74c0;
        --color-accent-soft: #1c2836;
        --color-accent-ink: #85aede;
        --color-border: rgba(255, 255, 255, 0.12);
        --color-success: #6fcf97;
        --color-error: #ef8a80;
        color-scheme: dark;
    }

    html:not([data-theme="light"]) .site-header__brand-dark {
        display: block;
    }

    html:not([data-theme="light"]) .site-header__brand-light {
        display: none;
    }
}

html {
    background: var(--color-bg);
    color-scheme: light;
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

.theme-toggle {
    align-items: center;
    background: none;
    border: 0;
    border-radius: 999px;
    color: var(--color-text-muted);
    cursor: pointer;
    display: inline-flex;
    height: 2.4rem;
    justify-content: center;
    justify-self: end;
    padding: 0;
    transition: background 180ms ease, color 180ms ease;
    width: 2.4rem;
}

.theme-toggle:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
}

.theme-toggle svg {
    fill: none;
    height: 1.15rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    width: 1.15rem;
}

.theme-toggle__sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle__sun {
    display: block;
}

html[data-theme="dark"] .theme-toggle__moon {
    display: none;
}

html:not(.js) .theme-toggle {
    display: none;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0;
}

h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    max-width: 14ch;
}

h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

h3 {
    font-size: 1.25rem;
}

p,
li {
    font-size: 1rem;
    line-height: 1.75;
}

.site-shell {
}

.site-main {
    min-height: 60vh;
}

.section-shell {
    margin: 0 auto;
    width: min(1160px, calc(100% - 3rem));
}

html.js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 600ms ease,
        transform 600ms ease;
    transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.legal-page {
    padding: 9rem 0 6rem;
}

.legal-page h1 {
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 0.75rem;
}

.legal-page p,
.legal-page li {
    color: var(--color-text-muted);
    max-width: 72ch;
}

.legal-page a {
    color: var(--color-accent-ink);
}

.legal-page__back {
    color: var(--color-text-muted);
    display: inline-block;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
    text-decoration: none;
    text-transform: uppercase;
}

.legal-page__back:hover {
    color: var(--color-text);
}

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

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

@media (max-width: 760px) {
    .section-shell {
        width: min(100% - 2rem, 1160px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
