/* ==========================================================================
   Grupo Cremsa — sistema visual "mapa de líneas"
   Ver DESIGN.md. Señalética de transporte: placas azul marino, cinco líneas
   de color con sus paradas, una sola correspondencia y una terminal.
   ========================================================================== */

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("assets/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("assets/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca */
  --navy: #0b2f5b;
  --blue: #1f6feb;
  --green: #1e9e6a;
  --gray: #5b6770;
  --sky: #8db4f5;            /* tinte del azul de marca: quinta línea */

  /* Derivados */
  --ink: #0d1b2e;            /* texto principal */
  --ink-2: #4c5862;          /* texto secundario (6.9:1 sobre blanco) */
  --ground: #ffffff;
  --platform: #f2f4f7;       /* secciones alternas: andén */
  --rule: #d8dde4;
  --rule-strong: #b7c0cb;
  --muted-line: #cfd6df;     /* línea atenuada */
  --on-navy: #ffffff;
  --on-navy-2: #c6d4e8;
  --navy-deep: #08223f;
  --focus: #1f6feb;
  --error: #b42318;
  --ok: #157a52;

  /* Tipografía */
  --font-sign: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", "Segoe UI", sans-serif;

  /* Espacio */
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --radius: 8px;

  /* Mapa */
  --stroke: 6px;
  --row: 68px;
  --gap: 12px;
  --n: 5;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--navy);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-sign);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 1.8vw, 1.5rem); font-weight: 600; line-height: 1.15; }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

::selection { background: var(--navy); color: #fff; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

html { scrollbar-color: var(--rule-strong) var(--platform); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  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: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] { display: none !important; }

/* ---------- Franja de líneas (firma de la marca) ---------- */
.line-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 6px;
}
.line-strip span:nth-child(1) { background: var(--sky); }
.line-strip span:nth-child(2) { background: var(--blue); }
.line-strip span:nth-child(3) { background: var(--navy-deep); }
.line-strip span:nth-child(4) { background: var(--gray); }
.line-strip span:nth-child(5) { background: var(--green); }
.site-footer .line-strip span:nth-child(3) { background: #6f93c4; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sign);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn .icon-arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); box-shadow: 0 6px 16px -8px rgb(11 47 91 / 0.55); }

.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e7eef8; }

.btn-outline { border-color: var(--rule-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--navy); }

.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-sm { min-height: 42px; padding: 0.5rem 1rem; font-size: 1.05rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
  text-decoration-color: currentColor;
}
.text-link:hover { text-decoration-thickness: 2.5px; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  margin-right: auto;
}
.wordmark-badge { width: 36px; height: 36px; flex: none; }
.wordmark-text {
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.005em;
}
.wordmark-text span { font-weight: 600; color: var(--ink-2); margin-right: 0.25rem; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  font-family: var(--font-sign);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:not(.btn):hover { background: var(--platform); }
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.45em;
  text-decoration-color: var(--blue);
}
.site-nav .btn { margin-left: 0.5rem; }

.header-cta { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 59.99em) {
  .header-cta { display: inline-flex; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -20px rgb(13 27 46 / 0.35);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem var(--gutter) 1.25rem;
    gap: 0;
  }
  .site-nav a:not(.btn) { min-height: 52px; padding: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .site-nav a:not(.btn):hover { background: transparent; }
  .site-nav .btn { margin: 1rem 0 0; }
  .site-nav .nav-cta { display: none; }
}
@media (max-width: 23em) {
  .wordmark-text span { display: none; }
}

/* ---------- Placa de señalización (encabezado de página) ---------- */
.sign {
  background: var(--navy);
  color: var(--on-navy);
}
.sign .wrap {
  padding-block: clamp(2rem, 4vw, 3rem);
}
.sign h1 { max-width: 18ch; }
@media (min-width: 60em) {
  .sign-split {
    display: grid;
    grid-template-columns: auto minmax(0, 30rem);
    justify-content: space-between;
    align-items: end;
    gap: 3rem;
  }
  .sign-split .sign-lead { margin: 0; }
}
.sign-lead {
  margin-top: 1.1rem;
  max-width: 60ch;
  color: var(--on-navy-2);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
}
.sign-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}
.sign-actions .text-link { color: #fff; }
.sign .breadcrumb {
  margin-bottom: 1rem;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--on-navy-2);
}
.sign .breadcrumb a { color: #fff; text-underline-offset: 0.25em; }

/* ---------- Mapa de la red (portada) ---------- */
.network-section { padding-block: clamp(1.75rem, 3vw, 2.25rem) clamp(3.5rem, 7vw, 5rem); }

.network {
  --bundle: calc(var(--n) * var(--gap) + 2.75rem);
  position: relative;
}
.network-caption {
  margin-bottom: 0.75rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.line {
  --c: var(--navy);
  position: relative;
  display: grid;
  grid-template-columns: 17rem 1fr var(--bundle);
  align-items: center;
  height: var(--row);
}
.line[data-line="diseno"] { --c: var(--sky); --glyph: var(--navy); }
.line[data-line="redes"] { --c: var(--blue); }
.line[data-line="streaming"] { --c: var(--navy); }
.line[data-line="eventos"] { --c: var(--gray); }
.line[data-line="automatizacion"] { --c: var(--green); }

.station {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  text-decoration: none;
  color: var(--ink);
}
.station::after {
  /* la línea nace en la estación */
  content: "";
  flex: 1;
  min-width: 0.75rem;
  height: var(--stroke);
  margin-left: 0.25rem;
  margin-right: -1px;
  background: var(--c);
  transition: background-color 0.3s;
}
.badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: var(--c);
  color: var(--glyph, #fff);
  transition: background-color 0.3s;
}
.badge .icon { width: 24px; height: 24px; stroke-width: 2; }
.station-name {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.1;
  white-space: nowrap;
  transition: color 0.3s;
}
.station:hover .station-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }

.track {
  list-style: none;
  margin: 0;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding-inline: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
}
.track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: var(--stroke);
  margin-top: calc(var(--stroke) / -2);
  background: var(--c);
  transition: background-color 0.3s;
}
.stop {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3.5px solid var(--c);
  transition: border-color 0.3s;
}
.stop-label {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-2);
  transition: color 0.3s, opacity 0.3s;
}

