/* ============================================================================
   Componentes
   Lenguaje visual tomado de "Presentacion ITX.pdf": encabezado de lámina
   (isotipo + rótulo azul + hairline + número), cruces de encuadre, listas con
   guion azul, ítems numerados 01–04 y diagramas de línea.
   ========================================================================= */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 23, 24, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--itx-rule-blue);
  transition: border-color var(--transition-base);
}
.site-header.is-scrolled { border-bottom-color: var(--itx-rule-blue-strong); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: var(--header-height);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--itx-text-on-dark); }
.brand img { width: 26px; height: 29px; }
.brand span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav { display: none; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
@media (min-width: 1000px) { .nav { display: flex; } }
.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--itx-text-on-dark-muted);
  transition: color var(--transition-fast);
}
.nav__link:hover,
.nav__link[aria-current="page"] { color: var(--itx-blue-light); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 1px;
  background: var(--itx-blue);
}

/* La especificidad tiene que ganarle a `.btn { display: inline-flex }`, que se
   declara más abajo en este mismo archivo. */
.site-header .nav__cta { display: none; }
@media (min-width: 1000px) { .site-header .nav__cta { display: inline-flex; } }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 5px;
}
@media (min-width: 1000px) { .nav-toggle { display: none; } }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--itx-text-on-dark);
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--space-xs);
  padding-block: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--itx-rule-blue);
}
.mobile-nav.is-open { display: flex; }
@media (min-width: 1000px) { .mobile-nav.is-open { display: none; } }
.mobile-nav__link {
  padding-block: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--itx-text-on-dark-muted);
}
.mobile-nav__link[aria-current="page"],
.mobile-nav__link:hover { color: var(--itx-blue-light); }
.mobile-nav__cta { margin-top: var(--space-sm); align-self: flex-start; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.btn--primary { background: var(--itx-blue); color: #05171f; }
.btn--primary:hover { background: var(--itx-blue-light); }

.btn--outline { border: 1px solid var(--itx-rule-blue-strong); color: var(--itx-blue-light); }
.btn--outline:hover { border-color: var(--itx-blue-light); box-shadow: inset 0 0 20px rgba(16, 155, 203, 0.22); }

.btn--on-light { border: 1px solid var(--itx-rule); background: var(--itx-white); color: var(--itx-ink); }
.btn--on-light:hover { border-color: var(--itx-blue); color: var(--itx-blue); }

/* ---------- Cruces de encuadre de las láminas ---------- */
.cross {
  position: absolute;
  width: 13px;
  height: 13px;
  color: var(--itx-blue);
  opacity: 0.6;
  pointer-events: none;
}
.cross::before, .cross::after { content: ""; position: absolute; background: currentColor; }
.cross::before { inset: 6px 0 auto 0; height: 1px; }
.cross::after { inset: 0 auto 0 6px; width: 1px; }
.cross--tl { top: 24px; left: 24px; }
.cross--tr { top: 24px; right: 24px; }
.cross--bl { bottom: 24px; left: 24px; }
.cross--br { bottom: 24px; right: 24px; }
.section--light .cross { color: var(--itx-text-muted); opacity: 0.5; }

/* ---------- Encabezado de sección (calcado de la lámina) ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--itx-rule-blue);
  margin-bottom: var(--section-gap);
}
.section--light .section-head { border-bottom-color: var(--itx-rule); }
.section-head__mark { width: 15px; height: 17px; }
.section-head__label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--itx-blue);
}
.section-head__num {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--itx-text-on-dark-muted);
}
.section--light .section-head__num { color: var(--itx-text-muted); }

/* ---------- Número gigante de fondo (gesto de la lámina 03) ---------- */
.watermark {
  position: absolute;
  z-index: 0;
  top: clamp(2rem, 6vw, 4.5rem);
  right: clamp(1.5rem, 5vw, 5rem);
  font-family: var(--font-display);
  font-size: clamp(9rem, 26vw, 24rem);
  font-weight: 600;
  line-height: 0.8;
  color: var(--itx-blue);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}
.section > .container { position: relative; z-index: 1; }

/* ---------- Hero de portada ---------- */
.hero {
  position: relative;
  padding-block: clamp(5rem, 13vw, 10rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 8%, rgba(16, 155, 203, 0.22), transparent 62%),
    repeating-linear-gradient(to bottom, rgba(242, 242, 243, 0.028) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero__mark { width: 50px; height: 55px; margin-bottom: var(--space-xl); }
.hero__rule {
  height: 1px;
  background: linear-gradient(to right, var(--itx-blue), rgba(16, 155, 203, 0.05));
  margin-bottom: var(--space-lg);
}
.hero h1 { font-size: var(--fs-hero); margin-bottom: var(--space-sm); }
.hero__sub {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--itx-blue-light);
  max-width: none;
}
.hero__lede { margin-top: var(--space-lg); max-width: 48ch; font-size: var(--fs-lede); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }

/* ---------- Hero de páginas interiores ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 12% 0%, rgba(16, 155, 203, 0.16), transparent 62%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero__lede { margin-top: var(--space-md); font-size: var(--fs-lede); max-width: 52ch; }

/* ---------- Listas con guion azul ---------- */
.dash-list { display: grid; gap: var(--space-md); }
.dash-list--tight { gap: var(--space-sm); }
.dash-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: start;
  gap: var(--space-xs);
  color: var(--itx-text-on-dark);
}
.section--light .dash-list li { color: var(--itx-text); }
.dash-list li::before {
  content: "";
  margin-top: 0.75em;
  width: 16px;
  height: 2px;
  background: var(--itx-blue);
}

/* ---------- Ítems numerados 01–04 ---------- */
.numbered { display: grid; gap: var(--section-gap) clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 720px) { .numbered { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .numbered--3 { grid-template-columns: repeat(3, 1fr); }
  .numbered--4 { grid-template-columns: repeat(4, 1fr); }
}
.numbered__item { padding-top: var(--space-md); border-top: 1px solid var(--itx-rule-blue); }
.section--light .numbered__item { border-top-color: var(--itx-rule); }
.numbered__n {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--itx-blue);
  margin-bottom: var(--space-xs);
}
.numbered__item h3 { margin-bottom: var(--space-xs); }
.numbered__item p { font-size: 1rem; }

.link-more {
  display: inline-block;
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--itx-blue-light);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}
.link-more:hover { border-bottom-color: var(--itx-blue-light); }
.section--light .link-more { color: var(--itx-blue-dark); }
.section--light .link-more:hover { border-bottom-color: var(--itx-blue-dark); }

/* ---------- Rótulo de bloque ---------- */
.label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--itx-blue);
  max-width: none;
  margin-bottom: var(--space-sm);
}
.section--light .label { color: var(--itx-blue-dark); }

