/* =========================================================
   ASOINCO 2026 — Sistema de diseño
   Bold minimalism · Performance-first · WCAG AA/AAA
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca — muestreada del logotipo ASOINCO (Asoinco · Impulsando Empresas) */
  --yellow:     #FCD22A;   /* amarillo del isotipo — acento principal */
  --yellow-600: #E8BC0A;
  --yellow-ink: #7A5B00;   /* amarillo legible como TEXTO sobre fondo claro */
  --blue:       #2A72A8;   /* azul del isotipo */
  --blue-600:   #215B87;
  --blue-ink:   #1B527A;   /* azul legible como texto sobre fondo claro */
  --green:      #96CC48;   /* verde lima del isotipo */
  --green-600:  #78AC2C;
  --green-ink:  #4C7317;   /* verde legible como texto sobre fondo claro */
  --charcoal:   #303636;   /* gris del logotipo */
  --navy:       #123049;   /* azul profundo: fondo de secciones oscuras */
  --ink:        #0B1A26;
  --sand:       #F5F6F3;
  --paper:      #FFFFFF;

  /* Semánticos (modo oscuro por defecto en hero, claro en cuerpo) */
  --bg:          var(--paper);
  --bg-alt:      var(--sand);
  --fg:          #232A2A;          /* carbón del logo, un punto más oscuro */
  --fg-muted:    #55605E;          /* 7.0:1 sobre blanco — AAA */
  --fg-invert:   #F2F6F8;
  --fg-invert-muted: #A9C3D3;
  --line:        #E3E6E1;
  --line-dark:   rgba(242,246,248,.16);
  --accent:      var(--yellow);

  /* Tipografía fluida */
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-body:    "Inter", system-ui, -apple-system, sans-serif;

  --t-xs:  clamp(.75rem, .72rem + .12vw, .8125rem);
  --t-sm:  clamp(.875rem, .84rem + .18vw, .9375rem);
  --t-base:clamp(1rem, .96rem + .22vw, 1.125rem);
  --t-lg:  clamp(1.125rem, 1.05rem + .4vw, 1.375rem);
  --t-xl:  clamp(1.5rem, 1.3rem + .9vw, 2.125rem);
  --t-2xl: clamp(2rem, 1.6rem + 1.9vw, 3.25rem);
  --t-3xl: clamp(2.75rem, 1.9rem + 4.1vw, 6rem);

  /* Espaciado fluido */
  --s-2xs: clamp(.25rem, .23rem + .1vw, .375rem);
  --s-xs:  clamp(.5rem, .45rem + .22vw, .75rem);
  --s-sm:  clamp(.75rem, .67rem + .35vw, 1.125rem);
  --s-md:  clamp(1rem, .89rem + .5vw, 1.5rem);
  --s-lg:  clamp(1.5rem, 1.3rem + .9vw, 2.5rem);
  --s-xl:  clamp(2.25rem, 1.8rem + 2vw, 4rem);
  --s-2xl: clamp(3.5rem, 2.6rem + 4vw, 7rem);

  /* Movimiento */
  --d-fast: 160ms;
  --d-norm: 280ms;
  --d-slow: 620ms;
  --ease:   cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.4,.5,1);

  /* Elevación */
  --e1: 0 1px 2px rgba(11,26,38,.06), 0 2px 8px rgba(11,26,38,.04);
  --e2: 0 4px 12px rgba(11,26,38,.08), 0 12px 32px rgba(11,26,38,.06);
  --e3: 0 12px 28px rgba(11,26,38,.12), 0 32px 64px rgba(11,26,38,.10);

  --radius: 14px;
  --radius-lg: 24px;
  --wrap: 1240px;
  --nav-h: 86px;   /* alto suficiente para el logotipo con su bajada */
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:focus-within { scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
/* La regla de agente de usuario para [hidden] es `display:none` sin clase, así
   que cualquier `.algo { display:flex }` la anula. Esto la restituye. */
[hidden] { display: none !important; }
img { height: auto; }
h1,h2,h3,h4 { font-family: var(--f-display); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--fg-invert);
  padding: var(--s-sm) var(--s-md); border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s-2xl); }
