/* ==========================================================================
   CSLU Utah — Sistema de diseño
   Paleta: azul cobalto salvadoreño + acentos de los trajes folclóricos.
   Contraste verificado AA/AAA en modo claro y oscuro.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Marca */
  --brand-900: #051D52;
  --brand-800: #072D7A;
  --brand-700: #0B3FA8;   /* 8.5:1 sobre blanco */
  --brand-600: #1454C8;
  --brand-200: #B9CEF2;
  --brand-100: #E7EFFC;
  --brand-50:  #F4F8FE;
  --brand-sun: #F2B417;   /* marigold — solo sobre fondos oscuros */

  --accent-700: #A32C18;
  --accent-600: #C2361F;  /* 5.5:1 sobre blanco */
  --accent-100: #FBEAE6;

  --success-600: #17683F;
  --success-100: #E4F4EB;
  --warning-600: #9A5B04;
  --warning-100: #FDF1DC;
  --danger-600:  #B3261E;
  --danger-100:  #FBE9E7;

  /* Superficies y texto */
  --surface:    #FFFFFF;
  --surface-2:  #F5F8FD;
  --surface-3:  #EAF0FA;
  --ink:        #101B33;  /* 16:1 sobre blanco */
  --ink-2:      #46526B;  /* 7.4:1 sobre blanco */
  --ink-3:      #667492;
  --border:     #DCE5F3;
  --border-strong: #C2D2EA;
  --on-brand:   #FFFFFF;

  /* Escala tipográfica fluida */
  --step--1: clamp(0.875rem, 0.84rem + 0.18vw, 0.95rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1:  clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2:  clamp(1.4rem, 1.28rem + 0.6vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.1vw, 2.35rem);
  --step-4:  clamp(2.1rem, 1.7rem + 1.9vw, 3.2rem);
  --step-5:  clamp(2.5rem, 1.9rem + 2.9vw, 4.1rem);

  /* Espaciado 4/8 */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(3.5rem, 2rem + 6vw, 6.5rem);

  /* Forma y profundidad */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 27, 51, .06), 0 2px 6px rgba(16, 27, 51, .05);
  --shadow-2: 0 4px 12px rgba(16, 27, 51, .07), 0 12px 28px rgba(16, 27, 51, .07);
  --shadow-3: 0 10px 24px rgba(16, 27, 51, .10), 0 24px 60px rgba(16, 27, 51, .10);

  --shell: 1180px;
  --measure: 58ch;   /* ≈72 caracteres reales por línea */

  /* Alto de la cabecera fija y tamaño del logo que aloja.
     El menú móvil se ancla a esta misma medida. */
  --header-h: 108px;
  --logo-h: 92px;

  /* Movimiento */
  --ease-out: cubic-bezier(.22, .78, .35, 1);
  --dur: 220ms;

  /* Capas */
  --z-header: 100;
  --z-menu: 90;

  color-scheme: light;
}

/* El sitio público usa un único tema claro por decisión de diseño:
   fondo blanco en todas las páginas, sin conmutación automática. */

/* --- 2. Base ------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 var(--sp-4); max-width: var(--measure); text-wrap: pretty; }

a { color: var(--brand-700); text-underline-offset: 3px; }
a:hover { color: var(--brand-800); }

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

ul, ol { padding-left: 1.25rem; }

address { font-style: normal; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-6) 0; }

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

:focus-visible {
  outline: 3px solid var(--accent-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 999;
  background: var(--brand-700);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 0; color: #fff; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

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

/* --- 3. Botones ---------------------------------------------------------- */

