/* Vertia — Webfonts (Google Fonts)
   Archivo        : titulares + UI. Grotesque neutra; a peso 800 con tracking
                    muy cerrado da presencia de afiche sin leer como periódico.
   IBM Plex Mono  : etiquetas, eyebrows, cifras — la voz de "sistemas".
   NOTA: la identidad anterior usaba Schibsted Grotesk y Newsreader. Ambas
   quedan retiradas; Newsreader (la itálica de "transformación") se elimina
   deliberadamente porque era el recurso que hacía genérica la página. */
/* Las fuentes se cargan con <link> + preconnect en base.html (más rápido
   que un @import encadenado). Aquí solo quedan las variables. */
:root{
  --font-sans: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Vertia — Color tokens (relanzamiento 2026)
   Base cálida heredada de la identidad anterior; el acento pasa de latón a
   terracota. El latón permanece como acento secundario para que el material
   ya publicado siga leyéndose como de la misma marca. */
:root{
  /* Papel — neutros cálidos */
  --paper-50:  #FDFBF6;  /* tarjeta / superficie elevada */
  --paper-100: #F7F4ED;  /* fondo de la página */
  --paper-200: #EFEADF;  /* superficie hundida / fila alterna */
  --paper-300: #E0D9C9;  /* línea hairline sobre papel */
  --paper-400: #CFC6B2;  /* borde de control */
  --paper-500: #D8D0BE;  /* borde de input */

  /* Tinta — carbones cálidos */
  --ink-950: #17150F;  /* superficies oscuras, texto primario */
  --ink-800: #39342B;  /* texto de cuerpo sobre papel */
  --ink-600: #4A4439;  /* texto secundario */
  --ink-500: #6E675A;  /* etiquetas pequeñas sobre papel (AA a 11px) */
  --ink-400: #8A8170;  /* texto sobre tinta */
  --ink-300: #A39B8A;  /* cuerpo sobre tinta */
  --ink-200: #BDB5A4;  /* cuerpo sobre tinta, mayor contraste */
  --ink-line: #3A342A; /* hairline sobre tinta */

  /* Acento primario — terracota */
  --accent-300: #E3C3B4;  /* borde de chip */
  --accent-500: #C8451C;  /* RELLENOS: botones, bandas, palabra del titular */
  --accent-600: #AE3C18;  /* TEXTO PEQUEÑO: etiquetas 11–14px (AA sobre papel) */
  --accent-700: #8E3012;  /* hover / pressed */

  /* Acento secundario — latón (continuidad con la marca anterior) */
  --brass-300: #C1954F;  /* etiquetas sobre tinta */
  --brass-500: #A67C3D;  /* acento de detalle */

  --danger-500: #A32318;

  /* Roles semánticos */
  --surface-app:     var(--paper-100);
  --surface-card:    var(--paper-50);
  --surface-inverse: var(--ink-950);
  --text-primary:    var(--ink-950);
  --text-body:       var(--ink-800);
  --text-muted:      var(--ink-600);
  --text-faint:      var(--ink-500);
  --text-on-dark:    var(--paper-100);
  --line-hair:       var(--paper-300);
  --line-on-dark:    var(--ink-line);

  /* Un solo acento por rol. NUNCA use --accent-500 en texto bajo 18px:
     no alcanza 4.5:1 sobre papel. Use --accent-600. */
  --accent-fill:     var(--accent-500);
  --accent-text:     var(--accent-600);
  --accent-press:    var(--accent-700);
}

/* Vertia — Tipografía
   Regla central: la escala del titular es lo que da presencia. No la reduzca
   para "que quepa"; reduzca el texto. */
:root{
  --text-micro:  11px;   /* eyebrow mono, MAYÚSCULAS, tracking 0.16em */
  --text-label:  10.5px; /* etiqueta de campo */
  --text-small:  13.5px;
  --text-body:   16px;
  --text-lead:   19px;   /* párrafo de entrada */

  --tracking-display: -0.05em;  /* titular h1 */
  --tracking-head:    -0.042em; /* h2 / h3 */
  --tracking-mono:     0.16em;  /* eyebrows */

  --leading-display: 0.94;
  --leading-head:    0.98;
  --leading-body:    1.6;
}

/* Escala fluida. El h1 sube hasta 138px a propósito. */
.v-display { font-family: var(--font-sans); font-weight: 800; font-size: clamp(44px, 9.6vw, 138px); line-height: var(--leading-display); letter-spacing: var(--tracking-display); text-wrap: pretty; }
.v-h2      { font-family: var(--font-sans); font-weight: 800; font-size: clamp(32px, 5.8vw, 80px);  line-height: var(--leading-head);    letter-spacing: var(--tracking-head); }
.v-h3      { font-family: var(--font-sans); font-weight: 800; font-size: clamp(28px, 4.4vw, 54px);  line-height: 1;                      letter-spacing: var(--tracking-head); }
.v-lead    { font-family: var(--font-sans); font-size: clamp(16.5px, 1.9vw, 19px); line-height: 1.6; color: var(--text-muted); }
.v-body    { font-family: var(--font-sans); font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-body); }
.v-eyebrow { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--accent-text); }

