/* =============================================================
   DigitalizaConIA — hoja de estilo única
   Claro por defecto (limpieza, claridad, ligereza) + modo oscuro
   automático. Paleta derivada del logo: teal #005070, verde #408030.
   Todos los textos verificados AA o mejor en ambos temas.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* superficie — neutro con un punto de verde, para que los grises
     pertenezcan a la misma familia que el acento y no solo convivan */
  --bg:        #FBFCFC;   /* fondo de página */
  --bg-2:      #F4F7F6;   /* franja alterna */
  --surface:   #FFFFFF;   /* cajas */

  /* tinta */
  --ink:       #0D1A17;   /* 17.4:1 — titulares */
  --ink-2:     #33423E;   /* 10.3:1 — cuerpo */
  --mute:      #5C6B67;   /*  5.4:1 — secundario */
  --faint:     #63726D;   /*  4.9:1 — micro 0.7rem */

  /* acento */
  --accent:      #0C7A52; /* 5.2:1 sobre blanco — texto y enlaces */
  --accent-deep: #0A6444; /* 7.2:1 — hover y rellenos con texto blanco */
  --accent-ink:  #FFFFFF; /* texto sobre relleno de acento */
  --accent-wash: #E8F5EF; /* fondo teñido muy suave */

  /* stops del gradiente (del logo) */
  --g1:        #0A5A78;
  --g2:        #12806E;
  --g3:        #3E9B45;
  --g4:        #0F2A43;

  --line:      #E4EAE8;
  --line-2:    #D3DCD9;
  --shadow:    0 1px 2px rgba(13,26,23,.04), 0 8px 24px -12px rgba(13,26,23,.10);
  --shadow-lg: 0 2px 4px rgba(13,26,23,.05), 0 20px 48px -20px rgba(13,26,23,.16);
  --mesh-op:   .22;
  --grain-op:  .022;

  /* tipografía — una familia principal + monoespaciada de apoyo.
     Dos sans casi idénticas se leerían como error, así que Jakarta
     hace también de display en pesos altos. */
  --sans:  "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* escala de espaciado, base 4 */
  --s-xs: .25rem; --s-sm: .5rem;  --s-md: 1rem;
  --s-lg: 1.5rem; --s-xl: 2rem;   --s-2xl: 3rem; --s-3xl: 4rem;

  --radius:    14px;
  --radius-sm: 10px;

  /* ritmo */
  --wrap:    1180px;
  --gutter:  clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);

  /* easings */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Modo oscuro: la versión que ya estaba aprobada, conservada intacta.
   Se activa sola según la preferencia del sistema del visitante. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #070B0C;
    --bg-2:      #0C1213;
    --surface:   #121A1B;

    --ink:       #F2F5F4;
    --ink-2:     #C3CFCC;
    --mute:      #8A9A97;
    --faint:     #74857F;

    --accent:      #4FE39B;
    --accent-deep: #6BEBAC;
    --accent-ink:  #04140C;
    --accent-wash: rgba(79,227,155,.09);

    --line:      rgba(242,245,244,.10);
    --line-2:    rgba(242,245,244,.18);
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 24px 60px -24px rgba(0,0,0,.8);
    --mesh-op:   .5;
    --grain-op:  .04;
  }
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

/* =============================================================
   3. Utilidades
   ============================================================= */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 820px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .65rem 1.1rem; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Fondo: mesh reactivo al cursor + grano
   ============================================================= */
