/* ==========================================================================
   Lole Automations — "El hilo"
   Papel, tinta y un solo acento. Serif editorial para lo que importa,
   grotesk para lo que acompaña. Una sola pieza visual: el hilo.
   ========================================================================== */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("/fonts/schibsted.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3F1EB;
  --paper-2: #EBE8E0;
  --ink: #15161A;
  --ink-2: #4B4D56;
  --ink-3: #8B8D97;
  --rule: rgba(21, 22, 26, 0.14);
  --rule-strong: rgba(21, 22, 26, 0.32);
  --blue: #1D3BF5;
  --blue-deep: #1430C9;
  --blue-soft: rgba(29, 59, 245, 0.10);

  --serif: "Newsreader", "Iowan Old Style", "Times New Roman", Georgia, serif;
  --sans: "Schibsted", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 80px);
  --max: 1360px;
  --section: clamp(96px, 14vw, 184px);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-draw: cubic-bezier(0.65, 0, 0.25, 1);
  --dur: 700ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
::selection { background: var(--blue); color: var(--paper); }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  z-index: 100; border-radius: 4px;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Type ---------- */
h1, h2, h3, .statement-text, .about-name, .contact-title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
em { font-style: italic; }
h2 {
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
h3 {
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.1;
}
p { max-width: 62ch; }
.lead { font-size: clamp(1.125rem, 1.35vw, 1.3rem); line-height: 1.5; color: var(--ink); }

.eyebrow {
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.75em;
  max-width: none;
}
.eyebrow .num {
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.eyebrow .num::after {
  content: "";
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--rule-strong);
  margin: 0 0.9em 0 0.9em;
  vertical-align: middle;
}
.sep {
  display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: 0.6;
}

/* ---------- Buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font-weight: 500; font-size: 1rem; letter-spacing: -0.005em;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 200ms var(--ease-out);
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--blue); }
.btn-primary:active { transform: translateY(1px); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--blue); color: var(--paper); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: color 200ms var(--ease-out);
}
.link-arrow span { transition: transform 300ms var(--ease-out); }
.link-arrow:hover { color: var(--blue); }
.link-arrow:hover span { transform: translateY(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 0%, transparent);
  border-bottom: 1px solid transparent;
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 28px; height: 28px; }
.brand-mark path { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 1rem; }

.site-nav { display: flex; align-items: center; gap: 34px; }
.site-nav a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink-2);
  transition: color 200ms var(--ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--ink);
  padding: 9px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.site-nav .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.nav-toggle {
  display: none;
  min-height: 44px; padding: 0 14px;
  font-weight: 500; font-size: 0.95rem;
  border: 1px solid var(--rule-strong); border-radius: 999px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
  min-height: calc(100svh - 72px);
  display: flex; align-items: center;
  overflow: clip;
}
.hero-inner { position: relative; z-index: 2; }
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 450ms var(--ease-out);
  pointer-events: none;
}
.hero.has-3d .hero-canvas { opacity: 1; }
.hero.has-3d .thread, .webgl .thread { visibility: hidden; }
.webgl .thread-path, .webgl .thread-end, .webgl .task, .webgl .task rect { animation: none; }

.hero-hint {
  margin-top: clamp(40px, 6vw, 72px);
  display: flex; align-items: center; gap: 14px;
  font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.02em;
  max-width: none;
}
.hint-line { width: 40px; height: 1px; background: var(--rule-strong); }
.hero:not(.has-3d) .hero-hint { display: none; }
.hero-eyebrow { margin-bottom: clamp(28px, 4vw, 48px); }
.hero-eyebrow span:not(.sep) { white-space: nowrap; }

.hero-title {
  font-size: clamp(3rem, 7.4vw, 7.6rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero-title em { color: var(--blue); }
.t-line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.t-inner {
  display: block;
  transform: translateY(105%);
  animation: rise 1100ms var(--ease-out) forwards;
  animation-delay: calc(120ms + var(--i, 0) * 110ms);
}
@keyframes rise { to { transform: translateY(0); } }

.hero-grid {
  margin-top: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.hero-copy .lead { margin-bottom: 32px; max-width: 30ch; }

/* --- El hilo --- */
.thread { position: relative; }
.thread svg { width: 100%; height: auto; overflow: visible; }
.thread-caption {
  margin-top: 14px;
  font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.02em;
}

.thread-path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2600ms var(--ease-draw) 700ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.thread-end {
  fill: var(--blue);
  transform-box: fill-box; transform-origin: center;
  transform: scale(0);
  animation: pop 500ms var(--ease-out) 3100ms forwards;
}
@keyframes pop { to { transform: scale(1); } }

.task rect {
  fill: var(--paper);
  stroke: var(--ink-3);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  transition: none;
}
.task text {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  fill: var(--ink-2);
  text-anchor: middle;
  dominant-baseline: middle;
}
.task {
  transform-box: fill-box;
  transform-origin: center;
  rotate: var(--r, 0deg);
  animation: settle 700ms var(--ease-out) forwards;
  /* cada tarea se "acomoda" cuando el hilo pasa por ella */
  animation-delay: calc(700ms + var(--d) * 2600ms - 150ms);
}
@keyframes settle { to { rotate: 0deg; } }
.task rect {
  animation: solidify 400ms linear forwards;
  animation-delay: calc(700ms + var(--d) * 2600ms - 150ms);
}
@keyframes solidify {
  to { stroke: var(--ink); stroke-dasharray: 1 0; }
}

/* ---------- Statement ---------- */
.statement {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}
.statement-text {
  margin-top: 28px;
  font-size: clamp(1.9rem, 4.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.statement-text em { color: var(--blue); }
.statement-text .w { display: inline; opacity: 0.16; transition: opacity 250ms linear; }
.statement-text .w.is-on { opacity: 1; }
.statement-note {
  margin-top: 32px;
  color: var(--ink-2);
  max-width: 48ch;
  font-size: 1.0625rem;
}

/* ---------- Section head ---------- */
.section-head { margin-bottom: clamp(48px, 6vw, 88px); }
.section-head h2 { margin-top: 22px; }
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 5vw, 80px);
  align-items: end;
}
.section-intro { color: var(--ink-2); max-width: 40ch; padding-bottom: 6px; }

/* ---------- Services ---------- */
.services { padding-block: var(--section); border-top: 1px solid var(--rule); }

.service-list { border-top: 1px solid var(--rule); }
.service {
  display: grid;
  grid-template-columns: 72px minmax(0, 5fr) minmax(0, 6fr) 96px;
  gap: 24px clamp(24px, 4vw, 64px);
  padding: clamp(32px, 4vw, 52px) 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.service::before {
  /* fondo que se enciende al hover, sin mover nada */
  content: "";
  position: absolute; inset: 0 calc(-1 * var(--gutter) / 2);
  background: var(--paper-2);
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  z-index: -1;
  border-radius: 6px;
}
@media (hover: hover) {
  .service:hover::before { opacity: 1; }
  .service:hover .service-num { color: var(--blue); }
}
.service-num {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding-top: 0.25em;
  transition: color 300ms var(--ease-out);
}
.service h3 { max-width: 10ch; }
.service-body p { color: var(--ink-2); }
.examples {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 10px;
}
.examples span {
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  white-space: nowrap;
}

.service-icon { width: 96px; height: 64px; justify-self: end; margin-top: 4px; }
.service-icon .ic-line { fill: none; stroke: var(--ink-3); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: stroke 300ms var(--ease-out); }
.service-icon .ic-dot { fill: var(--ink-3); transition: fill 300ms var(--ease-out); }
.service-icon .ic-blue { fill: var(--blue); }
@media (hover: hover) {
  .service:hover .service-icon .ic-line { stroke: var(--ink); }
  .service:hover .service-icon .ic-dot:not(.ic-blue) { fill: var(--ink); }
}

/* ---------- Ghost numbers (parallax) ---------- */
.services, .story, .method, .lab, .about, .calc, .contact { position: relative; overflow: clip; }
.ghost {
  position: absolute; right: calc(var(--gutter) * -0.2); top: 0;
  font-family: var(--serif);
  font-size: clamp(14rem, 34vw, 34rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--ink);
  opacity: 0.035;
  pointer-events: none; user-select: none;
  z-index: 0;
  will-change: transform;
}
.ghost--word { color: var(--paper); opacity: 0.05; right: calc(var(--gutter) * -0.4); font-style: italic; }
.services > .container, .story > .container, .method > .container, .lab > .container, .about > .container, .calc > .container, .contact > .container { position: relative; z-index: 1; }

/* ---------- Method ---------- */
.method { padding-block: var(--section); border-top: 1px solid var(--rule); }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-top: 36px;
}
.steps::before {
  /* la línea base, en tinta suave */
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--rule);
}
.steps::after {
  /* el hilo azul recorriendo los pasos al entrar en vista */
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--blue);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1800ms var(--ease-draw) 200ms;
}
.steps.is-in::after { transform: scaleX(1); }

