/* ==========================================================================
   Tecnotres — hoja de estilos del sitio corporativo
   Tipografía: Source Sans 3 (texto y titulares) + IBM Plex Mono (etiquetas)
   Paleta: rojo institucional Tecnotres + azul profundo, neutros cálidos
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  color-scheme: light;

  --brand:        #D0102B;
  --brand-dark:   #A00C21;
  --brand-soft:   #FBEEF0;
  --navy:         #0B1F3F;
  --navy-2:       #123057;

  --bg:           #FFFFFF;
  --surface:      #FFFFFF;
  --surface-alt:  #F5F2F2;
  --ink:          #1A171A;
  --ink-2:        #3D3639;
  --muted:        #635B5E;
  --line:         #E2DCDD;
  --line-strong:  #C9C1C3;

  --focus:        #0B1F3F;

  /* Color por categoría de servicio: cada zona del sitio lleva su propio acento */
  --c-ia:    #7A47D6;
  --c-ia-2:  #2F7BE0;
  --c-erp:   #0F6CBD;
  --c-erp-2: #3AA0E8;
  --c-int:   #0E7C86;
  --c-int-2: #2AA9A0;
  --c-app:   #17794A;
  --c-app-2: #43A86B;
  --c-dat:   #B4600A;
  /* Degradado del núcleo del diagrama del hero: celeste, con texto en negro */
  --core-1:  #CFE9FB;
  --core-2:  #93CDF3;
  --shadow-card:  0 1px 2px rgba(26,23,26,.06), 0 8px 24px rgba(26,23,26,.06);

  --ff-sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0:  1.0625rem;
  --step-1:  1.25rem;
  --step-2:  1.5rem;
  --step-3:  clamp(1.6rem, 1.3rem + 1.2vw, 2.125rem);
  --step-4:  clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --step-5:  clamp(2.4rem, 1.6rem + 3.6vw, 4rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1240px;
}

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0;
}

.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.55; max-width: 62ch; }

/* --- Skip link ---------------------------------------------------------- */
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 4px;
}
.skip:focus { top: .5rem; }

/* --- Barra superior + navegación ---------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-size: .95rem;
  color: var(--ink-2);
  padding: .45rem .7rem;
  border-radius: 3px;
  position: relative;
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem;
  height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .18s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line-strong); border-radius: 3px;
  color: var(--ink); padding: .4rem .6rem; font: inherit; font-size: .9rem; cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .45rem; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
    margin-left: 0;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .75rem .25rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: .75rem; text-align: center; border-bottom: 0; }
}

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-size: .975rem; font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--onDark { background: #fff; color: #0B1F3F; }
.btn--onDark:hover { background: #EDEDED; }
.btn--outlineDark { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outlineDark:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--brand); font-weight: 600; text-decoration: none; font-size: .975rem;
}
.link-arrow svg { transition: transform .18s ease; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- Secciones ---------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--alt { background: var(--surface-alt); }
.section__head { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2.5rem; max-width: 70ch; }
.section__head h2 { font-size: var(--step-4); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 500px at 88% -10%, var(--brand-soft), transparent 70%);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding-block: clamp(3rem, 6vw, 5.5rem);
}
.hero h1 { font-size: var(--step-5); font-weight: 700; }
.hero__copy { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  font-family: var(--ff-mono); font-size: var(--step--1); color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1rem; width: 100%;
}
.hero__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__meta b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { order: -1; }
}

/* Diagrama del hero */
.flow { width: 100%; height: auto; display: block; }
.flow .flow-card { fill: var(--surface); stroke: var(--line-strong); }
.flow .flow-band { fill: var(--surface-alt); stroke: var(--line); }
.flow .flow-core { fill: var(--navy); }
.flow .flow-accent { fill: var(--brand); }
.flow .flow-label { fill: var(--ink); font-family: var(--ff-sans); font-size: 13px; font-weight: 600; }
.flow .flow-sub { fill: var(--muted); font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .06em; }
.flow .flow-on-core { fill: var(--ink); font-family: var(--ff-sans); font-size: 13px; font-weight: 600; }
.flow .flow-on-core-sub { fill: rgba(26,23,26,.70); font-family: var(--ff-mono); font-size: 10px; letter-spacing: .06em; }
.flow .flow-path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.flow .flow-dot { fill: var(--brand); }
.flow .flow-dot { offset-distance: 0%; offset-rotate: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  .flow .flow-dot { animation: flowRun 3.6s cubic-bezier(.45,0,.55,1) infinite; }
  .flow .flow-dot:nth-of-type(2) { animation-delay: .45s; }
  .flow .flow-dot:nth-of-type(3) { animation-delay: .9s; }
  .flow .flow-dot:nth-of-type(4) { animation-delay: 1.8s; }
  .flow .flow-dot:nth-of-type(5) { animation-delay: 2.25s; }
  .flow .flow-dot:nth-of-type(6) { animation-delay: 2.7s; }
}
@keyframes flowRun {
  0%   { offset-distance: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  60%  { offset-distance: 100%; opacity: 1; }
  70%, 100% { offset-distance: 100%; opacity: 0; }
}

/* --- Tarjetas de servicio ----------------------------------------------- */
.cards {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--surface);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: .7rem;
  transition: background-color .15s ease;
}
.card:hover { background: var(--surface-alt); }
.card__icon { color: var(--brand); display: block; }
.card h3 { font-size: var(--step-1); }
.card p { color: var(--muted); font-size: .975rem; flex: 1; }
.card .link-arrow { margin-top: .25rem; }