.btn {
  --btn-bg: var(--brand-700);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn--primary { --btn-bg: var(--brand-700); --btn-fg: var(--on-brand); box-shadow: var(--shadow-1); }
.btn--primary:hover { --btn-bg: var(--brand-800); color: var(--on-brand); box-shadow: var(--shadow-2); }

.btn--accent { --btn-bg: var(--accent-600); --btn-fg: #fff; box-shadow: var(--shadow-1); }
.btn--accent:hover { --btn-bg: var(--accent-700); color: #fff; box-shadow: var(--shadow-2); }

.btn--ghost {
  --btn-bg: transparent; --btn-fg: var(--brand-700);
  border-color: var(--border-strong);
}
.btn--ghost:hover { --btn-bg: var(--brand-100); color: var(--brand-800); border-color: var(--brand-700); }

.btn--on-dark {
  --btn-bg: rgba(255,255,255,.10); --btn-fg: #fff;
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(6px);
}
.btn--on-dark:hover { --btn-bg: #fff; --btn-fg: var(--brand-900); color: var(--brand-900); }

.btn--sm { min-height: 44px; padding: 0.55rem 1.15rem; font-size: var(--step--1); }

/* --- 4. Encabezado ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-1); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

/* El logo ya lleva escrito el nombre de la organización, así que va solo,
   sin texto al lado, y aprovecha el alto disponible de la cabecera. */
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  line-height: 0;
  border-radius: 50%;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out);
}
.brand:hover { transform: scale(1.04); }
.brand:active { transform: scale(.99); }
.brand .logo-mark { width: var(--logo-h); height: var(--logo-h); }

/* El emblema es dorado con detalles azul marino y fondo transparente.
   Se apoya siempre en un disco blanco para que los detalles oscuros se lean
   igual sobre el pie azul que sobre la barra lateral del panel. */
.logo-mark {
  display: block;
  border-radius: 50%;
  background: #fff;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.site-nav__link:hover { color: var(--brand-700); background: var(--brand-100); }
.site-nav__link.is-current { color: var(--brand-700); }
.site-nav__link.is-current::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.25rem;
  height: 3px;
  border-radius: 3px;
  background: var(--accent-600);
}
.site-nav__cta { margin-left: var(--sp-3); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; }
.nav-toggle__bars span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), opacity 150ms var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  :root { --header-h: 88px; --logo-h: 72px; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    z-index: var(--z-menu);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-3);
    padding: var(--sp-4) clamp(1rem, 4vw, 2.5rem) var(--sp-6);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: var(--sp-1); }
  .site-nav__link {
    min-height: 52px;
    padding: 0 var(--sp-4);
    font-size: var(--step-0);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .site-nav__link.is-current::after { display: none; }
  .site-nav__link.is-current { background: var(--brand-100); border-radius: var(--radius-sm); }
  .site-nav__cta { margin: var(--sp-4) 0 0; }
  .site-nav__cta .btn { width: 100%; }
}

/* --- 5. Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--brand-900);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 12% 15%, rgba(11, 63, 168, .85), transparent 60%),
    linear-gradient(115deg, var(--brand-900) 18%, rgba(5, 29, 82, .72) 48%, rgba(5, 29, 82, .30) 78%);
  z-index: 2;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 65% 30%;
}
.hero__inner {
  position: relative;
  z-index: 3;
  padding-block: clamp(4rem, 3rem + 9vw, 8.5rem);
  max-width: 44rem;
}
.hero h1 { color: #fff; margin-bottom: var(--sp-5); }
.hero__lead {
  font-size: var(--step-1);
  color: rgba(255,255,255,.92);
  max-width: 38rem;
  margin-bottom: var(--sp-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.eyebrow--light {
  background: var(--brand-100);
  border-color: var(--brand-200);
  color: var(--brand-800);
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-sun); }

@media (max-width: 700px) {
  .hero::before {
    background: linear-gradient(180deg, rgba(5,29,82,.72) 0%, rgba(5,29,82,.92) 55%, var(--brand-900) 100%);
  }
  .hero__media img { object-position: 60% 20%; }
}

/* --- 5b. Encabezado de página interna ------------------------------------ */