.bend {
  position: relative;
  height: 100%;
}
.bend::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: calc(var(--stroke) / -2);
  right: calc(var(--i) * var(--gap));
  height: calc((var(--n) - var(--i) - 0.5) * var(--row) + var(--tail, 28px) + var(--stroke) / 2);
  border-top: var(--stroke) solid var(--c);
  border-right: var(--stroke) solid var(--c);
  border-top-right-radius: 20px;
  transition: border-color 0.3s;
}

/* Correspondencia y terminal */
.interchange {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "copy stack";
  align-items: start;
  margin-top: var(--tail, 28px);
}
.interchange-copy {
  grid-area: copy;
  justify-self: end;
  max-width: 26rem;
  padding: 0.6rem 1.5rem 0 0;
  text-align: right;
}
.interchange-copy h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 700;
  color: var(--navy);
}
.interchange-copy p { margin-top: 0.3rem; color: var(--ink-2); font-size: 0.98rem; }

.interchange-stack {
  grid-area: stack;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.hub {
  width: calc(var(--n) * var(--gap) + 18px);
  height: 64px;
  margin-right: -9px;
  border: 5px solid var(--ink);
  border-radius: 14px;
  background: #fff;
}
.connector {
  /* línea única hacia la terminal */
  width: 10px;
  height: 40px;
  margin-right: calc(var(--n) * var(--gap) / 2 - 5px);
  background: var(--navy);
}
.terminal {
  min-height: 60px;
  padding-inline: 1.6rem;
  font-size: 1.25rem;
}
.terminal-note {
  margin-top: 0.75rem;
  text-align: right;
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* Línea activa: las demás se atenúan */
.network.has-active .line:not(.is-active) { --c: var(--muted-line); --glyph: #fff; }
.network.has-active .line:not(.is-active) .station-name { color: var(--ink-2); }
.network.has-active .line:not(.is-active) .stop-label { opacity: 0; }
.network.has-active .line.is-active .stop-label { color: var(--ink); }
.network.has-active .line.is-active { z-index: 1; }

/* Trazado inicial de las líneas (una sola vez) */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .network .track::before {
    transform-origin: left center;
    animation: draw-x 0.9s var(--ease-out) both;
    animation-delay: calc(var(--i) * 90ms);
  }
  .js-motion .network .bend::before {
    animation: draw-bend 0.9s var(--ease-out) both;
    animation-delay: calc(450ms + var(--i) * 90ms);
  }
  .js-motion .network .stop {
    animation: pop 0.5s var(--ease-out) both;
    animation-delay: calc(250ms + var(--i) * 90ms);
  }
  .js-motion .network .interchange {
    animation: rise 0.7s var(--ease-out) both;
    animation-delay: 1s;
  }
}
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-bend { from { clip-path: inset(0 100% 100% 0); } to { clip-path: inset(0 -10px -10px 0); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 59.99em) {
  .network { --row: 60px; --gap: 10px; --stroke: 5px; --bundle: calc(var(--n) * var(--gap) + 1.5rem); }
  .line { grid-template-columns: auto 1fr var(--bundle); }
  .track { padding: 0; }
  .stop { display: none; }
  .badge { width: 40px; height: 40px; border-radius: 9px; }
  .badge .icon { width: 22px; height: 22px; }
  .station-name { font-size: 1.1rem; }
  .interchange { grid-template-columns: 1fr; grid-template-areas: "stack" "copy"; }
  .interchange-copy { padding: 1.25rem 0 0; max-width: 20rem; }
  .interchange-copy h3 { font-size: 1.3rem; }
  .interchange-copy p { font-size: 0.95rem; }
  .hub { height: 56px; border-width: 4px; }
  .terminal { font-size: 1.15rem; padding-inline: 1.2rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section-platform { background: var(--platform); }
.section-tight { padding-top: clamp(2.5rem, 5vw, 3.5rem); }

.section-head { max-width: 46rem; }
.section-head p { margin-top: 1rem; color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; }

/* Recorrido (método) */
.route {
  --c: var(--navy);
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}
.route::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 0;
  top: 14px;
  height: var(--stroke);
  margin-top: calc(var(--stroke) / -2);
  background: var(--c);
  border-radius: 0 3px 3px 0;
}
.route-stop { position: relative; }
.route-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid var(--navy);
}
.route-stop h3 { margin-top: 1.1rem; }
.route-stop p { margin-top: 0.5rem; color: var(--ink-2); max-width: 34ch; }

@media (max-width: 59.99em) {
  .route { grid-template-columns: 1fr; gap: 2rem; }
  .route::before { left: 14px; right: auto; top: 14px; bottom: 14px; width: var(--stroke); height: auto; margin: 0 0 0 calc(var(--stroke) / -2); border-radius: 0; }
  .route-stop { display: grid; grid-template-columns: 28px 1fr; column-gap: 1.25rem; }
  .route-stop h3 { margin-top: 0; grid-column: 2; grid-row: 1; align-self: center; }
  .route-dot { grid-row: 1; }
  .route-stop p { grid-column: 2; }
}

/* Línea de automatización */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.feature-copy p { margin-top: 1rem; color: var(--ink-2); font-size: 1.1rem; max-width: 56ch; }
.feature-points {
  list-style: none;
  margin: 1.75rem 0 2rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.feature-points li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.85rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}
.feature-points .icon { margin-top: 0.15rem; color: var(--navy); }
.feature-points strong { font-weight: 600; }

.flow {
  --c: var(--green);
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.flow-stop:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 20px;
  bottom: -20px;
  width: var(--stroke);
  margin-left: calc(var(--stroke) / -2);
  background: var(--c);
}
.flow-stop {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 1.25rem;
  padding-bottom: 1.9rem;
}
.flow-dot {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--c);
}
.flow-stop h3 { font-size: 1.3rem; padding-top: 0.45rem; }
.flow-stop p { color: var(--ink-2); margin-top: 0.3rem; }

.message {
  grid-column: 2;
  margin-top: 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px -22px rgb(13 27 46 / 0.45);
  overflow: hidden;
}
.message-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--platform);
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  font-weight: 600;
}
.message-head .icon { color: var(--green); }
.message-head span:last-child { margin-left: auto; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.message dl { margin: 0; padding: 0.9rem 1rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-size: 0.98rem; }
.message dt { color: var(--ink-2); }
.message dd { margin: 0; font-weight: 500; }
.intent {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--ok);
}
.intent::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.sample-note {
  grid-column: 2;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink-2);
}