/* El wordmark ES texto, no un archivo de imagen. */
.v-wordmark { font-family: var(--font-sans); font-weight: 800; letter-spacing: -0.045em; color: var(--text-primary); }
.v-wordmark span { color: var(--accent-fill); }

/* Vertia — Espaciado. Retícula base 4px. */
:root{
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  --container: 1280px;
  --gutter: clamp(18px, 4vw, 40px);
  --section-y: clamp(40px, 6vw, 80px);
  --section-y-lg: clamp(48px, 7vw, 104px);

  --radius-sm: 2px;   /* botones, inputs — nítido, nada burbujeante */
  --radius-md: 3px;   /* tarjetas */
}

/* Vertia — Movimiento y efectos.
   Crisp, sin rebote. La estructura se dibuja con líneas, no con sombras. */
:root{
  --ease-precise: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 160ms;
  --dur-base: 180ms;
  --dur-slow: 220ms;
  --focus-ring: 0 0 0 3px rgba(200, 69, 28, 0.14);
}

/* Reveal al hacer scroll: CSS puro y FAIL-OPEN.
   Nunca haga que JavaScript sea lo que DEVUELVE la visibilidad: si el
   observador no corre, el contenido queda invisible para siempre. */
@keyframes vReveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()){
  [data-reveal]{
    opacity: 0;
    animation-name: vReveal;
    animation-duration: 1ms;
    animation-timing-function: var(--ease-precise);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 6% cover 26%;
  }
}

/* Titular cinético: el motivo "vertere" (girar). El recorrido debe ser
   PEQUEÑO (0.14em) o la palabra se monta sobre la línea de abajo.
   El keyframe en sí (vHeroRotate) se genera en _hero.html porque sus
   porcentajes dependen de cuántas palabras tenga site.hero.rotating. */

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  [data-reveal]{ opacity: 1 !important; transform: none !important; }
}

/* Vertia — Reset y base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-press); }
::selection { background: var(--accent-fill); color: #FFFFFF; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
img, svg { display: block; max-width: 100%; }

/* Vertia — layout de la landing. Todo valor de marca viene de tokens/. */
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.rule-top { border-top: 1px solid var(--line-hair); }

header.site { position: sticky; top: 0; z-index: 50; background: rgba(247,244,237,0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-hair); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-block: 15px; }
header.site nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.navlink { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); border-radius: var(--radius-sm); font-weight: 600; border: none; cursor: pointer; text-decoration: none; transition: transform var(--dur-base) var(--ease-precise), background-color var(--dur-base); }
.btn:hover { transform: translateY(-2px); }
.btn-sm { height: 38px; padding-inline: 18px; font-size: 14px; }
.btn-lg { height: 56px; padding-inline: 28px; font-size: 15.5px; }
.btn-accent { background: var(--accent-fill); color: #fff; }
.btn-ink { background: var(--ink-950); color: var(--paper-100); }
.btn-ink:hover { background: var(--accent-fill); transform: none; }
.btn-ghost { border: 1px solid var(--paper-400); color: var(--text-primary); background: none; transform: none; }
.btn-ghost:hover { border-color: var(--ink-950); transform: none; }

.hero { padding-block: clamp(40px,7vw,96px) clamp(44px,6vw,80px); }
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: clamp(26px,4vw,44px); }
.hero-eyebrow .sep { color: #C2B9A4; }
.hero-eyebrow .place { color: var(--text-muted); }
.rotator { display: block; position: relative; height: 1.04em; color: var(--accent-fill); }
/* duration, delay y keyframe del rotador se calculan en _hero.html según la
   cantidad de palabras en site.hero.rotating (ver <style> ahí) */
.rotator span { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; animation-timing-function: var(--ease-precise); animation-iteration-count: infinite; }
.hero-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: clamp(22px,4vw,56px); align-items: end; margin-top: clamp(36px,5vw,60px); }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.micro-note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; line-height: 1.6; color: var(--text-muted); }
.micro-note.on-dark { color: var(--ink-200); }