.section--tight { padding-block: var(--s-xl); }
.section--sand { background: var(--bg-alt); }
.section--dark { background: var(--navy); color: var(--fg-invert); }
.section--dark h2, .section--dark h3 { color: var(--fg-invert); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--f-display); font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--blue-ink);
  margin-bottom: var(--s-sm);
}
.eyebrow::before { content:""; width: 26px; height: 2px; background: var(--yellow); }
.section--dark .eyebrow { color: var(--green); }

.h-sec { font-size: var(--t-2xl); max-width: 20ch; }
.lede { font-size: var(--t-lg); color: var(--fg-muted); max-width: 62ch; margin-top: var(--s-md); }
.section--dark .lede { color: var(--fg-invert-muted); }

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.6rem;
  font-family: var(--f-display); font-weight: 600; font-size: var(--t-sm);
  letter-spacing: .01em; border: 1.5px solid transparent; border-radius: 999px;
  cursor: pointer; background: none;
  transition: transform var(--d-fast) var(--spring),
              background-color var(--d-norm) var(--ease),
              color var(--d-norm) var(--ease),
              border-color var(--d-norm) var(--ease),
              box-shadow var(--d-norm) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--yellow); color: #2B2000; }
.btn--primary:hover { background: var(--yellow-600); box-shadow: 0 8px 24px rgba(252,210,42,.35); }
.btn--solid { background: var(--blue); color: var(--fg-invert); }
.btn--solid:hover { background: var(--blue-600); box-shadow: 0 8px 24px rgba(42,114,168,.3); }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: currentColor; }
.btn--ghost:hover > span { mix-blend-mode: difference; }
.btn--onDark { border-color: rgba(242,246,248,.45); color: var(--fg-invert); }
.btn--onDark:hover { background: var(--fg-invert); color: var(--ink); }
.btn--sm { min-height: 40px; padding: .5rem 1.1rem; font-size: var(--t-xs); }

/* ---------- 5. Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color var(--d-norm) var(--ease),
              box-shadow var(--d-norm) var(--ease),
              backdrop-filter var(--d-norm) var(--ease);
}
.nav__inner { display: flex; align-items: center; gap: var(--s-md); width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.nav__brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
/* El logotipo es el archivo original de ASOINCO. Se sirven dos versiones
   del mismo PNG —la de marca y otra con el texto aclarado— porque el
   logotipo es gris oscuro y desaparecería sobre el azul del hero. */
.nav__logo { height: 50px; width: auto; flex: none; }
.nav__logo--oscuro { display: none; }
.nav.is-stuck .nav__logo--claro { display: none; }
.nav.is-stuck .nav__logo--oscuro { display: block; }
.nav__logo--pie { height: 66px; }
.nav__links { display: flex; gap: var(--s-xs); align-items: center; }
.nav__links a {
  position: relative; padding: .5rem .8rem; border-radius: 999px;
  font-size: var(--t-sm); font-weight: 500; color: var(--fg-invert);
  transition: color var(--d-norm) var(--ease), background-color var(--d-norm) var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform var(--d-norm) var(--ease);
}
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }

.nav.is-stuck { background: rgba(255,255,255,.82); backdrop-filter: blur(16px) saturate(180%); box-shadow: 0 1px 0 var(--line), var(--e1); }
.nav.is-stuck .nav__links a { color: var(--fg); }
.nav.is-stuck .btn--onDark { border-color: var(--blue); color: var(--blue-ink); }
.nav.is-stuck .btn--onDark:hover { background: var(--blue); color: var(--fg-invert); }

.nav__toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(242,246,248,.12); cursor: pointer; }
.nav__toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--fg-invert); transition: transform var(--d-norm) var(--ease), opacity var(--d-fast); }
.nav.is-stuck .nav__toggle { background: rgba(11,26,38,.07); }
.nav.is-stuck .nav__toggle span { background: var(--fg); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: var(--s-md) 1.25rem var(--s-lg);
    background: var(--navy); border-top: 1px solid var(--line-dark);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--d-norm) var(--ease), transform var(--d-norm) var(--ease);
    max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { color: var(--fg-invert) !important; padding: .9rem .4rem; border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .nav__links a::after { display: none; }
  .nav__links .btn { margin-top: var(--s-md); border-color: rgba(242,246,248,.45) !important; color: var(--fg-invert) !important; }
}