.step { position: relative; }
.step-dot {
  position: absolute; top: -40px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
  transition-delay: calc(200ms + var(--i) * 420ms);
}
.steps.is-in .step-dot { background: var(--blue); border-color: var(--blue); }
.step-num {
  display: block;
  font-size: 0.75rem; letter-spacing: 0.14em; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}
.step h3 { font-size: clamp(1.5rem, 2vw, 1.9rem); margin-bottom: 12px; }
.step p { color: var(--ink-2); font-size: 1rem; max-width: 26ch; }

/* ---------- Lab: bento ---------- */
.lab { padding-block: var(--section); border-top: 1px solid var(--rule); }
.status-inline {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px; font-size: 0.8rem; font-weight: 500; color: var(--ink);
  letter-spacing: 0.02em;
}
.status-inline i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(29,59,245,.35); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(29,59,245,.35); } 70% { box-shadow: 0 0 0 9px rgba(29,59,245,0); } 100% { box-shadow: 0 0 0 0 rgba(29,59,245,0); } }

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  background: #FAF9F5;
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 22px 26px 30px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: border-color 300ms var(--ease-out);
}
@media (hover: hover) { .card:hover { border-color: var(--rule-strong); } }
.card h3 { font-size: 1.55rem; margin-top: 8px; margin-bottom: 10px; max-width: none; }
.card p { color: var(--ink-2); font-size: 0.97rem; line-height: 1.55; }
.illo { position: relative; height: 300px; margin: -22px -26px 18px; overflow: hidden; }
.card-connect { grid-column: span 2; }
.card-connect .illo { height: 360px; }