.mesh {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 42vw at var(--mx, 50%) var(--my, 22%),
      color-mix(in srgb, var(--g2) 62%, transparent) 0%, transparent 62%),
    radial-gradient(circle 34vw at calc(var(--mx, 50%) + 16%) calc(var(--my, 22%) + 14%),
      color-mix(in srgb, var(--g1) 58%, transparent) 0%, transparent 60%),
    radial-gradient(circle 30vw at calc(var(--mx, 50%) - 18%) calc(var(--my, 22%) + 8%),
      color-mix(in srgb, var(--g3) 40%, transparent) 0%, transparent 58%),
    radial-gradient(circle 46vw at 78% 88%,
      color-mix(in srgb, var(--g4) 70%, transparent) 0%, transparent 64%),
    var(--bg);
  filter: blur(58px) saturate(135%);
  opacity: var(--mesh-op);
  transition: opacity .8s var(--ease-out);
  will-change: background;
}
/* Sin color-mix (navegadores viejos): stops sólidos, mismo efecto */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .mesh {
    background:
      radial-gradient(circle 42vw at var(--mx, 50%) var(--my, 22%), #12806E 0%, transparent 62%),
      radial-gradient(circle 34vw at 66% 36%, #0A5A78 0%, transparent 60%),
      radial-gradient(circle 46vw at 78% 88%, #0F2A43 0%, transparent 64%),
      var(--bg);
    opacity: var(--mesh-op);
  }
}

.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: var(--grain-op); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .nav, .footer { position: relative; z-index: 2; }

/* =============================================================
   5. Tipografía compartida
   ============================================================= */
.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.032em;
  margin-top: 1rem;
}
.section-title em { font-style: normal; font-weight: 800; color: var(--accent); }

.minor-title {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
}

.section { padding-block: var(--section); }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* =============================================================
   6. Componentes — botones
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-size: .95rem; font-weight: 500; line-height: 1;
  border: 1px solid var(--line-2);
  transition: transform .35s var(--ease-out), background-color .35s var(--ease-out),
              border-color .35s var(--ease-out), color .35s var(--ease-out),
              box-shadow .35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: none;
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); box-shadow: var(--shadow-lg); }

.btn-ghost { color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: .6rem 1.15rem; font-size: .85rem; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* =============================================================
   7. Navegación
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-stuck { background: var(--bg); }
}

.nav-inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: .9rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.brand img { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--sans);
  font-size: 1.22rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand-accent { color: var(--accent); }

.nav-links { display: none; gap: 1.75rem; }
.nav-links a {
  position: relative;
  font-size: .92rem;
  color: var(--ink-2);
  padding-block: .25rem;
  transition: color .3s var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.is-active { color: var(--accent); }

.nav .btn-sm { display: none; }

/* hamburguesa */
.nav-toggle { width: 42px; height: 42px; display: grid; place-items: center; }
.nav-burger, .nav-burger::before, .nav-burger::after {
  content: ""; display: block;
  width: 20px; height: 1.5px; background: var(--ink);
  transition: transform .35s var(--ease-out), opacity .2s linear;
}
.nav-burger::before { transform: translateY(-6px); }
.nav-burger::after  { transform: translateY(4.5px); }
.nav-toggle[aria-expanded="true"] .nav-burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-burger::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-burger::after  { transform: translateY(-1.5px) rotate(-45deg); }

.nav-mobile {
  display: grid; gap: .25rem;
  padding: .5rem var(--gutter) 1.5rem;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a {
  font-family: var(--sans); font-size: 1.6rem;
  padding-block: .45rem;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: 0; color: var(--accent); }

/* =============================================================
   8. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: min(88svh, 900px);
  display: flex; align-items: center;
  /* En móvil el hero va apretado a propósito: así la cabecera del panel
     asoma por debajo del pliegue y se ve que ahí abajo pasa algo. */
  padding-block: clamp(2.75rem, 12vw, 8rem);
}

.hero-title {
  font-family: var(--sans);
  /* clamp prudente: a 320px sigue cabiendo sin cortar letras (gotcha B.4) */
  font-size: clamp(2.35rem, 6.4vw, 3.9rem);
  line-height: 1.06;
  margin-top: 1.5rem;
  letter-spacing: -.03em;
}
.hero-title em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}

.hero-sub {
  max-width: 46ch;
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--ink-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
}
.hero-meta li { display: flex; align-items: center; gap: .6rem; }
.hero-meta li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---- Panel «un ejemplo, en marcha» ---------------------------------- */
.taskpanel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px -40px rgba(0,0,0,.9);
  overflow: hidden;
  margin-top: 2rem;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .taskpanel { background: var(--surface); }
}

