/* KronForge — base.css
   Variables, reset, tipografía y estilos globales de body.
   ======================================================= */

@font-face { font-family: Sora; src: url('../fonts/sora.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
    color-scheme: light;
    --forge-amber: #f59e0b;
    --forge-orange: #ea580c;
    --forge-gold: #fcd34d;
    --status-success: #22c55e;
    --status-warning: #f59e0b;
    --status-error: #ef4444;
    --status-information: #38bdf8;
    --status-ai: #a78bfa;
    --status-verified: #14b8a6;
    --space-unit: 4px;
    --radius-control: 8px;
    --radius-card: 12px;
    --radius-panel: 16px;
    --radius-hero: 24px;
    --motion: 200ms;
    --bg-primary: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f1ee;
    --surface: #ffffff;
    --surface-muted: #f7f8f6;
    --surface-raised: #ffffff;
    --border-color: #e2e4df;
    --border-strong: #c9cec6;
    --text-primary: #182338;
    --text-secondary: #46536e;
    --text-muted: #58647c;
    --accent: #92400e;
    --accent-strong: #78350f;
    --accent-soft: #fdf0d8;
    --focus: #92400e;
    --success: #15803d;
    --warning: #b45309;
    --code-bg: #0f172a;
    --code-text: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
    --sidebar-width: 292px;
    --sidebar-collapsed-width: 76px;
    --radius: var(--radius-control);
    --font-primary: Inter, system-ui, sans-serif;
    --font-display: Sora, var(--font-primary);
    --font-mono: "JetBrains Mono", Consolas, monospace;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-primary: #0b1020;
    --bg-secondary: #121a2d;
    --bg-tertiary: #182338;
    --surface: #121a2d;
    --surface-muted: #182338;
    --surface-raised: #182338;
    --border-color: #2a3652;
    --border-strong: #62708b;
    --text-primary: #f5f7fb;
    --text-secondary: #b8c2d9;
    --text-muted: #9aa9c7;
    --accent: #f59e0b;
    --accent-strong: #fcd34d;
    --accent-soft: #2d2319;
    --focus: #fcd34d;
    --success: #4ade80;
    --warning: #fcd34d;
    --code-bg: #0b0c10;
    --code-text: #eef2ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.26);
    --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-block-end: 74px;
}

:is(h1, h2, h3, .forge-wordmark) { font-family: var(--font-display); }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 300; padding: 12px; background: var(--surface); color: var(--text-primary); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
    --active-sidebar-width: var(--sidebar-width);
}

body.sidebar-collapsed {
    --active-sidebar-width: var(--sidebar-collapsed-width);
}

button,
input,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

pre,
code {
    font-family: var(--font-mono);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:where(a, button, input, select, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

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

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