.manifesto { display: flex; flex-direction: column; gap: var(--sp-1); font-weight: 800; font-size: clamp(26px,4.8vw,52px); line-height: 1.06; letter-spacing: var(--tracking-head); max-width: 24ch; }
.manifesto .accent { color: var(--accent-text); }

.section-label { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--text-faint); }
.pillar { padding-block: clamp(24px,3.4vw,44px); border-top: 1px solid var(--line-hair); }
.pillar-head { display: flex; align-items: flex-start; gap: clamp(12px,2vw,22px); margin-bottom: clamp(16px,2.4vw,28px); }
.pillar-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); padding-top: 0.72em; }
.pillar-head h3 { margin: 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 0 clamp(20px,3vw,48px); }
.svc { border-top: 1px solid #E8E2D4; }
.svc-btn { display: flex; align-items: center; gap: var(--sp-3); width: 100%; padding-block: 14px; background: none; border: none; cursor: pointer; font-size: var(--text-body); font-weight: 500; letter-spacing: -0.015em; color: var(--text-body); transition: color var(--dur-fast); }
.svc-btn[aria-expanded="true"] { color: var(--accent-text); }
.svc-title { flex: 1; text-align: left; }
.svc-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-press); border: 1px solid var(--accent-300); border-radius: var(--radius-sm); padding: 3px 6px; }
.svc-sign { font-family: var(--font-mono); font-size: 15px; color: var(--ink-400); flex-shrink: 0; transition: transform var(--dur-slow) var(--ease-precise), color var(--dur-fast); }
.svc-btn[aria-expanded="true"] .svc-sign { transform: rotate(45deg); color: var(--accent-text); }
.svc-panel { padding-bottom: var(--sp-5); max-width: 52ch; }
.svc-what { margin: 0; font-size: 15.5px; line-height: 1.62; color: var(--text-muted); }
.svc-practice-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin: var(--sp-4) 0 var(--sp-2); }
.svc-bullet { display: flex; gap: var(--sp-3); padding-block: 5px; font-size: 14.5px; line-height: 1.5; color: var(--text-body); }
.svc-dash { color: var(--accent-fill); flex-shrink: 0; }

.band-ink { background: var(--surface-inverse); color: var(--text-on-dark); margin-top: clamp(30px,5vw,64px); }
.band-ink .wrap { padding-block: var(--section-y-lg); }
.band-ink .eyebrow { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--brass-300); margin-bottom: clamp(20px,3vw,34px); }
.band-ink h2 { margin: 0; }
.band-ink .lead { margin: clamp(20px,3vw,30px) 0 0; font-size: 17px; line-height: 1.7; color: var(--ink-200); max-width: 52ch; }
.steps { list-style: none; padding: 0; margin-bottom: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: clamp(20px,3vw,36px); margin-top: clamp(34px,5vw,60px); }
.step { border-top: 1px solid var(--line-on-dark); padding-top: 18px; }
.step-n { font-family: var(--font-mono); font-size: 11.5px; color: var(--brass-300); }
.step-t { font-weight: 700; font-size: clamp(17px,2vw,21px); letter-spacing: -0.025em; margin-top: var(--sp-3); }
.step-d { font-size: 14.5px; line-height: 1.6; color: var(--ink-300); margin-top: var(--sp-3); }

