/* ==========================================================================
   BYTPRESS — base.css
   ==========================================================================
   Tokens locales, reset mínimo, tipografía base, utilidades.

   Este archivo NO conoce componentes ni secciones.
   Solo define el terreno de juego.

   Reglas:
   - Cero !important (única excepción: prefers-reduced-motion, WCAG).
   - Cero parches apilados.
   - Mobile-first.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOKENS LOCALES
   -------------------------------------------------------------------------- */

:root {
  /* Transiciones */
  --bytmpress-transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  --bytmpress-transition-fast: all 0.15s cubic-bezier(0.22, 1, 0.36, 1);
  --bytmpress-transition-slow: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);

  /* Contenedores */
  --bytmpress-container: 1200px;
  --bytmpress-container-narrow: 720px;
  --bytmpress-container-wide: 1440px;

  /* Radios */
  --bytmpress-radius-sm: 6px;
  --bytmpress-radius-md: 8px;
  --bytmpress-radius-lg: 12px;
  --bytmpress-radius-xl: 16px;

  /* Sombras */
  --bytmpress-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --bytmpress-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --bytmpress-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
  --bytmpress-shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.5);

  /* Z-index — una sola escala, sin guerras */
  --bytmpress-z-base: 1;
  --bytmpress-z-header: 100;
  --bytmpress-z-overlay: 999;
  --bytmpress-z-modal: 9999;
}

/* --------------------------------------------------------------------------
   RESET MÍNIMO
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   TIPOGRAFÍA BASE
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul, ol {
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   MEDIA
   -------------------------------------------------------------------------- */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   SELECCIÓN
   -------------------------------------------------------------------------- */

::selection {
  background: var(--wp--preset--color--primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   FOCUS VISIBLE — WCAG 2.4.7
   -------------------------------------------------------------------------- */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   UTILIDADES
   -------------------------------------------------------------------------- */

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--bytmpress-z-modal);
  padding: 0.75rem 1.25rem;
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--contrast);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--bytmpress-radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --------------------------------------------------------------------------
   ALINEACIONES CLÁSICAS (compatibilidad core)
   -------------------------------------------------------------------------- */

.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   PREFERS REDUCED MOTION — WCAG 2.3.3
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}