/* ---------- 6. Hero + escena 3D ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center;
  background: radial-gradient(120% 90% at 68% 8%, #1D4E76 0%, var(--navy) 46%, var(--ink) 100%);
  color: var(--fg-invert); overflow: hidden; isolation: isolate;
}
#scene { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.1s var(--ease); }
#scene.is-ready { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(11,26,38,.94) 0%, rgba(11,26,38,.72) 42%, rgba(11,26,38,.15) 72%, transparent 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: calc(var(--nav-h) + var(--s-xl)) var(--s-xl); }
.hero__badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .45rem .55rem; border-radius: 999px;
  background: rgba(242,246,248,.08); border: 1px solid rgba(242,246,248,.18);
  backdrop-filter: blur(8px);
  font-size: var(--t-xs); font-weight: 500; letter-spacing: .04em; color: var(--fg-invert-muted);
}
.hero__badge b { color: var(--green); font-weight: 700; }
/* En pantallas estrechas la insignia se parte en dos líneas: recortamos la
   coletilla geográfica, que ya está en el logotipo y en el pie. */
@media (max-width: 540px) { .badge__extra { display: none; } }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(252,210,42,.7); animation: pulse 2.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(252,210,42,0); } 100% { box-shadow: 0 0 0 0 rgba(252,210,42,0); } }

.hero h1 { font-size: var(--t-3xl); max-width: 15ch; margin-top: var(--s-md); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero__sub { font-size: var(--t-lg); color: var(--fg-invert-muted); max-width: 46ch; margin-top: var(--s-md); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-top: var(--s-lg); }

.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: var(--s-md); translate: -50% 0;
  display: grid; justify-items: center; gap: .5rem;
  font-size: var(--t-xs); letter-spacing: .22em; text-transform: uppercase; color: var(--fg-invert-muted);
}
.hero__scroll i { display: block; width: 1px; height: 40px; background: linear-gradient(var(--yellow), transparent); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { 0%{transform:scaleY(0);transform-origin:top} 45%{transform:scaleY(1);transform-origin:top} 55%{transform:scaleY(1);transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

/* ---------- 7. Cifras ---------- */
.stats { border-block: 1px solid var(--line); background: var(--paper); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats__item { padding: var(--s-lg) var(--s-md); border-left: 1px solid var(--line); }
.stats__item:first-child { border-left: 0; }
.stats__n { font-family: var(--f-display); font-size: var(--t-2xl); font-weight: 800; color: var(--blue-ink); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stats__n sup { font-size: .45em; color: var(--yellow-ink); vertical-align: super; margin-left: .1em; }
.stats__l { font-size: var(--t-sm); color: var(--fg-muted); margin-top: .25rem; }
@media (max-width: 760px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(odd) { border-left: 0; }
  .stats__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- 8. Grillas y tarjetas ---------- */
.grid { display: grid; gap: var(--s-md); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--s-xl); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: var(--s-lg); } }

.card {
  position: relative; padding: var(--s-lg); border-radius: var(--radius-lg);
  background: var(--paper); border: 1px solid var(--line); overflow: hidden;
  transition: transform var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease), border-color var(--d-norm) var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--green) 55%, var(--blue));
  transform: scaleX(0); transform-origin: left; transition: transform var(--d-norm) var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--e3); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card h3 { font-size: var(--t-lg); margin-bottom: var(--s-xs); }
.card p { color: var(--fg-muted); font-size: var(--t-sm); }
.card__ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(42,114,168,.14), rgba(150,204,72,.18));
  color: var(--blue-ink); margin-bottom: var(--s-md);
}
.card__link { display: inline-flex; align-items: center; gap: .4rem; margin-top: var(--s-md); font-family: var(--f-display); font-weight: 600; font-size: var(--t-sm); color: var(--blue-ink); }
.card__link svg { transition: transform var(--d-norm) var(--spring); }
.card:hover .card__link svg { transform: translateX(4px); }
.card--dark { background: rgba(242,246,248,.04); border-color: var(--line-dark); color: var(--fg-invert); }
.card--dark p { color: var(--fg-invert-muted); }
.card--dark .card__ico,
.section--dark .card__ico { background: rgba(150,204,72,.16); color: var(--green); }

