/* =============================================================
   Goval TPA — color palette
   -------------------------------------------------------------
   Brand:   navy / navy-deep / teal / green (green = CTA only)
   Text:    ink (headings/body) · muted (secondary)
   Grounds: bg (white) · fog (cool blue-grey) · mint (soft green)
            · navy-deep (dark editorial) · accent gradient (#momento)
   Rule:    consecutive sections never share the same ground.
            Order → hero(dark) · cifras(mint) · operacion(bg) ·
            proceso(fog) · especializacion(bg) · servicios(fog) ·
            filosofia(navy-deep) · momento(accent) · contact(bg) ·
            footer(fog).  mint lives ONLY on #cifras.
   ============================================================= */
:root {
  /* Brand */
  --navy: #0a2342;
  --navy-deep: #061628;
  --teal: #1a6f9a;
  --green: #6fbf2c;
  --green-dark: #4f9a1a;

  /* Text */
  --ink: #152033;
  --muted: #5a6a7d;

  /* Section grounds (light) */
  --bg: #ffffff;
  --fog: #eef3f8;
  --mint: #e7f1e2;
  --surface: #ffffff;
  --white: #ffffff;

  /* Lines / form fields */
  --border: #e4ebf3;
  --border-strong: #d5dee8;
  --input-bg: #ffffff;
  --card-line: #d7e0ea;
  --form-border: #d7e2ec;
  --form-input-border: #c5d3e0;
  --sent-bg: #e8f6d8;

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --ink: #e8eef5;
  --muted: #9aabbc;

  --bg: #0b1622;
  --fog: #122536;
  --mint: #10241a;
  --surface: #102033;
  --white: #0d1b2a;

  --border: #243447;
  --border-strong: #2f4258;
  --input-bg: #0d1b2a;
  --card-line: #2a3d52;
  --form-border: #2f4258;
  --form-input-border: #3a5068;
  --sent-bg: #1e3a1a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--green); }
html[data-theme="dark"] a:hover { color: #9ad4f0; }
a.btn,
a.btn:hover { text-decoration: none; }

h1, h2, h3 { font-family: var(--font); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); color: var(--ink); padding: 0.5rem; }

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

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
  line-height: 0;
  color: var(--ink);
}
.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  display: block;
  flex-shrink: 0;
}
.brand-word {
  display: inline-block;
  font-family: "Orbitron", "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  color: var(--navy);
  line-height: 1;
  text-transform: uppercase;
}
html[data-theme="dark"] .brand-word {
  color: #e8eef5;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
}
.footer-brand img {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}
.footer-brand .brand-word {
  font-size: 1.1rem;
}
.header-cta .cta-short { display: none; }
.nav { display: flex; gap: 1.25rem; }
.nav a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.lang {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.lang button.is-active { background: var(--navy); color: #fff; }
html[data-theme="dark"] .lang button.is-active { background: var(--teal); }

.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; display: block; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Primary CTA (single accent, used everywhere) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.88rem; }

/* ---------- Section rhythm ---------- */
.section { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.9rem;
}
.section-lede { color: var(--muted); max-width: 38rem; margin: 0 0 2rem; }

/* ---------- 1. Hero ---------- */
/* Fondo oscuro fijo (mapa LatAm con nodos, public/hero-map) en ambos temas.
   Texto claro; el degradado izquierdo asegura contraste sobre el mapa. */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 4.25rem);
  padding: clamp(3rem, 8vh, 5.5rem) 0;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #08182c;
  background-image:
    linear-gradient(105deg, rgba(6,18,33,0.85) 0%, rgba(6,18,33,0.5) 42%, rgba(6,18,33,0.08) 76%, rgba(6,18,33,0) 100%),
    url("public/hero-map.jpg");
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: cover, cover;
}
@supports (background-image: image-set(url("i.webp") type("image/webp"))) {
  .hero-bg {
    background-image:
      linear-gradient(105deg, rgba(6,18,33,0.85) 0%, rgba(6,18,33,0.5) 42%, rgba(6,18,33,0.08) 76%, rgba(6,18,33,0) 100%),
      image-set(url("public/hero-map.webp") type("image/webp"), url("public/hero-map.jpg") type("image/jpeg"));
  }
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 40rem; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b7d0e8;
  margin: 0 0 1rem;
  animation: rise 0.7s ease both;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: #fff;
  animation: rise 0.8s ease 0.08s both;
}
.lede {
  font-size: 1.1rem;
  color: #d7e4f2;
  margin: 0 0 1.9rem;
  max-width: 34rem;
  animation: rise 0.85s ease 0.14s both;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; animation: rise 0.9s ease 0.2s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Stats band (under the hero) — the one green/mint ground ---------- */
/* Pure typography: no cards, borders, icons or column dividers.
   Soft green (--mint) with a near-imperceptible grain.
   4 stats: 2x2 on mobile, single row of 4 from 760px. */
.stats {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #eef5ea 0%, #e7f1e2 55%, #e1eed7 100%);
}
html[data-theme="dark"] .stats {
  background: linear-gradient(115deg, #0d1f15 0%, #10241a 55%, #13291c 100%);
}
.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.045;
  pointer-events: none;
}
html[data-theme="dark"] .stats::before { opacity: 0.06; }
.stats > .wrap { position: relative; z-index: 1; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
  margin: 0;
  text-align: center;
}
.stats-grid > div { min-width: 0; }
.stat-n {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0a1420;
}
html[data-theme="dark"] .stat-n { color: #f2f6fa; }
.stat-l {
  margin: 0.85rem auto 0;
  max-width: 15rem;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

@media (min-width: 760px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Ground utilities (see palette note at top) ---------- */
/* Default section ground is --bg (white). Fog bands opt in: */
.ground-fog { background: var(--fog); }

/* ---------- Centered "band" layout (#operacion, #proceso) ---------- */
.band { text-align: center; }
.band .wrap { max-width: 46rem; }
.band > .wrap > p { color: var(--muted); font-size: 1.05rem; margin: 0 auto; max-width: 40rem; }

/* #operacion needs room for the live ecosystem diagram */
#operacion.band .wrap { max-width: 74rem; }

/* ---------- Live ops diagram (HTML/CSS/SVG — not a raster) ---------- */
.ops-diagram {
  --diagram-surface: #ffffff;
  --diagram-ink: var(--navy);
  --diagram-muted: #3d5a78;
  --diagram-line: #5ba3d0;
  --diagram-glow: #4fc3f7;
  --diagram-panel: linear-gradient(115deg, #f4f8fc 0%, #e8f1f8 42%, #0b3a5c 100%);
  margin: 2.5rem auto 0;
  text-align: left;
  color: var(--diagram-ink);
}
html[data-theme="dark"] .ops-diagram {
  --diagram-surface: #102536;
  --diagram-ink: #e8eef5;
  --diagram-muted: #9eb4c8;
  --diagram-line: #6eb6dc;
  --diagram-glow: #5ec8f0;
  --diagram-panel: linear-gradient(115deg, #0d1c2a 0%, #123048 45%, #061828 100%);
}

.ops-diagram-stage {
  --ops-edge: 14px; /* ~12–16px from panel border */
  position: relative;
  /* Absolute layout so the hub sits on the same center axis as the section title */
  display: block;
  min-height: 32rem;
  padding: 2rem 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--diagram-panel);
  border: 1px solid color-mix(in srgb, var(--teal) 22%, transparent);
  box-shadow: 0 18px 50px rgba(10, 35, 66, 0.12);
}
html[data-theme="dark"] .ops-diagram-stage {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(110, 182, 220, 0.2);
}

.ops-diagram-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(circle at 82% 28%, rgba(79, 195, 247, 0.18), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(255, 255, 255, 0.08), transparent 26%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ccircle cx='8' cy='20' r='1.2' fill='%23ffffff' opacity='.35'/%3E%3Ccircle cx='40' cy='60' r='1' fill='%23ffffff' opacity='.28'/%3E%3Ccircle cx='90' cy='30' r='1.1' fill='%23ffffff' opacity='.3'/%3E%3Ccircle cx='70' cy='95' r='1' fill='%23ffffff' opacity='.25'/%3E%3Cpath d='M8 20L40 60L90 30M40 60L70 95' stroke='%23ffffff' stroke-opacity='.12' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: auto, auto, 160px 160px;
  background-position: center, center, 70% 40%;
  mix-blend-mode: soft-light;
}
html:not([data-theme="dark"]) .ops-diagram-mesh {
  opacity: 0.35;
  mix-blend-mode: multiply;
  background:
    radial-gradient(circle at 85% 30%, rgba(26, 111, 154, 0.08), transparent 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ccircle cx='8' cy='20' r='1.2' fill='%230a2342' opacity='.18'/%3E%3Ccircle cx='40' cy='60' r='1' fill='%230a2342' opacity='.14'/%3E%3Ccircle cx='90' cy='30' r='1.1' fill='%230a2342' opacity='.16'/%3E%3Cpath d='M8 20L40 60L90 30' stroke='%230a2342' stroke-opacity='.08' stroke-width='1' fill='none'/%3E%3C/svg%3E");
}

/* Hub locked to stage center (= title center) */
.ops-diagram-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

/* ~14px from left border (green guide) */
.ops-diagram-source {
  position: absolute;
  left: var(--ops-edge);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* Label in the open span between source and hub */
.ops-diagram-bridge {
  position: absolute;
  left: calc(var(--ops-edge) + 10.5rem);
  right: calc(50% + clamp(5.5rem, 9vw, 7rem));
  top: 50%;
  transform: translateY(-135%);
  z-index: 2;
  margin: 0;
  padding: 0 0.35rem;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: #d7ecf8;
  letter-spacing: 0.02em;
  pointer-events: none;
}
html:not([data-theme="dark"]) .ops-diagram-bridge {
  color: var(--teal);
}
.ops-diagram-bridge::after {
  content: none;
}

/* ~14px from right border; block hugs the right edge so arrows reach far */
.ops-diagram-nodes {
  position: absolute;
  right: var(--ops-edge);
  left: auto;
  width: max-content;
  max-width: calc(50% - clamp(6.5rem, 10vw, 8.5rem));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 26rem;
  max-height: 28rem;
}
.ops-diagram-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  color: var(--diagram-line);
}
.ops-link {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  opacity: 0.85;
}
.ops-link-main {
  stroke-width: 3.2;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(79, 195, 247, 0.45));
}

.ops-source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: min(100%, 10.5rem);
  padding: 1.1rem 0.85rem 1.15rem;
  border-radius: 14px;
  background: var(--diagram-surface);
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  box-shadow: 0 10px 28px rgba(10, 35, 66, 0.12);
  text-align: center;
}
.ops-source-icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}
html[data-theme="dark"] .ops-source-icon { color: #9fd0ea; }
.ops-source-icon svg { width: 100%; height: 100%; display: block; }
.ops-source-card strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--diagram-ink);
}
.ops-source-card > span:last-child {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--diagram-muted);
}

.ops-hub-ring {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--diagram-glow) 55%, transparent);
  animation: ops-orbit 28s linear infinite;
  pointer-events: none;
}
.ops-hub-core {
  position: relative;
  width: clamp(9.5rem, 18vw, 12.25rem);
  height: clamp(9.5rem, 18vw, 12.25rem);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 1rem;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 35% 28%, #2a6fa0 0%, transparent 42%),
    radial-gradient(circle at 50% 55%, #0a3a5c 0%, #061a2e 72%);
  box-shadow:
    0 0 0 3px rgba(79, 195, 247, 0.35),
    0 0 28px rgba(79, 195, 247, 0.55),
    0 0 48px rgba(26, 111, 154, 0.35),
    inset 0 0 24px rgba(0, 0, 0, 0.25);
  animation: ops-pulse 3.6s ease-in-out infinite;
}
.ops-hub-mark {
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.2rem;
  display: grid;
  place-items: center;
}
.ops-hub-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.ops-hub-core strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ops-hub-core span {
  font-size: 0.62rem;
  line-height: 1.3;
  color: #c5e4f5;
  max-width: 8.5rem;
}

.ops-node {
  display: grid;
  grid-template-columns: 2.85rem 1fr;
  align-items: center;
  gap: 0.55rem;
}
.ops-node-disc {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--diagram-surface);
  color: var(--navy);
  border: 1px solid color-mix(in srgb, var(--navy) 10%, transparent);
  box-shadow: 0 6px 16px rgba(10, 35, 66, 0.1);
}
html[data-theme="dark"] .ops-node-disc { color: #9fd0ea; }
.ops-node-disc svg { width: 1.25rem; height: 1.25rem; display: block; }
.ops-node-label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: #f2f8fc;
  text-shadow: 0 1px 2px rgba(6, 22, 40, 0.35);
}
html:not([data-theme="dark"]) .ops-node-label {
  color: var(--navy);
  text-shadow: none;
}
.ops-node-num { opacity: 0.75; font-weight: 700; }

