/* ── Alectrone.WASM (demo host) ──────────────────────────────────────────
   Host-level rules only. Every homepage style lives in the page's scoped
   CSS (Components/Pages/Home.razor.css), copied verbatim from
   Alectrone.AppComponents/AppShell/AppHomepage.razor.css.

   The homepage CSS was authored on top of Alectrone.Theme's reset and base
   layers (ux-alectrone.css). Those two layers are reproduced below so the
   demo lays out identically without shipping the whole theme bundle, which a
   page with no Alectrone controls on it would never use. They stay inside
   @layer, exactly as the theme does, so the page's own (unlayered) scoped CSS
   always wins.
   ────────────────────────────────────────────────────────────────────── */

@layer reset, base;

@layer reset {
    *, *:before, *:after { box-sizing: border-box; }
    * { margin: 0; }
    html, body { min-height: 100%; }
    body { line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
    body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
    img, picture, video, canvas, svg { display: block; max-width: 100%; }
    input, button, textarea, select { font: inherit; color: inherit; }
    textarea { resize: vertical; }
    a { text-decoration: none; color: inherit; }
    ul[role=list], ol[role=list] { list-style: none; padding: 0; }
    button { cursor: pointer; }
    :where(*)::selection { color: #fff; background: hsl(268, 62%, 58%); }
}

@layer base {
    :root { font-family: var(--font-family-sans, 'Inter', 'Segoe UI', system-ui, sans-serif); }

    body {
        font-family: var(--font-family-sans, 'Inter', 'Segoe UI', system-ui, sans-serif);
        font-size: 1rem;
        line-height: 1.6;
    }

    h1, h2, h3, h4, h5, h6 {
        font-family: var(--font-family-display, var(--font-family-sans, 'Inter', 'Segoe UI', system-ui, sans-serif));
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: -0.01em;
    }

    h1 { font-size: clamp(2.25rem, 2vw + 1.5rem, 3rem); }
    h2 { font-size: clamp(1.875rem, 1.5vw + 1.25rem, 2.5rem); }
    h3 { font-size: clamp(1.5rem, 1vw + 1.125rem, 2rem); }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }
    strong { font-weight: 600; }
    a { text-decoration: none; transition: color 200ms ease; }

    /* UxIcon's baseline, for the DemoIcon stand-in that renders the same SVGs. */
    .ux-icon { display: inline-flex; align-items: center; line-height: 1; vertical-align: middle; }
}

html, body {
    height: 100%;
    margin: 0;
}

/* The homepage owns a dark surface; declare it on the document so there is no
   light flash before the WebAssembly runtime paints the page, and so the
   native scrollbar and form controls read dark. */
body {
    background: hsl(240, 9%, 5%);
    color-scheme: dark;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
}

/* The homepage (.hp) is its own scroll container, so the frame above it must
   have a definite height all the way down from the document. Without the exact
   height, zoom/DPI rounding can leave the document a fraction taller than the
   viewport, which paints a second, dead document scrollbar. Mirrors the
   `.page:has(.hp)` rule in the Alectrone.App host. */
#app {
    height: 100%;
}

.page {
    height: 100vh;
    overflow: hidden;
}

/* ── Boot splash: the plasma mark, breathing, until the runtime is up ── */
.boot {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: hsl(268, 10%, 60%);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.boot__mark {
    width: 56px;
    height: 56px;
    animation: boot-breathe 2.4s ease-in-out infinite;
}

@keyframes boot-breathe {
    0%, 100% { opacity: 0.55; transform: scale(0.94); }
    50%      { opacity: 1;    transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .boot__mark { animation: none; opacity: 1; }
}

/* ── Blazor error / reconnect chrome ── */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: hsl(0, 60%, 22%);
    color: hsl(0, 20%, 96%);
    font-size: 0.9rem;
    box-shadow: 0 -2px 20px hsla(0, 0%, 0%, 0.5);
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: inherit;
    margin-left: 12px;
    cursor: pointer;
}