/* --- Bandas de pilar ---------------------------------------------------- */
.pillar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.pillar + .pillar { margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.pillar__copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.pillar__copy h3 { font-size: var(--step-3); }
.pillar--flip .pillar__copy { order: 2; }
@media (max-width: 900px) {
  .pillar { grid-template-columns: 1fr; }
  .pillar--flip .pillar__copy { order: 0; }
}

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.checklist li { display: grid; grid-template-columns: 1.2rem 1fr; gap: .65rem; align-items: start; color: var(--ink-2); font-size: .975rem; }
.checklist svg { color: var(--brand); margin-top: .35rem; }

/* Panel técnico junto a cada pilar */
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.15rem; border-bottom: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: var(--step--1); color: var(--muted); letter-spacing: .06em; text-transform: uppercase;
}
.panel__head b { color: var(--ink); font-weight: 600; }
.panel__body { padding: 1.15rem; display: grid; gap: .75rem; }
.stack-row {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: .7rem .85rem; border: 1px solid var(--line); background: var(--surface-alt);
}
.stack-row strong { font-weight: 600; font-size: .95rem; }
.stack-row span { font-family: var(--ff-mono); font-size: .75rem; color: var(--muted); letter-spacing: .05em; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .05em;
  border: 1px solid var(--line-strong); color: var(--ink-2);
  padding: .25rem .5rem; border-radius: 2px; background: var(--surface);
}