/* ---------- Tiempos de respuesta ---------- */
.stats { display: grid; gap: var(--space-lg); }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat__k {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1;
  color: var(--itx-blue-light);
  max-width: none;
}
.section--light .stat__k { color: var(--itx-blue-dark); }
.stat__v { margin-top: var(--space-2xs); }

/* ---------- Modelos de contratación ---------- */
.plans { display: grid; gap: 1px; background: var(--itx-rule-blue); border: 1px solid var(--itx-rule-blue); }
@media (min-width: 880px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { background: var(--itx-ink); padding: clamp(1.5rem, 3vw, 2.25rem); }
.plan__head { padding-bottom: var(--space-sm); border-bottom: 1px solid var(--itx-rule-blue); margin-bottom: var(--space-md); }
.plan__head h3 { margin-top: var(--space-2xs); }
.plan dl { display: grid; gap: var(--space-sm); margin: 0; }
.plan dt {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--itx-text-on-dark-muted);
}
.plan dd { margin: 0; font-size: 1rem; color: var(--itx-text-on-dark); }

/* ---------- Rejilla de aliados tecnológicos ---------- */
/* 44 logos: 2 / 4 / 11 columnas — los tres divisores exactos de 44, así la
   última fila nunca queda a medias. */
.partners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--itx-rule);
  border: 1px solid var(--itx-rule);
}
@media (min-width: 560px) { .partners { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1040px) { .partners { grid-template-columns: repeat(11, 1fr); } }
.partners li {
  display: grid;
  place-items: center;
  padding: 12px 8px;
  background: var(--itx-white);
  aspect-ratio: 8 / 5;
}
.partners img {
  max-width: 100%;
  max-height: 32px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter var(--transition-base), opacity var(--transition-base);
}
.partners li:hover img { filter: none; opacity: 1; }
.partners-note { margin-top: var(--space-sm); font-size: 0.8rem; color: var(--itx-text-muted); }

/* ---------- Banda de contacto ---------- */
.cta-band {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7.5rem);
  border-top: 1px solid var(--itx-rule-blue-strong);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 80% 100%, rgba(16, 155, 203, 0.18), transparent 65%);
  pointer-events: none;
}
.cta-band > .container { position: relative; z-index: 1; }
.cta-band__rule { height: 1px; background: rgba(16, 155, 203, 0.3); }
/* h1 en contacto.html, h2 cuando la banda cierra una página interior */
.cta-band h1,
.cta-band h2 { font-size: clamp(3rem, 11vw, 7.5rem); margin-block: var(--space-md); }
.cta-band__cols { display: grid; gap: var(--space-lg); margin-top: var(--space-xl); }
@media (min-width: 720px) { .cta-band__cols { grid-template-columns: repeat(3, 1fr); } }
.cta-band__cols p:not(.label) { color: var(--itx-text-on-dark); font-size: 1.15rem; }
.cta-band__cols a:hover { color: var(--itx-blue-light); }
.cta-band__note { margin-top: var(--space-xl); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--itx-rule-blue);
  color: var(--itx-text-on-dark-muted);
  padding-block: var(--space-xl) var(--space-md);
  font-size: var(--fs-small);
}
.site-footer__top { display: grid; gap: var(--space-xl); }
@media (min-width: 860px) { .site-footer__top { grid-template-columns: 1.2fr 2fr; } }
.site-footer__tagline { margin-top: var(--space-sm); max-width: 36ch; }
.site-footer__cols { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.site-footer h4 {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--itx-blue);
  margin-bottom: var(--space-sm);
}
.site-footer li + li { margin-top: var(--space-xs); }
.site-footer a:hover { color: var(--itx-blue-light); }
.site-footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--itx-rule-on-dark);
  font-size: 0.85rem;
}