.page-hero {
  position: relative;
  padding-block: clamp(2.5rem, 2rem + 4vw, 4.5rem) clamp(2rem, 1.5rem + 3vw, 3.5rem);
  background:
    linear-gradient(180deg, var(--brand-50), var(--surface));
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { max-width: 20ch; margin-bottom: var(--sp-4); }
.page-hero__lead {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 0;
}

/* --- 6. Secciones y utilidades ------------------------------------------- */

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-2); }
.section--brand { background: var(--brand-900); color: #fff; }
.section--brand h2, .section--brand h3 { color: #fff; }

.section__head { max-width: 46rem; margin-bottom: var(--sp-7); }
.section__head p { color: var(--ink-2); font-size: var(--step-1); }
.section--brand .section__head p { color: rgba(255,255,255,.85); }

.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center p { margin-inline: auto; }

.section__foot { margin-top: var(--sp-7); display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.section__foot--center { justify-content: center; }

.grid { display: grid; gap: var(--sp-5); }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; } }
@media (min-width: 900px) { .split--reverse > :first-child { order: 2; } }

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
  background: var(--surface-2);
}
.media-frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.media-frame--tall img { aspect-ratio: 4 / 5; }

.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: var(--sp-7); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--sp-6); }
.prose ul, .prose ol { color: var(--ink-2); margin-bottom: var(--sp-4); max-width: var(--measure); }
.prose li { margin-bottom: var(--sp-2); }
.prose p { color: var(--ink-2); }
.prose img { border-radius: var(--radius); margin-block: var(--sp-5); }
.prose blockquote {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--accent-600);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Fraunces', serif;
  font-size: var(--step-1);
  color: var(--ink);
}

/* --- 7. Tarjetas --------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.card__media { position: relative; background: var(--surface-3); }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; gap: var(--sp-2); }
.card__title { font-size: var(--step-2); margin: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--brand-700); text-decoration: underline; }
.card__text { color: var(--ink-2); font-size: var(--step--1); margin: 0; }
.card__foot { margin-top: auto; padding-top: var(--sp-4); }

.card--service { padding: var(--sp-6); gap: var(--sp-3); }
.card--service .card__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: var(--sp-2);
  border-radius: var(--radius);
  background: var(--brand-100);
  color: var(--brand-700);
}
.card--service h3 { margin: 0; font-size: var(--step-1); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  color: var(--ink-3);
}
.meta time { font-variant-numeric: tabular-nums; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
}
.tag--accent { background: var(--accent-100); color: var(--accent-700); }
.tag--muted   { background: var(--surface-3); color: var(--ink-2); }

/* --- 8. Estadísticas ----------------------------------------------------- */

.stats {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}
.stat {
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
}
.stat__value {
  font-family: 'Fraunces', serif;
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-sun);
  font-variant-numeric: tabular-nums;
}
.stat__label { margin: var(--sp-2) 0 0; color: rgba(255,255,255,.88); font-size: var(--step--1); }

/* --- 9. Testimonios ------------------------------------------------------ */

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.quote__mark { color: var(--accent-600); }
.quote blockquote {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink);
}
.quote figcaption { margin-top: auto; color: var(--ink-2); font-size: var(--step--1); font-weight: 600; }

/* --- 9b. Directiva ------------------------------------------------------- */

