/* ============================================================================
   base.css — Reset, tipografía base y utilidades globales
   ========================================================================== */

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: 1.55;
  color: var(--color-text);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* El atributo `hidden` siempre oculta el elemento.
   (Sin esto, una regla con `display: flex` como .alert lo pisa y aparece vacío.) */
[hidden] {
  display: none !important;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

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

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

::selection {
  background: var(--color-gold);
  color: #fff;
}

/* ---- Scrollbars sutiles acordes a la paleta ---- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-cream);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

.app-root {
  min-height: 100vh;
}

/* ---- Pantalla de arranque (cuando se abre vía file://) ---- */
.boot-notice {
  max-width: 520px;
  margin: 12vh auto 0;
  padding: var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.boot-notice__logo {
  height: 72px;
  margin: 0 auto var(--space-5);
}
.boot-notice h1 {
  font-size: var(--font-size-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.boot-notice p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.boot-notice code {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-gold-bright);
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: var(--font-size-sm);
}

/* ---- Utilidades de texto ---- */
.text-muted {
  color: var(--color-text-muted);
}
.text-gold {
  color: var(--color-gold);
}
.text-center {
  text-align: center;
}
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

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