/* IntegraCore · Base v1.0 — requiere tokens.css antes */

@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-VF.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 500 var(--fs-body)/1.55 var(--font-sans); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Secciones: el color de fondo llega al borde; el contenido se centra */
.band { background: var(--surface); color: var(--ink); padding: clamp(56px, 7vw, 112px) max(5vw, 20px); }
.wrap { max-width: var(--content-max); margin-inline: auto; }

/* Tipografía */
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: 700; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.t-h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 700; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.t-h2 { font-size: var(--fs-h2); line-height: 1.2; font-weight: 700; margin: 0; }
.t-lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-muted); margin: 0; max-width: 60ch; }
.t-body { font-size: var(--fs-body); line-height: 1.55; color: var(--ink-muted); margin: 0; max-width: 68ch; }
.t-small { font-size: var(--fs-small); line-height: 1.5; font-weight: 600; color: var(--ink-subtle); margin: 0; }
.t-etiqueta { font: 500 var(--fs-etiqueta)/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin: 0; }
.t-nota { font: 500 var(--fs-nota)/1.5 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--mark); margin: 0; }

/* Botones: el único elemento redondeado */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill); border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-ink); font: 600 0.9375rem/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease-draw), background-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }

/* Encabezado */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 76px; padding-inline: max(5vw, 20px); max-width: calc(var(--content-max) + 10vw); }
.site-head .logo img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: var(--fs-small); color: var(--ink-muted); padding: 12px 0; }
.nav a:not(.btn):hover { color: var(--ink); }

/* Tarjeta: esquinas rectas, sin barras de acento */
.card { background: var(--surface-raised); padding: var(--space-4); }

/* Lista de método */
.metodo { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-weight: 600; font-size: var(--fs-small); color: var(--ink-muted); }
.metodo li { display: grid; grid-template-columns: 1.4em 1fr; }
.metodo .ok { color: var(--signal); }
.metodo .pend { color: var(--mark); }

/* Geometría ------------------------------------------------------------
   Estructura de un SVG de geometría:
   <svg class="geo" viewBox="…">
     <g class="geo-cons">…líneas punteadas (sólo nivel método)…</g>
     <polygon class="geo-layer" pathLength="1" style="--i:0; opacity:.3" …/>
     <circle class="geo-dot" style="--i:4" …/>
   </svg>
   --i fija el orden en que se dibuja cada capa (M.02: en el orden en que se lee). */
.geo { overflow: visible; }
.geo .geo-layer { fill: none; stroke: url(#ic-geo-grad); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.geo .geo-cons { fill: none; stroke: var(--construction); stroke-width: 1; stroke-dasharray: 4 6; opacity: .6; vector-effect: non-scaling-stroke; }
.geo .geo-guide { fill: none; stroke: var(--mark); stroke-width: 1; vector-effect: non-scaling-stroke; }
.geo .geo-vertex { fill: var(--surface); stroke: var(--mark); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.geo .geo-dot { fill: var(--signal); }
.geo .geo-note { font: 500 12px var(--font-mono); letter-spacing: .04em; fill: var(--mark); }

/* Movimiento: se dibuja, no aparece (M.01). Sin JS o con movimiento reducido, se ve completa. */
.js .geo .geo-layer { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur-layer) var(--ease-draw) calc(var(--i, 0) * var(--stagger)); }
.js .geo .geo-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 300ms var(--ease-draw) calc(var(--i, 4) * var(--stagger) + 150ms); }
.js .geo .geo-cons, .js .geo .geo-guide, .js .geo .geo-vertex, .js .geo .geo-note { opacity: 0; transition: opacity 500ms ease-out calc(var(--i, 0) * var(--stagger)); }
.js .geo.is-drawn .geo-layer { stroke-dashoffset: 0; }
.js .geo.is-drawn .geo-dot { transform: scale(1); }
.js .geo.is-drawn .geo-cons { opacity: .6; }
.js .geo.is-drawn .geo-guide, .js .geo.is-drawn .geo-vertex, .js .geo.is-drawn .geo-note { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .geo .geo-layer, .js .geo .geo-dot, .js .geo .geo-cons, .js .geo .geo-guide, .js .geo .geo-vertex, .js .geo .geo-note { transition: none; }
  .js .geo .geo-layer { stroke-dashoffset: 0; }
  .js .geo .geo-dot { transform: none; }
  .js .geo .geo-cons { opacity: .6; }
  .js .geo .geo-guide, .js .geo .geo-vertex, .js .geo .geo-note { opacity: 1; }
}

/* Pie */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.site-foot img { height: 58px; width: auto; }
.geo .geo-label { font: 500 12px var(--font-mono); letter-spacing: .02em; fill: var(--ink-subtle); }
.js .geo .geo-label { opacity: 0; transition: opacity 500ms ease-out calc(var(--i, 0) * var(--stagger)); }
.js .geo.is-drawn .geo-label { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js .geo .geo-label { transition: none; opacity: 1; } }