.tp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.tp-label { color: var(--ink-2); }
.tp-live { display: flex; align-items: center; gap: .45rem; color: var(--faint); }
.tp-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: tpPulse 2s var(--ease-soft) infinite;
}
@keyframes tpPulse {
  0%, 100% { opacity: 1;  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50%      { opacity: .5; box-shadow: 0 0 0 5px transparent; }
}

.tp-list {
  padding: .5rem .35rem;
  transition: opacity .4s var(--ease-out);
}
.tp-list.is-swapping { opacity: 0; }

.tp-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-areas: "state text" ".  time";
  align-items: center;
  gap: 0 .55rem;
  padding: .5rem .8rem;
  border-radius: 8px;
  transition: background-color .4s var(--ease-out);
}
.tp-item.is-running { background: var(--accent-wash); }

/* círculo de estado: vacío → girando → marcado */
.tp-state {
  grid-area: state;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--line-2);
  position: relative;
  transition: border-color .35s var(--ease-out), background-color .35s var(--ease-out);
}
.tp-item.is-running .tp-state {
  border-color: var(--accent);
  border-top-color: var(--accent);
  animation: tpSpin .7s linear infinite;
}
@keyframes tpSpin { to { transform: rotate(360deg); } }

.tp-item.is-done .tp-state {
  border-color: var(--accent);
  background: var(--accent);
  animation: none;
}
.tp-item.is-done .tp-state::after {
  content: "";
  position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid var(--accent-ink); border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}

.tp-text {
  grid-area: text;
  font-size: .92rem; color: var(--mute);
  transition: color .35s var(--ease-out);
}
.tp-item.is-running .tp-text { color: var(--ink); }
.tp-item.is-done .tp-text { color: var(--ink-2); }

.tp-time {
  grid-area: time;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; color: var(--faint);
}
.tp-time:empty { display: none; }

.tp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.15rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.tp-count {
  font-family: var(--sans); font-size: 1.35rem;
  letter-spacing: 0; text-transform: none; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 2rem;
  width: 1px; height: 52px; overflow: hidden;
  background: var(--line-2); transform: translateX(-50%);
}
.scroll-hint span {
  display: block; width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollHint 2.4s var(--ease-soft) infinite;
}
@keyframes scrollHint {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* =============================================================
   9. Manifiesto
   ============================================================= */
.manifesto { padding-block: clamp(3rem, 9vw, 7rem); }
.manifesto-text {
  font-family: var(--sans);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--ink);
}
.manifesto-text em { font-style: normal; font-weight: 700; color: var(--accent); }

/* =============================================================
   10. Servicios — filas desplegables
   ============================================================= */
.rows { display: grid; gap: var(--s-md); }

.row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.row:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.row[open] { border-color: var(--accent); }

.row-head {
  display: flex; align-items: baseline; gap: 1rem;
  padding: clamp(1.15rem, 2.6vw, 1.6rem) clamp(1.15rem, 2.6vw, 1.75rem);
  cursor: pointer;
  list-style: none;
  transition: color .35s var(--ease-out);
}
.row-head::-webkit-details-marker { display: none; }
.row-head:hover { color: var(--accent); }
.row-head:focus-visible { outline-offset: 6px; }

.row-num {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  color: var(--faint); flex: none; padding-top: .4em;
  transition: color .35s var(--ease-out);
}
.row[open] .row-num, .row-head:hover .row-num { color: var(--accent); }

.row-title {
  font-family: var(--sans);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.2; letter-spacing: -.02em; font-weight: 700;
  margin-right: auto;
}

/* signo +/− dibujado en CSS, sin iconos externos */
.row-icon {
  position: relative; flex: none;
  width: 16px; height: 16px; align-self: center;
}
.row-icon::before, .row-icon::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease-out), opacity .3s linear;
}
.row-icon::after { transform: rotate(90deg); }
[open] > .row-head .row-icon::after,
[open] > summary .row-icon::after { transform: rotate(0deg); opacity: 0; }

