/* services.jhonattanrivera.com, v2: "De boceto a web publicada".
   Bricolage Grotesque (variable en tamaño óptico, peso y ancho) para titulares y texto, Martian Mono
   para etiquetas. Paleta: hueso, tinta, ultramar, coral, salvia y lima.
   Regla de movimiento: todo lo que se mueve está dentro de (prefers-reduced-motion: no-preference) y,
   si depende del scroll, dentro de @supports (animation-timeline: view()). Sin soporte, la página
   se ve completa y quieta. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-v1.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-latin-v1.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}

/* Variables animables: ejes del titular, giro del borde y brillo de los planes */
@property --ancho { syntax: "<number>"; inherits: true; initial-value: 100; }
@property --peso { syntax: "<number>"; inherits: true; initial-value: 600; }
@property --extra { syntax: "<number>"; inherits: false; initial-value: 0; }
@property --giro { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --hueso: #f2f1ec;
  --hueso-2: #e6e5de;
  --papel: #fbfbf8;
  --tinta: #15171c;
  --tinta-2: #2e3139;
  --grafito: #5b5f66;
  --ultramar: #2a35d8;
  --noche: #1b2499;
  --coral: #e8552b;
  --coral-texto: #c2410c;
  --salvia: #c9d8c5;
  --lima: #d7f36b;
  --linea: rgb(21 23 28 / .12);
  --linea-2: rgb(21 23 28 / .24);
  --error: #b42318;
  --ok: #1d6b40;

  --f-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --nav-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}

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

html {
  background: var(--hueso);
  color: var(--tinta);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--lima); color: var(--tinta); }

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

.casos :focus-visible,
.pie :focus-visible { outline-color: var(--lima); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--hueso);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform .4s var(--ease);
}

.skip:focus-visible { transform: none; }
main:focus { outline: none; }

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Etiquetas en mono. .kicker queda para la página de respuesta del formulario sin JavaScript. */
.etiqueta,
.kicker {
  margin: 0;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--grafito);
}

.kicker { margin-bottom: 22px; }

.h2 {
  margin: 0;
  font-size: clamp(44px, 6.4vw, 100px);
  line-height: .92;
  font-weight: 700;
  font-stretch: 78%;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.h2-suave {
  font-weight: 300;
  font-stretch: 100%;
  color: var(--ultramar);
}

/* Botones: la tinta se llena de ultramar desde abajo al pasar */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--tinta);
  border-radius: 999px;
  background: var(--tinta);
  color: var(--hueso);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease, transform .45s var(--ease);
  transform: translate(var(--mx, 0px), var(--my, 0px));
}

.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ultramar);
  transform: translateY(102%);
  transition: transform .5s var(--ease);
}

.btn:hover { border-color: var(--ultramar); }
.btn:hover::before { transform: none; }
.btn[disabled] { opacity: .6; cursor: progress; }

.btn .flecha {
  display: inline-block;
  transition: transform .45s var(--ease);
  transform: translate(calc(var(--mx, 0px) * .4), calc(var(--my, 0px) * .4));
}

.btn:hover .flecha { transform: translate(calc(var(--mx, 0px) * .4 + 4px), calc(var(--my, 0px) * .4)); }

.btn-grande { min-height: 56px; padding: 14px 28px; font-size: 17px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: var(--linea-2);
}

.btn-ghost:hover { color: var(--hueso); }

.btn-claro {
  background: var(--hueso);
  border-color: var(--hueso);
  color: var(--tinta);
}

.btn-claro::before { background: var(--lima); }
.btn-claro:hover { border-color: var(--lima); }

.link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: 6px 0 3px;
  border-bottom: 1px solid var(--linea-2);
  font-size: 15px;
  font-weight: 500;
  transition: border-color .3s ease;
}

.link:hover { border-bottom-color: currentColor; }
.link span { display: inline-block; transition: transform .4s var(--ease); }
.link:hover span[aria-hidden] { transform: translate(2px, -2px); }
.link[href^="#"]:hover span[aria-hidden] { transform: translateY(3px); }

/* Punto vivo: el detalle en lima */
.punto {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lima);
  box-shadow: 0 0 0 1px rgb(21 23 28 / .25);
}

/* Navegación */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(242 241 236 / .9);
  border-bottom: 1px solid var(--linea);
  view-transition-name: nav;
}

@supports (backdrop-filter: blur(1px)) {
  .nav { background: rgb(242 241 236 / .76); backdrop-filter: saturate(1.4) blur(14px); }
}

.nav-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  font-stretch: 90%;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  transition: transform .8s var(--ease);
}

.brand:hover img { transform: rotate(-18deg); }

.nav-links {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--tinta-2);
  transition: color .3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--ultramar);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}

.nav-links a:hover { color: var(--tinta); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang { display: flex; gap: 2px; }

.lang a {
  padding: 8px 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--grafito);
  transition: color .3s ease;
}

.lang a:hover,
.lang a[aria-current="true"] { color: var(--tinta); }
.lang a[aria-current="true"] { text-decoration: underline 2px var(--ultramar); text-underline-offset: 5px; }

/* Sobre los casos y el pie (fondos azules) la barra se oscurece; la activa efectos.js */
.nav { transition: background-color .4s ease, color .4s ease, border-color .4s ease; }
.nav.sobre-oscuro { color: var(--hueso); border-bottom-color: rgb(242 241 236 / .16); background: rgb(17 22 110 / .9); }
@supports (backdrop-filter: blur(1px)) {
  .nav.sobre-oscuro { background: rgb(17 22 110 / .72); }
}
.nav.sobre-oscuro .brand img { filter: invert(1); }
.nav.sobre-oscuro .nav-links a,
.nav.sobre-oscuro .lang a { color: rgb(242 241 236 / .82); }
.nav.sobre-oscuro .nav-links a:hover,
.nav.sobre-oscuro .lang a[aria-current="true"] { color: var(--hueso); }
.nav.sobre-oscuro .nav-links a::after { background: var(--lima); }
.nav.sobre-oscuro .lang a[aria-current="true"] { text-decoration-color: var(--lima); }
.nav.sobre-oscuro .btn { background: var(--hueso); border-color: var(--hueso); color: var(--tinta); }
.nav.sobre-oscuro .btn::before { background: var(--lima); }
.nav.sobre-oscuro :focus-visible { outline-color: var(--lima); }

@media (max-width: 900px) {
  .nav-in { grid-template-columns: 1fr auto; }
  .nav-secciones { display: none; }
}

@media (max-width: 440px) {
  :root { --nav-h: 64px; }
  .nav-end { gap: 8px; }
  .brand { gap: 10px; font-size: 15px; }
  .brand img { width: 28px; height: 28px; }
  .nav .btn-sm { padding-inline: 14px; }
}

@media (max-width: 370px) {
  .brand-name { display: none; }
}

/* ============ Portada ============ */

.hero {
  --arriba: clamp(20px, 3.4vw, 44px);
  position: relative;
  padding-block: var(--arriba) clamp(64px, 8vw, 112px);
}

/* La retícula: cinco líneas verticales y una horizontal que se dibujan al entrar */
.reticula {
  position: absolute;
  inset: 0;
  max-width: var(--max);
  margin-inline: auto;
  pointer-events: none;
  --ancho-util: calc(100% - 2 * var(--pad));
}

.reticula i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--linea);
  transform-origin: top;
}

.reticula i:nth-child(1) { left: var(--pad); }
.reticula i:nth-child(2) { left: calc(var(--pad) + var(--ancho-util) * .25); }
.reticula i:nth-child(3) { left: calc(var(--pad) + var(--ancho-util) * .5); }
.reticula i:nth-child(4) { left: calc(var(--pad) + var(--ancho-util) * .75); }
.reticula i:nth-child(5) { left: calc(var(--pad) + var(--ancho-util)); }