/* ============================================================================
   Diagramas SVG (láminas 4, 8 y 12)
   Bajo la CSP estricta no se puede usar style="" dentro del SVG: todo el color
   entra por estas clases o por atributos de presentación (fill=, stroke=).
   ========================================================================= */
.diagram { width: 100%; height: auto; overflow: visible; }
.diagram--wide { max-width: 880px; }

.diagram text { font-family: var(--font-base); font-size: 9px; fill: var(--itx-text-on-dark); }
.dg-line { fill: none; stroke: rgba(242, 242, 243, 0.45); stroke-width: 1; }
.dg-hair { stroke-width: 0.6; }
.dg-fill { fill: rgba(242, 242, 243, 0.75); stroke: none; }
.dg-accent { fill: none; stroke: var(--itx-blue); stroke-width: 1.6; }
.dg-accent-fill { fill: var(--itx-blue); stroke: none; }
.dg-flow { fill: none; stroke: var(--itx-blue); stroke-width: 1.2; stroke-dasharray: 5 4; animation: dg-run 1.6s linear infinite; }
.dg-dashed { stroke-dasharray: 4 3; }
.dg-faint { stroke: rgba(242, 242, 243, 0.3); }
.dg-cross { fill: none; stroke: var(--itx-blue); stroke-width: 1; opacity: 0.7; }
.dg-title {
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  fill: var(--itx-blue);
}
.dg-title.dg-muted { fill: var(--itx-text-on-dark-muted); }
.dg-node { font-family: var(--font-display); font-size: 10px; font-weight: 600; fill: var(--itx-text-on-dark); }
.dg-label { font-size: 8.5px; fill: var(--itx-text-on-dark); }
.dg-label .dg-muted, text.dg-muted { fill: var(--itx-text-on-dark-muted); }
.dg-room { font-family: var(--font-display); font-size: 8px; font-weight: 600; letter-spacing: 0.14em; fill: var(--itx-text-on-dark-muted); }

@keyframes dg-run { to { stroke-dashoffset: -18; } }

/* Los mismos diagramas sobre las secciones claras */
.section--light .diagram text,
.section--light .dg-node,
.section--light .dg-label { fill: var(--itx-ink); }
.section--light .dg-line { stroke: var(--itx-ink); }
.section--light .dg-fill { fill: var(--itx-ink); }
.section--light .dg-faint { stroke: var(--itx-text-muted); opacity: 0.75; }
.section--light .dg-cross { stroke: var(--itx-text-muted); }
.section--light .dg-room,
.section--light text.dg-muted,
.section--light .dg-title.dg-muted { fill: var(--itx-text-muted); }