.row-body {
  padding: 0 clamp(1.15rem, 2.6vw, 1.75rem) clamp(1.35rem, 2.6vw, 1.75rem);
  display: grid; gap: 1.35rem;
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
  margin-top: -1px;
}
.row-lede { max-width: 52ch; color: var(--ink-2); font-size: 1.05rem; }

.row-list { display: grid; gap: .55rem; }
.row-list li {
  display: flex; align-items: baseline; gap: .7rem;
  font-family: var(--mono); font-size: .82rem; color: var(--mute);
}
.row-list li::before { content: "→"; color: var(--accent); flex: none; }

/* ---- Mini dashboard predictivo (fila «Análisis de datos») ------------
   Se dispara con el atributo [open] del <details>: la animación arranca
   justo cuando alguien abre la fila, no antes ni escondida. Sin JS. */
.forecast { max-width: 520px; }
.fc-svg { width: 100%; height: auto; overflow: visible; }
.forecast figcaption {
  margin-top: .85rem;
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; color: var(--faint);
}

.fc-axis { stroke: var(--line-2); stroke-width: 1; }

.fc-bar {
  fill: url(#fcBar);
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform .75s var(--ease-out);
}
.row[open] .fc-bar, .panel .fc-bar { transform: scaleY(1); }
.row[open] .fc-bar:nth-child(1), .panel .fc-bar:nth-child(1) { transition-delay: .05s; }
.row[open] .fc-bar:nth-child(2), .panel .fc-bar:nth-child(2) { transition-delay: .11s; }
.row[open] .fc-bar:nth-child(3), .panel .fc-bar:nth-child(3) { transition-delay: .17s; }
.row[open] .fc-bar:nth-child(4), .panel .fc-bar:nth-child(4) { transition-delay: .23s; }
.row[open] .fc-bar:nth-child(5), .panel .fc-bar:nth-child(5) { transition-delay: .29s; }
.row[open] .fc-bar:nth-child(6), .panel .fc-bar:nth-child(6) { transition-delay: .35s; }
.row[open] .fc-bar:nth-child(7), .panel .fc-bar:nth-child(7) { transition-delay: .41s; }
.row[open] .fc-bar:nth-child(8), .panel .fc-bar:nth-child(8) { transition-delay: .47s; }

.fc-band {
  fill: var(--accent);
  opacity: 0;
  transition: opacity .7s var(--ease-out) .75s;
}
.row[open] .fc-band, .panel .fc-band { opacity: .12; }

.fc-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 6;
  stroke-dashoffset: 150;
  opacity: 0;
  transition: stroke-dashoffset 1s var(--ease-out) .7s, opacity .3s linear .7s;
}
.row[open] .fc-line, .panel .fc-line { stroke-dashoffset: 0; opacity: 1; }

.fc-dot {
  fill: var(--accent);
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: transform .5s var(--ease-bounce) 1.5s;
}
.row[open] .fc-dot, .panel .fc-dot { transform: scale(1); }

.fc-tick {
  fill: var(--faint);
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
}
.fc-tick-end { text-anchor: end; }
.fc-tag {
  fill: var(--accent);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .1em; text-anchor: end;
}

/* animación de apertura (el contenido ya es accesible sin JS) */
.row[open] .row-body, .qa[open] .qa-body { animation: openDown .5s var(--ease-out); }
@keyframes openDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* =============================================================
   11. Método — línea de tiempo
   ============================================================= */