.reticula b {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--arriba) + 46px);
  height: 1px;
  background: var(--linea);
  transform-origin: left;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6.2fr) minmax(0, 5.8fr);
  align-items: center;
  gap: 48px clamp(24px, 3.4vw, 56px);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  text-wrap: balance;
}

@media (max-width: 560px) {
  .kicker-nombre { display: none; }
}

/* Titular cinético: cada letra es un span; sus ejes se animan al entrar y ganan peso cerca del cursor */
.titular {
  margin: clamp(32px, 4.6vw, 64px) 0 0;
  font-size: min(8.6vw, 118px);
  line-height: .9;
  font-weight: 600;
  letter-spacing: -.022em;
  view-transition-name: titular;
}

.titular-letras { display: block; }

.linea {
  display: block;
  white-space: nowrap;
}

.l {
  display: inline-block;
  white-space: pre;
  font-variation-settings: "wdth" var(--ancho), "wght" calc(var(--peso) + var(--extra));
  transition: --extra .6s var(--ease);
}

.punto-final { color: var(--coral); }

.boceto { position: relative; display: inline-block; }

.garabato {
  position: absolute;
  left: -2%;
  bottom: -.1em;
  width: 104%;
  height: .2em;
  overflow: visible;
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.garabato path { stroke-dasharray: 1; stroke-dashoffset: 0; }

.hero-sub {
  max-width: 540px;
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.5;
  color: var(--tinta-2);
  text-wrap: pretty;
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
  margin-top: clamp(28px, 3vw, 40px);
}

/* El escenario: gradiente vivo (WebGL, con respaldo en CSS) y la ventana de navegador encima */
.escenario {
  position: relative;
  isolation: isolate;
  overflow: clip;
  margin: 0;
  padding: clamp(16px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px) 0;
  border-radius: 28px;
  background:
    radial-gradient(70% 60% at 18% 22%, rgb(42 53 216 / .9), transparent 70%),
    radial-gradient(60% 55% at 88% 86%, rgb(232 85 43 / .85), transparent 70%),
    radial-gradient(80% 70% at 80% 15%, #dfe9dc, transparent 75%),
    var(--salvia);
}

.escenario::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(30% 28% at 30% 30%, rgb(42 53 216 / .75), transparent 70%),
    radial-gradient(26% 24% at 70% 72%, rgb(232 85 43 / .7), transparent 70%),
    radial-gradient(34% 30% at 72% 26%, rgb(201 216 197 / .9), transparent 72%);
}

.escenario-gl {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.escenario.gl-listo .escenario-gl { opacity: 1; }

.escenario-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 14px 0 clamp(16px, 2.4vw, 32px);
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: rgb(251 251 248 / .86);
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--tinta);
}

.escenario-pie > span { flex: 1 1 220px; }

.pausa {
  display: none;
  flex: none;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgb(21 23 28 / .35);
  border-radius: 999px;
  background: rgb(251 251 248 / .7);
  font-family: var(--f-mono);
  font-size: 11px;
  cursor: pointer;
}

.pausa:hover { background: var(--papel); }
.js .pausa { display: inline-flex; align-items: center; }

.navegador {
  --t1: 1.1s;
  --t2: 3s;
  --t3: 5s;
  --t4: 8s;
  position: relative;
  border-radius: 14px;
  background: var(--papel);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgb(21 23 28 / .1), 0 40px 80px -36px rgb(14 18 64 / .7);
}

.navegador-barra {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 8px 10px 0;
  background: #e3e2db;
}

.navegador-puntos {
  display: flex;
  gap: 6px;
  align-self: center;
  padding-bottom: 6px;
}

.navegador-puntos i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c4c2ba;
}

.pestanas { display: flex; gap: 2px; min-width: 0; }

.pestana {
  min-height: 32px;
  padding: 7px 12px;
  border: 0;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--tinta-2);
  font-family: var(--f-mono);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}

.pestana:hover { background: rgb(251 251 248 / .55); }
.pestana:focus-visible { outline-offset: -2px; }

.navegador:not(.auto) .pestana[aria-selected="true"] { background: var(--papel); color: var(--tinta); }

.navegador-url {
  position: relative;
  height: 34px;
  border-bottom: 1px solid var(--linea);
  background: var(--papel);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--grafito);
}

.url {
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  opacity: 0;
}