/* Círculo con iniciales cuando no hay fotografía disponible. */
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-800);
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
}
.avatar--lg { width: 104px; height: 104px; font-size: 2rem; }
.avatar--solid { background: var(--brand-700); color: #fff; }
.avatar--photo { display: block; object-fit: cover; }
.avatar--empty {
  background: transparent;
  border: 2px dashed var(--border-strong);
  color: var(--ink-3);
}

.founder {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-600);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
@media (min-width: 820px) { .founder { grid-template-columns: minmax(0, 15rem) 1fr; } }

.founder__id { display: flex; align-items: center; gap: var(--sp-4); }
.founder__id h3 { margin: 0; font-size: var(--step-2); }
.founder__role {
  margin: var(--sp-1) 0 0;
  color: var(--accent-600);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Testimonio largo: se lee mejor con la tipografía de texto que con la de
   titulares. El primer párrafo hace de entrada y va algo mayor. */
.founder__quote { margin: 0; border: 0; padding: 0; }
.founder__quote p {
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}
.founder__quote p:first-child {
  font-family: 'Fraunces', serif;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
}
.founder__quote p:last-child { margin-bottom: 0; }
.founder__quote strong { color: var(--brand-700); font-weight: 700; }

.team {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.team__member {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.team__member:hover { box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.team__member .avatar { margin-bottom: var(--sp-2); }

.team__name { margin: 0; font-weight: 700; font-size: var(--step-0); color: var(--ink); }
.team__name--pending { color: var(--ink-3); font-style: italic; font-weight: 600; }
.team__role { margin: 0; color: var(--ink-2); font-size: var(--step--1); max-width: none; }

.team__note { margin: var(--sp-6) 0 0; color: var(--ink-2); font-size: var(--step--1); max-width: 60ch; }

/* --- 10. Agenda / eventos ------------------------------------------------ */

.agenda { display: grid; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }

.agenda__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  align-items: start;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.agenda__item:hover { border-color: var(--brand-200); box-shadow: var(--shadow-2); }
.agenda__item.is-past { opacity: .68; }

/* Con imagen: fecha · texto · miniatura */
.agenda__item--media { grid-template-columns: auto 1fr minmax(0, 200px); }

.agenda__media { border-radius: var(--radius); overflow: hidden; background: var(--surface-3); }
.agenda__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (max-width: 900px) {
  .agenda__item--media { grid-template-columns: auto 1fr; }
  .agenda__media { grid-column: 1 / -1; }
  .agenda__media img { aspect-ratio: 16 / 9; }
}

.agenda__date {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 84px;
  margin: 0;
  padding: var(--sp-3);
  border-radius: var(--radius);
  background: var(--brand-700);
  color: #fff;
  text-align: center;
}
.agenda__day {
  font-family: 'Fraunces', serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.agenda__month { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.agenda__year { font-size: .7rem; opacity: .8; }
.agenda__item.is-past .agenda__date { background: var(--ink-3); }

.agenda__body h3 { font-size: var(--step-1); margin: 0 0 var(--sp-2); }
.agenda__body p { color: var(--ink-2); font-size: var(--step--1); margin: 0 0 var(--sp-2); }
.agenda__facts { display: flex; flex-wrap: wrap; gap: var(--sp-4); color: var(--ink-2); font-size: var(--step--1); }
.agenda__facts span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.agenda__facts svg { flex: none; color: var(--brand-700); }

@media (max-width: 560px) {
  .agenda__item, .agenda__item--media { grid-template-columns: 1fr; gap: var(--sp-4); }
  .agenda__date { justify-self: start; min-width: 0; padding: var(--sp-2) var(--sp-4); display: flex; gap: var(--sp-2); align-items: baseline; }
  .agenda__day { font-size: 1.4rem; }
}

/* --- 11. Blog ------------------------------------------------------------ */

.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.filters__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur) var(--ease-out);
}
.filters__link:hover { border-color: var(--brand-700); color: var(--brand-700); background: var(--brand-100); }
.filters__link[aria-current="true"] { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  justify-content: center;
  align-items: center;
  margin-top: var(--sp-8);
  list-style: none;
  padding: 0;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--brand-700); color: var(--brand-700); background: var(--brand-100); }
.pagination [aria-current="page"] { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.article-header { padding-block: var(--sp-8) var(--sp-6); }
.article-header h1 { max-width: 22ch; }
.article-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  margin-bottom: var(--sp-7);
}
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.breadcrumb { font-size: var(--step--1); color: var(--ink-3); margin-bottom: var(--sp-4); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: var(--sp-2); color: var(--border-strong); }
.breadcrumb a { color: var(--ink-2); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.share p { margin: 0; font-weight: 600; font-size: var(--step--1); }

/* --- 12. Formularios ----------------------------------------------------- */

.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }
.field > label { font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.field__req { color: var(--accent-600); }
.field__hint { font-size: var(--step--1); color: var(--ink-3); margin: 0; }

.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* evita el zoom automático en iOS */
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--brand-600); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-700) 25%, transparent);
}
.textarea { min-height: 168px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%2346526B' stroke-width='2'%3E%3Cpath d='m1 1 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; }

.field--error .input, .field--error .textarea, .field--error .select { border-color: var(--danger-600); }
.field__error {
  display: flex; align-items: center; gap: var(--sp-2);
  margin: 0; color: var(--danger-600); font-size: var(--step--1); font-weight: 600;
}
.field__error svg { flex: none; }

.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--step--1);
}
.alert p { margin: 0; }
.alert svg { flex: none; margin-top: 2px; }
.alert--ok    { background: var(--success-100); border-color: color-mix(in srgb, var(--success-600) 35%, transparent); color: var(--success-600); }
.alert--error { background: var(--danger-100);  border-color: color-mix(in srgb, var(--danger-600) 35%, transparent);  color: var(--danger-600); }
.alert--info  { background: var(--brand-100);   border-color: var(--brand-200); color: var(--brand-800); }
.alert strong { color: inherit; }

