/* ==========================================================================
   FinanceXLab — Base
   Reset, box model, tipografía global. Mobile-first.
   Depende de tokens.css (debe cargarse después).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Resplandor violeta ambiental, fijo y muy sutil, detrás de toda la app —
   un único gradiente radial estático (sin animación, sin blur costoso) que
   se asoma por los huecos entre cards. pointer-events:none para que nunca
   intercepte clics; se pinta antes que #app en el orden del documento, así
   que siempre queda detrás del contenido real. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(139,92,246,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 20%, rgba(109,40,217,0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}
#app {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: 2.1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

@media (min-width: 768px) {
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.1rem; }
  h3 { font-size: 1.5rem; }
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-active);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

ul, ol {
  list-style: none;
}

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

.font-mono {
  font-family: var(--font-mono);
}

.oculto {
  display: none !important;
}

.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;
}

#app {
  min-height: 100vh;
}

/* Nunca dejar pantalla en blanco: fallback visible mientras carga la app */
#app:empty::before {
  content: '';
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