.url-segura::before {
  content: "";
  width: 9px;
  height: 11px;
  border-radius: 2px;
  background: var(--tinta-2);
  mask: radial-gradient(circle at 50% 2px, transparent 2.5px, #000 3px) top / 100% 5px no-repeat, linear-gradient(#000 0 0) bottom / 100% 6px no-repeat;
}

.navegador:not(.auto)[data-etapa="boceto"] .url[data-e="boceto"],
.navegador:not(.auto)[data-etapa="diseno"] .url[data-e="diseno"],
.navegador:not(.auto)[data-etapa="codigo"] .url[data-e="codigo"],
.navegador:not(.auto):not([data-etapa]) .url[data-e="publicada"],
.navegador:not(.auto)[data-etapa="publicada"] .url[data-e="publicada"] { opacity: 1; }

.navegador-vista {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  container-type: inline-size;
  background: var(--papel);
}

.etapa {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  transition: clip-path .75s var(--ease-io);
}

/* Modo manual (después del recorrido o al tocar una pestaña): las capas de encima se corren a la derecha */
.navegador:not(.auto)[data-etapa="boceto"] :is(.etapa-diseno, .etapa-codigo, .etapa-publicada),
.navegador:not(.auto)[data-etapa="diseno"] :is(.etapa-codigo, .etapa-publicada),
.navegador:not(.auto)[data-etapa="codigo"] .etapa-publicada { clip-path: inset(0 0 0 100%); }

/* Etapa 1: boceto */
.etapa-boceto {
  --gris: #cfcdc4;
  background:
    radial-gradient(circle, rgb(21 23 28 / .13) 1px, transparent 1.4px) 0 0 / 2.6cqi 2.6cqi,
    var(--papel);
}

.bc-nav {
  position: absolute;
  top: 3cqi;
  left: 4cqi;
  right: 4cqi;
  display: flex;
  align-items: center;
  gap: 2.4cqi;
}

.bc-nav i {
  width: 6.4cqi;
  height: 1.3cqi;
  border-radius: 1cqi;
  background: var(--gris);
  transform-origin: left;
}

.bc-nav .bc-logo { width: 15cqi; height: 2.6cqi; margin-right: auto; }
.bc-nav .bc-pill { width: 8cqi; height: 3cqi; border-radius: 3cqi; background: #b7b5ac; }

.bc-texto {
  position: absolute;
  left: 4cqi;
  bottom: 9cqi;
  width: 40cqi;
  display: grid;
  gap: 1.5cqi;
}

.bc-texto > i {
  height: 4.4cqi;
  border-radius: .8cqi;
  background: var(--gris);
  transform-origin: left;
}

.bc-texto > i:nth-child(1) { width: 96%; }
.bc-texto > i:nth-child(2) { width: 82%; }
.bc-texto > i:nth-child(3) { width: 46%; }

.bc-botones { display: flex; gap: 2cqi; margin-top: 2.2cqi; }

.bc-botones i {
  width: 12cqi;
  height: 4.2cqi;
  border-radius: 4cqi;
  background: #b7b5ac;
  transform-origin: left;
}

.bc-botones i + i { background: transparent; border: 1.5px dashed #a9a79e; }

.bc-imagen {
  position: absolute;
  top: 8.8cqi;
  right: 0;
  bottom: 0;
  width: 48cqi;
  border-left: 1.5px dashed #a9a79e;
  border-top: 1.5px dashed #a9a79e;
  background: rgb(21 23 28 / .035);
}

.bc-imagen svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #b7b5ac;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.nota {
  position: absolute;
  padding: .5cqi 1cqi;
  border-radius: .7cqi;
  background: var(--ultramar);
  color: #fff;
  font-family: var(--f-mono);
  font-size: max(9px, 1.7cqi);
  line-height: 1.3;
  white-space: nowrap;
}

.nota::before {
  content: "";
  position: absolute;
  width: 1cqi;
  height: 1cqi;
  background: inherit;
  transform: rotate(45deg);
}

.nota-menu { top: 7.2cqi; left: 40cqi; }
.nota-menu::before { top: -.4cqi; left: 2cqi; }
.nota-titulo { left: 26cqi; bottom: 27.5cqi; }
.nota-titulo::before { bottom: -.4cqi; left: 2cqi; }
.nota-imagen { right: 4cqi; top: 22cqi; background: var(--coral-texto); }
.nota-imagen::before { top: -.4cqi; right: 3cqi; }

/* Etapa 2: diseño (la portada de rocioarts.com recreada con tipografía del sistema) */
.etapa-diseno {
  background: #f6f2ec;
  color: #1b1a15;
}

.ds-nav {
  position: absolute;
  top: 2.6cqi;
  left: 4cqi;
  right: 4cqi;
  display: flex;
  align-items: center;
  gap: 2.4cqi;
  font-size: 1.55cqi;
}

.ds-logo {
  margin-right: auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6cqi;
  letter-spacing: -.01em;
}

.ds-logo i, .ds-titulo i { font-style: italic; }
.ds-links { display: flex; gap: 2.4cqi; }
.ds-links i { font-style: normal; }

.ds-boton {
  padding: .7cqi 1.8cqi;
  border-radius: 3cqi;
  background: #1b1a15;
  color: #f6f2ec;
}

.ds-texto {
  position: absolute;
  left: 4cqi;
  bottom: 7cqi;
  width: 42cqi;
}

.ds-titulo {
  position: relative;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.3cqi;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.015em;
}

.ds-titulo i { color: #4b5e33; }

.ds-botones {
  display: flex;
  align-items: center;
  gap: 2.4cqi;
  margin-top: 3cqi;
  font-size: 1.7cqi;
}

.ds-botones b {
  padding: 1.2cqi 2.4cqi;
  border-radius: 4cqi;
  background: #1b1a15;
  color: #f6f2ec;
  font-weight: 500;
}

.ds-botones u { text-decoration-thickness: 1px; text-underline-offset: .6cqi; }

.ds-imagen {
  position: absolute;
  top: 8.8cqi;
  right: 0;
  bottom: 0;
  width: 48cqi;
  background:
    radial-gradient(3cqi 2.6cqi at 60% 30%, #f6c9d4 0 40%, transparent 72%),
    radial-gradient(3.4cqi 2.8cqi at 68% 34%, #e48fa7 0 35%, transparent 72%),
    radial-gradient(2.6cqi 2.2cqi at 74% 28%, #f3b4c4 0 40%, transparent 72%),
    radial-gradient(3cqi 2.6cqi at 64% 40%, #eea3b7 0 35%, transparent 72%),
    radial-gradient(2.4cqi 2cqi at 20% 58%, #f1b8c6 0 40%, transparent 72%),
    radial-gradient(2.8cqi 2.4cqi at 26% 64%, #df8aa2 0 35%, transparent 72%),
    radial-gradient(2.2cqi 2cqi at 16% 66%, #f4c3cf 0 40%, transparent 72%),
    radial-gradient(2cqi 2cqi at 26% 12%, #f1d04f 0 40%, transparent 75%),
    radial-gradient(1.8cqi 1.8cqi at 70% 10%, #f0c94a 0 40%, transparent 75%),
    radial-gradient(1.6cqi 2.4cqi at 12% 16%, #5fb0d8 0 35%, transparent 75%),
    repeating-linear-gradient(115deg, rgb(255 255 255 / .07) 0 .5cqi, transparent .5cqi 1.6cqi),
    repeating-linear-gradient(70deg, rgb(30 50 15 / .12) 0 .4cqi, transparent .4cqi 1.3cqi),
    radial-gradient(20cqi 16cqi at 72% 76%, #8fb052, transparent 70%),
    radial-gradient(22cqi 20cqi at 20% 90%, #44632a, transparent 72%),
    radial-gradient(18cqi 14cqi at 40% 30%, #9bb860, transparent 70%),
    linear-gradient(165deg, #b4c77a, #6a8a3a 50%, #3f5a25);
}

.ds-seleccion {
  position: absolute;
  inset: -1.2cqi -1.4cqi;
  border: 1.5px solid var(--ultramar);
  pointer-events: none;
}

.ds-seleccion > i {
  position: absolute;
  width: 1.3cqi;
  height: 1.3cqi;
  border: 1.5px solid var(--ultramar);
  background: #fff;
}

.ds-seleccion > i:nth-child(1) { top: -.7cqi; left: -.7cqi; }
.ds-seleccion > i:nth-child(2) { top: -.7cqi; right: -.7cqi; }
.ds-seleccion > i:nth-child(3) { bottom: -.7cqi; left: -.7cqi; }
.ds-seleccion > i:nth-child(4) { bottom: -.7cqi; right: -.7cqi; }

.ds-medida {
  position: absolute;
  left: -1.5px;
  bottom: calc(100% + 1cqi);
  padding: .3cqi .9cqi;
  border-radius: .5cqi;
  background: var(--ultramar);
  color: #fff;
  font-family: var(--f-mono);
  font-size: max(9px, 1.5cqi);
  font-style: normal;
  line-height: 1.4;
  letter-spacing: 0;
  white-space: nowrap;
}

.ds-colores {
  position: absolute;
  right: 3cqi;
  top: 12cqi;
  display: flex;
  gap: 1cqi;
  padding: 1.1cqi;
  border-radius: 2cqi;
  background: rgb(251 251 248 / .94);
  box-shadow: 0 1.2cqi 3cqi -1.2cqi rgb(21 23 28 / .45);
}

.ds-colores i {
  width: 3.4cqi;
  height: 3.4cqi;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(21 23 28 / .15);
}

.ds-colores i:nth-child(1) { background: #f6f2ec; }
.ds-colores i:nth-child(2) { background: #1b1a15; }
.ds-colores i:nth-child(3) { background: #4b5e33; }

.ds-cursor {
  position: absolute;
  left: 40cqi;
  bottom: 22cqi;
  width: 2.6cqi;
  fill: var(--tinta);
  stroke: #fff;
  stroke-width: 1.2;
}

/* Etapa 3: código */
.etapa-codigo {
  padding: 4.2cqi 5cqi;
  background: var(--tinta);
  color: #d8dae1;
}

.codigo {
  margin: 0;
  font-family: var(--f-mono);
  font-size: max(7.5px, 2.4cqi);
  line-height: 1.66;
  white-space: pre;
  counter-reset: linea;
}

.c-l { display: inline-block; }

.c-l::before {
  counter-increment: linea;
  content: counter(linea);
  display: inline-block;
  width: 3.2ch;
  color: #6b707a;
}

.c-c { color: #8e939d; }
.c-s { color: #aab1ff; }
.c-p { color: var(--salvia); }
.c-n { color: #ff9d7c; }

.c-cursor {
  display: inline-block;
  width: .6em;
  height: 1.15em;
  margin-left: .2em;
  vertical-align: text-bottom;
  background: var(--lima);
}

/* Etapa 4: publicada, la captura real */
.etapa-publicada img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

@media (max-width: 999px) {
  .hero-grid { grid-template-columns: 1fr; }
  .titular { font-size: clamp(48px, 15.4vw, 96px); }
  .escenario { max-width: 680px; }
}

@media (max-width: 480px) {
  .navegador-puntos { display: none; }
  .navegador-barra { padding-inline: 6px; }
  .pestana { padding: 7px 8px; font-size: 10.5px; }
  .escenario { border-radius: 22px; margin-inline: calc(var(--pad) * -.5); }
}

/* ============ Cinta (marquee) ============ */

.cinta {
  position: relative;
  z-index: 3;
  overflow-x: clip;
  margin-block: -8px;
}

.cinta-giro {
  width: 108vw;
  margin-left: -4vw;
  padding-block: clamp(14px, 1.6vw, 22px);
  background: var(--tinta);
  color: var(--hueso);
  transform: rotate(calc(-1.6deg + var(--sesgo, 0deg)));
}

.cinta-pista {
  display: flex;
  width: max-content;
}

.cinta-lista {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cinta-lista li {
  display: flex;
  align-items: center;
  gap: .55em;
  padding-right: .55em;
  font-size: clamp(26px, 3.2vw, 46px);
  font-weight: 600;
  font-stretch: 80%;
  line-height: 1.1;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.cinta-lista li::after {
  content: "";
  width: .6em;
  height: .6em;
  background: var(--coral);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.7 6.4 5.6 11.3 12 12-6.4.7-11.3 5.6-12 12-.7-6.4-5.6-11.3-12-12C6.4 11.3 11.3 6.4 12 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  .cinta-pista { animation: cinta 42s linear infinite; }
  .cinta-giro:hover .cinta-pista,
  .pausa-todo .cinta-pista { animation-play-state: paused; }
}

@keyframes cinta { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .cinta-giro { transform: none; width: auto; margin-left: 0; }
  .cinta-pista { width: auto; justify-content: center; padding-inline: var(--pad); }
  .cinta-lista { flex-wrap: wrap; justify-content: center; }
  .cinta-lista[aria-hidden] { display: none; }
  .cinta-lista li { font-size: clamp(20px, 2.4vw, 30px); }
}

/* ============ Casos (sección en ultramar noche) ============ */

.casos {
  position: relative;
  background: var(--noche);
  color: var(--hueso);
}

.casos-fijo { padding-block: clamp(96px, 10vw, 140px) clamp(80px, 9vw, 120px); }

.casos-mover {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.casos .etiqueta { color: rgb(242 241 236 / .78); }
.casos .h2-suave { color: var(--salvia); }

.casos-intro { max-width: 560px; margin-bottom: clamp(48px, 6vw, 72px); }
.casos-intro .h2 { margin-top: 22px; }

.casos-texto {
  margin: 28px 0 0;
  color: rgb(242 241 236 / .82);
  text-wrap: pretty;
}

.casos-ayuda { display: none; margin-top: 40px; }
.casos-ayuda span { display: inline-block; color: var(--lima); }

/* Sin movimiento o sin soporte: los casos en lista vertical */
.casos-pista {
  position: relative; /* contiene los textos sr-only, que si no se escapan del carrusel y ensanchan la página */
  display: grid;
  gap: clamp(64px, 8vw, 104px);
}

.caso {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  align-items: center;
  gap: 32px clamp(28px, 4vw, 56px);
}

.caso-escena {
  position: relative;
  aspect-ratio: 1.42;
  cursor: pointer;
}

.marco-pc {
  position: absolute;
  left: 0;
  top: 0;
  width: 86%;
  border-radius: 12px;
  background: #11176b;
  box-shadow: 0 0 0 1px rgb(242 241 236 / .14), 0 40px 70px -30px rgb(5 7 40 / .8);
  overflow: hidden;
}

.marco-barra {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: rgb(242 241 236 / .7);
}

.marco-barra i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgb(242 241 236 / .25);
}

.marco-barra span { margin-left: 10px; }

.marco-vista {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  container-type: size;
  background: var(--hueso-2);
}

.marco-vista img {
  width: 100%;
  transition: transform 1.4s var(--ease);
}

.marco-cel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 25%;
  padding: 5px;
  border-radius: 24px;
  background: #0b0f4a;
  box-shadow: 0 0 0 1px rgb(242 241 236 / .18), 0 30px 50px -20px rgb(5 7 40 / .85);
}

.marco-cel .marco-vista {
  aspect-ratio: 390 / 844;
  border-radius: 19px;
}

/* Al pasar el cursor (o con el foco en el caso) la página completa baja dentro del marco */
@media (prefers-reduced-motion: no-preference) {
  .caso-escena:hover .marco-vista img,
  .caso:focus-within .marco-vista img {
    transform: translateY(calc(-100% + 100cqh));
    transition: transform 9s cubic-bezier(.45, 0, .35, 1);
  }
  .caso-escena:hover .marco-cel .marco-vista img,
  .caso:focus-within .marco-cel .marco-vista img { transition-duration: 11s; }
}

/* Etiqueta "Ver" que sigue al cursor (solo con mouse; la mueve efectos.js) */
.ver {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: var(--lima);
  color: var(--tinta);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  pointer-events: none;
  translate: var(--vx, 50%) var(--vy, 50%);
  scale: 0;
  transition: scale .4s var(--ease), translate .14s ease-out;
}

.caso-escena.con-cursor .ver { scale: 1; }

.caso-texto h3 {
  margin: 14px 0 0;
  font-size: clamp(34px, 3.6vw, 54px);
  font-weight: 700;
  font-stretch: 82%;
  line-height: .98;
  letter-spacing: -.03em;
}

.caso-texto p:not(.etiqueta) {
  margin: 18px 0 0;
  color: rgb(242 241 236 / .82);
  text-wrap: pretty;
}

.caso-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 26px;
}

.casos .link { border-bottom-color: rgb(242 241 236 / .35); }
.caso-abrir { display: none; }
.js .caso-abrir { display: inline-flex; }

/* La tarjeta vacía: la próxima web */
.tuyo-marco {
  display: grid;
  align-content: space-between;
  gap: 32px;
  min-height: 340px;
  height: 100%;
  padding: clamp(24px, 3vw, 40px);
  border: 2px dashed rgb(242 241 236 / .4);
  border-radius: 18px;
  transition: border-color .4s ease, background-color .4s ease;
}

.tuyo-marco:hover { border-color: var(--lima); background: rgb(242 241 236 / .05); }

.tuyo-texto {
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 700;
  font-stretch: 78%;
  line-height: .95;
  letter-spacing: -.03em;
}

.tuyo-texto span { display: block; font-weight: 300; font-stretch: 100%; color: var(--salvia); }

.tuyo-link {
  display: inline-flex;
  gap: .5em;
  font-weight: 500;
  color: var(--lima);
}

.tuyo-link span { transition: transform .4s var(--ease); }
.tuyo-marco:hover .tuyo-link span { transform: translateX(6px); }

.caso-tuyo { grid-template-columns: 1fr; }

@media (max-width: 1023px) {
  .caso { grid-template-columns: 1fr; }
}

/* Con movimiento: carrusel con scroll-snap (celular, tableta y navegadores sin scroll-driven animations) */
@media (prefers-reduced-motion: no-preference) {
  .casos-pista {
    display: flex;
    gap: 16px;
    margin-inline: calc(var(--pad) * -1);
    padding: 4px var(--pad) 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: thin;
    scrollbar-color: rgb(242 241 236 / .35) transparent;
  }
  .caso {
    flex: 0 0 min(86%, 760px);
    scroll-snap-align: start;
    align-content: start;
  }
  .caso-tuyo { flex-basis: min(76%, 520px); }
}

/* Escritorio con soporte: la sección queda fija y los casos pasan de derecha a izquierda con el scroll */
@supports (animation-timeline: view()) {
  @media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .casos {
      --recorrido: 160vw;
      height: calc(100vh + var(--recorrido));
      view-timeline: --casos block;
    }
    .casos-fijo {
      position: sticky;
      top: 0;
      display: flex;
      align-items: center;
      height: 100vh;
      padding-block: calc(var(--nav-h) + 20px) 28px;
      overflow: hidden;
    }
    .casos-mover {
      display: flex;
      align-items: center;
      gap: 7vw;
      width: max-content;
      max-width: none;
      margin: 0;
      padding-inline: max(var(--pad), (100vw - var(--max)) / 2 + var(--pad)) 6vw;
      animation: casos-deslizar linear both;
      animation-timeline: --casos;
      animation-range: contain 0% contain 100%;
    }
    .casos-intro { flex: none; width: 33vw; max-width: 520px; margin: 0; }
    .casos-ayuda { display: block; }
    .casos-ayuda span { animation: empujar 1.6s var(--ease-io) infinite; }
    .casos-pista {
      flex: none;
      gap: 7vw;
      margin: 0;
      padding: 0;
      overflow: visible;
    }
    .caso {
      flex: none;
      width: 76vw;
      max-width: 1180px;
      grid-template-columns: minmax(0, 8fr) minmax(0, 3.6fr);
    }
    .caso-escena { height: min(62vh, 33vw); aspect-ratio: auto; }
    .marco-pc { width: auto; height: calc(100% - 28px); aspect-ratio: 16 / 10.9; }
    .marco-pc .marco-vista { height: calc(100% - 28px); aspect-ratio: auto; }
    .marco-cel { width: auto; height: 78%; aspect-ratio: 400 / 854; right: 2%; }
    .marco-cel .marco-vista { height: 100%; aspect-ratio: auto; }
    .caso-tuyo { width: 34vw; display: block; }
    .tuyo-marco { height: min(60vh, 34vw); }
  }
}

@keyframes casos-deslizar { to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes empujar { 50% { transform: translateX(8px); } }

/* Panel de cada caso (dialog). Se abre con View Transition: el marco crece hasta el panel. */
.panel {
  width: min(1160px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--hueso);
  color: var(--tinta);
  overflow: hidden;
  box-shadow: 0 50px 120px -40px rgb(5 7 40 / .8);
}

/* El panel vive dentro de la sección azul: recupera los colores del tema claro */
.panel .etiqueta { color: var(--grafito); }
.panel :focus-visible { outline-color: var(--ultramar); }

.panel::backdrop {
  background: rgb(12 16 70 / .72);
  backdrop-filter: blur(6px);
}

.panel-in {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  height: min(740px, calc(100dvh - 32px));
}

.panel-vista {
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hueso-2);
  scrollbar-width: thin;
}

.panel-vista img { width: 100%; }

.panel-texto {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.4vw, 48px);
  overflow-y: auto;
}

.panel-texto h3 {
  margin: 14px 0 0;
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 700;
  font-stretch: 80%;
  line-height: .95;
  letter-spacing: -.03em;
}

.panel-texto > p:not(.etiqueta) { margin: 20px 0 0; color: var(--tinta-2); text-wrap: pretty; }
.panel-sub { margin-top: 32px !important; }

.panel-lista {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linea);
}

.panel-lista li {
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--linea);
  font-size: 15px;
  position: relative;
}

.panel-lista li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--coral);
  rotate: 45deg;
}

.panel-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 32px;
}

@media (max-width: 800px) {
  .panel-in { grid-template-columns: 1fr; grid-template-rows: 42% 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel[open] { animation: panel-entra .5s var(--ease); }
  .panel[open]::backdrop { animation: fundido .4s ease; }
}

@keyframes panel-entra { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fundido { from { opacity: 0; } }

::view-transition-group(caso-foco) { animation-duration: .65s; animation-timing-function: var(--ease); }
::view-transition-old(caso-foco),
::view-transition-new(caso-foco) { height: 100%; object-fit: cover; object-position: top; }

/* ============ Secciones claras ============ */

.seccion { padding-block: clamp(96px, 11vw, 168px); }

.cabecera {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: end;
  gap: 22px clamp(32px, 5vw, 72px);
  margin-bottom: clamp(48px, 6vw, 88px);
}

.cabecera .etiqueta { grid-column: 1 / -1; }

.cabecera > p:not(.etiqueta) {
  margin: 0;
  color: var(--tinta-2);
  text-wrap: pretty;
}

@media (max-width: 860px) {
  .cabecera { grid-template-columns: 1fr; }
}

/* ============ Servicios ============ */

.servicios {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--tinta);
}

.servicio {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--tinta);
}

/* Relleno salvia de izquierda a derecha al pasar */
.servicio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--salvia);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease);
}

.servicio:hover::before { transform: scaleX(1); }

.servicio summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: 16px clamp(20px, 3vw, 48px);
  padding: clamp(28px, 3.4vw, 48px) 0 20px;
  list-style: none;
  cursor: default;
}

.servicio summary::-webkit-details-marker { display: none; }
.servicio summary:focus-visible { outline-offset: -2px; }

.servicio h3 {
  margin: 0;
  font-size: clamp(48px, 7.4vw, 120px);
  font-weight: 700;
  font-stretch: 76%;
  line-height: .9;
  letter-spacing: -.035em;
  transition: font-stretch .7s var(--ease), font-weight .7s var(--ease), transform .7s var(--ease);
}

.servicio:hover h3 { font-stretch: 100%; font-weight: 500; transform: translateX(10px); }

.servicio-resumen { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; color: var(--tinta-2); }
.servicio-mas { display: none; }

.servicio .incluye {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0 0 clamp(28px, 3.4vw, 44px) calc(72px + clamp(20px, 3vw, 48px));
  list-style: none;
}

.incluye li {
  padding: 6px 14px;
  border: 1px solid var(--linea-2);
  border-radius: 999px;
  font-size: 14px;
  background: rgb(251 251 248 / .5);
}

/* Celular: acordeón */
@media (max-width: 760px) {
  .servicio summary {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 10px 16px;
    padding: 26px 0;
    cursor: pointer;
  }
  .servicio-n { grid-column: 1 / -1; }
  .servicio h3 { font-size: clamp(44px, 14vw, 64px); }
  .servicio-resumen { grid-column: 1 / -1; }
  .servicio-mas {
    display: block;
    grid-row: 2;
    grid-column: 2;
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--tinta);
    border-radius: 50%;
  }
  .servicio-mas::before,
  .servicio-mas::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 1.5px;
    margin: -.75px 0 0 -7px;
    background: var(--tinta);
    transition: transform .4s var(--ease);
  }
  .servicio-mas::after { transform: rotate(90deg); }
  .servicio details[open] .servicio-mas::after { transform: rotate(0); }
  .servicio .incluye { padding-left: 0; padding-bottom: 28px; }
  .servicio:hover h3 { transform: none; }
}

/* Muestra que sigue al cursor sobre cada servicio (la mueve efectos.js) */
.muestra {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 240px;
  height: 170px;
  margin: -85px 0 0 -120px;
  pointer-events: none;
  translate: var(--mx, -999px) var(--my, -999px);
  rotate: var(--mr, -4deg);
  scale: 0;
  transition: scale .45s var(--ease), rotate .6s var(--ease);
}

.muestra.activa { scale: 1; }

.muestra-carta {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 30px 60px -24px rgb(21 23 28 / .5);
  transition: opacity .25s ease;
}

.muestra[data-ver="nueva"] .muestra-nueva,
.muestra[data-ver="rediseno"] .muestra-rediseno { opacity: 1; }

.muestra-nueva {
  background:
    radial-gradient(circle, rgb(42 53 216 / .25) 1px, transparent 1.4px) 0 0 / 12px 12px,
    var(--papel);
  border: 1.5px solid var(--ultramar);
}

.muestra-nueva i {
  position: absolute;
  left: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px dashed var(--ultramar);
}

.muestra-nueva i:nth-child(1) { top: 22px; width: 50px; height: 10px; }
.muestra-nueva i:nth-child(2) { top: 62px; width: 110px; height: 18px; }
.muestra-nueva i:nth-child(3) { top: 88px; width: 80px; height: 18px; }

.muestra-nueva b {
  position: absolute;
  right: 18px;
  top: 50px;
  width: 78px;
  height: 96px;
  border-radius: 6px;
  background: var(--coral);
}

.muestra-rediseno { display: flex; background: var(--papel); }
.muestra-rediseno > span { position: relative; flex: 1; }

.muestra-rediseno .antes {
  background: #d9d7cf;
  filter: grayscale(1);
}

.muestra-rediseno .antes i {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 8px;
  background: #9c9a92;
}

.muestra-rediseno .antes i:nth-child(1) { top: 18px; height: 14px; background: #7a7a7a; }
.muestra-rediseno .antes i:nth-child(2) { top: 44px; }
.muestra-rediseno .antes i:nth-child(3) { top: 60px; right: 40px; }

.muestra-rediseno .despues { background: var(--ultramar); }

.muestra-rediseno .despues i {
  position: absolute;
  left: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--hueso);
}

.muestra-rediseno .despues i:nth-child(1) { top: 26px; width: 70%; }
.muestra-rediseno .despues i:nth-child(2) { top: 46px; width: 50%; }

.muestra-rediseno .despues b {
  position: absolute;
  left: 14px;
  bottom: 18px;
  width: 54px;
  height: 22px;
  border-radius: 11px;
  background: var(--lima);
}

/* ============ Proceso ============ */

.proceso-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px clamp(32px, 6vw, 112px);
}

.proceso-fijo {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  align-self: start;
}

.proceso-fijo .h2 { margin-top: 22px; }

.rodillo {
  height: 1em;
  margin-top: clamp(24px, 4vw, 56px);
  overflow: hidden;
  font-size: clamp(120px, 19vw, 300px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ultramar);
}

.rodillo-pista {
  display: flex;
  flex-direction: column;
  transition: transform 1s var(--ease);
}

.rodillo-pista span { height: 1em; }

.proceso[data-paso="2"] .rodillo-pista { transform: translateY(-1em); }
.proceso[data-paso="3"] .rodillo-pista { transform: translateY(-2em); }
.proceso[data-paso="4"] .rodillo-pista { transform: translateY(-3em); }

.pasos-zona {
  position: relative;
  padding-left: 64px;
  view-timeline: --pasos block;
}

.pasos-linea {
  position: absolute;
  left: 4px;
  top: 0;
  width: 40px;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.pasos-linea path { stroke-dasharray: 1; stroke-dashoffset: 0; }

.pasos {
  display: grid;
  gap: clamp(56px, 9vw, 140px);
  margin: 0;
  padding: clamp(8px, 4vw, 48px) 0;
  list-style: none;
}

.paso { position: relative; max-width: 520px; }

.paso::before {
  content: "";
  position: absolute;
  left: -51px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  background: var(--hueso);
  transition: background-color .4s ease, transform .5s var(--ease);
}

.paso.activo::before { background: var(--coral); transform: scale(1.25); }

.paso h3 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 700;
  font-stretch: 82%;
  line-height: 1;
  letter-spacing: -.025em;
}

.paso p { margin: 0; font-size: 18px; color: var(--tinta-2); text-wrap: pretty; }

@media (max-width: 860px) {
  .proceso-grid { grid-template-columns: 1fr; }
  .proceso-fijo { position: static; }
  .rodillo { display: none; }
  .pasos-zona { padding-left: 48px; }
  .pasos-linea { left: -6px; }
  .paso::before { left: -41px; }
}

/* ============ Precios ============ */

.planes-nota { font-size: 16px; }

.planes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  perspective: 1400px;
}

.plan {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  padding: clamp(24px, 2.6vw, 36px);
  border: 1px solid var(--linea-2);
  border-radius: 24px;
  background: var(--papel);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease);
}

/* Brillo que sigue al cursor */
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(380px circle at var(--x, 50%) var(--y, 0%), rgb(42 53 216 / .16), transparent 62%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.plan:hover::after { opacity: 1; }

/* Plan recomendado: borde que gira */
.plan-destacado {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--papel), var(--papel)) padding-box,
    conic-gradient(from var(--giro), var(--ultramar), var(--coral), var(--lima), var(--salvia), var(--ultramar)) border-box;
}

@media (prefers-reduced-motion: no-preference) {
  .plan-destacado { animation: girar 7s linear infinite; }
}

@keyframes girar { to { --giro: 360deg; } }

.plan-chip {
  position: absolute;
  top: clamp(22px, 2.4vw, 34px);
  right: clamp(22px, 2.4vw, 34px);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--hueso);
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.plan-n { margin: 0 0 40px; font-family: var(--f-mono); font-size: 12px; color: var(--grafito); }

.plan h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  font-stretch: 88%;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.plan-precio {
  margin: 12px 0 0;
  font-family: var(--f-mono);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.plan-resumen { margin: 18px 0 0; color: var(--tinta-2); }

.plan .incluye {
  display: grid;
  gap: 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--linea);
}

.plan .incluye li {
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--linea);
  border-radius: 0;
  background: none;
  font-size: 15px;
}

.plan .btn { margin-top: auto; align-self: flex-start; }
.plan > :nth-last-child(2) { margin-bottom: 32px; }

/* Plan sin llenar: borde punteado y "Por definir" con un brillo que pasa */
.plan-pendiente:not(.plan-destacado) { border-style: dashed; background: transparent; }
.plan-pendiente h3 { color: var(--grafito); }

/* Renglones de boceto en los planes que todavía no tienen contenido */
.plan-boceto {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px dashed var(--linea-2);
}

.plan-boceto i {
  height: 10px;
  border-radius: 5px;
  background: rgb(21 23 28 / .08);
}

.plan-boceto i:nth-child(1) { width: 88%; }
.plan-boceto i:nth-child(2) { width: 70%; }
.plan-boceto i:nth-child(3) { width: 78%; }
.plan-boceto i:nth-child(4) { width: 52%; }
.plan-pendiente .plan-precio { color: var(--grafito); }

@media (prefers-reduced-motion: no-preference) {
  .plan-pendiente .plan-precio {
    background: linear-gradient(100deg, var(--grafito) 42%, var(--ultramar) 50%, var(--grafito) 58%) 100% 0 / 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: brillo 3.4s ease-in-out infinite;
  }
}

@keyframes brillo { to { background-position: 0 0; } }

@media (max-width: 900px) {
  .planes { grid-template-columns: 1fr; }
  .plan { min-height: 0; }
}

/* ============ Contacto ============ */

.contacto-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: 56px clamp(40px, 6vw, 104px);
}

.contacto-form .h2 { margin-top: 22px; }

.contacto-nota {
  max-width: 460px;
  margin: 24px 0 40px;
  color: var(--tinta-2);
  text-wrap: pretty;
}

.form { display: grid; gap: 22px; align-content: start; }

.campo { display: grid; gap: 8px; }

.campo label {
  font-family: var(--f-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--tinta-2);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--linea-2);
  border-radius: 14px;
  background: var(--papel);
  font-size: 16px; /* 16 px evita que el iPhone haga zoom al escribir */
  line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.campo textarea::placeholder { color: #767a82; }

.campo select {
  appearance: none;
  padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--tinta-2) 50%), linear-gradient(-45deg, transparent 50%, var(--tinta-2) 50%);
  background-position: right 22px top 50%, right 17px top 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.campo textarea { min-height: 150px; resize: vertical; }

.campo input:hover,
.campo select:hover,
.campo textarea:hover { border-color: rgb(21 23 28 / .45); }

.campo input:focus-visible,
.campo select:focus-visible,
.campo textarea:focus-visible {
  outline: none;
  border-color: var(--ultramar);
  box-shadow: 0 0 0 4px rgb(42 53 216 / .16);
}

.campo [aria-invalid="true"] { border-color: var(--error); }

.campo-error {
  margin: 0;
  font-size: 14px;
  color: var(--error);
}

/* Campo trampa: fuera de la vista de las personas, visible para los bots */
.trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile { min-height: 65px; }

.form-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 8px;
}

.form-estado {
  flex: 1 1 240px;
  margin: 0;
  font-size: 15px;
  color: var(--tinta-2);
}

.form-estado:empty { display: none; }
.form-estado.es-ok { color: var(--ok); }
.form-estado.es-error { color: var(--error); }

/* El recibo "Tu pedido": se llena mientras la persona escribe (solo con JavaScript) */
.recibo-zona {
  display: none;
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  padding: clamp(28px, 3.6vw, 52px) clamp(22px, 3vw, 44px);
  border-radius: 28px;
  background: var(--salvia);
}

.js .recibo-zona { display: block; }

/* La sombra va en un envoltorio: la máscara de los dientes la cortaría */
.recibo-sombra {
  max-width: 360px;
  margin-inline: auto;
  rotate: -1.6deg;
  filter: drop-shadow(0 24px 20px rgb(21 23 28 / .2));
  transition: rotate .8s var(--ease);
}

.recibo-sombra:hover { rotate: 0deg; }

.recibo {
  --diente: 9px;
  position: relative;
  padding: 28px 24px calc(28px + var(--diente));
  background: var(--papel);
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--tinta);
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--diente)) 100%;
}