.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* --- 13. Contacto -------------------------------------------------------- */

.contact-list { display: grid; gap: var(--sp-4); list-style: none; margin: 0 0 var(--sp-6); padding: 0; }
.contact-list li { display: flex; gap: var(--sp-4); align-items: flex-start; }
.contact-list__icon {
  display: grid; place-items: center;
  flex: none; width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-100);
  color: var(--brand-700);
}
.contact-list__label { display: block; font-size: var(--step--1); color: var(--ink-3); }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* --- 14. Llamado final --------------------------------------------------- */

.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand-800);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.cta-band::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 90% at 80% 10%, rgba(242,180,23,.28), transparent 60%),
    radial-gradient(55% 80% at 10% 90%, rgba(194,54,31,.35), transparent 60%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin-inline: auto; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-6); }

/* --- 15. Pie ------------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-y);
  background: var(--brand-900);
  color: rgba(255,255,255,.82);
  padding-top: var(--sp-8);
}
.site-footer a { color: rgba(255,255,255,.86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__grid {
  display: grid;
  gap: var(--sp-7);
  padding-bottom: var(--sp-8);
}
@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1.1fr; gap: var(--sp-8); }
}

.site-footer__mark { display: block; margin-bottom: var(--sp-5); line-height: 0; }

.site-footer__legal {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 var(--sp-3);
  max-width: 22ch;
}
.site-footer__note { font-size: var(--step--1); max-width: 34ch; }

.site-footer__heading {
  font-family: 'Public Sans', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-sun);
  margin: 0 0 var(--sp-4);
}
.site-footer__col ul { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: grid; gap: var(--sp-1); }
.site-footer__col li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;   /* objetivo táctil mínimo */
  padding-block: var(--sp-1);
}
.site-footer__contact address { font-size: var(--step--1); line-height: 1.7; padding-block: var(--sp-2); }

.social { display: flex; gap: var(--sp-2); list-style: none; margin: var(--sp-5) 0 0; padding: 0; }
.social a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.social a:hover { background: rgba(255,255,255,.16); border-color: #fff; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: space-between;
  align-items: center;
  padding-block: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: var(--step--1);
}
.site-footer__bottom p { margin: 0; max-width: none; }
.site-footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; }

/* --- 16. Estados vacíos y errores --------------------------------------- */

.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.empty-state svg { margin: 0 auto var(--sp-4); color: var(--ink-3); }
.empty-state p { margin-inline: auto; color: var(--ink-2); }

.error-page { text-align: center; padding-block: var(--sp-9); }
.error-page__code {
  font-family: 'Fraunces', serif;
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-200);
}

/* --- 17. Animación de entrada ------------------------------------------- */

/* La aparición progresiva solo se activa cuando hay JavaScript: la clase «js»
   la añade un script en el <head>. Si el script falla o está bloqueado, el
   contenido se ve con normalidad en lugar de quedar invisible para siempre. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