.form-section .wrap { padding-block: clamp(48px,7vw,100px); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: clamp(28px,5vw,64px); align-items: start; }
.form-card { border: 1px solid var(--line-hair); background: var(--surface-card); border-radius: var(--radius-md); padding: clamp(22px,3.4vw,36px); }
form.diag { display: flex; flex-direction: column; gap: 15px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 13px; }
.field-opt { color: var(--text-faint); letter-spacing: 0.06em; }
.field [aria-invalid="true"] { border-color: var(--danger-500); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-family: var(--font-mono); font-size: var(--text-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.field input, .field select, .field textarea { border: 1px solid var(--paper-500); background: #fff; color: var(--text-primary); font-size: 15px; border-radius: var(--radius-sm); outline: none; }
.field input, .field select { height: 46px; padding-inline: 12px; }
.field textarea { padding: 11px 12px; line-height: 1.55; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-fill); box-shadow: var(--focus-ring); }
.consent { display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; }
.consent input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent-fill); flex-shrink: 0; }
.consent span { font-size: var(--text-small); line-height: 1.5; color: var(--text-muted); }
/* Honeypot antispam: oculto para humanos, visible para bots que rellenan todo */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button[type="submit"] { height: 52px; padding-inline: 26px; border: none; border-radius: var(--radius-sm); background: var(--accent-fill); color: #fff; font-size: 15.5px; font-weight: 600; cursor: pointer; }
button[type="submit"] { transition: background-color var(--dur-base) var(--ease-precise); }
button[type="submit"]:hover { background: var(--accent-press); }
button[type="submit"]:disabled { opacity: 0.7; cursor: progress; }
.form-err { margin: 0; font-size: 13px; line-height: 1.5; color: var(--danger-500); }
.form-ok .eyebrow { font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.form-ok .msg { font-weight: 800; font-size: clamp(22px,3vw,30px); letter-spacing: -0.035em; margin-top: var(--sp-3); }

.band-accent { background: var(--accent-fill); color: #fff; }
.band-accent .wrap { padding-block: var(--section-y); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-6); }
.band-accent .title { font-weight: 800; font-size: clamp(24px,3.6vw,44px); line-height: 1.04; letter-spacing: -0.04em; max-width: 20ch; }
.band-accent .note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: #fff; }

footer.site { background: var(--surface-inverse); color: var(--ink-400); }
footer.site .wrap { padding-block: clamp(34px,5vw,52px) 28px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-bottom: 26px; border-bottom: 1px solid var(--line-on-dark); }
.foot-top p { margin: var(--sp-3) 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-300); }
.foot-links { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.foot-links a { color: var(--ink-300); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; padding-top: 22px; font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: 0.1em; text-transform: uppercase; }

/* Accesibilidad */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--sp-4); top: -60px; z-index: 100; background: var(--ink-950); color: var(--paper-100); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: var(--sp-4); color: var(--paper-100); }
:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; }
.form-ok:focus { outline: none; }

/* El giro · antes → después */
.giro .wrap { padding-block: var(--section-y); }
.giro-head { display: flex; flex-direction: column; gap: clamp(14px,2vw,22px); margin-bottom: clamp(24px,4vw,44px); }
.giro-title { margin: 0; }
.giro-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(14px,3vw,40px); align-items: baseline; padding-block: clamp(14px,2vw,20px); border-top: 1px solid var(--line-hair); }
.giro-labels { border-top: none; padding-block: 0 10px; font-family: var(--font-mono); font-size: var(--text-micro); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--text-faint); }
.giro-antes { font-size: clamp(16px,1.9vw,20px); line-height: 1.4; color: var(--text-faint); }
.giro-arrow { font-family: var(--font-mono); color: var(--accent-fill); font-size: clamp(16px,1.9vw,20px); }
.giro-despues { font-size: clamp(17px,2.2vw,24px); line-height: 1.3; font-weight: 700; letter-spacing: -0.025em; color: var(--text-primary); }

/* Llamados a la acción intermedios */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-5); margin-block: clamp(12px,2vw,24px) clamp(8px,2vw,16px); padding: clamp(20px,3vw,32px); border: 1px solid var(--line-hair); background: var(--surface-card); border-radius: var(--radius-md); }
.cta-row-text { margin: 0; font-size: clamp(16px,1.8vw,18px); line-height: 1.5; color: var(--text-muted); max-width: 46ch; }
.cta-row-text strong { color: var(--text-primary); font-weight: 700; }
.metodo-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5); margin-top: clamp(34px,5vw,56px); }
.btn-accent:hover { background: var(--accent-press); color: #fff; }

/* Qué incluye el diagnóstico */
.incluye { list-style: none; padding: 0; margin: clamp(16px,2.4vw,22px) 0 0; display: flex; flex-direction: column; max-width: 46ch; }
.incluye li { display: flex; gap: var(--sp-4); padding-block: 12px; border-top: 1px solid var(--line-hair); font-size: 16px; line-height: 1.5; color: var(--text-body); }
.incluye-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); padding-top: 3px; }

/* Móvil: el CTA principal del header nunca puede quedar fuera de pantalla */
@media (max-width: 720px) {
  header.site .navlink { display: none; }
  header.site nav { gap: var(--sp-2); }
  header.site .btn-sm { padding-inline: 12px; font-size: 13px; height: 36px; }
  .giro-row { grid-template-columns: 1fr; gap: 4px; }
  .giro-row .giro-arrow { display: none; }
  .giro-labels { display: none; }
  .giro-antes { font-size: 15px; text-decoration: line-through; text-decoration-color: var(--paper-400); }
}

/* Sin movimiento: el titular muestra la primera palabra fija en vez de quedar en blanco */
@media (prefers-reduced-motion: reduce) {
  .rotator span:first-child { opacity: 1 !important; }
}