.recibo p { margin: 0; }

.recibo-marca {
  font-family: var(--f-sans);
  font-size: 22px !important;
  font-weight: 700;
  font-stretch: 80%;
  letter-spacing: -.02em;
  text-align: center;
}

.recibo-sub { margin-top: 4px !important; text-align: center; color: var(--grafito); }

.recibo-titulo {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px dashed var(--linea-2);
  font-weight: 600;
  text-transform: uppercase;
}

.recibo-filas {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--linea-2);
}

.recibo-titulo + .recibo-filas { margin-top: 8px; padding-top: 0; border-top: 0; }

.recibo-filas div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.recibo-filas dt { color: var(--grafito); }

.recibo-filas dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recibo-filas dd.lleno { color: var(--ultramar); font-weight: 500; }

.recibo-mensaje {
  min-height: 4.65em;
  margin-top: 14px !important;
  padding: 12px 0 0;
  border-top: 1px dashed var(--linea-2);
  color: var(--grafito);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.recibo-mensaje.lleno { color: var(--tinta); }

.recibo-total { font-weight: 600; }

.recibo-gracias {
  margin-top: 18px !important;
  text-align: center;
  text-transform: uppercase;
}

.recibo-barras {
  height: 38px;
  margin-top: 12px;
  background: repeating-linear-gradient(90deg, var(--tinta) 0 2px, transparent 2px 4px, var(--tinta) 4px 5px, transparent 5px 8px, var(--tinta) 8px 11px, transparent 11px 12px);
}

.sello-enviado {
  position: absolute;
  right: 18px;
  top: 47%;
  padding: 6px 14px;
  border: 3px double var(--coral);
  border-radius: 8px;
  color: var(--coral);
  font-family: var(--f-sans);
  font-size: 30px;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
  rotate: -14deg;
  opacity: 0;
  pointer-events: none;
}

.recibo.enviado .sello-enviado { opacity: .92; }

@media (prefers-reduced-motion: no-preference) {
  .recibo.enviado .sello-enviado { animation: sellar .55s cubic-bezier(.2, 1.5, .4, 1) both; }
  .recibo dd.recien, .recibo-mensaje.recien { animation: tinta-fresca .5s ease; }
}

@keyframes sellar {
  from { opacity: 0; scale: 2.4; }
  60% { opacity: .95; }
  to { opacity: .92; scale: 1; }
}

@keyframes tinta-fresca { from { background: rgb(215 243 107 / .7); } }

@media (max-width: 900px) {
  .contacto-grid { grid-template-columns: 1fr; }
  .recibo-zona { position: static; }
}

/* ============ Pie ============ */

.pie {
  overflow: clip;
  padding-top: clamp(64px, 8vw, 112px);
  background: var(--ultramar);
  color: var(--hueso);
}

.pie-arriba {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 40px;
}

.pie-cta {
  margin: 0;
  max-width: 820px;
  font-size: clamp(30px, 3.8vw, 56px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.pie-cta a {
  display: inline-flex;
  gap: .3em;
  font-weight: 700;
  font-stretch: 80%;
  color: var(--lima);
  border-bottom: 3px solid var(--lima);
}

.pie-cta a span { transition: transform .4s var(--ease); }
.pie-cta a:hover span { transform: translateX(6px); }

.reloj {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--hueso);
  font-variant-numeric: tabular-nums;
}

.reloj time { min-width: 8ch; }

.pie-nombre {
  margin: clamp(48px, 7vw, 96px) 0 0;
  container-type: inline-size;
  font-weight: 800;
  font-stretch: 75%;
  line-height: .8;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.pie-nombre span {
  display: block;
  font-size: 19.4cqi;
  padding-bottom: .06em;
}

.pie-abajo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 22px 32px;
  border-top: 1px solid rgb(242 241 236 / .3);
  font-size: 14px;
}

.pie-abajo p { margin: 0; }
.pie-abajo nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.pie-abajo a { padding-block: 6px; transition: color .3s ease; }
.pie-abajo a:hover { color: var(--lima); }

/* Página de respuesta del formulario sin JavaScript y página 404 */
.aviso {
  display: grid;
  align-content: center;
  min-height: calc(100svh - var(--nav-h) - 100px);
  padding-block: 80px;
}

.aviso h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 700;
  font-stretch: 78%;
  line-height: .92;
  letter-spacing: -.035em;
}

.aviso h1 .h2-suave { display: block; }

.aviso p:not(.kicker):not(.etiqueta) {
  max-width: 520px;
  margin: 24px 0 32px;
  color: var(--tinta-2);
}

.aviso-links { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============ Movimiento ============ */

@media (prefers-reduced-motion: no-preference) {
  /* Entrada: la retícula se dibuja y el titular entra letra por letra, del ancho 75 y peso 300 al 100 y 600 */
  .reticula i { animation: trazo-y 1.2s var(--ease) both; }
  .reticula i:nth-child(2) { animation-delay: .08s; }
  .reticula i:nth-child(3) { animation-delay: .16s; }
  .reticula i:nth-child(4) { animation-delay: .24s; }
  .reticula i:nth-child(5) { animation-delay: .32s; }
  .reticula b { animation: trazo-x 1.2s var(--ease) .1s both; }

  .linea { --linea: 0; }
  .linea:nth-child(2) { --linea: 1; }
  .linea:nth-child(3) { --linea: 2; }
  .l { animation: letra 1.1s var(--ease) calc(.25s + (var(--linea) * 5 + var(--i, 0) + var(--desfase, 0)) * 42ms) both; }
  .boceto { --desfase: 4; }
  :lang(en) .boceto { --desfase: 5; }
  .l:nth-child(2) { --i: 1; }
  .l:nth-child(3) { --i: 2; }
  .l:nth-child(4) { --i: 3; }
  .l:nth-child(5) { --i: 4; }
  .l:nth-child(6) { --i: 5; }
  .l:nth-child(7) { --i: 6; }
  .l:nth-child(8) { --i: 7; }
  .l:nth-child(9) { --i: 8; }
  .l:nth-child(10) { --i: 9; }
  .l:nth-child(11) { --i: 10; }
  .l:nth-child(12) { --i: 11; }
  .l:nth-child(13) { --i: 12; }
  .l:nth-child(14) { --i: 13; }
  .garabato path { animation: trazo .9s var(--ease-io) 1.35s both; }

  .hero-kicker { animation: subir .9s var(--ease) .1s both; }
  .hero-sub { animation: subir 1s var(--ease) .75s both; }
  .hero-acciones { animation: subir 1s var(--ease) .9s both; }
  .escenario { animation: escenario-entra 1.2s var(--ease) .45s both; }
  .escenario::before { animation: deriva 16s ease-in-out infinite alternate; }
  .escenario.gl-listo::before { animation: none; opacity: 0; }
  .pausa-todo .escenario::before { animation-play-state: paused; }

  /* Recorrido automático de la ventana: boceto, diseño, código y publicada. Termina en la captura real. */
  .navegador.auto .etapa-boceto,
  .reproducir.etapa-boceto { --t0: var(--t1); }
  .navegador.auto .etapa-diseno,
  .navegador.auto .etapa-codigo,
  .navegador.auto .etapa-publicada { animation: etapa-entra .8s var(--ease-io) both; }
  .navegador.auto .etapa-diseno { --t0: var(--t2); animation-delay: var(--t2); }
  .navegador.auto .etapa-codigo { --t0: var(--t3); animation-delay: var(--t3); animation-duration: .6s; }
  .navegador.auto .etapa-publicada { animation-delay: var(--t4); animation-duration: 1s; }
  .reproducir { --t0: .35s !important; }

  :is(.navegador.auto, .reproducir) .bc-nav i,
  :is(.navegador.auto, .reproducir) .bc-texto > i,
  :is(.navegador.auto, .reproducir) .bc-botones i { animation: crecer-x .7s var(--ease) calc(var(--t0) + var(--d, 0s)) both; }
  .bc-nav i:nth-child(2) { --d: .1s; }
  .bc-nav i:nth-child(3) { --d: .15s; }
  .bc-nav i:nth-child(4) { --d: .2s; }
  .bc-nav i:nth-child(5) { --d: .25s; }
  .bc-nav i:nth-child(6) { --d: .3s; }
  .bc-texto > i:nth-child(1) { --d: .35s; }
  .bc-texto > i:nth-child(2) { --d: .45s; }
  .bc-texto > i:nth-child(3) { --d: .55s; }
  .bc-botones i { --d: .7s; }
  .bc-botones i + i { --d: .8s; }
  :is(.navegador.auto, .reproducir) .bc-imagen { animation: revelar-abajo .9s var(--ease) calc(var(--t0) + .2s) both; }
  :is(.navegador.auto, .reproducir) .bc-imagen path { stroke-dasharray: 1; animation: trazo .8s var(--ease-io) calc(var(--t0) + .7s) both; }
  :is(.navegador.auto, .reproducir) .nota { animation: nota-entra .5s var(--ease) calc(var(--t0) + var(--d, 0s)) both; }
  .nota-menu { --d: .6s; }
  .nota-titulo { --d: .9s; }
  .nota-imagen { --d: 1.15s; }

  :is(.navegador.auto, .reproducir) .ds-seleccion { animation: aparecer .4s ease calc(var(--t0) + .7s) both; }
  :is(.navegador.auto, .reproducir) .ds-colores { animation: nota-entra .5s var(--ease) calc(var(--t0) + 1s) both; }
  :is(.navegador.auto, .reproducir) .ds-cursor { animation: cursor-llega 1s var(--ease) calc(var(--t0) + .2s) both; }

  :is(.navegador.auto, .reproducir) .c-l { animation: teclear .42s steps(18, end) calc(var(--t0) + .3s + var(--n, 0) * .2s) both; }
  .c-l:nth-of-type(2) { --n: 1; }
  .c-l:nth-of-type(3) { --n: 2; }
  .c-l:nth-of-type(4) { --n: 3; }
  .c-l:nth-of-type(5) { --n: 4; }
  .c-l:nth-of-type(6) { --n: 5; }
  .c-l:nth-of-type(7) { --n: 6; }
  .c-l:nth-of-type(8) { --n: 7; }
  .c-l:nth-of-type(9) { --n: 8; }
  .c-l:nth-of-type(10) { --n: 9; }
  .c-l:nth-of-type(11) { --n: 10; }
  .c-cursor { animation: parpadeo 1s steps(1) infinite; }

  /* Pestañas y barra de direcciones durante el recorrido (sin JavaScript también) */
  .navegador.auto [data-e] { animation: var(--on) .3s ease var(--desde) both, var(--off) .3s ease var(--hasta) forwards; }
  .navegador.auto .pestana { --on: pestana-on; --off: pestana-off; }
  .navegador.auto .url { --on: url-on; --off: url-off; }
  .navegador.auto [data-e="boceto"] { --desde: .4s; --hasta: var(--t2); }
  .navegador.auto [data-e="diseno"] { --desde: var(--t2); --hasta: var(--t3); }
  .navegador.auto [data-e="codigo"] { --desde: var(--t3); --hasta: var(--t4); }
  .navegador.auto [data-e="publicada"] { animation: var(--on) .3s ease var(--t4) both; }

  /* Con JavaScript el recorrido espera a que la ventana se vea (en celular queda más abajo) */
  .pausa-todo .navegador.auto,
  .pausa-todo .navegador.auto *,
  .js .navegador.auto:not(.en-vista),
  .js .navegador.auto:not(.en-vista) *,
  .pausa-todo .c-cursor { animation-play-state: paused !important; }
}

/* Sin movimiento: la ventana muestra directo la web publicada y el titular solo se funde */
@media (prefers-reduced-motion: reduce) {
  .titular-letras { animation: aparecer .4s ease both; }
  .titular { view-transition-name: none; }
  .navegador.auto .url[data-e="publicada"] { opacity: 1; }
  .navegador.auto .pestana[data-e="publicada"] { background: var(--papel); color: var(--tinta); }
  .etapa { transition: opacity .3s ease; clip-path: none !important; }
  .navegador:not(.auto)[data-etapa="boceto"] :is(.etapa-diseno, .etapa-codigo, .etapa-publicada),
  .navegador:not(.auto)[data-etapa="diseno"] :is(.etapa-codigo, .etapa-publicada),
  .navegador:not(.auto)[data-etapa="codigo"] .etapa-publicada { opacity: 0; }
  html:focus-within { scroll-behavior: auto; }
}

@keyframes trazo-y { from { transform: scaleY(0); } }
@keyframes trazo-x { from { transform: scaleX(0); } }
@keyframes trazo { from { stroke-dashoffset: 1; } }
@keyframes letra { from { --ancho: 75; --peso: 300; opacity: 0; transform: translateY(.18em); } 40% { opacity: 1; } }
@keyframes subir { from { opacity: 0; translate: 0 24px; } }
@keyframes aparecer { from { opacity: 0; } }
@keyframes escenario-entra { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes deriva { to { transform: translate(8%, -6%) rotate(18deg) scale(1.1); } }
@keyframes etapa-entra { from { clip-path: inset(0 100% 0 0); } }
@keyframes crecer-x { from { transform: scaleX(0); } }
@keyframes revelar-abajo { from { clip-path: inset(0 0 100% 0); } }
@keyframes nota-entra { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes cursor-llega { from { opacity: 0; transform: translate(14cqi, 10cqi); } 30% { opacity: 1; } }
@keyframes teclear { from { clip-path: inset(0 100% 0 0); } }
@keyframes parpadeo { 50% { opacity: 0; } }
@keyframes pestana-on { from { background: transparent; color: var(--tinta-2); } to { background: var(--papel); color: var(--tinta); } }
@keyframes pestana-off { from { background: var(--papel); color: var(--tinta); } to { background: transparent; color: var(--tinta-2); } }
@keyframes url-on { from { opacity: 0; } to { opacity: 1; } }
@keyframes url-off { from { opacity: 1; } to { opacity: 0; } }

/* Animaciones ligadas al scroll */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Los titulares de sección se aprietan al entrar: de ancho 100 y peso 300 a 78 y 700 */
    .seccion .h2,
    .casos-intro .h2 {
      animation: h2-entra linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
    .cabecera > p:not(.etiqueta),
    .servicio,
    .plan,
    .recibo-zona {
      animation: subir linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    .paso {
      animation: paso-entra linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 35%;
    }
    .pasos-linea path {
      animation: trazo linear both;
      animation-timeline: --pasos;
      animation-range: cover 10% cover 65%;
    }
    .pie-nombre span {
      animation: nombre-entra linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes h2-entra { from { font-stretch: 100%; font-weight: 300; opacity: .2; } }
@keyframes paso-entra { from { opacity: 0; translate: 0 56px; } }
@keyframes nombre-entra { from { clip-path: inset(100% 0 0 0); transform: translateY(35%); } }

/* Cambio de idioma: transición entre documentos. El titular y la barra se quedan; el resto se funde. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(titular) { animation-duration: .6s; animation-timing-function: var(--ease); }
}
