/* ==========================================================================
   Symphony v2.0 — Base Styles
   Reset, tipografía, fuentes auto-hospedadas y utilidades fundamentales.
   ========================================================================== */

/* -----------------------------------------------------------------------
   1. FUENTES AUTO-HOSPEDADAS — WOFF2, cero requests a Google Fonts
   ----------------------------------------------------------------------- */

/* Poppins — Display / Títulos */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-v22-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-v22-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/poppins-v22-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — Body / UI */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-v18-latin-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-v18-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-v18-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F,
    U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -----------------------------------------------------------------------
   2. RESET MODERNO
   ----------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto !important;
  overflow-x: hidden;
  max-width: 100%;
}

html.lenis,
html.lenis-smooth,
body {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--sy-font-body);
  font-size: var(--sy-text-body);
  font-weight: var(--sy-font-regular);
  line-height: var(--sy-leading-normal);
  color: var(--sy-text-primary);
  background-color: var(--sy-bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* -----------------------------------------------------------------------
   3. JERARQUÍA TIPOGRÁFICA DRAMÁTICA
   Contraste de tamaños: H2 >= 4x el cuerpo
   ----------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sy-font-display);
  font-weight: var(--sy-font-bold);
  letter-spacing: var(--sy-tracking-tight);
  line-height: var(--sy-leading-tight);
  text-wrap: balance;
  color: var(--sy-text-primary);
}

h1 {
  font-size: var(--sy-text-display);
  font-weight: var(--sy-font-extrabold);
  letter-spacing: -0.04em;
  line-height: var(--sy-leading-none);
}

h2 {
  font-size: var(--sy-text-h2);
  letter-spacing: -0.03em;
  line-height: 1.0;
}

h3 {
  font-size: var(--sy-text-h3);
  letter-spacing: -0.02em;
  line-height: var(--sy-leading-snug);
}

h4 {
  font-size: var(--sy-text-h4);
  font-weight: var(--sy-font-semibold);
  letter-spacing: var(--sy-tracking-snug);
  line-height: var(--sy-leading-snug);
}

p {
  text-wrap: pretty;
  max-width: 65ch;
}

/* -----------------------------------------------------------------------
   4. ELEMENTOS BASE
   ----------------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--sy-dur-micro) var(--sy-ease);
}

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

ul, ol {
  list-style: none;
}

/* -----------------------------------------------------------------------
   5. ACCESIBILIDAD
   ----------------------------------------------------------------------- */

/* Skip link */
.sy-skip-link {
  position: fixed;
  top: -100%;
  left: var(--sy-space-4);
  z-index: calc(var(--sy-z-header) + 10);
  padding: var(--sy-space-3) var(--sy-space-6);
  background: var(--sy-indigo-500);
  color: #fff;
  font-weight: var(--sy-font-semibold);
  border-radius: var(--sy-radius-sm);
  transition: top var(--sy-dur-base) var(--sy-ease);
}

.sy-skip-link:focus {
  top: var(--sy-space-4);
  outline: 2px solid var(--sy-violet-400);
  outline-offset: 2px;
}

/* Focus visible personalizado */
:focus-visible {
  outline: 2px solid var(--sy-violet-400);
  outline-offset: 3px;
  border-radius: var(--sy-radius-xs);
}

/* Screen reader only */
.sy-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;
}

/* -----------------------------------------------------------------------
   6. CONTENEDORES
   ----------------------------------------------------------------------- */

.sy-container {
  width: 100%;
  max-width: var(--sy-container-lg);
  margin-inline: auto;
  padding-inline: var(--sy-gutter);
}

.sy-container--sm {
  max-width: var(--sy-container-sm);
}

.sy-container--md {
  max-width: var(--sy-container-md);
}

.sy-container--xl {
  max-width: var(--sy-container-xl);
}

/* -----------------------------------------------------------------------
   7. SECCIONES — Espaciado fluido entre bloques
   ----------------------------------------------------------------------- */

.sy-section {
  position: relative;
  padding-block: var(--sy-section-gap);
  overflow: hidden;
}

/* Sección oscura (por defecto) */
.sy-section--dark {
  background: var(--sy-bg-deep);
  color: var(--sy-text-primary);
}

/* Sección clara con transición suave */
.sy-section--light {
  background: var(--sy-bg-light);
  color: var(--sy-text-on-light);
  border-radius: var(--sy-radius-3xl) var(--sy-radius-3xl) 0 0;
  margin-top: calc(var(--sy-space-12) * -1);
  padding-top: calc(var(--sy-section-gap) + var(--sy-space-12));
  position: relative;
  z-index: var(--sy-z-base);
}

/* Textura de grano sobre secciones oscuras */
.sy-section--dark::after,
.sy-section--grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sy-noise);
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Asegurar contenido sobre el grano */
.sy-section--dark > *,
.sy-section--grain > * {
  position: relative;
  z-index: 1;
}

/* -----------------------------------------------------------------------
   8. LABEL DE SECCIÓN — Sin pills/badges
   Formato: 01 — Título, integrado en el layout
   ----------------------------------------------------------------------- */

.sy-section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sy-space-3);
  font-family: var(--sy-font-body);
  font-size: var(--sy-text-label);
  font-weight: var(--sy-font-medium);
  letter-spacing: var(--sy-tracking-wide);
  text-transform: uppercase;
  color: var(--sy-violet-400);
  margin-bottom: var(--sy-space-6);
}

.sy-section-label::before {
  content: attr(data-number);
  font-variant-numeric: tabular-nums;
  font-weight: var(--sy-font-semibold);
  color: var(--sy-text-tertiary);
}

.sy-section-label::after {
  content: '';
  width: 2rem;
  height: 1px;
  background: var(--sy-border-strong);
}

/* Variante para fondos claros */
.sy-section-label--light {
  color: var(--sy-indigo-600);
}

.sy-section-label--light::before {
  color: var(--sy-text-on-light-secondary);
}

.sy-section-label--light::after {
  background: rgba(26, 23, 56, 0.15);
}

/* -----------------------------------------------------------------------
   9. NÚMEROS TABULARES PARA MÉTRICAS
   ----------------------------------------------------------------------- */

.sy-tabular {
  font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------------------------
   10. BARRA DE PROGRESO DE SCROLL
   ----------------------------------------------------------------------- */

.sy-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--sy-gradient-accent);
  z-index: var(--sy-z-progress);
  transform-origin: left;
  pointer-events: none;
}

/* -----------------------------------------------------------------------
   11. LÍNEAS DE COMPÁS — Guías verticales del layout (solo desktop)
   ----------------------------------------------------------------------- */

@media (min-width: 1024px) {
  .sy-guide-lines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    max-width: var(--sy-container-xl);
    margin-inline: auto;
    padding-inline: var(--sy-gutter);
  }

  .sy-guide-lines span {
    border-right: 1px solid rgba(165, 180, 252, 0.04);
  }

  .sy-guide-lines span:first-child {
    border-left: 1px solid rgba(165, 180, 252, 0.04);
  }
}

/* -----------------------------------------------------------------------
   12. UTILIDADES
   ----------------------------------------------------------------------- */

.sy-text-gradient {
  background: var(--sy-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sy-text-center {
  text-align: center;
}

/* Selección personalizada */
::selection {
  background: rgba(139, 92, 246, 0.30);
  color: #fff;
}
