/* =======================================================
   BASE — Reset + tipografía + utilidades
   ======================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background: var(--color-bg);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
button, input, select, textarea {
  font: inherit; color: inherit;
}
button { background: none; border: 0; cursor: pointer; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--color-text-strong);
  font-weight: var(--fw-semi);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--color-accent-glow); color: var(--color-text-strong); }

/* Scrollbar styling */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(40, 60, 55, 0.35);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(40, 60, 55, 0.55); background-clip: padding-box; }

/* Focus visible */
:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-sm);
}

/* ===== Utilidades ===== */
.u-hidden { display: none !important; }
.u-flex { display: flex; }
.u-flex-col { display: flex; flex-direction: column; }
.u-items-center { align-items: center; }
.u-justify-between { justify-content: space-between; }
.u-justify-center { justify-content: center; }
.u-gap-1 { gap: var(--space-1); }
.u-gap-2 { gap: var(--space-2); }
.u-gap-3 { gap: var(--space-3); }
.u-gap-4 { gap: var(--space-4); }
.u-gap-5 { gap: var(--space-5); }
.u-gap-6 { gap: var(--space-6); }
.u-grow { flex: 1; }
.u-shrink-0 { flex-shrink: 0; }

.u-text-xs { font-size: var(--fs-xs); }
.u-text-sm { font-size: var(--fs-sm); }
.u-text-lg { font-size: var(--fs-lg); }
.u-text-xl { font-size: var(--fs-xl); }
.u-text-muted { color: var(--color-text-muted); }
.u-text-strong { color: var(--color-text-strong); }
.u-text-accent { color: var(--color-accent); }
.u-text-success { color: var(--color-success); }
.u-text-danger { color: var(--color-danger); }
.u-text-center { text-align: center; }
.u-text-right { text-align: right; }
.u-fw-medium { font-weight: var(--fw-medium); }
.u-fw-semi { font-weight: var(--fw-semi); }
.u-fw-bold { font-weight: var(--fw-bold); }
.u-mono { font-family: var(--font-mono); }

.u-mt-2 { margin-top: var(--space-2); }
.u-mt-4 { margin-top: var(--space-4); }
.u-mt-6 { margin-top: var(--space-6); }
.u-mt-8 { margin-top: var(--space-8); }
.u-mb-2 { margin-bottom: var(--space-2); }
.u-mb-4 { margin-bottom: var(--space-4); }
.u-mb-6 { margin-bottom: var(--space-6); }

.u-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .u-hide-md { display: none !important; }
}
@media (min-width: 769px) {
  .u-show-md { display: none !important; }
}

@keyframes nm-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes nm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--color-accent-glow); }
  50% { box-shadow: 0 0 0 10px transparent; }
}
@keyframes nm-spin {
  to { transform: rotate(360deg); }
}