@keyframes ops-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.35), 0 0 24px rgba(79, 195, 247, 0.45), 0 0 40px rgba(26, 111, 154, 0.3), inset 0 0 24px rgba(0, 0, 0, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(79, 195, 247, 0.5), 0 0 36px rgba(79, 195, 247, 0.65), 0 0 56px rgba(26, 111, 154, 0.4), inset 0 0 24px rgba(0, 0, 0, 0.25); }
}
@keyframes ops-orbit {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ops-hub-core, .ops-hub-ring { animation: none; }
}

@media (max-width: 860px) {
  .ops-diagram-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-height: 0;
    padding: 1.75rem 1.15rem 2rem;
  }
  .ops-diagram-hub,
  .ops-diagram-source,
  .ops-diagram-bridge,
  .ops-diagram-nodes {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
  }
  .ops-diagram-source {
    z-index: 2;
    margin-bottom: 0.85rem;
  }
  /* Vertical connector arrow (text hidden; desktop SVG unchanged) */
  .ops-diagram-bridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 0;
    color: transparent;
    background: none;
    box-shadow: none;
    pointer-events: none;
  }
  .ops-diagram-bridge::before {
    content: "";
    display: block;
    width: 3px;
    height: 2.35rem;
    border-radius: 99px;
    background: linear-gradient(180deg, #1a6f9a, #4fc3f7);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.45);
  }
  .ops-diagram-bridge::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin-top: 1px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #4fc3f7;
    /* no filter/drop-shadow — it paints a rectangular “shade” behind the tip */
    background: none;
    box-shadow: none;
  }
  /* Clear dashed ring under hub; arrow to list sits in the gap below */
  .ops-diagram-hub {
    margin: 1.15rem 0 1rem;
  }
  .ops-hub-ring {
    inset: -10px;
  }
  /* Encapsulated list card + arrow from hub (mobile only) */
  .ops-diagram-nodes {
    position: relative;
    width: min(100%, 22rem);
    max-width: 100%;
    min-height: 0;
    max-height: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem 1rem;
    justify-items: start;
    box-sizing: border-box;
    margin: 3.65rem auto 0;
    padding: 1.25rem 1.15rem 1.35rem;
    border-radius: 16px;
    background: var(--diagram-surface);
    border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
    box-shadow: 0 10px 28px rgba(10, 35, 66, 0.12);
  }
  html[data-theme="dark"] .ops-diagram-nodes {
    border-color: color-mix(in srgb, #9fd0ea 18%, transparent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  }
  /* Shaft — no filter (avoids rectangular shade) */
  .ops-diagram-nodes::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -3.35rem;
    transform: translateX(-50%);
    width: 3px;
    height: 2.15rem;
    border-radius: 99px;
    background: linear-gradient(180deg, #1a6f9a, #4fc3f7);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.45);
    pointer-events: none;
  }
  /* Tip — leave ~10–12px air above the card */
  .ops-diagram-nodes::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -1.25rem;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #4fc3f7;
    background: none;
    box-shadow: none;
    filter: none;
    pointer-events: none;
  }
  .ops-node {
    gap: 0.7rem;
  }
  .ops-node-label {
    color: var(--diagram-ink);
    text-shadow: none;
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .ops-diagram-links { display: none; }
  .ops-hub-core {
    width: 10rem;
    height: 10rem;
    margin: 0 auto;
  }
  .ops-source-card { margin: 0 auto; }
}

@media (max-width: 480px) {
  .ops-diagram-stage {
    padding: 1.85rem 1rem 2.15rem;
  }
  .ops-diagram-source {
    margin-bottom: 1rem;
  }
  .ops-diagram-bridge::before {
    height: 2.75rem;
  }
  .ops-diagram-hub {
    margin: 1.35rem 0 1.15rem;
  }
  .ops-diagram-nodes {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 1.25rem;
    margin-top: 4rem;
    padding: 1.35rem 1.2rem 1.45rem;
  }
  .ops-diagram-nodes::before {
    top: -3.65rem;
    height: 2.35rem;
  }
  .ops-diagram-nodes::after {
    top: -1.35rem;
  }
}

/* ---------- 3. Specialization statement ---------- */
.statement { text-align: center; }
.statement .wrap { max-width: 36rem; }
.statement .eyebrow {
  font-size: 0.8rem;
  color: var(--teal);
  margin: 0 0 0.75rem;
  animation: none;
}
.statement p {
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
}

/* ---------- 4. Value stack ---------- */
.value-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
.value-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
html:not([data-theme="dark"]) .value-card { box-shadow: 0 1px 3px rgba(10, 35, 66, 0.06); }
.value-card svg { width: 1.7rem; height: 1.7rem; color: var(--teal); flex-shrink: 0; }
.value-card h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); }
.value-card p { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* ---------- 5. Philosophy (editorial, dark) ---------- */
.philosophy {
  background: var(--navy-deep);
  color: #fff;
  padding: clamp(5rem, 15vh, 9rem) 0;
}
.philosophy .wrap { max-width: 40rem; text-align: center; }
.philosophy .eyebrow {
  font-size: 0.8rem;
  color: #9fc4dd;
  margin: 0 0 1rem;
  animation: none;
}
.philosophy h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 1.5rem;
}
.philosophy .kicker {
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: #cfe3d0;
  margin: 0 0 1.75rem;
}
.philosophy p { color: #d7e4f2; font-size: 1.02rem; margin: 0 0 1rem; }
.philosophy p:last-child { margin-bottom: 0; }

/* ---------- 6. Impact — "Estamos ahí cuando más importa" ---------- */
/* Fondo de acento azul full-bleed en ambos temas (navy -> teal, sin verde);
   card blanca fija. Estructura tipo "Be there when it matters most". */
.impact {
  background: linear-gradient(125deg, var(--navy) 0%, #12547a 55%, var(--teal) 100%);
  color: #fff;
}
.impact .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.impact-copy h2 {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.14;
  margin: 0 0 1rem;
  max-width: 16ch;
}
.impact-copy p {
  color: #d7e6f1;
  margin: 0 0 1.75rem;
  max-width: 42ch;
}
.btn-rect { border-radius: 6px; }

.impact-right { min-width: 0; }
.impact-panel {
  background: #fff;
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 30px 60px rgba(6, 22, 40, 0.28);
  /* Stack every slide in one grid cell so the panel is always as tall as the
     tallest variant — the section height never changes when slides rotate. */
  display: grid;
}
.impact-slide {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.impact-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0s;
}
.impact-slide h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #14202f;
}
.impact-slide > p {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #56657a;
}

.impact-notif {
  position: relative;
  background: #f3f6fa;
  border-radius: 12px;
  padding: 1rem 1rem 1rem 2.6rem;
  overflow: hidden;
}
.impact-notif-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--green);
}
.impact-notif-badge {
  position: absolute;
  left: -1px;
  top: 0.95rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(6, 22, 40, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.impact-notif-badge img { width: 1.2rem; height: 1.2rem; object-fit: contain; }
.impact-notif-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7a8b;
}
.impact-notif-label svg { width: 0.9rem; height: 0.9rem; flex-shrink: 0; }
.impact-notif-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: #14202f;
}

