/* =====================================================
   main.css — Variables globales + reset del tema Pylaris
   Archivo: assets/main.css
   Carga GLOBAL en todas las páginas — base de todo el sistema.
   Todos los demás CSS del tema dependen de este archivo.
   ===================================================== */

/* =====================================================
   INTER — Fuente local
   ===================================================== */
@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/pylaris-theme-main/assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/pylaris-theme-main/assets/fonts/inter-v20-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/wp-content/themes/pylaris-theme-main/assets/fonts/inter-v20-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Fondos */
  --bg-base:         #0A0E13;
  --bg-surface:      #0D1117;
  --bg-elevated:     #161B21;
  --bg-card:         #111519;
  --bg-light:        #F8F9FA;
  --bg-light-alt:    #ECEEF0;
  --bg-dark-card:    #1A1D21;

  /* Texto */
  --text-primary:    #F5F5F5;
  --text-secondary:  #A0A4A8;
  --text-muted:      #6B7075;
  --text-dim:        #4A4F54;
  --text-dark:       #1A1D21;
  --text-dark-muted: #4A4F54;

  /* Acento — naranja */
  --orange:          #FF6A00;
  --orange-light:    #FF8534;
  --orange-dark:     #E55D00;
  --orange-subtle:   rgba(255, 106, 0, 0.08);
  --orange-border:   rgba(255, 106, 0, 0.20);

  /* Bordes */
  --border-dim:      rgba(255, 255, 255, 0.04);
  --border-mid:      rgba(255, 255, 255, 0.06);
  --border-light:    rgba(255, 255, 255, 0.10);
  --border-dark:     rgba(0, 0, 0, 0.08);

  /* Tipografía */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --header-height:      72px;
  --content-max-width:  680px;
  --toc-width:          260px;
  --section-pad-v:      clamp(72px, 9vw, 100px);
  --section-pad-h:      clamp(20px, 5vw, 80px);
  --container-max:      1140px;

  /* Radios */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;

  /* Transiciones */
  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --micro: 180ms;
}

/* ── Variables mobile (se activan desde 768px) ──────────── */
@media (max-width: 767px) {
  :root {
    --header-height:  60px;
    --section-pad-h:  20px;
    --section-pad-v:  52px;
  }
}

/* =====================================================
   RESET MÍNIMO
   ===================================================== */

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

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 400;              /* explícito — evita herencia de plugins/temas */
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

p {
  font-weight: 400;              /* explícito — Inter párrafos siempre regular */
  line-height: 1.6;
}

/* =====================================================
   COMPENSAR HEADER FIJO
   El header tiene position:fixed — el body necesita
   padding-top para que el contenido no quede tapado.

   .has-hero-overlap — aplicado por body_class() en functions.php
   en páginas donde el hero se superpone intencionalmente
   al header transparente (home, landings de servicio).
   ===================================================== */

body {
  padding-top: var(--header-height);
}

body.has-hero-overlap {
  padding-top: 0;
}

/* =====================================================
   CONTAINER GLOBAL
   Usado en header, footer y páginas de contenido.
   max-width: 1200px — mismo que el spec del header.
   ===================================================== */

.py-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--section-pad-h);
  width: 100%;
}

/* =====================================================
   ACCESIBILIDAD — REDUCCIÓN DE MOVIMIENTO
   Si el usuario prefiere menos animaciones, desactivar
   todas las transiciones y animaciones del tema.
   ===================================================== */

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

/* =====================================================
   FOCUS VISIBLE — ACCESIBILIDAD DE TECLADO
   Outline visible solo cuando se navega con teclado.
   El focus-visible evita el outline en clicks con mouse.
   ===================================================== */

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =====================================================
   SCROLLBAR (Chromium)
   Scrollbar delgada y discreta en línea con el diseño.
   ===================================================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* =====================================================
   SELECTION
   ===================================================== */

::selection {
  background: var(--orange-subtle);
  color: var(--text-primary);
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #FF6A00 0%, #FF8534 100%);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(255, 106, 0, 0.25);
  cursor: pointer;
  text-decoration: none;
  transition: all 300ms var(--ease);
  font-family: var(--font);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 106, 0, 0.35);
}
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 300ms var(--ease);
  font-family: var(--font);
}
.btn-ghost:hover {
  border-color: var(--border-light);
  color: var(--text-secondary);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #FF6A00 0%, #FF8534 100%);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.25);
  text-decoration: none;
  transition: all 300ms var(--ease);
  font-family: var(--font);
}
.btn-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 106, 0, 0.35);
}