/* ==========================================================================
   INFISOLT — Applied AI Research Lab
   Hoja de estilos principal. Derivada del diseño "Web.dc.html" (Claude Design).
   Orden: tokens → reset → utilidades → layout → componentes → secciones →
          animaciones → responsive → accesibilidad / print
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color */
  --ink:            #0A0A0A;
  --surface:        #111111;
  --line:           #1E1E1E;
  --line-strong:    #2A2A2A;
  --line-btn:       #3A3A3A;
  --white:          #FFFFFF;
  --text:           #FFFFFF;
  --text-muted:     #A8A8A8;
  --text-dim:       #8A8A8A;
  --text-faint:     #6A6A6A;
  --ignition:       #FF4D00;
  --ignition-deep:  #3A2A22;

  /* Tipografía */
  --font-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --font-body:    'Chivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Chivo Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Escala tipográfica fluida */
  --fs-hero:    clamp(2.5rem, 1.05rem + 5.7vw, 5.125rem);   /*  40 → 82 */
  --fs-h2:      clamp(2rem,   1.16rem + 3.1vw, 3.875rem);   /*  32 → 62 */
  --fs-h3:      clamp(1.75rem,1.18rem + 2.1vw, 3.25rem);    /*  28 → 52 */
  --fs-h4:      clamp(1.5rem, 1.19rem + 1.2vw, 2.125rem);   /*  24 → 34 */
  --fs-card:    clamp(1.25rem,1.09rem + 0.6vw, 1.625rem);   /*  20 → 26 */
  --fs-lead:    clamp(1rem,   0.94rem + 0.24vw, 1.1875rem); /*  16 → 19 */
  --fs-body:    1rem;
  --fs-sm:      0.9375rem;
  --fs-mono:    0.75rem;
  --fs-mono-sm: 0.6875rem;

  /* Ritmo espacial */
  --gutter:     clamp(1.25rem, 0.35rem + 3.9vw, 3.5rem);    /*  20 → 56 */
  --section-y:  clamp(3.5rem, 1.9rem + 5vw, 5.5rem);        /*  56 → 88 */
  --gap-grid:   clamp(0.75rem, 0.4rem + 1.1vw, 1.25rem);    /*  12 → 20 */
  --gap-col:    clamp(2rem, 0.6rem + 4vw, 4rem);            /*  32 → 64 */

  /* Layout */
  --page-max: 1440px;
  --nav-h: 68px;

  /* Movimiento */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur:  0.24s;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: var(--ignition);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--white); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

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

::selection { background: var(--ignition); color: var(--ink); }

/* --------------------------------------------------------------------------
   3. UTILIDADES
   -------------------------------------------------------------------------- */
.page { width: 100%; max-width: var(--page-max); margin-inline: auto; }

.section {
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section--split {
  display: flex;
  gap: var(--gap-col);
  align-items: flex-start;
}

.stack { display: flex; flex-direction: column; }
.stack-12 { gap: 0.75rem; }
.stack-16 { gap: 1rem; }
.stack-20 { gap: 1.25rem; }
.stack-24 { gap: 1.5rem; }
.stack-26 { gap: 1.625rem; }
.stack-40 { gap: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem); }
.stack-44 { gap: clamp(2rem, 1.4rem + 1.9vw, 2.75rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  color: var(--ignition);
  text-transform: uppercase;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.1em;
  color: var(--text-faint);
  line-height: 2;
  text-transform: uppercase;
}
.mono--dim   { color: var(--text-dim); letter-spacing: 0.12em; }
.mono--flag  { color: var(--ignition); letter-spacing: 0.14em; }
.mono--label { color: var(--ignition); letter-spacing: 0.12em; line-height: 1.4; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-transform: uppercase;
}
.display--hero { font-size: var(--fs-hero); line-height: 0.9; }
.display--xl   { font-size: var(--fs-h2);  line-height: 0.92; }
.display--lg   { font-size: var(--fs-h3); }
.display--md   { font-size: var(--fs-h4); letter-spacing: -0.05em; line-height: 1; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.body-muted {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}
.measure-380 { max-width: 380px; }
.measure-460 { max-width: 460px; }
.measure-480 { max-width: 480px; }
.measure-520 { max-width: 520px; }
.measure-640 { max-width: 640px; }
.measure-700 { max-width: 700px; }

.grid { display: grid; gap: var(--gap-grid); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.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; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 100;
  background: var(--ignition); color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono); font-size: var(--fs-mono);
  letter-spacing: 0.12em;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--ink); }