/* --- Métricas ----------------------------------------------------------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.metric { background: var(--bg); padding: 1.75rem 1.25rem; display: flex; flex-direction: column; gap: .3rem; }
.metric b { font-size: var(--step-4); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.metric span { color: var(--muted); font-size: .95rem; }

/* --- Proceso ------------------------------------------------------------ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { padding: 1.5rem 1.5rem 1.5rem 0; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.step:first-child { border-top-color: var(--brand); }
.step__n { font-family: var(--ff-mono); font-size: var(--step--1); color: var(--brand); letter-spacing: .1em; }
.step h3 { font-size: var(--step-1); }
.step p { color: var(--muted); font-size: .95rem; }

/* --- Clientes ----------------------------------------------------------- */
.logowall {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.logowall div {
  background: var(--surface); display: grid; place-items: center;
  padding: 1.5rem .9rem; min-height: 116px;
}
/* Cada logo trae su propio --logo-h (ver index.html): con un alto único, los
   isotipos cuadrados aplastan a las firmas alargadas. Con max-height y
   max-width la imagen se escala sola respetando su proporción. */
.logowall img {
  width: auto; height: auto;
  max-height: var(--logo-h, 30px); max-width: 100%;
  object-fit: contain;
  filter: grayscale(1); opacity: .68; transition: filter .2s ease, opacity .2s ease;
}
.logowall div:hover img { filter: grayscale(0); opacity: 1; }
/* --- Franja oscura ------------------------------------------------------ */
.band {
  background: var(--navy);
  background-image: linear-gradient(140deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.band .lede { color: rgba(255,255,255,.78); }
.band .eyebrow { color: #FF8E99; }
.band__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.band__copy { display: flex; flex-direction: column; gap: 1.15rem; align-items: flex-start; }
.band__copy h2 { font-size: var(--step-4); }
.quote { border-left: 2px solid var(--brand); padding-left: 1.25rem; display: grid; gap: .6rem; }
.quote p { font-size: var(--step-2); line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.quote cite { font-style: normal; font-family: var(--ff-mono); font-size: var(--step--1); color: rgba(255,255,255,.65); letter-spacing: .05em; }
@media (max-width: 900px) { .band__grid { grid-template-columns: 1fr; } }

/* --- Contacto ----------------------------------------------------------- */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.contact__aside { display: flex; flex-direction: column; gap: 1.5rem; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
.contact__list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .85rem; align-items: start; }
.contact__list svg { color: var(--brand); margin-top: .25rem; }
.contact__list strong { display: block; font-size: .9rem; font-weight: 600; }
.contact__list a, .contact__list span { color: var(--muted); font-size: .975rem; text-decoration: none; }
.contact__list a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.form { border: 1px solid var(--line); background: var(--surface); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-card); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 600; }
.field label .req { color: var(--brand); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .975rem;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 2px;
  padding: .65rem .75rem;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); }
.field small { color: var(--muted); font-size: .8125rem; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--brand); }
.field__error { color: var(--brand); font-size: .8125rem; display: none; }
.field--error .field__error { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.form__note { color: var(--muted); font-size: .8125rem; max-width: 44ch; }
.form__status { margin-top: 1rem; padding: .85rem 1rem; border-left: 3px solid; font-size: .95rem; display: none; }
.form__status[data-state="ok"] { display: block; border-color: #1F7A45; background: color-mix(in srgb, #1F7A45 10%, transparent); }
.form__status[data-state="error"] { display: block; border-color: var(--brand); background: var(--brand-soft); }

/* --- Pie ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-alt); padding-block: 3rem 2rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: .875rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--ff-mono); font-weight: 500; color: var(--muted); }
.footer ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .55rem; }
.footer a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.footer a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.footer__brand { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.footer__brand img { height: 28px; }
.footer__brand p { color: var(--muted); font-size: .95rem; max-width: 40ch; }
.social { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .95rem; color: var(--ink-2); text-decoration: none; }
.social:hover { color: var(--brand); }
.footer__legal {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  color: var(--muted); font-size: .8125rem;
}

/* ==========================================================================
   Zonas con color — cada servicio tiene su propio acento, al estilo de las
   páginas de producto de Microsoft. El rojo de marca queda reservado para la
   identidad y las llamadas a la acción.
   ========================================================================== */

/* --- Logo: variante clara y oscura --------------------------------------- */
.brand img { height: 34px; width: auto; }

/* En el pie va la versión vertical del logo, que necesita más alto para que el
   texto siga siendo legible. `width: auto` evita que el atributo width del <img>
   estire la imagen. */
.footer__brand img { height: 148px; width: auto; }

/* El botón del menú es rojo con texto blanco: `.nav a` es más específico que
   `.btn--primary`, así que hay que ganarle explícitamente. */
.nav a.btn--primary,
.nav a.btn--primary:hover { color: #fff; }


/* --- Acento por categoría ------------------------------------------------ */
[data-cat="ia"]  { --cat: var(--c-ia);  --cat-2: var(--c-ia-2); }
[data-cat="erp"] { --cat: var(--c-erp); --cat-2: var(--c-erp-2); }
[data-cat="int"] { --cat: var(--c-int); --cat-2: var(--c-int-2); }
[data-cat="app"] { --cat: var(--c-app); --cat-2: var(--c-app-2); }
[data-cat="dat"] { --cat: var(--c-dat); --cat-2: var(--c-dat); }

/* --- Tarjetas de servicio con barra y chip de color ---------------------- */
.card { position: relative; padding-top: 1.9rem; }

/* En pantalla ancha los cinco servicios van en una sola fila: son cinco y el
   título de la sección lo dice, así que partirlos en dos líneas los desmiente.
   Bajo este ancho vuelve el auto-fit, que reparte tres o cuatro por fila. */
@media (min-width: 1080px) {
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .card { padding-inline: 1.25rem; }

  /* Los doce clientes en 6 x 2: el auto-fit daba 7 y 5, y una fila incompleta
     al final se lee como si faltaran logos. */
  .logowall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cat, var(--brand)), var(--cat-2, var(--brand)));
}
.card__chip {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 3px;
  color: var(--cat, var(--brand));
  background: color-mix(in srgb, var(--cat, var(--brand)) 12%, transparent);
}
.card .link-arrow { color: var(--cat, var(--brand)); }

/* --- Pilares: eyebrow, vistos y panel toman el color de la categoría ------ */
.pillar .eyebrow { color: var(--cat, var(--brand)); }
.pillar .checklist svg { color: var(--cat, var(--brand)); }
.pillar .stack-row { border-left: 3px solid color-mix(in srgb, var(--cat, var(--brand)) 50%, transparent); }
.pillar .panel__head b { color: var(--cat, var(--brand)); }
.pillar .tag { border-color: color-mix(in srgb, var(--cat, var(--brand)) 35%, var(--line-strong)); }

/* Ilustración del servicio en la cabecera del panel */
.panel__figure {
  padding: 1.4rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 92% 8%, color-mix(in srgb, var(--cat-2, var(--brand)) 20%, transparent), transparent 62%),
    linear-gradient(135deg, color-mix(in srgb, var(--cat, var(--brand)) 13%, var(--surface)), color-mix(in srgb, var(--cat, var(--brand)) 3%, var(--surface)));
}
.panel__figure svg { display: block; width: 100%; height: auto; }

/* Piezas comunes de las ilustraciones */
.fig-surface { fill: var(--surface); }
.fig-line    { fill: none; stroke: color-mix(in srgb, var(--cat) 45%, var(--line-strong)); stroke-width: 1.5; }
.fig-soft    { fill: color-mix(in srgb, var(--cat) 16%, var(--surface)); }
.fig-mid     { fill: color-mix(in srgb, var(--cat) 45%, var(--surface)); }
.fig-cat     { fill: var(--cat); }
.fig-cat2    { fill: var(--cat-2); }
.fig-brand   { fill: var(--brand); }
.fig-ink     { fill: var(--ink); }
.fig-bar     { fill: color-mix(in srgb, var(--ink) 22%, transparent); }
.fig-edge    { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.fig-txt     { fill: var(--muted); font-family: var(--ff-mono); font-size: 9px; letter-spacing: .08em; }
.fig-txt-on  { fill: #fff; font-family: var(--ff-mono); font-size: 9px; letter-spacing: .08em; }

/* --- Métricas y etapas: una progresión de color -------------------------- */
.metric { border-top: 3px solid var(--brand); }
.metric:nth-child(2) { border-top-color: var(--c-ia); }
.metric:nth-child(3) { border-top-color: var(--c-erp); }
.metric:nth-child(4) { border-top-color: var(--c-app); }

.step:nth-child(1) { border-top-color: var(--brand); }
.step:nth-child(2) { border-top-color: var(--c-ia); }
.step:nth-child(3) { border-top-color: var(--c-erp); }
.step:nth-child(4) { border-top-color: var(--c-app); }
.step:nth-child(1) .step__n { color: var(--brand); }
.step:nth-child(2) .step__n { color: var(--c-ia); }
.step:nth-child(3) .step__n { color: var(--c-erp); }
.step:nth-child(4) .step__n { color: var(--c-app); }

/* --- Fondos con más color ------------------------------------------------ */
.hero {
  background:
    radial-gradient(760px 420px at 74% -12%, color-mix(in srgb, var(--c-ia) 17%, transparent), transparent 66%),
    radial-gradient(680px 380px at 99% 34%, color-mix(in srgb, var(--c-erp) 15%, transparent), transparent 68%),
    radial-gradient(620px 380px at 4% -18%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 64%);
}

.band {
  background-image:
    radial-gradient(680px 380px at 10% 0%, rgba(122, 71, 214, .38), transparent 62%),
    radial-gradient(620px 340px at 88% 105%, rgba(15, 108, 189, .40), transparent 62%),
    linear-gradient(140deg, var(--navy) 0%, var(--navy-2) 100%);
}

/* --- Diagrama del hero: nodos con el color de su categoría ---------------- */
.flow .fill-brand { fill: var(--brand); }
.flow .fill-ia    { fill: var(--c-ia); }
.flow .fill-erp   { fill: var(--c-erp); }
.flow .fill-int   { fill: var(--c-int); }
.flow .fill-app   { fill: var(--c-app); }
.flow .flow-dot--erp { fill: var(--c-erp); }
.flow .flow-dot--int { fill: var(--c-int); }
.flow .flow-dot--app { fill: var(--c-app); }
.fig-card { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.fig-ok   { fill: var(--c-app); }
.fig-white{ fill: #fff; }
.fig-stroke-white { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