/* Cobertura completa del enlace de la tarjeta */
.card__link::after { content: ""; position: absolute; inset: 0; }

/* ---------- 9. Ejes estratégicos (acordeón) ---------- */
.axes { display: grid; gap: var(--s-xs); }
.axis {
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background: rgba(242,246,248,.03); overflow: hidden;
  transition: background-color var(--d-norm) var(--ease), border-color var(--d-norm) var(--ease);
}
.axis[open] { background: rgba(242,246,248,.06); border-color: rgba(150,204,72,.4); }
.axis summary {
  display: flex; align-items: center; gap: var(--s-md); padding: var(--s-md) var(--s-lg);
  cursor: pointer; list-style: none; min-height: 56px;
}
.axis summary::-webkit-details-marker { display: none; }
.axis__n { font-family: var(--f-display); font-size: var(--t-sm); font-weight: 700; color: var(--yellow); font-variant-numeric: tabular-nums; }
.axis__t { font-family: var(--f-display); font-size: var(--t-lg); font-weight: 700; margin-right: auto; }
.axis__x { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; transition: transform var(--d-norm) var(--spring), background-color var(--d-norm); }
.axis[open] .axis__x { transform: rotate(45deg); background: var(--yellow); color: var(--ink); }
.axis__body { padding: 0 var(--s-lg) var(--s-lg) calc(var(--s-lg) + 2.5rem); }
.axis__body li { position: relative; padding-left: 1.35rem; margin-bottom: var(--s-sm); color: var(--fg-invert-muted); font-size: var(--t-sm); }
.axis__body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--green); }
@media (max-width: 640px) { .axis__body { padding-left: var(--s-lg); } .axis summary { padding-inline: var(--s-md); } }

/* ---------- 10. Directorio de socios ---------- */
.dir__bar { display: flex; flex-wrap: wrap; gap: var(--s-sm); align-items: center; margin-bottom: var(--s-lg); }
.field { position: relative; flex: 1 1 320px; }
.field svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--fg-muted); pointer-events: none; }
.field input, .select {
  width: 100%; min-height: 52px; padding: .8rem 1.1rem .8rem 3rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
  transition: border-color var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease);
}
.select { padding-left: 1.3rem; flex: 0 1 220px; cursor: pointer; }
.field input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(42,114,168,.12); outline: none; }
.dir__count { font-size: var(--t-sm); color: var(--fg-muted); margin-left: auto; }
.dir__count b { color: var(--blue-ink); font-variant-numeric: tabular-nums; }

.socio {
  display: grid; gap: var(--s-xs); padding: var(--s-md) var(--s-lg);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  transition: transform var(--d-fast) var(--ease), box-shadow var(--d-norm) var(--ease), border-color var(--d-norm);
}
.socio:hover { transform: translateY(-3px); box-shadow: var(--e2); border-color: rgba(42,114,168,.35); }
.socio__top { display: flex; align-items: start; gap: var(--s-sm); }
.socio__ini { width: 42px; height: 42px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--navy); color: var(--green); font-family: var(--f-display); font-weight: 700; font-size: .9rem; }
.socio__nom { font-family: var(--f-display); font-weight: 700; font-size: var(--t-base); line-height: 1.25; }
.socio__raz { font-size: var(--t-xs); color: var(--fg-muted); }
.tag { display: inline-block; padding: .22rem .7rem; border-radius: 999px; background: rgba(42,114,168,.13); color: var(--blue-ink); font-size: var(--t-xs); font-weight: 600; }
.socio__meta { display: grid; gap: .3rem; font-size: var(--t-sm); color: var(--fg-muted); }
.socio__meta span { display: flex; gap: .5rem; align-items: center; }
.dir__empty { grid-column: 1/-1; text-align: center; padding: var(--s-2xl) var(--s-md); color: var(--fg-muted); }