.impact-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}
.impact-dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.impact-dot.is-active { width: 1.6rem; background: var(--green); }
.impact-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (min-width: 900px) {
  .impact .wrap { grid-template-columns: 45fr 55fr; gap: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .impact-slide { transition: none; }
}

/* ---------- 7. Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  text-align: left;
}
.step { position: relative; }
.step-num {
  display: block;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  margin-bottom: 0.4rem;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.step p { margin: 0; color: var(--muted); }

/* ---------- 8. Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}
.contact-card {
  background: var(--navy);
  color: #fff;
  padding: 1.75rem;
  margin-top: 1.25rem;
}
.contact-card a { color: #c8ec9a; }
.contact-card .note { color: #9eb4cb; font-size: 0.9rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  min-width: 0;
  background: var(--fog);
  padding: 1.5rem;
  border: 1px solid var(--form-border);
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}
.contact-form .field > span,
.contact-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.contact-form input,
.contact-form textarea {
  display: block;
  box-sizing: border-box;
  font: inherit;
  font-weight: 400;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--form-input-border);
  background: var(--input-bg);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
}
.contact-form textarea {
  resize: vertical;
  min-height: 7rem;
}
.contact-form .btn {
  display: inline-flex;
  width: 100%;
  margin-top: 0.15rem;
}
.contact-form input.is-invalid,
.contact-form textarea.is-invalid {
  border-color: #e35d5d;
  outline: none;
  box-shadow: 0 0 0 2px rgba(227, 93, 93, 0.25);
}
.field-error {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c62828;
  line-height: 1.3;
}
.field-error[hidden] { display: none !important; }
html[data-theme="dark"] .field-error { color: #ff8a80; }

.form-hint {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.form-sent {
  display: none;
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: var(--sent-bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.form-sent.is-visible,
.form-sent.is-visible[hidden] {
  display: block !important;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  background: var(--fog); /* differs from #contact (white) above it */
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-inner > .footer-brand { flex-shrink: 0; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Responsive: tablet up ---------- */
@media (min-width: 700px) {
  .value-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: 3.75rem;
    right: -1.25rem;
    height: 1px;
    background: var(--border-strong);
  }
}
@media (min-width: 1000px) {
  .value-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Responsive: mobile ---------- */
@media (max-width: 860px) {
  .site-header { overflow: visible; }
  .header-inner { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    z-index: 50;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
  }
  .nav a:last-child { border-bottom: 0; }

  .contact-inner { grid-template-columns: 1fr; }

  .hero { min-height: calc(100svh - 3.75rem); }
  .hero-bg { background-position: center, 78% center; }

  .wrap { width: min(1080px, calc(100% - 1.5rem)); }
  .header-inner { gap: 0.65rem; min-height: 3.75rem; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand-mark { width: 2.15rem; height: 2.15rem; }
  .brand-word { font-size: clamp(1.05rem, 4vw, 1.35rem); }
  .header-actions { flex: 0 0 auto; gap: 0.45rem; margin-left: auto; }
  .header-cta {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .header-cta .cta-full { display: none; }
  .header-cta .cta-short { display: inline; }
  .lang button { padding: 0.3rem 0.55rem; }
}

@media (max-width: 380px) {
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .hero h1, .lede, .cta-row { animation: none; }
  html { scroll-behavior: auto; }
}