.steps { display: grid; gap: var(--s-md); }
.step {
  position: relative; padding: clamp(1.25rem, 2.6vw, 1.6rem);
  padding-left: 3.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* la caja ya agrupa; la línea sobraría y añadiría ruido */
.step::before { content: none; }
.step:last-child::before { display: none; }

.step-num {
  position: absolute; left: clamp(1.25rem, 2.6vw, 1.6rem); top: clamp(1.35rem, 2.6vw, 1.7rem);
  width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  background: var(--bg);
  font-family: var(--mono); font-size: .76rem; color: var(--accent);
}
.step-title {
  font-family: var(--sans);
  font-size: 1.5rem; margin-bottom: .5rem;
}
.step p { color: var(--mute); font-size: .96rem; max-width: 34ch; }

/* =============================================================
   12. Cifras
   ============================================================= */
.stats-section { padding-block: clamp(3rem, 8vw, 6rem); }
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s-md);
}
.stat {
  display: grid; gap: .25rem;
  padding: clamp(1.15rem, 2.4vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-num {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  line-height: 1; color: var(--accent); font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .95rem; color: var(--ink-2); }
.stat-note {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}

/* =============================================================
   13. Por qué
   ============================================================= */
.whys { display: grid; gap: var(--s-md); }
.why {
  padding: clamp(1.25rem, 2.6vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid; gap: .5rem;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.why:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.why h3 {
  font-family: var(--sans); font-size: clamp(1.3rem, 3vw, 1.7rem);
  transition: color .35s var(--ease-out);
}
.why:hover h3 { color: var(--accent); }
.why p { color: var(--mute); max-width: 60ch; }

/* =============================================================
   14. Tech & RGPD
   ============================================================= */
.flow {
  margin-bottom: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.flow-cap {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 1.25rem;
}
.flow-svg { width: 100%; min-width: 760px; height: auto; }

.flow-node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.flow-node-end circle { fill: var(--accent); stroke: var(--accent); }
.flow-node text {
  fill: var(--ink-2); font-family: var(--mono); font-size: 12px;
  font-weight: 500; text-anchor: middle; letter-spacing: .06em;
}
.flow-node .flow-sub { fill: var(--faint); font-size: 10.5px; letter-spacing: .02em; }

.flow-pulse { opacity: 0; }
.is-ready .flow-pulse {
  opacity: 1;
  animation: flowPulse 3.4s linear infinite;
}
@keyframes flowPulse {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

.tech-grid { display: grid; gap: var(--s-md); }
.tech-stack, .tech-privacy {
  padding: clamp(1.35rem, 2.8vw, 1.9rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stack-list { display: grid; }
.stack-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: .8rem;
  border-bottom: 1px solid var(--line);
}
.stack-name { font-size: 1rem; color: var(--ink); }
.stack-role {
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  text-align: right;
}

.privacy-list dt {
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .06em; color: var(--accent); margin-top: 1.25rem;
}
.privacy-list dt:first-child { margin-top: 0; }
.privacy-list dd { color: var(--mute); font-size: .95rem; }

/* =============================================================
   15. FAQ
   ============================================================= */
.faq { display: grid; gap: .65rem; }
.qa {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.qa[open] { border-color: var(--line-2); }
.qa > summary {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.35rem;
  cursor: pointer; list-style: none;
  font-family: var(--sans); font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  transition: color .35s var(--ease-out);
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary:hover { color: var(--accent); }
.qa > summary > span:first-child { margin-right: auto; }
.qa-body { padding: 0 1.35rem 1.25rem; }
.qa-body p { color: var(--ink-2); max-width: 66ch; }

/* =============================================================
   16. Contacto y formulario
   ============================================================= */
.contact-grid { display: grid; gap: 3.5rem; }

.contact-email {
  display: inline-block; position: relative;
  font-family: var(--sans);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  line-height: 1.2; font-weight: 700;
  word-break: break-word;
  color: var(--accent);
}
.contact-email::after {
  content: ""; position: absolute; left: 0; bottom: -.1em;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.contact-email:hover::after { transform: scaleX(1); transform-origin: left; }

.contact-note { margin-top: 1.5rem; color: var(--mute); max-width: 42ch; }

.contact-facts { margin-top: 2rem; display: grid; gap: .15rem; }
.contact-facts dt {
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  margin-top: 1rem;
}
.contact-facts dt:first-child { margin-top: 0; }
.contact-facts dd { color: var(--ink-2); }

.form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .45rem; }
.field-pair { display: grid; gap: 1.35rem; }

.field label {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
}
.field .opt { color: var(--faint); text-transform: none; letter-spacing: .04em; }

.field input, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.field input:focus-visible, .field textarea:focus-visible { outline: none; }

.field-error {
  font-family: var(--mono); font-size: .72rem; color: #FF8A7A;
  min-height: 0;
}
.field-error:empty { display: none; }
.field.has-error input, .field.has-error textarea { border-color: #FF8A7A; }

.field-check { gap: .6rem; }
.check { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; }
.check input {
  flex: none; width: 18px; height: 18px; margin-top: .18rem;
  accent-color: var(--accent);
}
.check span {
  font-family: var(--sans); font-size: .88rem;
  letter-spacing: normal; text-transform: none; color: var(--mute);
}
.check a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.check a:hover { color: var(--accent); }

.btn-submit { justify-self: start; }

.form-status {
  font-family: var(--mono); font-size: .8rem; line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status.is-ok  { color: var(--accent); }
.form-status.is-err { color: #FF8A7A; }

/* =============================================================
   16b. Páginas legales
   ============================================================= */
.legal { padding-block: clamp(4rem, 10vw, 7rem); }

.legal-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  margin-top: .75rem;
  padding-bottom: clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.legal-block {
  padding: clamp(1.35rem, 3vw, 1.9rem);
  margin-bottom: var(--s-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.legal-block h2 {
  font-family: var(--mono);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}
.legal-block p + p { margin-top: .85rem; }
.legal-block p, .legal-list li { color: var(--ink-2); max-width: 68ch; }
.legal-block a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.legal-list { display: grid; gap: .85rem; }
.legal-list li { display: flex; gap: .8rem; }
.legal-list li::before { content: "—"; color: var(--faint); flex: none; }

.legal-back { margin-top: 2.5rem; }
.legal-back a {
  font-family: var(--mono); font-size: .8rem;
  letter-spacing: .08em; color: var(--mute);
  transition: color .3s var(--ease-out);
}
.legal-back a:hover { color: var(--accent); }


/* =============================================================
   16c. Páginas interiores (servicios, método)
   ============================================================= */
.page-hero { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.page-title {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.034em;
  margin-top: .85rem;
}
.page-lede {
  margin-top: 1.35rem; max-width: 58ch;
  font-size: clamp(1.02rem, 1.7vw, 1.15rem);
  color: var(--ink-2);
}
.page-hero .hero-actions { margin-top: 2rem; }

.section-sub { margin-top: .9rem; color: var(--mute); max-width: 60ch; }

/* caja genérica reutilizable */
.panel {
  padding: clamp(1.35rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-list { display: grid; gap: 1rem; }
.feature-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink-2);
}
/* marcador absoluto: si fuese un ítem de rejilla, el texto suelto que
   sigue a <strong> se colocaría solo en otra celda y se partiría */
.feature-list li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent);
}
.feature-list strong { color: var(--ink); font-weight: 600; }

.cases { display: grid; gap: var(--s-md); }
.case {
  padding: clamp(1.15rem, 2.4vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid; gap: .6rem;
}
.case-num {
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .12em; color: var(--accent);
}
.case p { color: var(--ink-2); }

.spec { display: grid; gap: 0; }
.spec dt {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--faint);
  margin-top: 1.25rem;
}
.spec dt:first-child { margin-top: 0; }
.spec dd { color: var(--ink-2); margin-top: .2rem; }

/* franja de cierre */
.cta-band { padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-box {
  display: grid; gap: 1.5rem;
  padding: clamp(1.6rem, 4vw, 2.75rem);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: var(--radius);
}
.cta-title { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.028em; }
.cta-sub { margin-top: .6rem; color: var(--ink-2); max-width: 52ch; }
.cta-box .btn { justify-self: start; }

/* tarjetas de servicio del inicio, que llevan a su página */
.svc-grid { display: grid; gap: var(--s-md); }
.svc {
  display: flex; flex-direction: column; gap: .85rem;
  padding: clamp(1.35rem, 2.8vw, 1.85rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease-out), border-color .35s var(--ease-out),
              box-shadow .35s var(--ease-out);
}
.svc:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow-lg);
}
.svc-num { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: var(--accent); }
.svc-title { font-size: 1.28rem; letter-spacing: -.022em; }
.svc p { color: var(--mute); font-size: .96rem; flex: 1; }
.svc-more {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em;
  color: var(--accent); display: inline-flex; align-items: center; gap: .45rem;
}
.svc-more::after { content: "→"; transition: transform .35s var(--ease-out); }
.svc:hover .svc-more::after { transform: translateX(4px); }

@media (min-width: 720px) {
  .cases { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-box { grid-template-columns: 1fr auto; align-items: center; gap: 2.5rem; }
  .cta-box .btn { justify-self: end; }
}

/* =============================================================
   17. Footer
   ============================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
  background: var(--bg-2);
}
.footer-inner { display: grid; gap: 1.75rem; }
.footer-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-size: 1.15rem;
}
.footer-brand img { width: 28px; height: 28px; }

.footer-links { display: grid; gap: .5rem; font-size: .92rem; color: var(--mute); }
.footer-links a { transition: color .3s var(--ease-out); }
.footer-links a:hover { color: var(--accent); }

.footer-copy {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}

/* =============================================================
   18. Reveals al hacer scroll
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Red de seguridad: si el JS no llega a ejecutarse, nada queda invisible */
.no-js .reveal { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   19. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .field-pair { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-auto-flow: column; justify-content: start; gap: 1.75rem; }
}

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .whys { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 2rem;
  }
  .footer-links { justify-content: center; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav .btn-sm { display: inline-flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }

  /* Hero a dos columnas: el titular pierde tamaño para dejar sitio al panel */
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    align-items: center;
    gap: 4rem;
  }
  .hero-title { font-size: clamp(2.2rem, 3.9vw, 3.3rem); }
  .hero-sub { margin-top: 1.75rem; }
  .hero-actions { margin-top: 2.5rem; }
  .hero-meta { margin-top: 2.25rem; padding-top: 1.5rem; }
  .taskpanel { margin-top: 0; }

  .steps { grid-template-columns: repeat(4, 1fr); }

  .contact-grid { grid-template-columns: 1fr 1.15fr; gap: 4.5rem; }
  .whys { grid-template-columns: repeat(2, 1fr); }
}

/* Con cinco enlaces el menú va justo en el tramo donde aparece.
   Se aprieta un poco entre 960 y 1120 para que no colisione con el CTA
   si entra una tipografía de reserva más ancha que Jakarta. */
@media (min-width: 960px) and (max-width: 1119px) {
  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: .88rem; }
}

@media (min-width: 1280px) {
  .hero-title { letter-spacing: -.035em; }
  .contact-grid { gap: 6rem; }
}

/* =============================================================
   20. Reduced motion
   Solo lo intrusivo: bucles largos y el pulso del diagrama.
   Los hovers, fades y micro-interacciones se mantienen a propósito
   (Windows trae reduce activado de fábrica en muchos equipos).
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span { animation: none; }
  .is-ready .flow-pulse { animation: none; opacity: .45; }
  .mesh { transition: none; }

  /* El panel del hero es un bucle largo: se queda en el estado final.
     El JS ya lo detecta y no arranca; esto cubre el CSS. */
  .tp-dot { animation: none; }
  .tp-item.is-running .tp-state { animation: none; }

  /* El dashboard se muestra dibujado, sin transición */
  .fc-bar, .fc-band, .fc-line, .fc-dot { transition: none; }
}

/* Impresión: sin fondos ni efectos */
@media print {
  .mesh, .grain, .nav, .scroll-hint { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}

.inline-link {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.inline-link:hover { color: var(--accent-deep); }