.notice {
  display: flex; gap: var(--s-sm); padding: var(--s-md) var(--s-lg); border-radius: var(--radius);
  background: rgba(252,210,42,.1); border: 1px solid rgba(252,210,42,.35);
  font-size: var(--t-sm); margin-bottom: var(--s-lg);
}
.notice b { color: var(--yellow-ink); }

/* ---------- 11. Convenios ---------- */
.benefit {
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-sm);
  padding: var(--s-lg); border-radius: var(--radius-lg);
  background: var(--paper); border: 1px solid var(--line);
  transition: transform var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease);
}
.benefit:hover { transform: translateY(-5px); box-shadow: var(--e2); }
/* `.benefit p` y `.post p` se declaran más abajo con la misma especificidad,
   así que ganarían por orden. Subimos a (0-2-1) para que estos rótulos
   conserven su tamaño y color. */
.benefit p.benefit__off {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-display); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--yellow-ink);
}
.benefit p.benefit__off::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--yellow); }
.benefit h3 { font-size: var(--t-base); }
.benefit p { font-size: var(--t-sm); color: var(--fg-muted); }
.benefit__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-sm); padding-top: var(--s-sm); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--fg-muted); }

/* ---------- 12. Noticias ---------- */
.post {
  display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--paper); border: 1px solid var(--line);
  transition: transform var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease);
}
.post:hover { transform: translateY(-5px); box-shadow: var(--e3); }
.post__img { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.post:hover .post__img img { transform: scale(1.06); }
.post__cat { position: absolute; left: var(--s-sm); top: var(--s-sm); padding: .28rem .75rem; border-radius: 999px; background: rgba(11,26,38,.78); color: var(--fg-invert); font-size: var(--t-xs); font-weight: 600; backdrop-filter: blur(6px); }
.post__body { padding: var(--s-md) var(--s-lg) var(--s-lg); display: grid; gap: .5rem; align-content: start; }
.post p.post__date { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.post h3 { font-size: var(--t-base); line-height: 1.3; }
.post p { font-size: var(--t-sm); color: var(--fg-muted); }

/* ---------- 13. Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.gallery figure { position: relative; margin: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); background: rgba(242,246,248,.05); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease), filter var(--d-slow); filter: saturate(.85); }
.gallery figure:hover img { transform: scale(1.08); filter: saturate(1.1); }
.gallery figure:nth-child(1), .gallery figure:nth-child(6) { grid-row: span 2; aspect-ratio: 4/6; }
@media (max-width: 640px) { .gallery figure:nth-child(1), .gallery figure:nth-child(6) { grid-row: auto; aspect-ratio: 4/3; } }

/* ---------- 14. Formulario / Contacto ---------- */
.form { display: grid; gap: var(--s-md); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: .4rem; font-size: var(--t-sm); font-weight: 600; font-family: var(--f-display); }
.form input, .form textarea, .form select {
  min-height: 52px; padding: .85rem 1.1rem; border-radius: var(--radius);
  border: 1.5px solid var(--line-dark); background: rgba(242,246,248,.05); color: var(--fg-invert);
  transition: border-color var(--d-norm) var(--ease), box-shadow var(--d-norm) var(--ease), background-color var(--d-norm);
}
.form textarea { min-height: 130px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: rgba(185,204,195,.55); }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--green); background: rgba(242,246,248,.08);
  box-shadow: 0 0 0 4px rgba(150,204,72,.16);
}
.form select option { background: var(--navy); }
.form__hint { font-size: var(--t-xs); color: var(--fg-invert-muted); font-weight: 400; }
/* El error va pegado a su campo, no agrupado arriba: así se sabe cuál falla. */
.form__error {
  display: flex; align-items: center; gap: .4rem;
  font-size: var(--t-xs); font-weight: 500; color: #FFC2B4;
}
.form__error::before {
  content: "!"; flex: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: #E5534B; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
}
.form [aria-invalid="true"] { border-color: #E5534B; background: rgba(229,83,75,.08); }
.form [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(229,83,75,.18); }
.form__ok { padding: var(--s-md); border-radius: var(--radius); background: rgba(150,204,72,.14); border: 1px solid rgba(150,204,72,.4); font-size: var(--t-sm); }

.contact-list { display: grid; gap: var(--s-md); }
.contact-item { display: flex; gap: var(--s-md); align-items: flex-start; }
.contact-item .card__ico { margin: 0; flex: none; }
.contact-item h4 { font-size: var(--t-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: .2rem; }
.contact-item p, .contact-item a { color: var(--fg-invert-muted); font-size: var(--t-sm); }
.contact-item a:hover { color: var(--fg-invert); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 15. CTA de cierre ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: var(--s-2xl) var(--s-xl); text-align: center; color: var(--fg-invert);
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 55%, var(--ink) 100%);
}
.cta::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(252,210,42,.4), transparent 62%); filter: blur(28px);
}
.cta > * { position: relative; }
.cta h2 { font-size: var(--t-2xl); max-width: 18ch; margin-inline: auto; }
.cta p { color: var(--fg-invert-muted); max-width: 52ch; margin: var(--s-md) auto 0; }
.cta__btns { display: flex; flex-wrap: wrap; gap: var(--s-sm); justify-content: center; margin-top: var(--s-lg); }

