/* ==========================================================
   Axiodatum: paleta oficial (Manual de marca, opción 2A)
   ========================================================== */
:root {
  --midnight: #081F42;   /* Azul Medianoche: tipografía, anclaje */
  --sapphire: #2750A6;   /* Azul Zafiro Real: confianza, tecnología */
  --emerald:  #29A967;   /* Verde Esmeralda: crecimiento, validación */
  --gold:     #D1B57F;   /* Oro Champaña: el dato, excelencia */
  --white:    #FFFFFF;

  --ink: var(--midnight);
  --muted: #4A5872;
  --line: #E3E8F0;
  --tint: #F4F7FB;
  --midnight-2: #0D2A57;
  --emerald-text: #1E8A52; /* verde con contraste AA para texto pequeño sobre blanco */

  --font-head: "Montserrat", "Gotham", system-ui, sans-serif;
  --font-body: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 31, 66, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 600 .98rem/1 var(--font-body);
  padding: 15px 26px; border-radius: 10px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-primary { background: var(--sapphire); color: var(--white); }
.btn-primary:hover { background: #1F438F; box-shadow: 0 8px 20px rgba(39, 80, 166, .3); }
.btn-gold { background: var(--gold); color: var(--midnight); }
.btn-gold:hover { background: #DCC496; box-shadow: 0 8px 22px rgba(209, 181, 127, .35); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.eyebrow {
  font: 700 .78rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .14em;
  color: var(--emerald-text); margin-bottom: 14px;
}
.eyebrow-light { color: var(--gold); }
.gold { color: var(--gold); }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark {
  font: 700 1.22rem/1 var(--font-head);
  letter-spacing: .06em; /* ≈ +60 tracking */
  color: var(--midnight);
}
.tagline {
  font: 400 .72rem/1.3 var(--font-body);
  letter-spacing: .015em; /* ≈ +15 tracking */
  color: var(--muted); margin-top: 3px;
}
.brand-light .wordmark { color: var(--white); }
.brand-light .tagline { color: rgba(255,255,255,.65); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--midnight);
  position: relative;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--gold); transition: right .2s ease;
}
.main-nav a:not(.btn):hover::after { right: 0; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(41,169,103,.18), transparent 60%),
    radial-gradient(700px 500px at 10% 100%, rgba(39,80,166,.45), transparent 60%),
    var(--midnight);
  padding: 96px 0 104px;
}
.hero::before { /* retícula arquitectónica */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.lead { font-size: 1.12rem; color: rgba(255,255,255,.8); max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .9rem; color: rgba(255,255,255,.72); }
.hero-points li::before { content: "◆"; color: var(--emerald); margin-right: 8px; font-size: .7em; }

.canvas {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden;
}
.canvas-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.canvas-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.2); }
.canvas-bar em { font-style: normal; font-size: .78rem; color: rgba(255,255,255,.55); margin-left: 10px; font-family: ui-monospace, monospace; }
.canvas-flow { width: 100%; height: auto; display: block; padding: 8px; }
.canvas-flow .links path { stroke-dasharray: 6 6; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.node rect { stroke-width: 1.5; }
.node text { fill: #fff; font: 600 12px var(--font-body); text-anchor: middle; }
.node text.sub { font-weight: 400; font-size: 9.5px; fill: rgba(255,255,255,.7); }
.n1 rect { fill: rgba(39,80,166,.55); stroke: #5F86D6; }
.n2 rect { fill: rgba(41,169,103,.35); stroke: var(--emerald); }
.n3 rect { fill: rgba(209,181,127,.25); stroke: var(--gold); }
.n4 rect { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.4); }
.canvas-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; font-size: .78rem; color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.1); }
.canvas-foot .ok { color: #6FD8A0; }
@media (prefers-reduced-motion: reduce) { .canvas-flow .links path { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Franja de valor ---------- */
.value-strip { border-bottom: 1px solid var(--line); }
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.value-grid > div { padding: 30px 24px; border-left: 1px solid var(--line); }
.value-grid > div:first-child { border-left: 0; padding-left: 0; }
.value-grid strong { display: block; font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 4px; }
.value-grid strong::before { content: ""; display: inline-block; width: 16px; height: 3px; background: var(--gold); vertical-align: middle; margin-right: 10px; }
.value-grid span { color: var(--muted); font-size: .92rem; }

/* ---------- Secciones ---------- */
.section { padding: 100px 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--midnight); color: var(--white); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.06rem; }
.section-dark .section-head p:not(.eyebrow) { color: rgba(255,255,255,.72); }

/* Tarjetas de plataforma */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  background: var(--white); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #CBD5E4; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-blue  { background: rgba(39,80,166,.1);  color: var(--sapphire); }
.icon-green { background: rgba(41,169,103,.12); color: #1E8A52; }
.icon-gold  { background: rgba(209,181,127,.2); color: #8E7340; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { background: var(--white); border-radius: var(--radius); padding: 28px; border-top: 4px solid var(--sapphire); box-shadow: 0 2px 0 var(--line); }
.steps li:nth-child(2) { border-top-color: var(--emerald); }
.steps li:nth-child(3) { border-top-color: var(--gold); }
.steps li:nth-child(4) { border-top-color: var(--midnight); }
.step-n { font: 800 2rem/1 var(--font-head); color: var(--line); display: block; margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: .94rem; margin: 0; }

.connectors { margin-top: 56px; text-align: center; }
.connectors p { font-weight: 600; margin-bottom: 18px; }
.connectors ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.connectors li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .88rem; color: var(--muted); }

/* Pestañas */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tabs button {
  background: none; border: 0; cursor: pointer; padding: 14px 18px;
  font: 600 .95rem var(--font-body); color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--midnight); border-bottom-color: var(--emerald); }
.tabs button:hover { color: var(--midnight); }
.tab-panel { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.tab-panel[hidden] { display: none; }
.tab-panel h3 { font-size: 1.5rem; }
.tab-panel p { color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--emerald) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat;
}
.tab-panel .checks { background: var(--tint); padding: 28px; border-radius: var(--radius); }

.sub-head { margin: 72px 0 22px; font-size: 1.3rem; }
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.industry { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--gold); }
.industry strong { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.industry span { color: var(--muted); font-size: .92rem; }

/* Servicios */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.service { background: var(--midnight); padding: 34px 30px; transition: background .2s ease; }
.service:hover { background: var(--midnight-2); }
.service h3 { color: var(--white); }
.service h3::before { content: ""; display: block; width: 28px; height: 3px; background: var(--gold); margin-bottom: 18px; }
.service p { color: rgba(255,255,255,.7); font-size: .95rem; margin: 0; }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.about-copy strong { color: var(--midnight); }
.pillars { display: grid; gap: 14px; }
.pillar { padding: 24px 26px; border-radius: var(--radius); color: var(--white); }
.pillar strong { display: block; font: 700 1.15rem var(--font-head); margin-bottom: 2px; }
.pillar span { opacity: .88; font-size: .95rem; }
.p-blue  { background: linear-gradient(120deg, var(--midnight), var(--sapphire)); }
.p-green { background: linear-gradient(120deg, #1B7A49, var(--emerald)); }
.p-gold  { background: linear-gradient(120deg, #B8995C, var(--gold)); color: var(--midnight); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.contact-copy .checks { margin-top: 26px; }
.contact-form { background: var(--white); border-radius: 18px; padding: 34px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 1rem var(--font-body); color: var(--ink);
  padding: 12px 14px; border: 1px solid #CBD5E4; border-radius: 10px; background: var(--white);
  width: 100%;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--sapphire); box-shadow: 0 0 0 3px rgba(39,80,166,.15); }
.contact-form .invalid { border-color: #C0392B; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; font-size: .92rem; min-height: 1.4em; }
.form-status.success { color: #1E8A52; }
.form-status.error { color: #C0392B; }

/* Pie de página */
.site-footer { background: #061733; color: rgba(255,255,255,.7); padding: 64px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.footer-grid > div:not(.footer-brand) a { display: block; text-decoration: none; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: .84rem; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Multipágina ---------- */
.main-nav a[aria-current="page"]:not(.btn)::after { right: 0; }
.main-nav a[aria-current="page"]:not(.btn) { font-weight: 600; }

.page-hero {
  position: relative; overflow: hidden; color: var(--white);
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(41,169,103,.18), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(39,80,166,.45), transparent 60%),
    var(--midnight);
  padding: 64px 0 72px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.page-hero .container { position: relative; max-width: 1180px; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 820px; }
.crumbs { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs a { text-decoration: none; color: rgba(255,255,255,.8); white-space: nowrap; }
.crumbs a:hover { color: var(--gold); }

.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-head-row > div { max-width: 680px; }
.section-head-row h2:last-child, .section-head-row p:last-child { margin-bottom: 0; }
.more-link {
  font-weight: 600; color: var(--sapphire); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid var(--gold); padding-bottom: 3px;
}
.more-link::after { content: " →"; transition: margin .15s ease; }
.more-link:hover::after { margin-left: 4px; }
.more-link-light { color: var(--white); }

.card-link { text-decoration: none; color: inherit; display: block; }

.area-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.area {
  background: var(--white); border-radius: var(--radius); padding: 24px; text-decoration: none;
  border-top: 4px solid var(--sapphire); transition: box-shadow .2s ease, transform .2s ease;
}
.area:nth-child(2) { border-top-color: var(--emerald); }
.area:nth-child(3) { border-top-color: var(--gold); }
.area:nth-child(4) { border-top-color: var(--midnight); }
.area:nth-child(5) { border-top-color: var(--emerald); }
.area:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.area strong { display: block; font-family: var(--font-head); margin-bottom: 6px; }
.area span { color: var(--muted); font-size: .9rem; }

.about-copy .more-link { display: inline-block; margin-top: 8px; }
.connectors-left { text-align: left; margin-top: 0; }
.connectors-left ul { justify-content: flex-start; }
.deploy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.industry-white { background: var(--white); }
.service-grid-4 { grid-template-columns: repeat(4, 1fr); }
.pillars-row { grid-template-columns: repeat(3, 1fr); }

.logo-story { background: var(--tint); border-radius: 18px; padding: 40px; }
.logo-story img { width: 140px; margin: 0 auto 28px; } /* tamaño nativo de la imagen: sin pérdida de nitidez */
.logo-story ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--muted); }
.logo-story strong { color: var(--midnight); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 10px; vertical-align: middle; }
.contact-note { margin-top: 26px; font-size: .95rem; }

.cta-band { background: linear-gradient(110deg, var(--midnight) 0%, var(--sapphire) 100%); color: var(--white); padding: 64px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { margin-bottom: 6px; }
.cta-inner p { margin: 0; color: rgba(255,255,255,.78); }

/* ---------- Diagrama de flujo del hero ---------- */
.flow { margin: 0; }
.flow-body { padding: 18px 18px 14px; display: grid; gap: 0; }
.flow-label {
  margin: 0 0 10px; font: 600 .7rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.62); display: flex; align-items: center; gap: 8px;
}
.flow-label b {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: var(--midnight); font-size: .66rem; letter-spacing: 0;
}
.flow-sources { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.flow-sources li {
  background: rgba(39,80,166,.5); border: 1px solid #5F86D6; border-radius: 10px; padding: 9px 10px;
  display: grid; gap: 2px; animation: pulse 4s ease-in-out infinite;
}
.flow-sources li:nth-child(2) { animation-delay: .25s; }
.flow-sources li:nth-child(3) { animation-delay: .5s; }
.flow-sources li:nth-child(4) { animation-delay: .75s; }
.flow-sources strong { font-size: .8rem; color: var(--white); line-height: 1.2; }
.flow-sources small { font-size: .66rem; color: rgba(255,255,255,.68); line-height: 1.25; }
@keyframes pulse { 0%, 100% { border-color: #5F86D6; } 12% { border-color: var(--gold); } }

/* Conectores alineados a su caja: fuentes ↓ IA (columna 1) → especialista ↓ hallazgos (columna 3) */
.flow-link, .flow-row { grid-template-columns: 1.55fr 40px 1fr; }
.flow-link { height: 26px; display: grid; }
.flow-link-a span { grid-column: 1; }
.flow-link-b span { grid-column: 3; }
.flow-link span { justify-self: center; }
.flow-link span {
  width: 2px; height: 100%;
  background: repeating-linear-gradient(to bottom, var(--gold) 0 5px, transparent 5px 10px);
  background-size: 2px 20px; animation: drip 1s linear infinite; position: relative;
}
.flow-link span::after {
  content: ""; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--gold); border-bottom: 0;
}
@keyframes drip { to { background-position: 0 20px; } }

.flow-row { display: grid; align-items: stretch; }
.flow-engine {
  border: 1.5px solid var(--gold); background: rgba(209,181,127,.12); border-radius: 12px; padding: 12px 14px;
}
.flow-tags { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.flow-tags li {
  font-size: .7rem; color: var(--white); padding: 4px 8px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(209,181,127,.45);
}
.flow-scan { height: 5px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.flow-scan i {
  display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scan 2.2s ease-in-out infinite;
}
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.flow-caption { display: block; margin-top: 7px; font-size: .66rem; color: rgba(255,255,255,.62); }

.flow-arrow { position: relative; }
.flow-arrow::before {
  content: ""; position: absolute; top: 50%; left: 6px; right: 10px; height: 2px;
  background: repeating-linear-gradient(to right, var(--gold) 0 5px, transparent 5px 10px);
  background-size: 20px 2px; animation: dash-x 1s linear infinite;
}
.flow-arrow::after {
  content: ""; position: absolute; top: calc(50% - 4px); right: 2px;
  border: 5px solid transparent; border-left-color: var(--gold); border-right: 0;
}
@keyframes dash-x { to { background-position: 20px 0; } }

.flow-expert {
  border: 1.5px solid var(--emerald); background: rgba(41,169,103,.16); border-radius: 12px; padding: 12px 14px;
  display: grid; align-content: start; gap: 6px;
}
.flow-expert .flow-label { margin-bottom: 4px; }
.flow-expert svg { width: 30px; height: 30px; fill: none; stroke: #6FD8A0; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow-expert small { font-size: .7rem; color: rgba(255,255,255,.75); line-height: 1.4; }

.flow-findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.flow-findings li {
  display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--white);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; padding: 8px 10px;
  opacity: 0; animation: reveal .5s ease .3s forwards; /* aparecen una vez y se quedan */
}
.flow-findings li:nth-child(2) { animation-delay: .7s; }
.flow-findings li:nth-child(3) { animation-delay: 1.1s; }
@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.sev {
  font-style: normal; font: 700 .62rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 7px; border-radius: 5px; flex: none; min-width: 46px; text-align: center;
}
.sev-high { background: #E2574C; color: #fff; }
.sev-mid  { background: var(--gold); color: var(--midnight); }
.sev-low  { background: rgba(255,255,255,.18); color: #fff; }

/* Diagrama con pestañas del inicio */
.hero-grid > * { min-width: 0; } /* evita que el contenido ensanche la columna en celular */
.flow-switch-label {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font: 700 .74rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.flow-switch-label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.flow-switch-label span {
  margin-left: auto; font: 600 .72rem/1 var(--font-body); letter-spacing: 0; text-transform: none;
  color: rgba(255,255,255,.7); padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
  white-space: nowrap;
}
/* Menú de 5 pestañas iguales integrado como encabezado de la tarjeta */
.flow-tabs {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.12);
}
.flow-tabs button {
  position: relative; cursor: pointer; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font: 600 .76rem/1.1 var(--font-body); color: rgba(255,255,255,.62);
  background: none; border: 0; border-right: 1px solid rgba(255,255,255,.08);
  padding: 13px 4px 14px; transition: background .2s ease, color .2s ease;
}
.flow-tabs button:last-child { border-right: 0; }
.flow-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-tabs button svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow-tabs button:hover { color: var(--white); background: rgba(255,255,255,.05); }
.flow-tabs button[aria-selected="true"] {
  color: var(--white); background: rgba(209,181,127,.13);
  box-shadow: inset 0 -2px 0 rgba(209,181,127,.35);
}
.flow-tabs button[aria-selected="true"] svg { color: var(--gold); }
/* Línea dorada que se llena mientras la pestaña está activa: anuncia que viene otro diagrama */
.tab-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--gold); transform-origin: left; transform: scaleX(0);
}
.flow-tabs button[aria-selected="true"] .tab-progress { animation: tab-progress var(--rotate, 7s) linear forwards; }
.flow-tabbed.paused .flow-tabs button[aria-selected="true"] .tab-progress { animation: none; transform: scaleX(1); }
@keyframes tab-progress { to { transform: scaleX(1); } }
.flow-foot-left { display: flex; align-items: center; gap: 12px; }
.flow-foot-left small { color: rgba(255,255,255,.5); font-size: .72rem; }

.canvas-note { margin-left: auto !important; font-family: var(--font-body) !important; }
.flow-foot { align-items: center; }
.flow-more { color: #6FD8A0; text-decoration: none; font-weight: 600; }
.flow-more:hover { text-decoration: underline; }
.flow-pager { display: flex; align-items: center; gap: 8px; }
.flow-pager span { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.6); }
.flow-pager button {
  cursor: pointer; font: 600 .76rem/1 var(--font-body); color: var(--white);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 7px 10px;
}
.flow-pager button:hover { border-color: var(--gold); }
.flow-pager .flow-next { background: rgba(209,181,127,.18); border-color: rgba(209,181,127,.6); }
.flow-panel[hidden] { display: none; }
.flow-panel { animation: panel-in .35s ease; }
@keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .flow-panel, .tab-progress { animation: none; }
  .flow-sources li, .flow-link span, .flow-scan i, .flow-arrow::before { animation: none; }
  .flow-findings li { animation: none; opacity: 1; }
}
@media (max-width: 620px) {
  .flow-sources { grid-template-columns: 1fr 1fr; }
  .flow-row, .flow-link { grid-template-columns: 1fr; }
  .flow-link-a span, .flow-link-b span { grid-column: 1; }
  .flow-arrow { height: 26px; }
  .flow-arrow::before {
    top: 0; bottom: 8px; left: 50%; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(to bottom, var(--gold) 0 5px, transparent 5px 10px);
    background-size: 2px 20px; animation: drip 1s linear infinite;
  }
  .flow-arrow::after {
    top: auto; bottom: 2px; right: auto; left: calc(50% - 4px);
    border: 5px solid transparent; border-top-color: var(--gold); border-bottom: 0;
  }
  .flow-findings li { font-size: .74rem; }
  .flow-tabs button { font-size: .66rem; padding: 11px 2px 12px; gap: 5px; }
  .flow-tabs button svg { width: 18px; height: 18px; }
  .flow-foot { flex-direction: column; align-items: stretch; }
  .flow-pager { justify-content: space-between; }
}

/* ---------- Servicios detallados ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.svc {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  border-top: 4px solid var(--sapphire); scroll-margin-top: 96px;
}
.svc:nth-child(4n+2) { border-top-color: var(--emerald); }
.svc:nth-child(4n+3) { border-top-color: var(--gold); }
.svc:nth-child(4n+4) { border-top-color: var(--midnight); }
.svc:target { box-shadow: 0 0 0 3px rgba(209,181,127,.6), var(--shadow); }
.svc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.svc-head .icon { margin: 0; flex: none; }
.svc-head h2 { font-size: 1.25rem; margin: 0; }
.svc > p { color: var(--muted); }
.checks-sm { gap: 8px; font-size: .93rem; }
.checks-sm li { padding-left: 28px; }
.checks-sm li::before { width: 18px; height: 18px; top: 2px; background-size: 11px; }
.deploy-grid-flush { margin-top: 0; }
.svc-wide { grid-column: 1 / -1; }
.svc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 8px; }
.svc-cols h3 { font-size: 1rem; margin-bottom: 12px; }
.inline-note {
  display: flex; align-items: center; gap: 20px; margin-top: 22px; padding: 22px 28px;
  border: 1px dashed #CBD5E4; border-radius: var(--radius); text-decoration: none; color: var(--muted);
  transition: border-color .2s ease, background .2s ease;
}
.inline-note:hover { border-color: var(--sapphire); background: var(--tint); }
.inline-note .icon { margin: 0; flex: none; }
.inline-note strong { color: var(--midnight); }
.inline-note .more-link { margin-left: auto; }
.footer-note { margin-top: 16px; max-width: 320px; font-size: .88rem; }

/* ---------- Menú desplegable de servicios ---------- */
.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.submenu-toggle {
  background: none; border: 0; cursor: pointer; padding: 4px; color: var(--midnight);
  display: grid; place-items: center; border-radius: 6px;
}
.submenu-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.nav-item.open .submenu-toggle svg { transform: rotate(180deg); }
.mega { display: none; }
.nav-item.open .mega { display: block; }
.mega-inner {
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(8,31,66,.16); padding: 24px;
  display: grid; grid-template-columns: repeat(3, 236px); gap: 8px 24px;
}
.mega-title { font: 700 .72rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--emerald-text); margin: 0 0 8px 10px; }
.main-nav .mega a {
  display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-weight: 400;
}
.main-nav .mega a::after { display: none; }
.main-nav .mega a:hover { background: var(--tint); }
.mega a strong { display: block; font-size: .9rem; font-weight: 600; color: var(--midnight); }
.mega a span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.mega-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 14px 10px 0; margin-top: 8px; }
.main-nav .mega-foot a.more-link { display: inline-block; padding: 0 0 3px; border-radius: 0; }
.main-nav .mega-foot a.more-link:hover { background: none; }

@media (min-width: 981px) {
  .mega { position: absolute; top: 100%; left: 50%; transform: translateX(-30%); padding-top: 22px; z-index: 60; }
  .nav-item:focus-within .mega { display: block; }
}
@media (min-width: 981px) and (hover: hover) {
  .nav-item:hover .mega { display: block; }
  .nav-item:hover .submenu-toggle svg { transform: rotate(180deg); }
}

/* ---------- Barra de grupos (servicios.html) ---------- */
.subnav {
  position: sticky; top: 76px; z-index: 40;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.subnav .container { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a {
  white-space: nowrap; padding: 8px 16px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .9rem; color: var(--muted); border: 1px solid var(--line); transition: all .2s ease;
}
.subnav a:hover { color: var(--midnight); border-color: #CBD5E4; }
.subnav a.active { background: var(--midnight); border-color: var(--midnight); color: var(--white); }
.group-section { scroll-margin-top: 140px; }
.svc-card p { font-size: .93rem; }
.card-more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: .9rem; color: var(--sapphire); }
.card-more::after { content: " →"; }
.card-link:hover .card-more::after { margin-left: 4px; }

/* ---------- Página de detalle de servicio ---------- */
.hero-split { padding: 56px 0 72px; }
.hero-split .hero-grid { gap: 48px; }
.hero-split h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.hero-split .hero-ctas { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.detail-main h2 { margin-bottom: 24px; }
.detail-sources { margin-top: 48px; }
.aside-card {
  position: sticky; top: 100px; background: var(--tint); border-radius: 18px; padding: 30px;
  border-top: 4px solid var(--gold);
}
.aside-card h3 { margin-bottom: 16px; }
.aside-meta { margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.aside-meta small { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.aside-meta p { margin: 4px 0 0; }
.aside-card .btn { width: 100%; text-align: center; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.pager a {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.pager a:hover { border-color: var(--sapphire); box-shadow: var(--shadow); }
.pager small { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 4px; }
.pager strong { font-family: var(--font-head); }
.pager-next { text-align: right; }

/* ---------- Bloques extra de servicio (calidad) ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpi {
  background: var(--white); border-radius: var(--radius); padding: 22px 24px;
  border-left: 4px solid var(--emerald); box-shadow: 0 2px 0 var(--line);
}
.kpi strong { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.kpi span { color: var(--muted); font-size: .92rem; }
.mini-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.mini-steps li { display: flex; gap: 16px; padding-bottom: 22px; position: relative; }
.mini-steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 2px; background: var(--line);
}
.mini-steps b {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--midnight); color: var(--gold); font: 700 .85rem var(--font-head);
}
.mini-steps strong { display: block; font-family: var(--font-head); margin-bottom: 2px; }
.mini-steps span { color: var(--muted); font-size: .95rem; padding-top: 4px; }

/* ---------- Recursos: índice y guías ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.guide-tag {
  display: inline-block; font: 700 .7rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  color: var(--emerald-text); background: rgba(41,169,103,.1); padding: 6px 10px; border-radius: 999px; margin-bottom: 14px;
}
.guide-card h3 { font-size: 1.2rem; }
.guide-meta { display: block; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.section-flush { padding-top: 0; }
.guide-teaser {
  display: flex; align-items: center; gap: 20px; padding: 22px 28px; text-decoration: none;
  border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius);
  transition: box-shadow .2s ease;
}
.guide-teaser:hover { box-shadow: var(--shadow); }
.guide-teaser .guide-tag { margin: 0; flex: none; }
.guide-teaser strong { display: block; font-family: var(--font-head); }
.guide-teaser small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.guide-teaser .card-more { margin: 0 0 0 auto; flex: none; }

.article-meta { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: rgba(255,255,255,.7); }
.article-meta li::before { content: "◆"; color: var(--gold); font-size: .65em; margin-right: 8px; vertical-align: middle; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 100px; }
.toc-title { font: 700 .72rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.toc nav { display: grid; border-left: 2px solid var(--line); }
.toc a {
  text-decoration: none; font-size: .9rem; color: var(--muted); padding: 7px 0 7px 16px; margin-left: -2px;
  border-left: 2px solid transparent; transition: color .2s ease, border-color .2s ease;
}
.toc a:hover { color: var(--midnight); }
.toc a.active { color: var(--midnight); font-weight: 600; border-left-color: var(--gold); }

.prose { max-width: 760px; font-size: 1.04rem; }
.prose > section { margin-bottom: 56px; scroll-margin-top: 100px; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.prose h3 { font-size: 1.05rem; margin-bottom: 6px; }
.prose p { color: #33415C; }
.callout { background: var(--tint); border-radius: 16px; padding: 28px 30px; border-top: 4px solid var(--emerald); }
.callout h2 { font-size: 1.2rem; margin-bottom: 16px; }
.callout .checks li { color: #33415C; }
.note {
  background: rgba(209,181,127,.14); border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0;
  padding: 18px 22px; margin: 24px 0; color: #33415C; font-size: .97rem;
}

.law-table { width: 100%; border-collapse: collapse; margin: 20px 0 24px; font-size: .93rem; }
.law-table th {
  text-align: left; font: 700 .74rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  color: var(--white); background: var(--midnight); padding: 12px 14px;
}
.law-table th:first-child { border-radius: 10px 0 0 0; }
.law-table th:last-child { border-radius: 0 10px 0 0; }
.law-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: #33415C; }
.law-table tbody tr:nth-child(even) td { background: #FAFBFD; }
.law-table td:last-child { font-weight: 600; color: var(--sapphire); }
.law-table th:nth-child(1) { width: 30%; }
.law-table th:nth-child(2) { width: 45%; }
.law-table th:nth-child(3) { width: 25%; }

.rule-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.rule { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.rule p { margin: 10px 0 0; font-size: .95rem; }
.rule-tag { display: inline-block; font: 700 .78rem/1 var(--font-head); color: var(--white); background: var(--sapphire); padding: 6px 10px; border-radius: 6px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 24px; }
.compare-col { border-radius: var(--radius); padding: 24px; border: 2px solid var(--line); }
.compare-col p { margin: 0; font-size: .95rem; }
.compare-yes { border-color: var(--emerald); background: rgba(41,169,103,.06); }
.compare-no { border-style: dashed; }
.compare-badge {
  display: inline-block; font: 700 .7rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 10px; border-radius: 999px; margin-bottom: 14px;
}
.compare-yes .compare-badge { background: var(--emerald-text); color: var(--white); }
.compare-no .compare-badge { background: var(--line); color: var(--muted); }

.impl-steps { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 12px; }
.impl-steps li { display: flex; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.impl-steps b {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--midnight); color: var(--gold); font: 700 .9rem var(--font-head);
}
.impl-steps p { margin: 0 0 8px; font-size: .95rem; }
.impl-result { margin: 0 !important; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--midnight) !important; }
.impl-result span {
  font: 700 .66rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--emerald-text); margin-right: 8px;
}
.area-chips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.area-chips li { padding: 7px 14px; border-radius: 999px; background: var(--tint); font-weight: 600; font-size: .88rem; }

.guide-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.guide-services a {
  display: block; text-decoration: none; border: 1px solid var(--line); border-top: 4px solid var(--sapphire);
  border-radius: var(--radius); padding: 18px; transition: box-shadow .2s ease;
}
.guide-services a:hover { box-shadow: var(--shadow); }
.guide-services small { display: block; font: 700 .68rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--emerald-text); margin-bottom: 8px; }
.guide-services strong { display: block; font-family: var(--font-head); font-size: .95rem; }
.guide-services span { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.guide-services strong::after { content: " →"; color: var(--gold); }

.sources { border-top: 1px solid var(--line); padding-top: 32px; }
.sources h2 { font-size: 1.1rem; }
.sources ul { padding-left: 18px; color: #33415C; font-size: .93rem; display: grid; gap: 6px; }
.sources a { color: var(--sapphire); }
.disclaimer { margin-top: 18px; font-size: .85rem !important; color: var(--muted) !important; font-style: italic; }

/* ---------- Siguiente página ---------- */
.page-next { border-top: 1px solid var(--line); }
.page-next a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 36px 0; text-decoration: none;
}
.page-next small { display: block; font: 700 .72rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--emerald-text); margin-bottom: 8px; }
.page-next strong { display: block; font: 700 clamp(1.4rem, 3vw, 2rem)/1.2 var(--font-head); }
.page-next em { font-style: normal; color: var(--muted); }
.page-next-arrow {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--gold); font-size: 1.4rem; transition: background .2s ease, transform .2s ease;
}
.page-next a:hover .page-next-arrow { background: var(--gold); transform: translateX(4px); }

/* ---------- Inicio: marcos y grupos de servicios ---------- */
.trust-strip { border-bottom: 1px solid var(--line); padding: 26px 0; }
.trust-inner { display: flex; align-items: center; gap: 12px 32px; flex-wrap: wrap; }
.trust-inner p { margin: 0; font: 700 .75rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.trust-inner ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.trust-inner li { font-weight: 600; font-size: .86rem; display: flex; align-items: center; gap: 8px; }
.trust-inner li::before { content: ""; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }

.group-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.group-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; border-top: 4px solid var(--sapphire); }
.gc-green { border-top-color: var(--emerald); }
.gc-gold { border-top-color: var(--gold); }
.group-col > p { color: var(--muted); font-size: .92rem; }
.group-links { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.group-links a {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px; margin: 0 -10px; border-radius: 10px;
  text-decoration: none; transition: background .2s ease;
}
.group-links a:hover { background: var(--tint); }
.group-links strong { display: block; font-size: .95rem; }
.group-links small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.icon-sm { width: 36px; height: 36px; border-radius: 9px; flex: none; margin: 0; }
.icon-sm svg { width: 18px; height: 18px; }
.service-link { text-decoration: none; display: block; }
.service-link h3::after { content: " →"; color: var(--gold); }

/* ---------- Industrias: enlaces ---------- */
.related-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.related-links span { font-weight: 600; font-size: .85rem; color: var(--midnight); margin-right: 4px; }
.related-links a {
  font-size: .85rem; text-decoration: none; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #CBD5E4; color: var(--sapphire); font-weight: 500;
}
.related-links a:hover { border-color: var(--sapphire); background: rgba(39,80,166,.06); }
.industry-link { text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; }
.industry-link:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.industry-link strong::after { content: " →"; color: var(--gold); }

/* ---------- Nosotros: equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ---------- Contacto: otros medios ---------- */
.contact-channels { margin-top: 36px; display: grid; gap: 10px; }
.contact-channels h3 { margin-bottom: 6px; }
.contact-channels a {
  display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; text-decoration: none; font-weight: 600;
}
.contact-channels a:hover { border-color: var(--sapphire); }
.contact-channels .icon { width: 40px; height: 40px; margin: 0; flex: none; }
.contact-channels .icon svg { width: 20px; height: 20px; }
.contact-channels small { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid, .tab-panel { grid-template-columns: 1fr; gap: 40px; }
  .card-grid, .service-grid, .industry-grid, .service-grid-4, .area-grid, .deploy-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-row, .svc-grid, .detail-grid, .group-cols { grid-template-columns: 1fr; }
  .team-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .guide-services { grid-template-columns: 1fr; }
  .aside-card { position: static; }

  /* Menú de servicios dentro del menú móvil */
  .nav-item { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--line); }
  .main-nav .nav-item > a:not(.btn) { border-bottom: 0; }
  .submenu-toggle { padding: 10px; }
  .mega { width: 100%; padding-bottom: 12px; }
  .mega-inner { grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0; gap: 4px; }
  .mega-title { margin: 10px 0 4px 10px; }
  .main-nav .mega a:not(.btn) { padding: 8px 10px; border-bottom: 0; }
  .main-nav .mega-foot a.more-link:not(.btn) { padding: 0 0 3px; border-bottom: 2px solid var(--gold); }
  .mega a span { display: none; }
  .mega-foot { margin-top: 4px; }
  .main-nav { max-height: calc(100vh - 76px); overflow-y: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid > div { border-left: 0; padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-toggle {
    display: grid; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--midnight); transition: transform .2s ease, opacity .2s ease; }
  .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); }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 16px; text-align: center; }
}
@media (max-width: 620px) {
  .section { padding: 72px 0; }
  .hero { padding: 64px 0 72px; }
  .card-grid, .service-grid, .industry-grid, .steps, .value-grid, .field-row,
  .service-grid-4, .area-grid, .deploy-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 56px; }
  .svc-cols { grid-template-columns: 1fr; gap: 20px; }
  .team-grid, .pager, .kpi-grid, .guide-grid, .rule-cards, .compare { grid-template-columns: 1fr; }
  .guide-teaser { flex-direction: column; align-items: flex-start; }
  .guide-teaser .card-more { margin: 0; }
  .callout { padding: 22px; }
  /* Tabla legal: cada fila se vuelve una tarjeta en celular */
  .law-table thead { display: none; }
  .law-table, .law-table tbody, .law-table tr, .law-table td { display: block; width: 100%; }
  .law-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
  .law-table td { border-bottom: 1px solid var(--line); white-space: normal !important; }
  .law-table tr td:last-child { border-bottom: 0; }
  .law-table td::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font: 700 .66rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  }
  .pager-next { text-align: left; }
  .page-next-arrow { width: 44px; height: 44px; }

  /* Pestañas deslizables en una sola fila */
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; gap: 0; scrollbar-width: none;
    margin-inline: -16px; padding-inline: 16px;
    mask-image: linear-gradient(to right, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; padding: 12px 14px; }
  .inline-note { flex-direction: column; align-items: flex-start; }
  .inline-note .more-link { margin-left: 0; }
  .tagline { display: none; }
  .contact-form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
