/* =========================================================
   ACCESIBLE 360 — Sistema de diseño compartido
   ========================================================= */

:root{
  --bg: #14181c;
  --surface: #1b2025;
  --surface-2: #20262c;
  --text: #ECEDE9;
  --text-muted: #9BA5AC;
  --accent: #6FB3A8;      /* verde-petróleo: marca, enlaces, sello */
  --accent-strong: #4F8C82;
  --action: #E2A06F;      /* terracota: botones de acción */
  --action-text: #14181c;
  --gold: #E8B84B;        /* guiño de familia con accesible360.org, uso mínimo */
  --border: #2A3138;
  --focus: #E8B84B;
  --radius: 2px;
  --font: 'Atkinson Hyperlegible Next', system-ui, -apple-system, sans-serif;
  --max: 72rem;
}

[data-theme="light"]{
  --bg: #F7F5F0;
  --surface: #EFEAE2;
  --surface-2: #E6E0D5;
  --text: #1B2025;
  --text-muted: #5C6770;
  --accent: #2F6258;
  --accent-strong: #234A43;
  --action: #B6592F;
  --action-text: #FBF7F1;
  --gold: #9C7311;
  --border: #DCD4C6;
  --focus: #B6592F;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@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; }
}

body{
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: var(--accent); }
a:hover{ color: var(--accent-strong); }

:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden{
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link{
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--gold);
  color: #14181c;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  z-index: 100;
  transition: top .2s ease;
}
.skip-link:focus{ top: 1rem; }

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.wrap{
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
section{ padding-block: clamp(3rem, 8vw, 6rem); }
.eyebrow{
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
h1, h2, h3{ font-weight: 800; line-height: 1.15; margin: 0 0 1rem; }
h1{ font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -0.01em; }
h2{ font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3{ font-size: 1.15rem; }
p{ margin: 0 0 1rem; }
.lede{ font-size: 1.2rem; color: var(--text-muted); max-width: 42ch; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
header.site{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-bar{
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 0.7rem;
  gap: 1rem;
}
.brand{
  display: flex; align-items: center;
  text-decoration: none; color: var(--text);
  flex-shrink: 0;
}
.brand img{ height: 2.6rem; width: auto; display: block; }

nav.primary ul{
  list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0;
}
nav.primary a{
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding-block: 0.25rem; border-bottom: 2px solid transparent;
}
nav.primary a:hover{ border-color: var(--accent); }
nav.primary a[aria-current="page"]{ border-color: var(--gold); color: var(--gold); }

.nav-controls{ display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle{
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.45rem 0.7rem; cursor: pointer; font-family: inherit; font-size: 0.85rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.theme-toggle:hover{ border-color: var(--accent); }

.menu-toggle{
  display: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.5rem 0.75rem; cursor: pointer; font-family: inherit;
}

@media (max-width: 760px){
  nav.primary{
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  nav.primary.open{ display: block; }
  nav.primary ul{ flex-direction: column; gap: 0; padding: 0.5rem 1.5rem 1.5rem; }
  nav.primary a{ display: block; padding-block: 0.7rem; border-bottom: 1px solid var(--border); }
  .menu-toggle{ display: inline-flex; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  display: grid; gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 10vw, 7rem);
}
@media (min-width: 880px){
  .hero{ grid-template-columns: 1.15fr 0.85fr; }
}
.hero .stat{
  display: inline-flex; align-items: baseline; gap: 0.6rem;
  margin-block: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
}
.hero .stat strong{
  font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--gold);
}
.hero .stat span{ color: var(--text-muted); font-size: 0.95rem; max-width: 28ch; }

.cta-row{ display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.btn{
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: inherit; font-weight: 700; font-size: 0.98rem;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn-action{ background: var(--action); color: var(--action-text); }
.btn-action:hover{ background: var(--gold); color: var(--action-text); }
.btn-outline{ border-color: var(--border); color: var(--text); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }

/* =========================================================
   SEAL (signature element)
   ========================================================= */
.seal-wrap{ display: flex; justify-content: center; }
.seal{ width: min(100%, 320px); height: auto; }
.seal .ring-text{ font-family: var(--font); font-weight: 700; font-size: 8.5px; letter-spacing: 0.15em; fill: var(--accent); }
.seal .ring{ fill: none; stroke: var(--border); }
.seal .core-circle{ fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.seal .mark{ stroke: var(--gold); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.seal .rotor{ transform-origin: 100px 100px; animation: rotate 80s linear infinite; }
@keyframes rotate{ to{ transform: rotate(360deg); } }

/* =========================================================
   SECTIONS
   ========================================================= */
.alt{ background: var(--surface); border-block: 1px solid var(--border); }

.reasons-grid{
  display: grid; gap: 1.5rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.reason{
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
[data-theme="light"] .reason{ background: var(--surface-2); }
.reason .num{
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em;
  color: var(--gold); display: block; margin-bottom: 0.6rem;
}
.reason svg{ width: 2.2rem; height: 2.2rem; stroke: var(--accent); fill: none; stroke-width: 1.6; margin-bottom: 0.9rem; }
.reason p{ color: var(--text-muted); margin-bottom: 0; }
.reason p strong{ color: var(--text); }

.pub-grid{
  display: grid; gap: 1.5rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.pub-card{
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--bg);
}
[data-theme="light"] .pub-card{ background: var(--surface-2); }
.pub-card .kind{
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
}
.pub-card p{ color: var(--text-muted); flex-grow: 1; }
.pub-card a.more{ font-weight: 700; text-decoration: none; }
.pub-card a.more:hover{ text-decoration: underline; }

/* =========================================================
   COLABORADORES (logo wall)
   ========================================================= */
.partners-intro{ max-width: 56ch; }
.partners-grid{
  display: grid; gap: 1.25rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: stretch;
}
.partner-logo{
  display: flex; align-items: center; justify-content: center;
  height: 5.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
[data-theme="light"] .partner-logo{ background: var(--surface-2); }
.partner-logo img{
  max-height: 100%; max-width: 100%;
  filter: grayscale(1) opacity(0.75);
  transition: filter .2s ease;
}
.partner-logo:hover img,
.partner-logo:focus-within img{ filter: grayscale(0) opacity(1); }
.partner-logo .placeholder{
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  color: var(--text-muted); text-align: center; text-transform: uppercase;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact{
  display: grid; gap: 2.5rem;
}
@media (min-width: 760px){
  .contact{ grid-template-columns: 1fr 1fr; align-items: center; }
}
.contact address{ font-style: normal; color: var(--text-muted); }
.contact address p{ margin: 0 0 0.4rem; }
.contact address a{ color: var(--text); font-weight: 700; text-decoration: none; }
.contact address a:hover{ color: var(--accent); }

/* =========================================================
   LEGAL / CONTENT PAGES
   ========================================================= */
.legal{
  max-width: 48rem;
}
.legal h1{ font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2{ font-size: 1.4rem; margin-top: 2.5rem; border-top: 1px solid var(--border); padding-top: 1.75rem; }
.legal h3{ font-size: 1.05rem; margin-top: 1.5rem; }
.legal p, .legal li{ color: var(--text-muted); }
.legal strong{ color: var(--text); }
.legal ul, .legal ol{ padding-left: 1.4rem; }
.legal li{ margin-bottom: 0.4rem; }
.legal table{
  width: 100%; border-collapse: collapse; margin-block: 1.25rem;
  font-size: 0.92rem;
}
.legal th, .legal td{
  border: 1px solid var(--border); padding: 0.6rem 0.75rem; text-align: left;
  vertical-align: top;
}
.legal th{ background: var(--surface); color: var(--text); }
[data-theme="light"] .legal th{ background: var(--surface-2); }
.legal td{ color: var(--text-muted); }
.status-badge{
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem; border-radius: var(--radius);
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.05em;
  border: 1px solid var(--border);
}
.status-ok{ color: #7FBF8F; border-color: #7FBF8F; }
.status-progress{ color: var(--gold); border-color: var(--gold); }
.update-date{ color: var(--text-muted); font-size: 0.9rem; font-style: italic; }
.back-link{ display: inline-block; margin-top: 2.5rem; font-weight: 700; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site{
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-grid{
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem;
  justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.footer-grid .brand img{ height: 2.2rem; }
footer.site nav ul{ list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding: 0; margin: 0; }
footer.site nav a{ color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
footer.site nav a:hover{ color: var(--accent); }
.footer-bottom{ border-top: 1px solid var(--border); padding-top: 1.25rem; }