@media (max-width: 59.99em) {
  .feature { grid-template-columns: 1fr; }
}

/* Compromisos: tablero de horarios */
.board {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  border-top: 2px solid var(--ink);
}
.board-row {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 1rem 2.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.board-row h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
}
.board-row h3 .icon { width: 24px; height: 24px; color: var(--navy); stroke-width: 1.8; }
.board-row p { color: var(--ink-2); max-width: 62ch; }
@media (max-width: 47.99em) {
  .board-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Cierre */
.closing {
  background: var(--navy);
  color: #fff;
}
.closing .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.closing h2 { max-width: 16ch; }
.closing p { margin-top: 0.9rem; color: var(--on-navy-2); max-width: 48ch; font-size: 1.1rem; }
.closing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.closing-actions .text-link { color: #fff; }

/* ---------- Página de servicios ---------- */
.service-index {
  border-bottom: 1px solid var(--rule);
  background: #fff;
}
.service-index ul {
  display: flex;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 1rem 0;
  list-style: none;
}
.service-index a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
}
.service-index a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.service-index .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3.5px solid var(--c); }

.service-line { --c: var(--navy); padding-block: clamp(3.5rem, 7vw, 5.5rem); border-bottom: 1px solid var(--rule); }
.service-line[data-line="diseno"] { --c: var(--sky); --glyph: var(--navy); }
.service-line[data-line="redes"] { --c: var(--blue); }
.service-line[data-line="eventos"] { --c: var(--gray); }
.service-line[data-line="automatizacion"] { --c: var(--green); }

