/* ==========================================================================
   IncubArte — Reset, tipografía base y utilidades de layout
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* El navegador aplica [hidden] { display: none }, pero cualquier regla de
   autor con la misma especificidad la vence: .artist-card { display: flex }
   dejaba visibles las tarjetas que el filtro marcaba como ocultas.
   Esta declaración garantiza que el atributo hidden siempre se respete. */
[hidden] {
  display: none !important;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-md);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-md);
  text-wrap: pretty;
}

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

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

/* --- Foco visible y consistente ------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--rosa);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section {
  padding-block: var(--space-section);
}

/* --- Accesibilidad ---------------------------------------------------------- */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: var(--z-overlay);
  padding: var(--space-sm) var(--space-lg);
  background: var(--rosa);
  color: var(--blanco);
  font-weight: var(--fw-bold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}

/* --- Tipografía de apoyo ---------------------------------------------------- */
.eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.lead {
  font-size: var(--text-lg);
  font-weight: var(--fw-light);
  line-height: var(--leading-normal);
}

/* Límite de longitud de línea para lectura cómoda (65–75 caracteres) */
.measure {
  max-width: 68ch;
}

.measure-center {
  max-width: 68ch;
  margin-inline: auto;
}

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

/* --- Colores de texto -------------------------------------------------------- */
.t-rosa  { color: var(--rosa-texto); }
.t-verde { color: var(--verde-texto); }
.t-negro { color: var(--negro); }
.t-blanco { color: var(--blanco); }

/* Sobre fondo verde o azul, el texto va en negro (requisito de marca) */
.bg-verde { background: var(--verde); color: var(--negro); }
.bg-azul  { background: var(--azul);  color: var(--negro); }
.bg-rosa  { background: var(--rosa);  color: var(--blanco); }
.bg-blanco { background: var(--blanco); color: var(--negro); }

/* --- Curva del branding ------------------------------------------------------- */
.curva {
  display: block;
  width: auto;
  height: clamp(56px, 7vw, 96px);
  /* En un contenedor flex en columna, align-items:stretch estiraría la curva
     a lo ancho y deformaría el trazo. Se fija su proporción. */
  align-self: flex-start;
  flex: 0 0 auto;
  max-width: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.curva--center { margin-inline: auto; }
.curva--right { margin-left: auto; }

/* --- Cinta de cuadritos (lenguaje gráfico) ------------------------------------- */
.cuadros {
  height: clamp(28px, 4vw, 46px);
  background-image: url('../img/brand/cuadros-rosa-azul.png');
  background-repeat: repeat;
  background-size: auto 100%;
}

.cuadros--verde {
  background-image: url('../img/brand/cuadros-verde-rosa.png');
}

/* --- Respeto por reduced-motion ------------------------------------------------- */
@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;
    scroll-behavior: auto !important;
  }
}