/* ---------- 16. Footer ---------- */
.foot { background: var(--ink); color: var(--fg-invert-muted); padding-block: var(--s-xl) var(--s-lg); }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-lg); }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h4 { font-size: var(--t-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: var(--s-sm); }
.foot li { margin-bottom: .5rem; font-size: var(--t-sm); }
.foot a:hover { color: var(--fg-invert); }
.foot__brand p { font-size: var(--t-sm); max-width: 34ch; margin-top: var(--s-sm); }
.social { display: flex; gap: .5rem; margin-top: var(--s-md); }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line-dark); transition: background-color var(--d-norm) var(--ease), transform var(--d-fast) var(--spring), color var(--d-norm); }
.social a:hover { background: var(--yellow); color: var(--ink); transform: translateY(-3px); }
.foot__bar { display: flex; flex-wrap: wrap; gap: var(--s-sm); justify-content: space-between; margin-top: var(--s-xl); padding-top: var(--s-md); border-top: 1px solid var(--line-dark); font-size: var(--t-xs); }

/* ---------- 17. Cursor personalizado ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; will-change: transform; }
.cursor { width: 34px; height: 34px; border: 1.5px solid var(--yellow); margin: -17px 0 0 -17px; transition: width var(--d-norm) var(--spring), height var(--d-norm) var(--spring), margin var(--d-norm) var(--spring), background-color var(--d-norm); }
.cursor-dot { width: 5px; height: 5px; background: var(--yellow); margin: -2.5px 0 0 -2.5px; }
.cursor.is-hot { width: 52px; height: 52px; margin: -26px 0 0 -26px; background: rgba(252,210,42,.16); }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* ---------- 18. Revelados al scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease); }
[data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal-stagger].is-in > *:nth-child(n+7) { transition-delay: 420ms; }

.progress { position: fixed; inset: 0 auto auto 0; z-index: 101; height: 3px; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--yellow), var(--green) 55%, var(--blue)); }

/* ---------- 19. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .cursor, .cursor-dot { display: none; }
}

/* ---------- 20. Impresión ---------- */
@media print {
  .nav, .hero__scroll, #scene, .cursor, .cursor-dot, .progress { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ---------- 21. Objetivos táctiles en pantallas sin puntero fino ----------
   Los enlaces embebidos en texto (teléfono, correo, listados del pie) miden
   ~23px de alto: por debajo del mínimo de 44px recomendado. En dispositivos
   táctiles los expandimos sin alterar el diseño en escritorio.            */
@media (hover: none), (pointer: coarse) {
  .socio__meta { gap: 0; }
  .socio__meta span { min-height: 44px; }
  .socio__meta a { display: flex; align-items: center; flex: 1; min-height: 44px; }
  .contact-item p a,
  .foot li a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot li { margin-bottom: 0; }
  .nav__brand { min-height: 44px; }
}