.service-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
}
.service-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.service-title .badge { width: 56px; height: 56px; border-radius: 12px; }
.service-title .badge .icon { width: 30px; height: 30px; }
.service-copy > p { margin-top: 1.25rem; color: var(--ink-2); font-size: 1.12rem; max-width: 52ch; }
.service-copy .sign-actions { margin-top: 2rem; }
.service-copy .sign-actions .text-link { color: var(--ink); }

.stops-title {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
}
.stops {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.stops::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: var(--stroke);
  margin-left: calc(var(--stroke) / -2);
  background: var(--c);
}
.stops li {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 1.1rem;
  padding: 0.55rem 0;
  font-size: 1.05rem;
}
.stops li::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--c);
}
@media (max-width: 59.99em) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 59.99em) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-aside {
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--platform);
}
.contact-aside h2 { font-size: 1.5rem; }
.contact-list { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.contact-list li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.85rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}
.contact-list .icon { margin-top: 0.15rem; color: var(--navy); }
.contact-list .label { display: block; font-size: 0.88rem; color: var(--ink-2); }
.contact-list a, .contact-list .value { font-weight: 600; word-break: break-word; }
.contact-list a { text-underline-offset: 0.25em; }
.contact-aside .btn { width: 100%; margin-top: 1rem; }

.form { display: grid; gap: 1.4rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 39.99em) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; align-content: start; gap: 0.45rem; min-width: 0; border: 0; margin: 0; padding: 0; }
.field > label, .field legend {
  font-weight: 600;
  font-size: 1rem;
  padding: 0;
}
.field legend { margin-bottom: 0.45rem; }
.req { color: var(--error); }
.hint { font-size: 0.92rem; color: var(--ink-2); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #8a96a3;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { min-height: 9rem; resize: vertical; }
select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2f5b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.2rem;
}
input::placeholder, textarea::placeholder { color: #6b7680; }
input:hover, select:hover, textarea:hover { border-color: var(--navy); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(31 111 235 / 0.28);
}
[aria-invalid="true"] { border-color: var(--error) !important; }
.error-msg { min-height: 0; color: var(--error); font-size: 0.92rem; font-weight: 500; }
.error-msg:empty { display: none; }

.choice-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid #8a96a3;
  border-radius: var(--radius);
  font-weight: 600;
}
.choice span::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3.5px solid #8a96a3;
  background: #fff;
}
.choice input:checked + span { border-color: var(--navy); background: #eaf0f8; }
.choice input:checked + span::before { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 2.5px #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 0.75rem; align-items: start; font-weight: 400 !important; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 0.1rem 0 0; }
.consent a { text-underline-offset: 0.2em; }

.form-status:empty { display: none; }
.form-status {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 500;
}
.form-status.is-ok { background: #e6f4ee; color: #0f5a3c; border: 1px solid #a8d8c3; }
.form-status.is-error { background: #fdecea; color: #8a1c12; border: 1px solid #f3b8b2; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* ---------- Legal ---------- */
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-top: 3rem; }
.prose h2:first-of-type { margin-top: 2rem; }
.prose h3 { margin-top: 1.75rem; }
.prose p, .prose ul { margin-top: 0.75rem; color: var(--ink); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }
.prose a { text-underline-offset: 0.2em; }
.notice {
  padding: 1rem 1.2rem;
  border: 1.5px solid #e0b252;
  background: #fdf6e7;
  border-radius: var(--radius);
  color: #5c4207 !important;
  font-weight: 500;
}

/* ---------- Pie ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy-2);
  font-size: 0.98rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark-text span { color: var(--on-navy-2); }
.footer-brand p { margin-top: 1rem; max-width: 34ch; }
.footer-col h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.footer-col ul { list-style: none; margin: 0.85rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.legend li { display: flex; align-items: center; gap: 0.6rem; }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--c); background: var(--navy-deep); flex: none; }
.legend .dot-streaming { --c: #6f93c4; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
  font-size: 0.92rem;
}
.footer-base a { color: #fff; text-underline-offset: 0.2em; }
@media (max-width: 59.99em) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 29.99em) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Aparición al desplazarse (secciones bajo el pliegue) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js-motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
  .js-motion .reveal.is-in { opacity: 1; transform: none; }
}

@media (max-width: 23em) {
  .station-name { white-space: normal; font-size: 1rem; }
  .station::after { min-width: 0.5rem; }
}
