/* base.css — reset + tipografía global + atmósfera de fondo.
   Importar después de tokens.css */

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

html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
    margin: 0;
    padding: 0;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
}

/* Atmosfera: gradiente radial + grano sutil */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 15% 0%,  rgba(255,122,24,.07), transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 100%, rgba(90,199,255,.04), transparent 60%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
}
body > * { position: relative; z-index: 1; }

/* Headings: monospace display, peso 600, tracking ajustado */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }

p { color: var(--color-text); }

a {
    color: var(--color-brand);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--color-brand-hov); }

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

::selection {
    background: var(--color-brand);
    color: var(--color-text-on-brand);
}

/* Scrollbar coherente */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border-radius: var(--radius-pill);
}
*::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* Utility: caret blink (aesthetic touch) */
@keyframes caret-blink {
    0%, 49%   { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.caret::after {
    content: "▌";
    color: var(--color-brand);
    animation: caret-blink 1s steps(1) infinite;
    margin-left: 2px;
}
