/* ───────── XIKTLA · base compartida entre páginas ─────────
   Tokens de marca, barra, pie, botones y utilidades.
   (index.html todavía trae su propia copia en línea.)            */

:root {
  --xiktla: #0E3B32;
  --obsidiana: #082620;
  --agave: #C6E56A;
  --agave-tinta: #5F7A16;   /* agave oscurecido: texto sobre fondos claros (AA) */
  --cantera: #EDE6DA;
  --piedra: #D8CDB9;
  --marfil: #F9F6EE;

  --sora: "Sora", system-ui, sans-serif;
  --inter: "Inter", system-ui, sans-serif;

  --margen: clamp(1.25rem, 4vw, 4rem);
  --barra: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--xiktla);
  color: var(--xiktla);
  font-family: var(--inter);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
section[id] { scroll-margin-top: calc(var(--barra) + 3.25rem); }
:focus-visible { outline: 3px solid var(--agave); outline-offset: 4px; }
.claro :focus-visible { outline-color: var(--xiktla); }

.raya::after {
  content: ""; display: block;
  width: 3rem; height: 3px; margin-top: 1.25rem;
  background: var(--agave);
}
.claro .raya::after { background: var(--agave-tinta); }
/* La raya se dibuja una vez, cuando su título entra en pantalla */
.raya::after { transform-origin: left; transition: scale .9s cubic-bezier(.2, .8, .2, 1) .15s; }
.raya.por-ver::after { scale: 0 1; }

.titulo {
  font-family: var(--sora); font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1.05; letter-spacing: -.03em;
}

.ico { width: 2.5rem; height: 2.5rem; fill: none; stroke: currentColor; }

/* ───────── Barra ───────── */
.barra {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--barra);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--margen);
  background: var(--xiktla);
  color: var(--marfil);
  border-bottom: 1px solid rgba(249, 246, 238, .14);
}
.marca { display: flex; align-items: center; gap: .75rem; text-decoration: none; min-height: 2.75rem; }
.marca img { width: 2.25rem; height: 2.25rem; }
.marca b { font-family: var(--sora); font-weight: 600; font-size: 1.375rem; letter-spacing: .12em; }
.barra nav { display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 2.5rem); }
.barra .enlaces { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.5rem); }
.barra .enlaces a { text-decoration: none; font-size: .9375rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.barra .enlaces a:hover { color: var(--agave); }
.barra .enlaces a[aria-current] { border-bottom-color: var(--agave); }
.barra .llamado {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  background: var(--marfil); color: var(--xiktla);
  padding: 0 1.15rem; font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.barra .llamado:hover { background: var(--agave); }
.menu-boton {
  display: none; align-items: center; gap: .6rem; min-height: 2.75rem;
  background: none; border: 1px solid rgba(249, 246, 238, .5); color: inherit;
  padding: 0 .9rem; font: inherit; font-size: .9375rem; cursor: pointer;
}
.menu-boton i { width: 1rem; height: .6rem; border-top: 2px solid; border-bottom: 2px solid; transition: height .2s; }
.menu-boton[aria-expanded="true"] i { height: 0; border-bottom: 0; }
@media (max-width: 760px) {
  .menu-boton { display: inline-flex; }
  .barra .enlaces {
    position: absolute; top: var(--barra); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--obsidiana);
    border-bottom: 1px solid rgba(249, 246, 238, .14);
    padding: .5rem var(--margen) 1rem;
    visibility: hidden; opacity: 0; translate: 0 -.5rem;
    transition: opacity .2s, translate .2s, visibility 0s .2s;
  }
  .barra nav.abierto .enlaces { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
  .barra .enlaces a {
    padding: .95rem 0; font-family: var(--sora); font-size: 1.25rem;
    border-bottom: 1px solid rgba(249, 246, 238, .14);
  }
  .barra .enlaces a[aria-current] { color: var(--agave); border-bottom-color: rgba(249, 246, 238, .14); }
}

/* Franja de greca: cierre de página */
.franja-greca {
  height: 3rem;
  background: var(--cantera) url("../assets/patron-greca.svg") 0 0 / 6rem 6rem;
}

/* ───────── Botón ───────── */
.boton {
  display: inline-flex; align-items: center; gap: .75rem;
  background: var(--marfil); color: var(--xiktla);
  padding: .95rem 1.5rem; font-weight: 600; text-decoration: none;
  border: 0; font: inherit; font-weight: 600; cursor: pointer;
}
.boton:hover { background: var(--agave); }
.boton svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; transition: translate .2s; }
.boton:hover svg { translate: .3rem 0; }
.boton.oscuro { background: var(--xiktla); color: var(--marfil); }
.boton.oscuro:hover { background: var(--obsidiana); color: var(--agave); }

/* ───────── Pie ───────── */
.pie {
  background: var(--obsidiana); color: var(--marfil);
  padding: 2.5rem var(--margen);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 3rem;
  font-size: .9375rem;
}
.pie .marca b { font-size: 1.125rem; }
.pie a { text-underline-offset: .25em; }
.pie a:hover { color: var(--agave); }
@media (max-width: 420px) { .barra .marca b { font-size: 1.125rem; letter-spacing: .08em; } .barra .marca { gap: .5rem; } .menu-boton { padding: 0 .7rem; } .barra nav { gap: .5rem; } }
.pie small { font-size: inherit; opacity: .75; letter-spacing: .28em; font-family: var(--sora); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .raya::after { transition: none; }
  .barra .enlaces { transition: none; }
}