/* mini-superficies: blanco sobre papel, sombra muy suave */
.surf, .orb, .core, .fn, .srv, .vault-win, .chat .bubble {
  background: #fff;
  border: 1px solid rgba(21,22,26,.07);
  box-shadow: 0 1px 2px rgba(21,22,26,.05), 0 10px 28px rgba(21,22,26,.07);
}

/* anillos */
.rings .ring {
  position: absolute; left: 50%; top: 50%;
  width: var(--d); height: var(--d);
  translate: -50% -50%;
  border: 1px solid rgba(29,59,245,.14);
  border-radius: 50%;
}
.rings .core {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; display: grid; place-items: center;
}
.rings .core svg { width: 30px; height: 30px; }
.rings .core path { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; }
.orb {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; display: grid; place-items: center;
  transform: rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a)));
  animation: bob 6s ease-in-out var(--d, 0s) infinite;
}
.orb svg { width: 21px; height: 21px; fill: var(--c); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }

/* chat */
.chat { padding: 26px 22px 0; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, transparent, transparent 70%, #FAF9F5); }
.chat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(180deg, rgba(250,249,245,0), #FAF9F5); }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; }
.msg.me { align-self: flex-end; }
.avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 0.72rem; font-weight: 600; display: grid; place-items: center; }
.bubble { border-radius: 14px; padding: 10px 12px; }
.bubble p { font-size: 0.82rem; line-height: 1.4; color: var(--ink); }
.bubble .meta { display: flex; justify-content: space-between; gap: 12px; font-size: 0.7rem; color: var(--ink-3); margin-bottom: 3px; }
.bubble .meta b { color: var(--ink); font-weight: 600; }
.msg.me .bubble { background: var(--blue); border-color: var(--blue); box-shadow: 0 10px 28px rgba(29,59,245,.18); }
.msg.me .bubble p { color: #fff; }
.card.is-in .msg { animation: msgin 600ms var(--ease-out) both; }
.card.is-in .msg:nth-child(1) { animation-delay: 150ms; }
.card.is-in .msg:nth-child(2) { animation-delay: 550ms; }
.card.is-in .msg:nth-child(3) { animation-delay: 950ms; }
.card.is-in .msg:nth-child(4) { animation-delay: 1350ms; }
@keyframes msgin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* flujo */
.flow { display: grid; place-items: center; padding: 0 22px; }
.flow-stage { position: relative; width: 100%; max-width: 380px; aspect-ratio: 360 / 210; }
.flow-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow .fl { fill: none; stroke: rgba(21,22,26,.25); stroke-width: 1; stroke-dasharray: 3 4; animation: dash 5s linear infinite; }
.flow .fp { fill: var(--blue); }
@keyframes dash { to { stroke-dashoffset: -70; } }
.fn {
  position: absolute; left: calc(var(--x) / 360 * 100%); top: calc(var(--y) / 210 * 100%);
  width: 24%; min-width: 84px; padding: 10px 10px 9px; border-radius: 12px;
  display: grid; gap: 1px;
}
.fn .fi { width: 18px; height: 18px; margin-bottom: 5px; fill: currentColor; color: var(--ink); }
.fn .fi--stroke { fill: none; stroke: currentColor; }
.fn span { font-size: 0.78rem; font-weight: 600; color: var(--ink); }
.fn small { font-size: 0.66rem; color: var(--ink-3); }
.fn--ai { border-color: rgba(217,119,87,.35); }

/* vault */
.vault { padding: 26px 22px 0; }
.vault-win { border-radius: 12px; padding: 12px 14px; width: 76%; }
.vault-head { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.vault-head svg { width: 14px; height: 14px; fill: currentColor; }
.vault-head span { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.66rem; font-weight: 500; color: var(--ink-3); }
.files li { display: grid; grid-template-columns: 8px 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 7px 0; border-top: 1px solid var(--rule); align-items: center; }
.files li:first-child { border-top: 0; }
.files i { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.files span { font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.files b { font-size: 0.78rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.is-in .files li:nth-child(1) { animation: hilite 4s ease-in-out infinite; }
@keyframes hilite { 0%, 100% { background: transparent; } 50% { background: rgba(29,59,245,.06); } }
.vault-graph { position: absolute; right: 6px; top: 14px; width: 100px; height: auto; }

/* infra */
.infra { padding: 0 22px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.infra-net { position: absolute; left: 22px; right: 22px; top: 50%; height: 60px; margin-top: -30px; width: calc(100% - 44px); }
.infra-tag { position: absolute; left: 50%; top: 40px; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 500; color: var(--ink-2); background: #FAF9F5; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); }
.infra-tag svg { width: 12px; height: 12px; fill: currentColor; }
.srv { position: relative; width: 92px; padding: 14px 12px 12px; border-radius: 14px; display: grid; gap: 1px; }
.srv svg { width: 20px; height: 20px; fill: currentColor; margin-bottom: 8px; color: var(--ink); }
.srv svg.stroke { fill: none; stroke: currentColor; }
.srv b { font-size: 0.8rem; font-weight: 600; }
.srv small { font-size: 0.66rem; color: var(--ink-3); }
.srv em { position: absolute; right: 10px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: #34A853; }

/* banda del principio */
.principle-band {
  margin: 16px 0 0;
  padding: clamp(40px, 5vw, 64px) var(--gutter);
  background: var(--paper-2);
  border-radius: 22px;
  text-align: center;
}
.principle-band p {
  margin: 0 auto;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.3rem); line-height: 1.25; letter-spacing: -0.015em;
  max-width: 30ch; text-wrap: balance;
}
.principle-band footer { margin-top: 18px; font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.04em; }

/* ---------- About ---------- */
.about { padding-block: var(--section); border-top: 1px solid var(--rule); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 40px clamp(40px, 7vw, 120px);
  align-items: start;
}
.about-name {
  margin-top: 22px;
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 9ch;
}
.about-name em { color: var(--blue); }
.about-copy .lead { margin-bottom: 22px; }
.about-copy > p:not(.lead):not(.principle) { color: var(--ink-2); }
.principle {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 28ch;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--section);
  --rule: rgba(243, 241, 235, 0.16);
  --rule-strong: rgba(243, 241, 235, 0.36);
  --ink-2: rgba(243, 241, 235, 0.72);
  --ink-3: rgba(243, 241, 235, 0.5);
}
.contact ::selection { background: var(--paper); color: var(--ink); }
.contact .eyebrow { color: var(--ink-2); }
.contact .eyebrow .num { color: #7D8DFF; }
.contact-title {
  margin-top: 28px;
  font-size: clamp(2.6rem, 7vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.contact-title em { color: #7D8DFF; }
.contact-row {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: center;
}
.contact-row p { color: var(--ink-2); max-width: 40ch; }
.contact .btn-light:hover { background: #7D8DFF; color: var(--ink); }
.contact :focus-visible { outline-color: var(--paper); }

.copy-email {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 4px;
  font-size: 1rem; font-weight: 500;
  color: var(--paper);
  background-image: linear-gradient(var(--rule-strong), var(--rule-strong));
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 calc(100% - 10px);
  transition: color 200ms var(--ease-out);
}
.copy-email svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.copy-email:hover { color: #7D8DFF; }
.copy-email.is-copied [data-copy-label] { color: #7D8DFF; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0; border-top: 1px solid var(--rule); }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px 40px;
}
.footer-tag { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); text-align: center; }
.footer-meta { font-size: 0.8rem; color: var(--ink-3); display: flex; align-items: center; gap: 10px; white-space: nowrap; }


/* ---------- Story: una consulta de punta a punta ---------- */
.story { padding-block: var(--section); border-top: 1px solid var(--rule); }
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0 clamp(32px, 6vw, 96px);
  align-items: start;
}
.story-steps { display: flex; flex-direction: column; }
.story-step {
  padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 48px) 28px;
  border-left: 1px solid var(--rule);
  position: relative;
  min-height: 36vh;
  display: flex; flex-direction: column; justify-content: center;
  transition: opacity 400ms var(--ease-out);
  opacity: 0.35;
}
.story-step.is-active { opacity: 1; }
.story-step::before {
  content: ""; position: absolute; left: -5px; top: 50%; margin-top: -4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule-strong);
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.story-step.is-active::before { background: var(--blue); border-color: var(--blue); }
.story-step time { display: block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.story-step h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin-bottom: 12px; }
.story-step p { color: var(--ink-2); max-width: 36ch; }
.story-step p em { color: var(--ink); font-style: italic; }
.story-step:last-child { min-height: 0; padding-bottom: 12px; }

.story-stage { position: sticky; top: 84px; }
.stage {
  position: relative;
  background: #FAF9F5;
  border: 1px solid var(--rule);
  border-radius: 22px;
  aspect-ratio: 5 / 4;
  max-height: 600px;
  overflow: hidden;
}
.scene {
  position: absolute; inset: 0;
  padding: 26px 28px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  pointer-events: none;
}
.scene.is-on { opacity: 1; transform: none; transition-delay: 120ms; }
.scene-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.scene-label svg { width: 14px; height: 14px; fill: currentColor; }
.scene-body {
  position: absolute; inset: 64px 28px 28px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 14px;
}
.scene-body > * { width: min(100%, 440px); }

/* superficies: mismas reglas que el bento */
.wa, .wa-msg, .extract, .sheet2, .tg {
  background: #fff;
  border: 1px solid rgba(21,22,26,.07);
  box-shadow: 0 1px 2px rgba(21,22,26,.05), 0 10px 28px rgba(21,22,26,.07);
  border-radius: 16px;
}
.wa { overflow: hidden; }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.pav { width: 30px; height: 30px; border-radius: 50%; background: #E8DDD0; color: #6b4b2b; font-size: 0.74rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.pname { display: flex; flex-direction: column; font-size: 0.9rem; font-weight: 600; line-height: 1.15; }
.pname small { font-size: 0.68rem; font-weight: 500; color: var(--ink-3); }
.wa .wa-msg { box-shadow: none; border: 0; border-radius: 0; margin: 16px; width: auto; }
.wa-msg { padding: 14px 16px 10px; font-size: 0.98rem; line-height: 1.45; }
.wa-msg p { max-width: none; }
.wa-msg time { display: block; font-size: 0.68rem; color: var(--ink-3); margin-top: 6px; text-align: right; }
.wa-msg.in { align-self: flex-start; border-bottom-left-radius: 4px; }
.wa .wa-msg.in { background: var(--paper); border-radius: 12px 12px 12px 4px; }
.wa-msg.out { align-self: flex-end; background: #E9F7EE; border-bottom-right-radius: 4px; }
.wa-msg.solo { align-self: center; padding-bottom: 14px; }
.wa-msg mark { background: rgba(29,59,245,.12); color: var(--ink); border-radius: 4px; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.extract { display: grid; grid-template-columns: 1fr 1fr; }
.extract > div { padding: 12px 16px; border-top: 1px solid var(--rule); }
.extract > div:nth-child(-n+2) { border-top: 0; }
.extract > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.extract dt { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.extract dd { font-family: var(--serif); font-size: 1.15rem; letter-spacing: -0.01em; }

.sheet2 { overflow: hidden; }
.sheet2-head { padding: 12px 16px; font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid var(--rule); }
.sheet2 .r { display: grid; grid-template-columns: 0.8fr 1.3fr 1.1fr 1.1fr; gap: 10px; padding: 11px 16px; font-size: 0.85rem; border-top: 1px solid var(--rule); align-items: center; }
.sheet2 .r.h { border-top: 0; color: var(--ink-3); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; }
.sheet2 .r.new { background: rgba(29,59,245,.06); }
.sheet2 .ok { color: #2f7a46; font-weight: 600; }
.sheet2 .pend { color: var(--blue); font-weight: 600; }

.tg { display: flex; align-items: center; gap: 12px; padding: 12px 16px; align-self: flex-end; }
.tg > svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.tg b { display: block; font-size: 0.9rem; }
.tg span { font-size: 0.8rem; color: var(--ink-3); }
.tg > time { margin-left: auto; font-size: 0.68rem; color: var(--ink-3); align-self: flex-start; }
.tg.big { display: block; padding: 18px 20px 20px; align-self: center; }
.tg-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.tg-head time { font-size: 0.68rem; font-weight: 500; color: var(--ink-3); }
.tg.big ul li { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--ink-2); }
.tg.big ul li b { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1; color: var(--ink); min-width: 1.4ch; }
.tg-action { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--paper-2); font-size: 0.85rem; font-weight: 500; }
.tg-action i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* ---------- Calculadora ---------- */
.calc { padding-block: var(--section); border-top: 1px solid var(--rule); }
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 24px;
  margin: 0;
}
.calc-controls, .calc-result {
  background: #FAF9F5; border: 1px solid var(--rule); border-radius: 22px;
  padding: clamp(24px, 3vw, 40px);
}
.calc-controls { display: flex; flex-direction: column; gap: 26px; }
.field { display: block; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.field-label output { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.01em; text-transform: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.field select {
  width: 100%; min-height: 50px; padding: 0 44px 0 16px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%2315161A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  border: 1px solid var(--rule-strong); border-radius: 12px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.field input[type="range"] {
  width: 100%; height: 28px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.field input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--blue) var(--p, 0%), var(--rule-strong) var(--p, 0%)); border-radius: 2px; }
.field input[type="range"]::-moz-range-track { height: 2px; background: var(--rule-strong); border-radius: 2px; }
.field input[type="range"]::-moz-range-progress { height: 2px; background: var(--blue); }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: #fff; border: 1px solid var(--rule-strong); box-shadow: 0 1px 2px rgba(21,22,26,.1), 0 6px 16px rgba(21,22,26,.12); }
.field input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--rule-strong); box-shadow: 0 1px 2px rgba(21,22,26,.1), 0 6px 16px rgba(21,22,26,.12); }
.field input[type="range"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 4px; }

.calc-result { display: flex; flex-direction: column; justify-content: center; }
.calc-label { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.calc-hours { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 14px; }
.calc-hours b { font-family: var(--serif); font-weight: 400; font-size: clamp(4rem, 8vw, 7.5rem); line-height: 0.95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--ink); }
.calc-hours span { font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 2rem); color: var(--ink-2); }
.calc-equiv { color: var(--ink-2); max-width: 34ch; }
.calc-verdict { margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 1.35rem; letter-spacing: -0.01em; color: var(--blue); }
.calc-result .btn { align-self: flex-start; margin-top: 22px; }

@media (max-width: 1024px) {
  .story-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-stage { order: -1; position: sticky; top: 72px; z-index: 3; margin: 0 0 8px; }
  .story-steps { padding-top: 8px; }
  .stage { aspect-ratio: 1 / 1; border-radius: 16px; }
  .tg.big { padding: 14px 16px 16px; }
  .scene { padding: 16px 18px; }
  .scene-body { inset: 48px 18px 18px; gap: 10px; }
  .wa-msg { font-size: 0.88rem; padding: 12px 14px 8px; }
  .extract dd { font-size: 1rem; }
  .sheet2 .r { font-size: 0.76rem; padding: 9px 12px; }
  .tg.big ul li { padding: 7px 0; }
  .story-step { min-height: 0; padding: 22px 0 22px 20px; opacity: 1; }
  .calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sheet2 .r { font-size: 0.7rem; gap: 6px; }
  .wa .wa-msg { margin: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
  .story-step { transition: none; }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .service { grid-template-columns: 56px minmax(0, 1fr); }
  .service-body { grid-column: 2; }
  .service-icon { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .steps .step:nth-child(n + 3) .step-dot { display: none; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero { min-height: 0; }
  .hero.has-3d { padding-bottom: clamp(300px, 72vw, 440px); }
  .hero-hint { display: none; }
  .hero-hint { margin-top: 24px; }
  .thread { margin-top: 12px; }
  .section-head--split, .lab-grid, .about-grid, .contact-row { grid-template-columns: 1fr; }
  .about-name { max-width: none; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-tag { text-align: left; }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.1rem; color: var(--ink); }
  .site-nav .nav-cta { border: 0; border-radius: 0; padding: 14px 0; }
  .site-nav .nav-cta:hover { background: none; color: var(--blue); }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-header { position: sticky; }
  .site-header.is-stuck, .site-header.is-open { background: var(--paper); }
}

@media (max-width: 600px) {
  .hero-title { font-size: clamp(2.6rem, 12vw, 4.2rem); letter-spacing: -0.028em; }
  .steps { grid-template-columns: 1fr; gap: 36px; padding-top: 0; }
  .steps::before, .steps::after { display: none; }
  .step { padding-left: 24px; border-left: 1px solid var(--rule); }
  .steps.is-in .step { border-left-color: var(--blue); transition: border-color 500ms var(--ease-out); transition-delay: calc(var(--i) * 250ms); }
  .step-dot { display: none; }
  .bento { grid-template-columns: 1fr; }
  .card-connect { grid-column: auto; }
  .illo { height: 260px; }
  .card-connect .illo { height: 300px; }
  .orb { width: 40px; height: 40px; margin: -20px 0 0 -20px; --r: calc(var(--r) * 0.72); }
  .vault-win { width: 100%; }
  .vault-graph { display: none; }
  .ghost { font-size: 11rem; right: -10px; }
  .actions { gap: 16px; }
  .btn { width: 100%; }
  .copy-email { width: 100%; justify-content: space-between; }
  .thread text { font-size: 15px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .t-inner { animation: none; transform: none; }
  .thread-path { animation: none; stroke-dashoffset: 0; }
  .thread-end { animation: none; transform: none; }
  .task { animation: none; rotate: 0deg; }
  .task rect { animation: none; stroke: var(--ink); stroke-dasharray: 1 0; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .steps::after { transition: none; }
  .statement-text .w { opacity: 1; }
  .orb, .flow .fl, .status-inline i, .files li { animation: none; }
  .card.is-in .msg { animation: none; }
  .ghost { transform: none !important; }
  .step-dot { transition: none; }
  * { transition-duration: 0.01ms !important; }
}
