/* The fonts are the same as the ones of the ASP.NET Core home page, Open Sans and Space Grotesk (SIL Open Font License). */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/open-sans-latin-400.woff2") format("woff2");
}

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

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

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-700.woff2") format("woff2");
}

/* The color mode follows the system by default. The "data-theme" attribute of the root element overrides it. */
:root {
    color-scheme: light dark;

    --bg: light-dark(#fafafa, #1f1f1f);
    --bg-2: light-dark(#ffffff, #292929);
    --text: light-dark(#141414, #f5f5f5);
    --muted: light-dark(#5a5a5a, #b8b8b8);
    --border: light-dark(rgb(0 0 0 / 12%), rgb(255 255 255 / 16%));
    --primary: light-dark(#512bd4, #ac99ea);
    --primary-hover: light-dark(#4122aa, #b9aaee);
    --primary-active: light-dark(#311a7f, #cbbff2);
    --on-primary: light-dark(#ffffff, #141414);
    --tint: light-dark(rgb(81 43 212 / 8%), rgb(172 153 234 / 14%));
    --g1: light-dark(#512bd4, #9780e5);
    --g2: light-dark(#d600aa, #e666cc);
    --gradient: linear-gradient(128.87deg, var(--g1) 14.05%, var(--g2) 89.3%);

    --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-heading: "Space Grotesk", Helvetica, Arial, sans-serif;
}

/* The color tokens are registered as colors, so that the browser can animate them when the color mode changes.
   Every color on the page comes from these tokens, so the whole page fades, including the gradients. */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #fafafa; }
@property --bg-2 { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --text { syntax: "<color>"; inherits: true; initial-value: #141414; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #5a5a5a; }
@property --border { syntax: "<color>"; inherits: true; initial-value: rgb(0 0 0 / 12%); }
@property --primary { syntax: "<color>"; inherits: true; initial-value: #512bd4; }
@property --primary-hover { syntax: "<color>"; inherits: true; initial-value: #4122aa; }
@property --primary-active { syntax: "<color>"; inherits: true; initial-value: #311a7f; }
@property --on-primary { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --tint { syntax: "<color>"; inherits: true; initial-value: rgb(81 43 212 / 8%); }
@property --g1 { syntax: "<color>"; inherits: true; initial-value: #512bd4; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #d600aa; }

:root {
    transition:
        --bg .2s ease, --bg-2 .2s ease, --text .2s ease, --muted .2s ease, --border .2s ease,
        --primary .2s ease, --primary-hover .2s ease, --primary-active .2s ease, --on-primary .2s ease,
        --tint .2s ease, --g1 .2s ease, --g2 .2s ease;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        transition: none;
    }
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .75rem;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* A link that has a small icon before its text. */
.with-icon,
.btn.with-icon {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 46rem;
}

.fine-print {
    font-size: .875rem;
    color: var(--muted);
    max-width: 46rem;
}

.gradient-text {
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: .65rem 1.4rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--on-primary);
}

.btn-primary:active {
    background: var(--primary-active);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--tint);
    color: var(--primary);
}

.loading {
    display: grid;
    place-items: center;
    min-height: 100vh;
    color: var(--muted);
    font-family: var(--font-body);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    padding: .6rem 1.25rem;
    background: #fff3cd;
    color: #664d03;
    box-shadow: 0 -1px 2px rgb(0 0 0 / 20%);
    z-index: 1000;
}

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

@media (max-width: 767px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .section { padding: 3rem 0; }
}

/* Fade the colors of the code blocks when the theme changes. */
pre[class*="language-"],
pre[class*="language-"]::before,
pre[class*="language-"]::after,
pre[class*="language-"] code,
pre[class*="language-"] .token {
    transition: all .2s ease;
}

@media (prefers-reduced-motion: reduce) {
    pre[class*="language-"],
    pre[class*="language-"]::before,
    pre[class*="language-"]::after,
    pre[class*="language-"] code,
    pre[class*="language-"] .token {
        transition: none;
    }
}

/* A link in a sentence stays inline, so that it keeps the baseline and the line height of the text. */
p .with-icon {
    display: inline;
}

p .with-icon .brand-icon {
    margin-right: .2em;
}

/* The controls are disabled until the app starts. */
button:disabled,
select:disabled,
input:disabled,
label:has(input:disabled) {
    cursor: progress;
}