/* --------------------------------------------------------------------------
   4. MARCA — retícula ∞ (isotipo 5×3)
   -------------------------------------------------------------------------- */
.mark {
  --mark-cell: 7px;
  --mark-gap: 2px;
  display: grid;
  grid-template-columns: repeat(5, var(--mark-cell));
  grid-template-rows: repeat(3, var(--mark-cell));
  gap: var(--mark-gap);
  flex: none;
}
.mark span { background: var(--white); }
.mark span.is-void { background: none; }
.mark span.is-core { background: var(--ignition); }
.mark--ignition span { background: var(--ignition); }
.mark--ignition span.is-void { background: none; }
.mark--lg { --mark-cell: 12px; --mark-gap: 3px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   5. NAVEGACIÓN
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem var(--gutter);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--white);
}
.nav__brand:hover { color: var(--white); }
.nav__brand .wordmark { font-size: 1.1875rem; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, -0.6rem + 2.2vw, 2.125rem);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.12em;
}
.nav__link {
  color: var(--text-dim);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__link:hover,
.nav__link[aria-current="true"] {
  color: var(--white);
  border-bottom-color: var(--ignition);
}
.nav__cta {
  background: var(--ignition);
  color: var(--ink);
  padding: 0.6875rem 1.125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__cta:hover { background: var(--white); color: var(--ink); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__toggle-bars::before,
.nav__toggle-bars::after { content: ''; position: absolute; }
.nav__toggle-bars::before { transform: translateY(-7px); }
.nav__toggle-bars::after  { transform: translateY(7px); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after  { transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. BOTONES
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.0625rem 1.875rem;
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ignition); color: var(--ink); }
.btn--primary:hover { background: var(--white); color: var(--ink); }
.btn--ghost {
  border-color: var(--line-btn);
  color: var(--white);
  font-weight: 600;
}
.btn--ghost:hover { border-color: var(--ignition); color: var(--ignition); }
.btn--invert { background: var(--ink); color: var(--ignition); }
.btn--invert:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(3rem, 1.4rem + 5vw, 6rem) var(--gutter) var(--section-y);
  display: flex;
  gap: var(--gap-col);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero__copy {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 0.8rem + 1.4vw, 1.875rem);
  min-width: 0;
}
.hero__art {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__glow {
  position: absolute;
  width: 340px; height: 340px;
  max-width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 0, 0.16), rgba(255, 77, 0, 0) 70%);
  pointer-events: none;
}

/* Retícula animada del hero (13×9) */
.field {
  --cell: clamp(13px, 2.1vw, 30px);
  --field-gap: calc(var(--cell) * 7 / 30);
  position: relative;
  display: grid;
  grid-template-columns: repeat(13, var(--cell));
  grid-template-rows: repeat(9, var(--cell));
  gap: var(--field-gap);
}
.field span {
  background: var(--line);
  animation: is-field 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.field span.is-mark {
  background: var(--white);
  animation: is-scan 2.4s linear infinite;
}
.field span.is-core {
  background: var(--ignition);
  animation: is-core 2.4s ease-in-out infinite;
  will-change: opacity, box-shadow;
}

/* --------------------------------------------------------------------------
   8. PRINCIPIOS
   -------------------------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.principle {
  padding: clamp(1.5rem, 1.1rem + 1.3vw, 2.125rem) clamp(1.25rem, 0.6rem + 2vw, 2.5rem);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.principle:last-child { border-right: 0; }
.principle__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.125rem, 0.94rem + 0.7vw, 1.5rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.principle__title--accent { color: var(--ignition); }
.principle .mono { color: var(--text-dim); letter-spacing: 0.12em; line-height: 1.8; }

/* --------------------------------------------------------------------------
   9. CABECERAS DE SECCIÓN
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: clamp(1.5rem, 0.8rem + 2vw, 2.5rem);
  flex-wrap: wrap;
}
.section-head__title { display: flex; flex-direction: column; gap: 1rem; }

/* --------------------------------------------------------------------------
   10. TARJETAS
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 1.1rem + 1.3vw, 2.125rem);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--line-btn); transform: translateY(-2px); }
.card__title {
  font-size: var(--fs-card);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.card__meta { margin-top: auto; }

/* Fases */
.phase {
  border-top: 3px solid var(--ignition);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.phase--final { border-top-color: var(--white); }
.phase .mono { color: var(--text-faint); letter-spacing: 0.14em; line-height: 1.4; }
.phase__title {
  font-size: var(--fs-card);
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* Servicios */
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: border-color var(--dur) var(--ease);
}
.service:hover { border-color: var(--line-btn); }
.service__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.service__desc { font-size: var(--fs-body); line-height: 1.65; color: var(--text-muted); text-wrap: pretty; }
.service__list {
  display: flex;
  flex-direction: column;
  gap: 0.6875rem;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.service__list li { display: flex; align-items: flex-start; gap: 0.6875rem; }
.service__list li::before {
  content: '';
  flex: none;
  width: 9px; height: 9px;
  margin-top: 0.45em;
  background: var(--ignition);
}
.service__list li.is-final::before { background: var(--white); }
.service__foot {
  border-top: 1px solid var(--line);
  padding-top: 1.125rem;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Complementos */
.addon {
  border: 1px solid var(--line);
  padding: 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: border-color var(--dur) var(--ease);
}
.addon:hover { border-color: var(--line-btn); }
.addon__title { font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.015em; }
.addon__desc { font-size: var(--fs-sm); line-height: 1.6; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   11. COLABORACIÓN (bloque naranja)
   -------------------------------------------------------------------------- */
.collab {
  background: var(--ignition);
  color: var(--ink);
  padding: var(--section-y) var(--gutter);
  display: flex;
  gap: var(--gap-col);
  align-items: flex-start;
}
.collab__copy { flex: 1 1 0; display: flex; flex-direction: column; gap: 1.625rem; min-width: 0; }
.collab__copy .eyebrow { color: var(--ink); }
.collab__lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  text-wrap: pretty;
}
.collab__list { flex: none; width: min(460px, 100%); display: flex; flex-direction: column; gap: 2px; }
.collab__row {
  background: var(--ink);
  color: var(--white);
  padding: 1.375rem 1.625rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.collab__row dt { font-size: var(--fs-body); font-weight: 700; }
.collab__row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   12. EL LAB — fichas
   -------------------------------------------------------------------------- */
.facts { flex: none; width: min(520px, 100%); display: flex; flex-direction: column; gap: 2px; }
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fact--accent {
  background: var(--ignition);
  border-color: var(--ignition);
  color: var(--ink);
}
.fact--accent .mono--label { color: var(--ink); }
.fact__value { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }

/* --------------------------------------------------------------------------
   13. FORMULARIO DE CONTACTO
   -------------------------------------------------------------------------- */
.form { flex: none; width: min(520px, 100%); display: flex; flex-direction: column; gap: 0.875rem; }
.field-group { display: flex; flex-direction: column; gap: 0.375rem; }
.field-group > label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 0.9375rem 1.0625rem;
  font-size: var(--fs-sm);
  color: var(--white);
  width: 100%;
  transition: border-color var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-faint); }
.input:hover { border-color: var(--line-btn); }
.input:focus { border-color: var(--ignition); outline: none; }
textarea.input { min-height: 104px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--ignition); }

.field-error {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.08em;
  color: var(--ignition);
  min-height: 0;
}
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.consent input {
  flex: none;
  width: 18px; height: 18px;
  margin: 0.15rem 0 0;
  accent-color: var(--ignition);
}
.form__status {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.1em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form__status[data-state="ok"]    { color: var(--ignition); }
.form__status[data-state="error"] { color: var(--ignition); }
.form__submit { align-self: flex-start; }
.form__submit[disabled] { opacity: 0.55; cursor: progress; }

/* --------------------------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 1.2rem + 1.7vw, 2.5rem);
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(2rem, 1rem + 3vw, 2.5rem);
  flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; gap: 1.25rem; }
.footer__brand .wordmark { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.125rem); letter-spacing: -0.05em; }
.footer__nav { display: flex; gap: clamp(2rem, 0.6rem + 4vw, 4rem); flex-wrap: wrap; }
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer__col > h3 { color: var(--white); font-size: inherit; font-weight: 400; letter-spacing: inherit; }
.footer__col a { color: var(--text-dim); }
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   15. PÁGINAS DE TEXTO (legal / 404)
   -------------------------------------------------------------------------- */
.doc {
  padding: var(--section-y) var(--gutter);
  max-width: 820px;
}
.doc__head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
.doc h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 2.5rem 0 0.875rem;
}
.doc h3 { font-size: 1.0625rem; font-weight: 800; margin: 1.75rem 0 0.5rem; }
.doc p, .doc li { color: var(--text-muted); line-height: 1.7; text-wrap: pretty; }
.doc p + p { margin-top: 0.875rem; }
.doc ul { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.doc ul li { display: flex; gap: 0.75rem; }
.doc ul li::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 0.6em; background: var(--ignition); }
.doc dl { display: grid; gap: 0.5rem 1.5rem; margin-top: 0.75rem; }
.doc dt { font-weight: 700; color: var(--white); }
.doc dd { margin: 0; color: var(--text-muted); }
.doc__note {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
}

.error-page {
  padding: clamp(4rem, 2rem + 8vw, 8rem) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: flex-start;
  min-height: 52vh;
}

/* --------------------------------------------------------------------------
   16. ANIMACIONES
   -------------------------------------------------------------------------- */
@keyframes is-core {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
  45%      { opacity: 1; box-shadow: 0 0 34px 10px rgba(255, 77, 0, 0.55); }
  70%      { opacity: 0.85; box-shadow: 0 0 12px 2px rgba(255, 77, 0, 0.25); }
}
@keyframes is-scan {
  0%   { opacity: 0.16; transform: scale(0.82); }
  18%  { opacity: 1; transform: scale(1); }
  55%  { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0.16; transform: scale(0.82); }
}
@keyframes is-field {
  0%, 100% { opacity: 0.35; }
  40%      { opacity: 1; background: var(--ignition-deep); }
  60%      { opacity: 0.5; }
}

/* Revelado al hacer scroll.
   El estado oculto se aplica SOLO si main.js ha marcado el documento con
   .js-reveal. Si el observador no funciona (JS desactivado, pestaña oculta,
   navegador antiguo), el contenido nunca queda invisible. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   17. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .field { --cell: clamp(12px, 2vw, 24px); }
}

@media (max-width: 1040px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
    padding: 0 var(--gutter) 1.25rem;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__link {
    padding: 1.0625rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__link:hover,
  .nav__link[aria-current="true"] { border-bottom-color: var(--ignition); }
  .nav__cta { margin-top: 1.25rem; text-align: center; padding: 1rem; }
  .nav__toggle { display: inline-flex; }
  .nav { position: sticky; }

  .hero { flex-direction: column; align-items: flex-start; }
  .hero__art { align-self: center; }

  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle:nth-child(2n) { border-right: 0; }
  .principle:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .section--split,
  .collab { flex-direction: column; }
  .facts, .form, .collab__list { width: 100%; }
}

@media (max-width: 900px) {
  /* Las dos tarjetas de servicio son densas: a una columna antes que el resto. */
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --nav-h: 62px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
  .section-head { align-items: flex-start; }
  .service__foot { flex-direction: column; gap: 0.375rem; }
  .field { --cell: clamp(11px, 4.6vw, 22px); }
  .hero__glow { width: 260px; height: 260px; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .collab__row { flex-direction: column; align-items: flex-start; gap: 0.375rem; }
  .footer__nav { gap: 2rem; width: 100%; }
}

/* --------------------------------------------------------------------------
   18. ACCESIBILIDAD Y PRINT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .field span { opacity: 1; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .hero__art, .form, .skip-link { display: none; }
  .section, .footer { border-color: #ccc; }
  .card, .service, .fact, .addon { background: none; border-color: #ccc; }
  .lead, .body-muted, .doc p, .doc li { color: #333; }
  a { color: #000; text-decoration: underline; }
}
