/* Hallmark · shape: Sheet set, every section is one full screen · genre: modern-minimal · theme: brand · redesign: full · job: hire
 * paper: oklch(98.6% 0.009 90) · accent: oklch(79% 0.12 86) · display: Manrope 800 · body: Manrope 500 · hero: Stage, a rotating word in the headline beside a window cut to measure with tape, pins and stitches · nav: signature, one curtain menu that opens from its button, with search and one action · footer: contact first, one row of links · imagery: the real products captured · signature: the reading thread with its needle and the tape-measure rail, and the project sheet that turns three taps into a WhatsApp message
 * axes: light/grotesk-heavy/warm · posture: Navy and ivory sheets, brass as the only signal · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, the sections still share one grid; each one now holds a different object (cut window, tabs, pinned measuring scene, index, animated product explainers, disclosure, project sheet) */
/* Hallmark · waive 2b · one brass ramp from two tokens, 40 and 41 pass · the footer line Tecnología a tu medida and the stage numerals of Medir, prototipar, entregar carry the Gradient Flow and Outline to Fill effects the owner chose from their list of twenty */
/* Hallmark · waive 79 · the hero is centred in the screen with equal gaps above and below, spare height stays margin · each section is one full screen as the owner asked, so Salamanca pages keep air instead of filler copy */
/* Hallmark · waive 80 · the drawn figures are the owner's own logo symbol, built from its real paths, and the interface mock-ups of the owner's own products · both are the brand and the product and cannot be replaced by a photograph */
/* ── 00-tokens.css ── */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Marca: marino, marfil y latón (design-system/COLOR_AND_MOTION.md). */
  --color-paper: #fdfbf6;
  --color-paper-2: #f4efe3;
  --color-paper-3: #ece4d2;
  --color-ink: #091628;
  --color-ink-2: #1e2d42;
  --color-muted: #3d4b5f;
  --color-rule: #d6cbb2;
  --color-rule-strong: #8d816a;
  --color-accent: #dcb14f;
  --color-accent-hi: #ecc96f;
  --color-accent-deep: #6e4d0b;
  --color-accent-ink: #091628;
  --color-focus: #6e4d0b;
  --color-focus-night: #ecc96f;

  /* Superficies oscuras: cada una define su propia pareja de texto y fondo. */
  --color-night: #091628;
  --color-night-2: #0d1d34;
  --color-night-3: #13294a;
  --color-night-ink: #fdfbf6;
  --color-night-muted: #dbe3ee;
  --color-night-faint: #b9c8e2;
  --color-night-rule: #2a3a52;
  --color-night-edge: #7f8ea8;
  --color-scrim: rgb(5 13 26 / 0.78);

  /* Maquetas de producto: estado correcto y aviso sobre fondo oscuro, claro y papel; puntero y máscara. */
  --mock-ok: #63d49c;
  --mock-warn: #f2b84b;
  --mock-ok-light: #17704a;
  --mock-warn-light: #b4690e;
  --mock-ok-paper: #1f8a58;
  --mock-pointer: #ffffff;
  --mock-pointer-ink: #0b1220;
  --mock-mask: #000000;
  --color-shadow: rgb(5 13 26 / 0.5);
  --color-error: #a3262f;
  --color-success: #1f6b45;

  /* Identidad de cada producto: fondo, texto, secundario, acento y texto sobre acento. */
  --cognago-bg: #123a2d;
  --cognago-fg: #f4f7f2;
  --cognago-muted: #cfe0d6;
  --cognago-accent: #8fd6b0;
  --cognago-on: #0c2a20;
  --unitry-bg: #050e1c;
  --unitry-fg: #f6f1e3;
  --unitry-muted: #c9d3e3;
  --unitry-accent: #d9b650;
  --unitry-on: #050e1c;
  --codego-bg: #0b1220;
  --codego-fg: #eaf2ff;
  --codego-muted: #b8c6e0;
  --codego-accent: #38bdf8;
  --codego-on: #06202e;
  --industrial-bg: #0e1c2f;
  --industrial-fg: #eef5fb;
  --industrial-muted: #bcd0e0;
  --industrial-accent: #3cc9a6;
  --industrial-on: #06251d;
  --nexocesta-bg: #173f33;
  --nexocesta-fg: #f4efe3;
  --nexocesta-muted: #d6e0d3;
  --nexocesta-accent: #f0d070;
  --nexocesta-on: #2a2208;
  --traste-bg: #0a1632;
  --traste-fg: #f2f5ff;
  --traste-muted: #c3cdf0;
  --traste-accent: #9fb2ff;
  --traste-on: #0a1632;
  --salamanca-bg: #f3e7c8;
  --salamanca-fg: #26201a;
  --salamanca-muted: #4a3f33;
  --salamanca-accent: #1e5a45;
  --salamanca-on: #fff7e0;

  /* Tipografía: Manrope local, una sola familia. */
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-outlier: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --tracking-display: -0.035em;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-hero: clamp(2.5rem, 3.4vw + 4.4svh, 5.5rem);
  --text-section: clamp(2.5rem, 1.8vw + 4.6svh, 4.5rem);
  --text-title: clamp(1.375rem, 0.5vw + 2.6svh, 1.875rem);
  --text-list: clamp(2rem, 1vw + 3.8svh, 3.5rem);
  --text-lead: clamp(1.0625rem, 0.4vw + 1.9svh, 1.375rem);

  /* Espacio: escala de 4 px y pasos que se comprimen con la altura de la pantalla. */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 144px;
  --fit-1: clamp(8px, 1.4svh, 16px);
  --fit-2: clamp(12px, 2.4svh, 28px);
  --fit-3: clamp(16px, 3.6svh, 48px);
  --fit-4: clamp(24px, 6svh, 80px);

  --radius-card: 6px;
  --radius-pill: 999px;
  --rule-hair: 1px;
  --rule-heavy: 2px;
  --shadow-card: none;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 480ms;

  --container: 1360px;
  --gutter: 48px;
  --gap-columns: 32px;
  --header-h: 64px;
  --screen-h: calc(100svh - var(--header-h));

  --z-base: 1;
  --z-raised: 10;
  --z-sticky-nav: 300;
  --z-modal: 400;
}

@media (max-width: 60rem) {
  :root {
    --gutter: 24px;
    --gap-columns: 24px;
  }
}

@media (max-width: 40rem) {
  :root {
    --gutter: 16px;
    --gap-columns: 16px;
    --header-h: 60px;
    --text-hero: clamp(2.25rem, 1.6vw + 4.2svh, 3.25rem);
    --text-section: clamp(2rem, 1.2vw + 4svh, 2.75rem);
  }
}

@media (max-width: 40rem) and (max-height: 780px) {
  :root {
    --text-hero: clamp(2rem, 4.8svh, 2.75rem);
    --text-section: clamp(1.75rem, 4.2svh, 2.5rem);
  }
}

/* ── 10-base.css ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

html {
  background: var(--color-paper);
  color-scheme: light;
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.006em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--color-accent-deep);
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.themed :focus-visible {
  outline-color: var(--p-accent);
}

.on-night :focus-visible,
.site-header :focus-visible,
.menu :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-focus-night);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-synthesis: none;
  line-height: 1.04;
  letter-spacing: var(--tracking-display);
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

p {
  text-wrap: pretty;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: var(--z-modal);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-weight: 800;
}

.num {
  font-variant-numeric: tabular-nums;
}

.code {
  font-family: var(--font-outlier);
  letter-spacing: -0.02em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *:not(.keep-motion),
  *:not(.keep-motion)::before,
  *:not(.keep-motion)::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 20-shell.css ── */
/* ───────── Cabecera: firma, WhatsApp y menú ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  background: var(--color-night);
  color: var(--color-night-ink);
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  color: inherit;
}

.brand img {
  width: auto;
  height: 32px;
  max-width: 52vw;
  object-fit: contain;
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-night-edge);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--color-night-ink);
  font-size: var(--text-sm);
  font-weight: 800;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.menu-btn__icon {
  position: relative;
  width: 20px;
  height: 12px;
}

.menu-btn__icon i {
  position: absolute;
  right: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--space-3xs);
  background: currentColor;
  transform-origin: right center;
  transition: transform var(--dur-short) var(--ease-out);
}

.menu-btn__icon i:first-child {
  top: 0;
}

.menu-btn__icon i:last-child {
  bottom: 0;
  transform: scaleX(0.62);
}

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

.menu-btn:hover .menu-btn__icon i:last-child {
  transform: none;
}

.menu-btn:active {
  background: var(--color-night-2);
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-sm);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out);
}

.wa-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.wa-btn:hover {
  background: var(--color-accent-hi);
}

.wa-btn:active {
  background: var(--color-accent);
}

@media (max-width: 40rem) {
  .wa-btn span,
  .menu-btn > span:last-child {
    display: none;
  }

  .wa-btn,
  .menu-btn {
    width: 44px;
    padding: 0;
  }

  .menu-btn {
    justify-content: center;
  }
}

/* ───────── Hilo: una aguja cose el borde de la página conforme se avanza ───────── */
.progress {
  --thread: var(--color-accent-deep);
  --needle: var(--color-ink);
  --k: 0;
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  z-index: var(--z-raised);
  width: 20px;
  pointer-events: none;
}

.progress[data-tone="night"] {
  --thread: var(--color-accent);
  --needle: var(--color-accent-hi);
}

.progress__line,
.progress__sewn {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  border-left: var(--rule-heavy) dashed;
  transition: border-color var(--dur-long) var(--ease-out);
}

.progress__line {
  border-color: color-mix(in srgb, var(--thread) 26%, transparent);
}

.progress__sewn {
  border-color: var(--thread);
  clip-path: inset(0 0 calc(100% - (100% - 26px) * var(--k)) 0);
}

.progress__needle {
  position: absolute;
  top: calc((100% - 26px) * var(--k));
  left: 4px;
  width: 12px;
  height: 32px;
  margin-top: calc(var(--space-2xs) * -1);
  color: var(--needle);
  transform-origin: 50% 16%;
  transition: color var(--dur-long) var(--ease-out);
}

.progress__needle svg {
  display: block;
  width: 100%;
  height: 100%;
}

.progress.is-sewing .progress__needle {
  animation: needle-sew 320ms var(--ease-in-out) infinite alternate;
}

@keyframes needle-sew {
  from {
    transform: translate3d(0, -2px, 0) rotate(-4deg);
  }

  to {
    transform: translate3d(0, 3px, 0) rotate(4deg);
  }
}

@media (max-width: 40rem) {
  .progress {
    width: 16px;
  }

  .progress__line,
  .progress__sewn {
    left: 7px;
  }

  .progress__needle {
    left: 2px;
  }
}

body.jugando .progress {
  display: none;
}

/* ───────── Menú: un telón de latón y noche que se abre desde el botón ───────── */
.menu {
  --mx: 92%;
  --my: 32px;
  --mr: 160vmax;
  --stitch-inset: clamp(10px, 1.2vw, 18px);
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  color: var(--color-night-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 760ms;
}

.menu.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.menu__veil,
.menu__bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  clip-path: circle(0 at var(--mx) var(--my));
  transition: clip-path 640ms var(--ease-in-out);
}

.menu__veil {
  z-index: -2;
  background: var(--color-accent);
  transition-delay: 110ms;
}

.menu__bg {
  background: var(--color-night);
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-night-ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-night-ink) 4%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}

.menu.is-open .menu__veil,
.menu.is-open .menu__bg {
  clip-path: circle(var(--mr) at var(--mx) var(--my));
}

.menu.is-open .menu__veil {
  transition-delay: 0s;
}

.menu.is-open .menu__bg {
  transition-delay: 130ms;
}

/* Cuatro puntadas que rodean la pantalla, una tras otra */
.menu__stitch {
  position: fixed;
  border: 0 dashed var(--color-accent);
  opacity: 0.55;
  pointer-events: none;
  transition: transform 520ms var(--ease-out);
}

.menu__stitch--t,
.menu__stitch--b {
  left: var(--stitch-inset);
  right: var(--stitch-inset);
  border-top-width: var(--rule-heavy);
  transform: scaleX(0);
}

.menu__stitch--r,
.menu__stitch--l {
  top: var(--stitch-inset);
  bottom: var(--stitch-inset);
  border-left-width: var(--rule-heavy);
  transform: scaleY(0);
}

.menu__stitch--t {
  top: var(--stitch-inset);
  transform-origin: left center;
}

.menu__stitch--r {
  right: var(--stitch-inset);
  transform-origin: center top;
}

.menu__stitch--b {
  bottom: var(--stitch-inset);
  transform-origin: right center;
}

.menu__stitch--l {
  left: var(--stitch-inset);
  transform-origin: center bottom;
}

.menu.is-open .menu__stitch {
  transform: none;
}

.menu.is-open .menu__stitch--t {
  transition-delay: 420ms;
}

.menu.is-open .menu__stitch--r {
  transition-delay: 760ms;
}

.menu.is-open .menu__stitch--b {
  transition-delay: 1100ms;
}

.menu.is-open .menu__stitch--l {
  transition-delay: 1440ms;
}

.menu__bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.menu__close {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-night-edge);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--color-night-ink);
  font-size: var(--text-sm);
  font-weight: 800;
  transition: border-color var(--dur-short) var(--ease-out);
}

.menu__close i {
  position: relative;
  width: 16px;
  height: 16px;
}

.menu__close i::before,
.menu__close i::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: var(--space-3xs);
  background: currentColor;
  transition: transform var(--dur-long) var(--ease-out);
}

.menu__close i::before {
  transform: rotate(45deg);
}

.menu__close i::after {
  transform: rotate(-45deg);
}

.menu__close:hover {
  border-color: var(--color-accent);
}

.menu__close:hover i::before {
  transform: rotate(135deg);
}

.menu__close:hover i::after {
  transform: rotate(45deg);
}

.menu__body {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--space-lg);
  padding-block: var(--space-sm) var(--space-lg);
}

.menu__main {
  display: grid;
  align-content: start;
  gap: var(--space-md);
  min-width: 0;
}

.menu__search {
  display: block;
}

.menu__search input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-night-edge);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--color-night-2) 80%, transparent);
  color: var(--color-night-ink);
  font-size: var(--text-md);
  font-weight: 700;
}

.menu__search input::placeholder {
  color: var(--color-night-faint);
}

.menu__links {
  display: grid;
}

.menu__links li {
  overflow: hidden;
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
}

.menu__links li[hidden],
.menu__products a[hidden] {
  display: none;
}

.menu__links a {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-xs);
  padding: var(--space-xs) 0;
  color: var(--color-night-ink);
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
  text-decoration: none;
  transform: translate3d(0, 105%, 0);
  transition: transform 720ms var(--ease-out), color var(--dur-short) var(--ease-out);
}

.menu.is-open .menu__links a {
  transform: none;
  transition-delay: calc(360ms + var(--i, 0) * 70ms), 0s;
}

.menu__n {
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 700;
}

.menu__links small {
  color: var(--color-night-faint);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0;
}

.menu__links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  border-bottom: var(--rule-heavy) dashed var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 460ms var(--ease-out);
}

.menu__links:hover a:not(:hover),
.menu__links:focus-within a:not(:focus-visible) {
  color: var(--color-night-faint);
}

.menu__links a:hover::after,
.menu__links a:focus-visible::after {
  transform: scaleX(1);
}

.menu__empty {
  color: var(--color-night-faint);
  font-weight: 700;
}

.menu__side {
  display: grid;
  align-content: start;
  gap: var(--space-sm);
  min-width: 0;
}

.menu__label {
  color: var(--color-night-faint);
  font-size: var(--text-sm);
  font-weight: 700;
}

.menu__products {
  display: flex;
  gap: var(--space-sm);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
}

.menu__products::-webkit-scrollbar {
  display: none;
}

.menu__products a {
  position: relative;
  display: grid;
  flex: 0 0 9.5rem;
  align-content: end;
  gap: var(--space-3xs);
  min-height: 6.75rem;
  padding: var(--space-sm);
  border: var(--rule-hair) solid color-mix(in srgb, var(--p-accent) 50%, transparent);
  border-radius: var(--radius-card);
  background: var(--p-bg);
  color: var(--p-fg);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  scroll-snap-align: start;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 700ms var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.menu.is-open .menu__products a {
  clip-path: inset(0);
  transition-delay: calc(520ms + var(--i, 0) * 60ms), 0s;
}

.menu__products img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 900ms var(--ease-out);
}

.menu__products a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 20%, var(--p-bg) 94%);
}

.menu__tile-name {
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.15;
}

.menu__products small {
  color: var(--p-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.25;
}

.menu__products a:hover {
  border-color: var(--p-accent);
}

.menu__products a:hover img {
  transform: scale(1.06);
}

.menu__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
}

.menu__mail {
  color: var(--color-night-ink);
  font-size: var(--text-md);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 0.24em;
}

.menu__place {
  color: var(--color-night-faint);
  font-size: var(--text-sm);
  font-weight: 700;
}

@media (max-width: 59.98rem) {
  .menu__body {
    align-content: space-between;
  }

  .menu__cta {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin-inline: calc(var(--gutter) * -1);
    padding: var(--space-sm) var(--gutter);
    background: linear-gradient(180deg, transparent, var(--color-night) 38%);
  }

  .menu__cta .btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 60rem) {
  .menu__body {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--space-2xl);
    align-content: center;
    padding-block: var(--space-md) var(--space-xl);
  }

  .menu__links a {
    padding-block: var(--space-sm);
    font-size: var(--text-list);
  }

  .menu__products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .menu__products a {
    flex: none;
    min-height: clamp(7rem, 17svh, 10.5rem);
  }

  .menu__products a:first-child {
    grid-column: 1 / -1;
    min-height: clamp(8rem, 21svh, 12rem);
  }

  .menu__cta {
    padding-top: var(--space-xs);
  }
}

@media (min-width: 80rem) {
  .menu__products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu__products a:first-child,
  .menu__products a:last-child {
    grid-column: span 2;
  }
}

@media (max-height: 700px) and (min-width: 60rem) {
  .menu__links a {
    padding-block: var(--space-xs);
    font-size: var(--text-title);
  }
}

/* ───────── Cinta métrica: índice lateral de secciones ───────── */
.rail {
  position: fixed;
  top: 50%;
  right: var(--space-md);
  z-index: var(--z-raised);
  display: none;
  padding-block: var(--space-xs);
  transform: translateY(-50%);
  color: var(--color-ink);
}

.rail[data-tone="night"] {
  color: var(--color-night-ink);
}

@media (min-width: 80rem) and (min-height: 40rem) {
  .rail {
    display: block;
  }
}

/* Borde de la cinta con marcas cada 7 px, como un flexómetro de sastre. */
.rail::before {
  content: "";
  position: absolute;
  inset: 0 var(--space-xs) 0 auto;
  width: 5px;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 7px);
  opacity: 0.34;
  pointer-events: none;
}

.rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  min-height: 28px;
  padding-inline: var(--space-xs);
  color: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
}

.rail a span {
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--space-2xs);
  background: var(--color-night);
  color: var(--color-night-ink);
}

html.js .rail a span {
  opacity: 0;
  transform: translate3d(8px, 0, 0);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.rail a::after {
  content: "";
  width: 22px;
  height: var(--rule-heavy);
  background: currentColor;
  transform-origin: right center;
  transform: scaleX(0.45);
  transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

html.js .rail a:hover span,
html.js .rail a:focus-visible span {
  opacity: 1;
  transform: none;
}

.rail a:hover::after {
  transform: scaleX(0.8);
}

.rail a[aria-current="true"]::after {
  background: var(--color-accent);
  transform: scaleX(1);
}

/* ───────── Pie: contacto primero, un solo renglón de enlaces ───────── */
.site-footer {
  background: var(--color-night-2);
  color: var(--color-night-ink);
  padding-block: var(--space-xl) var(--space-lg);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
}

.site-footer__say {
  max-width: 18ch;
  font-size: var(--text-section);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.site-footer__channels {
  display: grid;
  gap: var(--space-sm);
  align-content: end;
}

.site-footer__channels a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
  color: var(--color-night-ink);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--dur-short) var(--ease-out);
}

.site-footer__channels small {
  color: var(--color-night-faint);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0;
}

.site-footer__channels a:hover {
  color: var(--color-accent);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-top: var(--space-lg);
  color: var(--color-night-faint);
  font-size: var(--text-sm);
}

.site-footer__bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
}

.site-footer__bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--color-night-muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__bottom a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

@media (min-width: 60rem) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-2xl);
  }
}

/* ── 30-controls.css ── */
/* ───────── Botones, enlaces, fichas y campos ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-sm) var(--space-lg);
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-card);
  background: transparent;
  color: inherit;
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn--wa,
.btn--brass {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--wa:hover,
.btn--brass:hover {
  background: var(--color-accent-hi);
  border-color: var(--color-accent-hi);
}

.btn--wa:active,
.btn--brass:active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--ink {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-paper);
}

.btn--ink:hover {
  background: var(--color-night-3);
  border-color: var(--color-night-3);
}

.btn--ink:active {
  background: var(--color-ink);
}

.btn--line {
  border-color: currentColor;
}

.btn--line:hover {
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.btn--line:active {
  background: color-mix(in srgb, currentColor 18%, transparent);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--color-paper-3);
  border-color: var(--color-rule);
  color: var(--color-muted);
  cursor: not-allowed;
}

.link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: var(--rule-heavy);
  text-underline-offset: 0.24em;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

.link:hover {
  text-decoration-color: currentColor;
}

.link:active {
  text-decoration-color: var(--color-accent-deep);
}

.btn[hidden] {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

@media (max-width: 40rem) {
  .actions .btn {
    flex: 1 1 100%;
  }
}

/* Fichas de elección: radio real, etiqueta visible, foco claro. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--tone-edge, var(--color-rule-strong));
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.chip label:hover {
  border-color: var(--color-accent);
}

.chip input:checked + label {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.chip input:focus-visible + label {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.on-night .chip input:focus-visible + label {
  outline-color: var(--color-focus-night);
}

.chip input:disabled + label {
  border-style: dashed;
  color: var(--color-muted);
  cursor: not-allowed;
}

/* Campos de texto. */
.field {
  display: grid;
  gap: var(--space-xs);
}

.field label {
  font-size: var(--text-sm);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-md);
  font-weight: 500;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-muted);
}

.on-night .field input,
.on-night .field select,
.on-night .field textarea {
  background: var(--color-night-2);
  border-color: var(--color-night-edge);
  color: var(--color-night-ink);
}

.on-night .field input::placeholder,
.on-night .field textarea::placeholder {
  color: var(--color-night-faint);
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

/* ── 40-layout.css ── */
/* ───────── Pantallas: cada sección se ve completa sin desplazarse ───────── */
.on-night {
  --tone-ink: var(--color-night-ink);
  --tone-soft: var(--color-night-muted);
  --tone-faint: var(--color-night-faint);
  --tone-line: var(--color-night-rule);
  --tone-edge: var(--color-night-edge);
  background: var(--color-night);
  color: var(--color-night-ink);
}

.on-night-2 {
  background: var(--color-night-2);
}

.on-paper,
.on-paper-2 {
  --tone-ink: var(--color-ink);
  --tone-soft: var(--color-ink-2);
  --tone-faint: var(--color-muted);
  --tone-line: var(--color-rule);
  --tone-edge: var(--color-rule-strong);
  background: var(--color-paper);
  color: var(--color-ink);
}

.on-paper-2 {
  background: var(--color-paper-2);
}

.screen {
  position: relative;
  display: grid;
  align-content: center;
  min-height: var(--screen-h);
  padding-block: var(--fit-3);
}

.screen[data-flow] {
  min-height: 0;
  align-content: start;
  padding-block: var(--space-2xl);
}

@media (min-width: 60rem) and (hover: hover) and (pointer: fine) {
  html:has(.screen:not([data-flow])) {
    scroll-snap-type: y proximity;
  }

  .screen:not([data-flow]) {
    scroll-snap-align: start;
  }
}

.stack {
  display: grid;
  gap: var(--fit-3);
}

.head {
  display: grid;
  gap: var(--fit-2);
  align-content: start;
}

.head h1 {
  max-width: 14ch;
  font-size: var(--text-hero);
  line-height: 1;
}

.head h2 {
  max-width: 16ch;
  font-size: var(--text-section);
}

.lead {
  max-width: 34ch;
  color: var(--tone-soft, var(--color-ink-2));
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.4;
}

.muted {
  color: var(--tone-soft, var(--color-muted));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fit-3) var(--space-2xl);
  align-items: center;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .split--even {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split--wide {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

/* ───────── Pestañas con paneles que entran y salen en sentidos opuestos ───────── */
.tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fit-3) var(--space-2xl);
  align-items: start;
}

@media (min-width: 60rem) {
  .tabs {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.tablist {
  display: grid;
  align-content: start;
  border-top: var(--rule-hair) solid var(--tone-line);
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--space-sm) var(--space-md) var(--space-sm) var(--space-lg);
  border: 0;
  border-bottom: var(--rule-hair) solid var(--tone-line);
  background: transparent;
  color: var(--tone-faint);
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
  text-align: left;
  transition: color var(--dur-short) var(--ease-out);
}

.tab::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--space-2xs);
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-short) var(--ease-out);
}

.tab:hover {
  color: var(--tone-ink);
}

.tab:active {
  color: var(--tone-soft);
}

.tab[aria-selected="true"] {
  color: var(--tone-ink);
}

.tab[aria-selected="true"]::before {
  transform: scaleY(1);
}

@media (max-width: 59.98rem) {
  .tablist {
    display: flex;
    gap: var(--space-xs);
    padding-bottom: var(--space-3xs);
    border-top: 0;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .tablist::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: var(--space-xs) var(--space-md);
    border: var(--rule-hair) solid var(--tone-line);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .tab::before {
    display: none;
  }

  .tab[aria-selected="true"] {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-ink);
  }
}

.panels {
  display: grid;
}

.panel {
  grid-area: 1 / 1;
  min-width: 0;
}

html.js .panel {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(calc(var(--dir, 1) * 32px), calc(var(--dir, 1) * -14px), 0);
  transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-long) var(--ease-out), visibility 0s linear var(--dur-long);
}

html.js .panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

html.js .panel.is-leaving {
  opacity: 0;
  visibility: visible;
  transform: translate3d(calc(var(--dir, 1) * -32px), calc(var(--dir, 1) * 14px), 0);
  transition-delay: 0s;
}

html:not(.js) .panels {
  gap: var(--space-xl);
}

html:not(.js) .panel {
  grid-area: auto;
}

/* ───────── Capturas reales con anotaciones numeradas ───────── */
.shot {
  position: relative;
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-night-2);
}

.shot img {
  width: 100%;
  height: auto;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: var(--rule-heavy) solid var(--color-night);
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1;
}

.pin::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-2xs) * -1);
  border: var(--rule-hair) solid var(--color-accent);
  border-radius: 50%;
  opacity: 0;
}

html.js .is-active .pin::after,
html.js .shot.is-in .pin::after {
  animation: pin-ping 1.6s var(--ease-out) 0.5s 2;
}

@keyframes pin-ping {
  from {
    opacity: 0.9;
    transform: scale(0.6);
  }

  to {
    opacity: 0;
    transform: scale(2.2);
  }
}

.legend {
  display: grid;
  gap: var(--space-xs);
}

.legend li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
}

.legend li b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-xs);
}

/* ───────── Cifras reales ───────── */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md) var(--space-lg);
}

.fact {
  display: grid;
  gap: var(--space-2xs);
}

.fact b {
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fact span {
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 40rem) {
  .fact b {
    font-size: var(--text-lg);
  }

  .fact span {
    font-size: var(--text-xs);
  }
}

/* ───────── Índice de filas ───────── */
.rows {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2xs) var(--space-lg);
  padding: var(--fit-2) var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--tone-line);
  color: var(--tone-ink);
  text-decoration: none;
  isolation: isolate;
  overflow: hidden;
}

.row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-accent);
  transform: translate3d(-101%, 0, 0);
  transition: transform var(--dur-long) var(--ease-out);
}

.row strong {
  display: block;
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.row span {
  color: var(--tone-soft);
  font-size: var(--text-md);
  font-weight: 500;
  transition: color var(--dur-short) var(--ease-out);
}

.row i {
  display: none;
  font-style: normal;
  font-weight: 800;
}

.row:hover::before,
.row:focus-visible::before {
  transform: none;
}

.row:hover,
.row:focus-visible {
  color: var(--color-accent-ink);
}

.row:hover span,
.row:focus-visible span {
  color: var(--color-accent-ink);
}

.row:active::before {
  background: var(--color-accent-hi);
}

@media (min-width: 48rem) {
  .row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  }

  .row i {
    display: block;
  }
}

/* Teléfonos de 320 px: filas y fichas un paso más compactas para que la pantalla siga completa. */
@media (max-width: 21rem) {
  .row {
    padding-block: var(--space-sm);
  }

  .row strong {
    font-size: var(--text-lg);
  }

  .row span {
    font-size: var(--text-sm);
  }
}

/* ───────── Preguntas: un solo panel abierto, sin tocar la altura de la pantalla ───────── */
.faq {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.faq__item {
  border-bottom: var(--rule-hair) solid var(--tone-line);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: 44px;
  padding: var(--space-xs) var(--space-2xs);
  border: 0;
  background: transparent;
  color: var(--tone-ink);
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
  text-align: left;
}

.faq__q::after {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform var(--dur-short) var(--ease-out);
}

.faq__q[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq__q:hover {
  color: var(--color-accent-deep);
}

.on-night .faq__q:hover {
  color: var(--color-accent);
}

.faq__a {
  display: grid;
  grid-template-rows: 1fr;
}

.faq__a > div {
  min-height: 0;
  overflow: hidden;
}

.faq__a p {
  max-width: 62ch;
  padding: 0 var(--space-2xs) var(--space-md);
  color: var(--tone-soft);
}

html.js .faq__a {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--dur-long) var(--ease-out), visibility 0s linear var(--dur-long);
}

html.js .faq__a.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

@media (max-width: 40rem) {
  .faq__q {
    font-size: var(--text-lg);
  }
}

@media (max-width: 21rem) {
  .faq__q {
    font-size: var(--text-md);
  }
}

/* ───────── Ficha de proyecto: contacto en tres toques ───────── */
.brief {
  display: grid;
  gap: var(--fit-2);
  padding: var(--fit-3) var(--space-lg);
  border: var(--rule-hair) solid var(--color-night-rule);
  border-radius: var(--radius-card);
  background: var(--color-night-2);
  color: var(--color-night-ink);
  --tone-line: var(--color-night-rule);
  --tone-edge: var(--color-night-edge);
}

.brief fieldset {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.brief legend {
  padding: 0 0 var(--space-xs);
  color: var(--color-night-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.brief__line input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-night-edge);
  border-radius: var(--radius-card);
  background: var(--color-night);
  color: var(--color-night-ink);
  font-size: var(--text-md);
}

.brief__line input::placeholder {
  color: var(--color-night-faint);
}

.bubble {
  --lines: 5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  line-clamp: var(--lines);
  padding: var(--space-md);
  border-radius: var(--space-md) var(--space-md) var(--space-2xs) var(--space-md);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
  overflow: hidden;
}

.brief__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

@media (max-width: 40rem) {
  .brief {
    padding: var(--space-md);
  }

  .brief fieldset:first-of-type .chips {
    flex-wrap: nowrap;
    margin-inline: calc(var(--space-md) * -1);
    padding-inline: var(--space-md);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .brief fieldset:first-of-type .chips::-webkit-scrollbar {
    display: none;
  }

  .brief .chip {
    flex: 0 0 auto;
  }

  .brief .chip label {
    padding-inline: var(--space-sm);
  }

  .brief__line input {
    min-height: 44px;
  }

  .bubble {
    --lines: 3;
  }

  .brief__actions .btn--wa {
    flex: 1 1 100%;
  }
}

.brief__actions .btn--wa {
  flex: 1 1 14rem;
}

.brief__note {
  color: var(--color-night-faint);
  font-size: var(--text-xs);
}

dialog.brief-dialog {
  width: min(36rem, calc(100% - var(--space-lg)));
  max-height: calc(100svh - var(--space-lg));
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--color-night-ink);
  overflow: auto;
}

dialog.brief-dialog::backdrop {
  background: var(--color-scrim);
}

.brief-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg) 0;
  background: var(--color-night-2);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
}

.brief-dialog__bar button {
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--color-night-rule);
  border-radius: var(--radius-card);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 700;
}

.brief-dialog .brief {
  border-top: 0;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* ───────── Cierre compacto de cada página ───────── */
.closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-2xl);
}

.closing h2 {
  max-width: 16ch;
  font-size: var(--text-section);
}

@media (min-width: 60rem) {
  .closing {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 21rem) {
  .brief .chip label {
    padding-inline: var(--space-xs);
    font-size: var(--text-xs);
  }

  .brief__actions .btn--line {
    min-height: 40px;
  }
}

/* ── 50-home.css ── */
/* ───────── Identidad de cada producto: sus colores dentro del marco Zolvek ───────── */
[data-product="cognago"] {
  --p-bg: var(--cognago-bg);
  --p-fg: var(--cognago-fg);
  --p-muted: var(--cognago-muted);
  --p-accent: var(--cognago-accent);
  --p-on: var(--cognago-on);
}

[data-product="unitry"] {
  --p-bg: var(--unitry-bg);
  --p-fg: var(--unitry-fg);
  --p-muted: var(--unitry-muted);
  --p-accent: var(--unitry-accent);
  --p-on: var(--unitry-on);
}

[data-product="codego"] {
  --p-bg: var(--codego-bg);
  --p-fg: var(--codego-fg);
  --p-muted: var(--codego-muted);
  --p-accent: var(--codego-accent);
  --p-on: var(--codego-on);
}

[data-product="industrial"] {
  --p-bg: var(--industrial-bg);
  --p-fg: var(--industrial-fg);
  --p-muted: var(--industrial-muted);
  --p-accent: var(--industrial-accent);
  --p-on: var(--industrial-on);
}

[data-product="nexocesta"] {
  --p-bg: var(--nexocesta-bg);
  --p-fg: var(--nexocesta-fg);
  --p-muted: var(--nexocesta-muted);
  --p-accent: var(--nexocesta-accent);
  --p-on: var(--nexocesta-on);
}

[data-product="traste-cero"] {
  --p-bg: var(--traste-bg);
  --p-fg: var(--traste-fg);
  --p-muted: var(--traste-muted);
  --p-accent: var(--traste-accent);
  --p-on: var(--traste-on);
}

[data-product="salamanca"] {
  --p-bg: var(--salamanca-bg);
  --p-fg: var(--salamanca-fg);
  --p-muted: var(--salamanca-muted);
  --p-accent: var(--salamanca-accent);
  --p-on: var(--salamanca-on);
}

.themed {
  --tone-ink: var(--p-fg);
  --tone-soft: var(--p-muted);
  --tone-faint: var(--p-muted);
  --tone-line: color-mix(in srgb, var(--p-fg) 28%, transparent);
  background: var(--p-bg);
  color: var(--p-fg);
  transition: background-color var(--dur-long) var(--ease-out), color var(--dur-long) var(--ease-out);
}

.themed .btn--p {
  background: var(--p-accent);
  border-color: var(--p-accent);
  color: var(--p-on);
}

.themed .btn--p:hover {
  background: color-mix(in srgb, var(--p-accent) 86%, var(--p-fg));
}

.themed .btn--p:active {
  background: var(--p-accent);
}

.themed .tab[aria-selected="true"]::before {
  background: var(--p-accent);
}

.themed .legend li b,
.themed .pin {
  background: var(--p-accent);
  color: var(--p-on);
}

.themed .pin {
  border-color: var(--p-bg);
}

.themed .link {
  text-decoration-color: var(--p-accent);
}

.themed .stage {
  border-top-color: var(--p-accent);
}

.themed .stage .num {
  color: var(--p-accent);
}

.themed .tab[aria-selected="true"] {
  color: var(--p-fg);
}

.themed .tablist .tab {
  color: var(--p-muted);
}

.themed .tablist .tab[aria-selected="true"],
.themed .tablist .tab:hover {
  color: var(--p-fg);
}

/* La pestaña activa es una píldora con el acento del producto: su texto usa la pareja «sobre acento». */
.themed .showroom .tablist .tab[aria-selected="true"],
.themed .showroom .tablist .tab[aria-selected="true"]:hover {
  background: var(--p-accent);
  border-color: var(--p-accent);
  color: var(--p-on);
}

@media (max-width: 59.98rem) {
  .themed .tablist .tab[aria-selected="true"],
  .themed .tablist .tab[aria-selected="true"]:hover {
    background: var(--p-accent);
    border-color: var(--p-accent);
    color: var(--p-on);
  }
}

/* ───────── Inicio: titular con palabra que cambia y una ventana cortada a la medida ───────── */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-xl);
}

@media (min-width: 60rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  }
}

.hero .head {
  gap: var(--fit-3);
}

.hero .head h1 {
  max-width: 14ch;
}

.hero .head .lead {
  max-width: 34ch;
}

/* ───────── Medidas: elige el hueco y mira cómo se cierra ───────── */
.gap {
  display: grid;
  align-content: center;
  gap: var(--fit-3);
  min-height: 100%;
}

.gap__problem {
  max-width: 24ch;
  color: var(--tone-soft);
  font-size: var(--text-title);
  font-weight: 700;
  line-height: 1.25;
}

.gap__swap {
  max-width: 18ch;
  font-size: var(--text-section);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.05;
}

.gap__swap s {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--tone-faint);
  font-size: var(--text-title);
  font-weight: 700;
  letter-spacing: 0;
}

.gap__swap b {
  font-weight: 800;
}

/* ───────── Método: tres etapas, tres acciones distintas ───────── */
.stages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fit-3) var(--space-xl);
}

@media (min-width: 60rem) {
  .stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  align-items: baseline;
  gap: var(--fit-1) var(--space-sm);
  padding-top: var(--fit-2);
  border-top: var(--rule-heavy) dashed var(--color-accent);
}

.stage .num {
  grid-column: 1;
  grid-row: 1;
  color: var(--color-accent);
  font-size: var(--text-section);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1;
}

.stage h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--text-section);
  line-height: 1;
}

.stage > p,
.stage > .link {
  grid-column: 1 / -1;
}

.stage p {
  max-width: 28ch;
  color: var(--tone-soft);
}

.stage .link {
  justify-self: start;
}

@media (max-width: 59.98rem) {
  .stages {
    display: flex;
    gap: var(--space-md);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
  }

  .stages::-webkit-scrollbar {
    display: none;
  }

  .stage {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

/* ───────── Productos: una sala de muestras con anotaciones ───────── */
.showroom {
  display: grid;
  gap: var(--fit-2);
}

.showroom .tablist {
  display: flex;
  gap: var(--space-xs);
  border-top: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.showroom .tablist::-webkit-scrollbar {
  display: none;
}

.showroom .tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.showroom .tab::before {
  display: none;
}

.showroom .tab[aria-selected="true"] {
  background: var(--p-accent);
  border-color: var(--p-accent);
  color: var(--p-on);
}

/* ───────── Preguntas y contacto ───────── */
.channels {
  display: grid;
  gap: var(--space-xs);
}

@media (max-width: 59.98rem) {
  .channels {
    display: none;
  }
}

.channels a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: var(--rule-hair) solid var(--tone-line);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color var(--dur-short) var(--ease-out);
}

.channels a:hover {
  color: var(--color-accent);
}

.channels small {
  color: var(--tone-faint);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0;
}

.shot__cap {
  position: absolute;
  left: var(--space-sm);
  bottom: var(--space-sm);
  max-width: calc(100% - var(--space-lg));
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--color-scrim);
  color: var(--color-night-ink);
  font-size: var(--text-xs);
  font-weight: 700;
}

.ext-p {
  --fx-ext: var(--p-accent);
}

html:not(.js) .panel[data-product],
html:not(.js) .demo {
  padding-block: var(--space-lg);
}

/* Teléfonos bajos: todo sigue cabiendo en una pantalla. */
@media (max-width: 59.98rem) and (max-height: 880px) {
  #contacto .lead {
    display: none;
  }
}

@media (max-width: 59.98rem) and (max-height: 780px) {
  #contacto .lead {
    display: none;
  }

  #contacto .brief {
    gap: var(--space-sm);
  }

  #contacto .bubble {
    --lines: 2;
    padding: var(--space-sm);
  }
}

/* ── 60-products.css ── */
/* ───────── Fichas de producto: cada pantalla enseña el producto funcionando ───────── */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-xs);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
}

.crumbs a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--tone-line);
}

.crumbs a:hover {
  text-decoration-color: currentColor;
}

.pg-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-2xl);
}

@media (min-width: 60rem) {
  .pg-hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.pg-hero__copy {
  display: grid;
  align-content: center;
  gap: var(--fit-2);
}

.pg-hero__copy h1 {
  font-size: var(--text-section);
  line-height: 1;
}

@media (min-width: 80rem) {
  .pg-hero__grid {
    grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
    gap: var(--fit-3) var(--space-2xl);
  }

  .pg-hero .shot {
    justify-self: start;
  }
}

.pg-hero__copy .lead {
  max-width: 26ch;
}

.pg-hero .shot {
  justify-self: end;
  width: min(100%, calc((var(--screen-h) - 9rem) * var(--ratio, 1.6)));
}

@media (max-width: 59.98rem) {
  .pg-hero .shot {
    order: -1;
    justify-self: center;
    width: min(100%, calc((var(--screen-h) - 25rem) * var(--ratio, 1.6)));
  }

  .pg-hero .pin {
    display: none;
  }

  .pg-hero .legend {
    display: none;
  }
}

.pg-hero .legend {
  margin-top: var(--space-xs);
}

/* Pasos con zoom sobre la captura real */
.steps .tab {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--space-sm);
  align-items: baseline;
}

.steps .tab .num {
  color: var(--color-accent-deep);
  font-size: var(--text-md);
}

.on-night .steps .tab .num,
.themed .steps .tab .num {
  color: var(--color-accent);
}

.step {
  display: grid;
  gap: var(--fit-2);
}

.step p {
  max-width: 44ch;
  color: var(--tone-soft);
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.4;
}

.zoom {
  position: relative;
  aspect-ratio: var(--ratio, 1.7778);
  width: min(100%, calc((var(--screen-h) - 19rem) * var(--ratio, 1.7778)));
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-night-2);
}

.zoom img {
  width: 100%;
  height: 100%;
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--z, 1));
}

html.js .panel .zoom img {
  transform: none;
}

html.js .panel.is-active .zoom img {
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--z, 1));
  transition: transform 1400ms var(--ease-out) 150ms;
}

@media (max-width: 59.98rem) {
  .steps .tab {
    display: flex;
  }

  .steps .tab .num {
    display: none;
  }

  .zoom {
    width: min(100%, calc((var(--screen-h) - 22rem) * var(--ratio, 1.7778)));
  }

  .step p {
    font-size: var(--text-md);
  }
}

/* Qué resuelve y ficha técnica */
.solves {
  display: grid;
  gap: var(--space-sm);
}

.solves li {
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  border-left: var(--rule-heavy) solid var(--color-accent);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
}

.ficha {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.ficha > div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: var(--rule-hair) solid var(--tone-line);
}

.ficha dt {
  color: var(--tone-faint);
  font-size: var(--text-sm);
  font-weight: 700;
}

.ficha dd {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.35;
}

@media (min-width: 40rem) {
  .ficha > div {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: var(--space-md);
  }
}

@media (max-width: 40rem) {
  .solves {
    gap: var(--space-2xs);
  }

  .solves li {
    padding-block: var(--space-3xs);
    font-size: var(--text-md);
  }

  .ficha > div {
    padding: var(--space-xs) 0;
  }

  .ficha dd {
    font-size: var(--text-sm);
  }
}

/* Video bajo demanda */
.film {
  position: relative;
  width: min(100%, calc((var(--screen-h) - 11rem) * 1.7778));
  margin-inline: auto;
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-night);
}

.film video {
  width: 100%;
  max-height: calc(var(--screen-h) - 10rem);
  object-fit: contain;
}

.film__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: var(--space-xs) var(--space-lg);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-md);
  font-weight: 800;
  transform: translate(-50%, -50%);
  transition: background-color var(--dur-short) var(--ease-out);
}

.film__icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent currentColor;
}

.film__play:hover {
  background: var(--color-accent-hi);
}

.film.is-playing .film__play {
  display: none;
}

.film__err {
  padding: var(--space-md);
  color: var(--color-night-muted);
  font-size: var(--text-sm);
}

/* Descargas y accesos */
.getrows {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.getrows a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xs);
  border-bottom: var(--rule-hair) solid var(--tone-line);
  color: var(--tone-ink);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.getrows a > span {
  transition: transform var(--dur-short) var(--ease-out);
}

.getrows a small {
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0;
}

.getrows a:hover {
  color: var(--color-accent-deep);
}

.getrows a:hover > span {
  transform: translate3d(var(--space-sm), 0, 0);
}

.on-night .getrows a:hover {
  color: var(--color-accent);
}

/* Piloto de NexoCesta: formulario compacto con los datos opcionales plegados */
.hidden {
  display: none !important;
}

.pilot {
  display: grid;
  gap: var(--space-sm);
}

.pilot .grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.pilot .field.full {
  grid-column: 1 / -1;
}

/* Formulario por pasos: tres pantallas cortas en lugar de una larga */
.pilot__nav {
  display: flex;
  gap: var(--space-xs);
}

.pilot__nav li {
  display: flex;
  flex: 1 1 0;
  align-items: baseline;
  gap: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: var(--rule-heavy) solid var(--tone-line);
  color: var(--tone-faint);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.pilot__nav li.is-current,
.pilot__nav li.is-done {
  border-top-color: var(--p-accent);
  color: var(--tone-ink);
}

html:not(.js) .pilot__nav {
  display: none;
}

.pilot__step {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pilot__step[hidden] {
  display: none;
}

html.js .pilot__step:not([hidden]) {
  animation: step-in var(--dur-long) var(--ease-out) both;
}

@keyframes step-in {
  from {
    transform: translate3d(var(--space-lg), 0, 0);
  }

  to {
    transform: none;
  }
}

.pilot__step legend {
  padding: 0 0 var(--space-sm);
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.pilot .actions .btn--line {
  flex: 0 0 auto;
}

.pilot .actions .btn--p {
  flex: 1 1 12rem;
}

.pilot details {
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
}

.pilot summary {
  min-height: 32px;
  font-weight: 700;
  cursor: pointer;
}

.pilot details[open] summary {
  margin-bottom: var(--space-sm);
}

.pilot .consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
}

.pilot .consent input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: var(--space-3xs);
  accent-color: var(--color-accent);
}

.pilot .status {
  color: var(--color-error);
  font-weight: 700;
}

.pilot__ok {
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-success);
  border-radius: var(--radius-card);
  font-weight: 700;
}

/* ───────── Catálogo: siete productos en una pantalla ───────── */
.catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

@media (min-width: 60rem) {
  .catalog {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-md);
  }

  .catalog .tile:nth-child(1) {
    grid-column: span 6;
  }

  .catalog .tile:nth-child(2),
  .catalog .tile:nth-child(3) {
    grid-column: span 3;
  }

  .catalog .tile:nth-child(n + 4) {
    grid-column: span 3;
  }
}

.tile {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  border: var(--rule-hair) solid color-mix(in srgb, var(--p-accent) 40%, transparent);
  border-radius: var(--radius-card);
  background: var(--p-bg);
  color: var(--p-fg);
  text-decoration: none;
  overflow: hidden;
  transition: border-color var(--dur-short) var(--ease-out);
}

.tile__img {
  height: clamp(72px, 13.5svh, 190px);
  margin: 0;
  overflow: hidden;
  background: var(--color-night-2);
}

.tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.tile__body {
  display: grid;
  align-content: start;
  gap: var(--space-2xs);
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.tile h2,
.tile h3 {
  font-size: var(--text-title);
  line-height: 1.1;
}

.tile p {
  color: var(--p-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
}

.tile:hover {
  border-color: var(--p-accent);
}

.tile:active {
  border-color: var(--p-fg);
}

.tile[hidden] {
  display: none;
}

@media (max-width: 59.98rem) {
  .tile p {
    display: none;
  }

  .tile__body {
    padding: var(--space-xs) var(--space-sm) var(--space-sm);
  }

  .tile h2,
  .tile h3 {
    font-size: var(--text-md);
  }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.catalog__top {
  display: grid;
  gap: var(--fit-2) var(--space-xl);
  align-items: end;
}

.catalog__top .head h1 {
  max-width: 16ch;
  font-size: var(--text-list);
}

@media (min-width: 60rem) {
  .catalog__top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 59.98rem) {
  .filters {
    flex-wrap: nowrap;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filters .chip {
    flex: 0 0 auto;
  }

  .catalog__top .lead {
    display: none;
  }

  .tile__img {
    height: clamp(48px, 8svh, 100px);
  }

  .catalog .tile:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 40rem) and (max-height: 700px) {
  .tile__img {
    height: clamp(40px, 6.5svh, 60px);
  }
}

@media (max-width: 40rem) and (max-height: 700px) {
  .pg-hero .facts {
    display: none;
  }

  .ficha > div {
    padding: var(--space-2xs) 0;
  }
}

/* ── 70-pages.css ── */
/* ───────── Páginas interiores: tablero de ejemplo, capas, evidencia, diagnóstico, texto largo y error ───────── */

/* Tablero ilustrativo: el tipo de pantalla que construimos para cada sector */
.board {
  justify-self: end;
  width: min(100%, 34rem);
  margin: 0;
  border: var(--rule-hair) solid var(--color-night-rule);
  border-radius: var(--radius-card);
  background: var(--color-night-2);
  color: var(--color-night-ink);
  overflow: hidden;
}

.board__bar {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
  color: var(--color-night-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.board__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-night-rule);
}

.board__bar i:first-child {
  background: var(--color-accent);
}

html.js .board.is-in .board__bar i:first-child {
  animation: board-pulse 2.4s var(--ease-in-out) infinite;
}

.board__bar span {
  margin-left: var(--space-xs);
}

.board__rows {
  display: grid;
}

.board__rows li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) 4.5rem;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-night-rule);
}

.board__id {
  color: var(--color-night-faint);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
}

.board__name {
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
}

.board__name strong {
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.2;
}

.board__meter {
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-night-3);
  overflow: hidden;
}

.board__meter b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transform: scaleX(var(--v));
  transform-origin: left center;
  transition: transform 1.2s var(--ease-out) calc(var(--i, 0) * 140ms);
}

html.js .board:not(.is-in) .board__meter b {
  transform: scaleX(0);
}

.board__state {
  justify-self: end;
  color: var(--color-night-muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.board__state[data-s="ok"] {
  color: var(--color-accent);
}

.board figcaption {
  padding: var(--space-sm) var(--space-md);
  color: var(--color-night-faint);
  font-size: var(--text-xs);
  font-weight: 700;
}

@keyframes board-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.5);
  }
}

@media (max-width: 59.98rem) {
  .board {
    justify-self: stretch;
    width: 100%;
  }

  .board__rows li:nth-child(n + 4),
  .board figcaption {
    display: none;
  }

  .board__rows li {
    grid-template-columns: minmax(0, 1fr) 4.5rem;
    padding: var(--space-sm) var(--space-md);
  }

  .board__id {
    display: none;
  }
}

@media (max-width: 40rem) and (max-height: 760px) {
  .board {
    display: none;
  }
}

/* Capa activa dentro de las pestañas de servicio */
.layer {
  display: grid;
  align-content: center;
  gap: var(--fit-2);
  min-height: 100%;
}

.layer h3 {
  max-width: 20ch;
  font-size: var(--text-list);
  line-height: 1.05;
}

.layer p {
  max-width: 34ch;
  color: var(--tone-soft);
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: 1.4;
}

/* Cuatro etapas en una fila (perfil del diagnóstico) */
.stages--4 .stage h3 {
  font-size: var(--text-title);
}

.stages--4 .stage .num {
  font-size: var(--text-title);
  font-variant-numeric: tabular-nums;
}

.stages--4 .stage p {
  max-width: 24ch;
}

@media (min-width: 60rem) {
  .stages--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Filas de evidencia con etiqueta de tecnología */
.evidence {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.evidence a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-xs) var(--space-lg);
  padding: var(--fit-2) var(--space-xs);
  border-bottom: var(--rule-hair) solid var(--tone-line);
  color: var(--tone-ink);
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.evidence a strong,
.evidence a span {
  transition: transform var(--dur-short) var(--ease-out);
}

.evidence a:hover {
  color: var(--color-accent-deep);
}

.evidence a:hover strong,
.evidence a:hover span {
  transform: translate3d(var(--space-sm), 0, 0);
}

.on-night .evidence a:hover {
  color: var(--color-accent);
}

.evidence strong {
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.evidence span {
  grid-column: 1;
  max-width: 52ch;
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.35;
}

.evidence small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: var(--space-3xs) var(--space-sm);
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-pill);
  color: var(--tone-soft);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 59.98rem) {
  .evidence span {
    display: none;
  }

  .evidence small {
    grid-row: 1;
  }

  .evidence strong {
    font-size: var(--text-lg);
  }
}

/* ───────── Diagnóstico: una pregunta por pantalla ───────── */
.quiz {
  display: grid;
  gap: var(--fit-2);
  min-width: 0;
}

.quiz__top {
  display: grid;
  gap: var(--space-xs);
}

.quiz__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
}

.quiz__track {
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--tone-line);
  overflow: hidden;
}

.quiz__track b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent-deep);
  transform-origin: left center;
  transition: transform var(--dur-long) var(--ease-out);
}

.on-night .quiz__track b {
  background: var(--color-accent);
}

.quiz__dots {
  display: flex;
  justify-content: space-between;
  color: var(--tone-line);
  font-size: var(--text-xs);
}

.quiz__dots .is-done {
  color: var(--color-accent-deep);
}

.quiz__dots .is-now {
  color: var(--tone-ink);
}

.diagnostic-step {
  display: grid;
  gap: var(--fit-2);
}

html.js .diagnostic-step:not(.hidden) {
  animation: step-in var(--dur-long) var(--ease-out) both;
}

.step-question {
  max-width: 24ch;
  font-size: var(--text-title);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.12;
}

.step-question:focus {
  outline: 0;
}

.step-hint {
  max-width: 48ch;
  color: var(--tone-soft);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.4;
}

.step-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.step-options.cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.diag-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: 56px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--tone-edge);
  border-radius: var(--radius-card);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

.diag-option:hover {
  border-color: var(--color-accent-deep);
}

.diag-option:active {
  background: var(--color-paper-3);
}

.diag-option-icon {
  font-size: var(--text-xl);
  line-height: 1;
}

.diag-option-text {
  display: grid;
  gap: var(--space-3xs);
  grid-column: 2;
  min-width: 0;
}

.diag-option:not(:has(.diag-option-icon)) .diag-option-text {
  grid-column: 1 / -1;
}

.diag-option strong {
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.2;
}

.diag-option small {
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
}

.diag-option.diag-selected {
  border-color: var(--color-accent-deep);
  background: var(--color-ink);
  color: var(--color-paper);
}

.diag-option.diag-selected small {
  color: var(--color-night-muted);
}

.quiz__next {
  justify-self: start;
}

.quiz .form-status,
.pilot .form-status {
  color: var(--color-error);
  font-size: var(--text-sm);
  font-weight: 700;
}

.quiz__form {
  display: grid;
  gap: var(--space-sm);
}

.quiz__form .grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.quiz__form .field.full {
  grid-column: 1 / -1;
}

.quiz__form .consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}

.quiz__form .consent input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin-top: var(--space-3xs);
  accent-color: var(--color-ink);
}

.quiz__form .consent a {
  color: var(--tone-ink);
  text-decoration: underline;
}

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

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.result {
  display: grid;
  gap: var(--fit-2);
}

.result h2 {
  max-width: 20ch;
  font-size: var(--text-title);
  line-height: 1.1;
}

.result__route {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
}

.result__route strong {
  font-size: var(--text-lg);
  font-weight: 800;
}

.result__route p {
  color: var(--tone-soft);
  font-size: var(--text-sm);
}

.result__scores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.result__scores span {
  padding: var(--space-3xs) var(--space-sm);
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-pill);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
}

@media (max-width: 59.98rem) {
  .quiz__dots {
    display: none;
  }

  .step-options {
    gap: var(--space-xs);
  }

  .diag-option {
    min-height: 48px;
    padding: var(--space-xs) var(--space-md);
  }

  .diag-option small {
    display: none;
  }

  .diag-option-icon {
    font-size: var(--text-lg);
  }

  .quiz__form .grid2 {
    gap: var(--space-xs);
  }

  .quiz__form .field label {
    font-size: var(--text-xs);
  }

  .quiz__form .field input,
  .quiz__form .field textarea {
    min-height: 44px;
    padding: var(--space-xs) var(--space-sm);
  }
}

@media (max-width: 40rem) {
  .step-options:not(.cols-1) {
    grid-template-columns: minmax(0, 1fr);
  }

  .quiz__form .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ───────── Texto largo: privacidad y artículos ───────── */
.prose {
  display: grid;
  gap: var(--space-md);
  max-width: 58ch;
  font-size: var(--text-lg);
  line-height: 1.6;
}

.prose h2 {
  margin-top: var(--space-lg);
  font-size: var(--text-2xl);
  line-height: 1.1;
}

.prose h3 {
  margin-top: var(--space-md);
  font-size: var(--text-xl);
  line-height: 1.15;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--color-accent-deep);
  text-underline-offset: 0.2em;
}

.prose a:hover {
  color: var(--color-accent-deep);
}

.prose ul,
.prose ol {
  display: grid;
  gap: var(--space-xs);
  padding-left: var(--space-lg);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose blockquote {
  padding-left: var(--space-md);
  border-left: var(--rule-heavy) solid var(--color-accent);
  color: var(--color-ink-2);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.35;
}

.prose code {
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: var(--space-3xs);
  background: var(--color-paper-3);
  font-family: var(--font-outlier);
  font-size: 0.9em;
}

.prose pre {
  padding: var(--space-md);
  border-radius: var(--radius-card);
  background: var(--color-night);
  color: var(--color-night-ink);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.prose .table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.prose table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.prose th,
.prose td {
  padding: var(--space-xs) var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 800;
}

.prose img {
  height: auto;
  border-radius: var(--radius-card);
}

.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl) var(--space-2xl);
  align-items: start;
}

@media (min-width: 60rem) {
  .legal {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  }
}

.legal__toc {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
}

@media (min-width: 60rem) {
  .legal__toc {
    position: sticky;
    top: calc(var(--header-h) + var(--space-lg));
  }
}

.legal__toc a {
  display: block;
  overflow: hidden;
  padding: var(--space-xs) var(--space-md);
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: var(--rule-heavy) solid var(--tone-line);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.legal__toc a:hover,
.legal__toc a[aria-current="true"] {
  border-left-color: var(--color-accent-deep);
  color: var(--tone-ink);
}

@media (max-width: 59.98rem) {
  .legal__toc {
    display: none;
  }
}

.legal__body {
  display: grid;
  gap: var(--space-xl);
}

.legal__item {
  display: grid;
  gap: var(--space-sm);
  scroll-margin-top: calc(var(--header-h) + var(--space-md));
}

.head--long h1 {
  font-size: var(--text-list);
}

.legal__item h2 {
  max-width: 28ch;
  font-size: var(--text-2xl);
  line-height: 1.1;
}

.legal__item p {
  max-width: 58ch;
  font-size: var(--text-lg);
  line-height: 1.6;
}

.legal__item a {
  text-decoration: underline;
  text-decoration-color: var(--color-accent-deep);
  text-underline-offset: 0.2em;
}

.legal__item a:hover {
  color: var(--color-accent-deep);
}

.legal__item code {
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: var(--space-3xs);
  background: var(--color-paper-3);
  font-family: var(--font-outlier);
  font-size: 0.9em;
}

.legal__item small {
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* ───────── 404: una sola pantalla con el número dañado a propósito ───────── */
.lost {
  display: grid;
  gap: var(--fit-3);
  justify-items: stretch;
}

.lost .actions {
  width: 100%;
}

.lost__code {
  font-size: clamp(5rem, min(24svh, 48vw), 14rem);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 0.9;
}

.lost h1 {
  max-width: 18ch;
  font-size: var(--text-section);
  line-height: 1;
}

.lost .lead {
  max-width: 44ch;
}

/* Portada de página interior: el titular comparte pantalla con el tablero o las cifras */
.pg-hero--page .pg-hero__copy h1 {
  max-width: 16ch;
  font-size: var(--text-list);
  line-height: 1.1;
}

.pg-hero--page .pg-hero__copy .lead {
  max-width: 38ch;
}

.bignums .fx-count {
  font-variant-numeric: proportional-nums;
}

@media (min-width: 60rem) {
  .pg-hero--page .pg-hero__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

@media (min-width: 80rem) {
  .pg-hero--page .pg-hero__grid {
    grid-template-columns: minmax(0, 30rem) minmax(0, 34rem);
    justify-content: center;
    gap: var(--fit-3) var(--space-3xl);
  }
}

.bignums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--fit-3) var(--space-xl);
  justify-self: end;
  width: min(100%, 34rem);
}

.bignums li {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-sm);
  border-top: var(--rule-heavy) solid var(--color-accent);
}

.bignums b {
  font-size: var(--text-hero);
  font-weight: 800;
  font-variant-numeric: proportional-nums;
  letter-spacing: var(--tracking-display);
  line-height: 1;
}

.bignums span {
  color: var(--tone-soft);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.3;
}

@media (max-width: 59.98rem) {
  .bignums {
    justify-self: stretch;
    width: 100%;
    gap: var(--space-md) var(--space-lg);
  }

  .bignums b {
    font-size: var(--text-section);
  }

  .bignums span {
    font-size: var(--text-sm);
  }
}

/* Diagnóstico en móvil: el titular se vuelve una línea de contexto sobre la pregunta */
.quiz-page .head h1 {
  font-size: var(--text-list);
}

@media (max-width: 59.98rem) {
  .quiz-page .head .crumbs,
  .quiz-page .head .lead,
  .quiz-page .head .facts {
    display: none;
  }

  .quiz-page .head h1 {
    max-width: none;
    font-size: var(--text-title);
  }
}

@media (max-width: 59.98rem) and (max-height: 780px) {
  .quiz-page .step-hint {
    display: none;
  }
}

.quiz__more {
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: var(--radius-card);
  padding: var(--space-xs) var(--space-md);
}

.quiz__more summary {
  min-height: 32px;
  font-weight: 700;
  cursor: pointer;
}

.quiz__more[open] summary {
  margin-bottom: var(--space-sm);
}

.quiz__more .grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 21rem) {
  .bignums b {
    font-size: var(--text-xl);
  }
}

@media (max-width: 21rem) {
  .pg-hero--page .pg-hero__copy h1 {
    font-size: var(--text-title);
  }

  .getrows a {
    padding-block: var(--space-sm);
  }
}

/* Ficha de contrato: el tipo de salida que entrega NexoCesta */
.codecard pre {
  margin: 0;
  padding: var(--space-lg) var(--space-md);
  color: var(--color-night-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-lg);
  line-height: 1.5;
  overflow-x: auto;
}

.codecard pre i {
  color: var(--color-accent);
  font-style: normal;
}

.codecard__fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-night-rule);
}

.codecard__fields li {
  padding: var(--space-3xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-night-rule);
  border-radius: var(--radius-pill);
  color: var(--color-night-muted);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 700;
}

@media (max-width: 59.98rem) {
  .codecard pre {
    padding: var(--space-md);
    font-size: var(--text-md);
  }

  .codecard__fields {
    display: none;
  }
}

.stages--compact .stage h3 {
  font-size: var(--text-title);
}

.stages--compact .stage .num {
  font-size: var(--text-title);
  font-variant-numeric: tabular-nums;
}

.note {
  max-width: 62ch;
  padding-left: var(--space-md);
  border-left: var(--rule-heavy) solid var(--p-accent, var(--color-accent));
  color: var(--tone-soft);
  font-size: var(--text-md);
  font-weight: 700;
}

/* Etapas de solo texto: en móvil se apilan; el carrusel horizontal queda para las que llevan enlaces */
@media (max-width: 59.98rem) {
  .stages--compact,
  .stages--4 {
    display: grid;
    gap: var(--space-md);
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .stages--compact .stage,
  .stages--4 .stage {
    gap: var(--space-xs);
    padding-top: var(--space-sm);
  }

  .stages--compact .stage h3,
  .stages--4 .stage h3 {
    font-size: var(--text-lg);
  }

  .stages--compact .stage .num,
  .stages--4 .stage .num {
    font-size: var(--text-lg);
    font-variant-numeric: tabular-nums;
  }

  .stages--compact .stage p,
  .stages--4 .stage p {
    max-width: 46ch;
    font-size: var(--text-sm);
  }
}

@media (max-width: 21rem) {
  .stages--compact,
  .stages--4 {
    gap: var(--space-sm);
  }

  .stages--compact .stage p,
  .stages--4 .stage p {
    font-size: var(--text-xs);
    line-height: 1.35;
  }

  .note {
    font-size: var(--text-sm);
  }
}

/* ── 80-blog.css ── */
/* ───────── Cuaderno Zolvek: índice con lectura destacada y artículo con índice lateral ───────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3xs) var(--space-sm);
  border: var(--rule-hair) solid currentColor;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* Índice: portada con la lectura destacada */
.blog-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-2xl);
}

@media (min-width: 60rem) {
  .blog-hero__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }
}

.blog-hero__copy {
  display: grid;
  align-content: center;
  gap: var(--fit-2);
}

.blog-hero__copy h1 {
  max-width: 14ch;
  font-size: var(--text-section);
  line-height: 1.02;
}

.lead-card {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-night-rule);
  border-radius: var(--radius-card);
  background: var(--color-night-2);
  color: var(--color-night-ink);
}

.lead-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  color: var(--color-night-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.lead-card h2 {
  font-size: var(--text-list);
  line-height: 1.06;
}

.lead-card p {
  color: var(--color-night-muted);
  font-size: var(--text-md);
  line-height: 1.45;
}

.lead-card .actions {
  margin-top: var(--space-xs);
}

@media (max-width: 59.98rem) {
  .lead-card {
    padding: var(--space-md);
  }

  .lead-card h2 {
    font-size: var(--text-title);
  }

  .lead-card p {
    display: none;
  }
}

/* Índice: la biblioteca de guías */
.library__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fit-2) var(--space-xl);
  align-items: end;
}

@media (min-width: 60rem) {
  .library__top {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.library__top .head h2 {
  max-width: 18ch;
  font-size: var(--text-list);
}

.library__tools {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
  min-width: 0;
}

.library__tools .filters {
  max-width: 100%;
}

.library__tools input[type="search"] {
  width: min(100%, 24rem);
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-md);
}

.library__tools input[type="search"]::placeholder {
  color: var(--color-muted);
}

.library__count {
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
}

.library {
  border-top: var(--rule-hair) solid var(--tone-line);
}

.library li[hidden] {
  display: none;
}

.library a {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--fit-1) var(--space-xs);
  border-bottom: var(--rule-hair) solid var(--tone-line);
  color: var(--tone-ink);
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.library__t {
  transition: transform var(--dur-short) var(--ease-out);
}

.library a:hover {
  color: var(--color-accent-deep);
}

.library a:hover .library__t {
  transform: translate3d(var(--space-sm), 0, 0);
}

.library__n {
  color: var(--color-accent-deep);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-weight: 700;
}

.library__t {
  display: grid;
  gap: var(--space-3xs);
  min-width: 0;
}

.library strong {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
}

.library small {
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}

.library .tag {
  color: var(--tone-soft);
}

.library__empty {
  padding: var(--space-lg) 0;
  color: var(--tone-soft);
  font-size: var(--text-lg);
  font-weight: 700;
}

@media (max-width: 59.98rem) {
  .library a {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .library__n,
  .library small {
    display: none;
  }

  .library strong {
    font-size: var(--text-md);
  }
}

@media (max-width: 40rem) {
  .library .tag {
    display: none;
  }

  .library a {
    grid-template-columns: minmax(0, 1fr);
    padding-block: var(--space-sm);
  }

  .library__top .head h2 {
    font-size: var(--text-title);
  }

  .post__next .actions [data-copy-link] {
    display: none;
  }

  .post__next .getrows a {
    padding-block: var(--space-sm);
    font-size: var(--text-md);
  }
}

@media (max-width: 40rem) and (max-height: 700px) {
  .library__tools input[type="search"] {
    display: none;
  }
}

/* Artículo: cabecera de una pantalla */
.post__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-2xl);
}

@media (min-width: 60rem) {
  .post__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }
}

.post__title {
  display: grid;
  align-content: center;
  gap: var(--fit-2);
}

.post__title h1 {
  max-width: 22ch;
  font-size: var(--text-list);
  line-height: 1.08;
}

.post__title .lead {
  max-width: 48ch;
}

.byline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
}

.byline a {
  color: var(--tone-ink);
  font-weight: 800;
}

.takeaway {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-left: var(--rule-heavy) solid var(--color-accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--color-night-2);
  color: var(--color-night-ink);
}

.takeaway b {
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 800;
}

.takeaway p {
  font-size: var(--text-lead);
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 59.98rem) {
  .post__title .lead {
    font-size: var(--text-md);
  }

  .takeaway {
    padding: var(--space-md);
  }

  .takeaway p {
    font-size: var(--text-md);
  }
}

@media (max-width: 40rem) and (max-height: 760px) {
  .post__title .lead {
    display: none;
  }
}

/* Artículo: lectura con índice lateral */
.post__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl) var(--space-2xl);
  align-items: start;
}

@media (min-width: 60rem) {
  .post__layout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  }
}

.toc {
  display: grid;
  align-content: start;
  gap: var(--space-sm);
}

@media (min-width: 60rem) {
  .toc {
    position: sticky;
    top: calc(var(--header-h) + var(--space-lg));
  }
}

.toc summary {
  min-height: 32px;
  font-size: var(--text-sm);
  font-weight: 800;
  cursor: pointer;
}

.toc nav {
  display: grid;
}

.toc nav a {
  display: block;
  overflow: hidden;
  padding: var(--space-xs) var(--space-md);
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: var(--rule-heavy) solid var(--tone-line);
  color: var(--tone-soft);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.toc nav a:hover,
.toc nav a[aria-current="true"] {
  border-left-color: var(--color-accent-deep);
  color: var(--tone-ink);
}

.toc p {
  color: var(--tone-soft);
  font-size: var(--text-sm);
}

.toc [data-print] {
  justify-self: start;
  min-height: 44px;
}

.post__body .prose {
  max-width: 58ch;
}

.post__body .prose h2 {
  scroll-margin-top: calc(var(--header-h) + var(--space-md));
}

/* Artículo: siguiente paso y lecturas relacionadas en una pantalla */
.post__next .head h2 {
  max-width: 14ch;
}

.post__next .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: var(--space-xs);
}

.post__next .actions .btn--brass {
  grid-column: 1 / -1;
}

.post__more {
  display: grid;
  gap: var(--space-sm);
}

.post__more h3 {
  color: var(--tone-soft);
  font-size: var(--text-md);
  font-weight: 700;
}

/* Impresión: solo la guía, en negro sobre blanco */
@media print {
  .site-header,
  .menu,
  .site-footer,
  .progress,
  .skip-link,
  .toc,
  .post__next,
  .byline + .actions,
  [data-print],
  [data-copy-link] {
    display: none !important;
  }

  body,
  .post__head,
  .post__body {
    --tone-ink: var(--color-ink);
    --tone-soft: var(--color-ink-2);
    --tone-faint: var(--color-muted);
    --tone-line: var(--color-rule);
    background: var(--color-paper);
    color: var(--color-ink);
  }

  .screen {
    min-height: 0;
    padding-block: var(--space-md);
  }

  .takeaway {
    border: var(--rule-hair) solid var(--color-ink);
    background: transparent;
    color: var(--color-ink);
  }

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

/* La biblioteca crece con cada guía: en laptops bajas se compacta para seguir viéndose completa */
@media (min-width: 60rem) and (max-height: 1000px) {
  .library small {
    display: none;
  }

  .library a {
    padding-block: var(--space-xs);
  }
}

@media (max-width: 40rem) {
  .library__tools input[type="search"] {
    display: none;
  }
}

@media (max-width: 40rem) and (max-height: 780px) {
  .library a {
    padding-block: var(--space-xs);
  }

  .library strong {
    font-size: var(--text-md);
    line-height: 1.2;
  }
}

@media (max-width: 40rem) and (max-height: 700px) {
  .library__count {
    display: none;
  }

  .library a {
    padding-block: var(--space-2xs);
  }
}

@media (max-width: 21rem) {
  .blog-hero__copy h1 {
    font-size: var(--text-title);
  }
}

/* ── 85-story.css ── */
/* ───────── Escenas: software cortado a la medida, animado con GSAP (js/story.js y js/demos.js) ─────────
   El HTML trae siempre el cuadro final; sin JavaScript o con movimiento reducido es lo que se ve. */

/* ───────── Maquetas (.mk): interfaces dibujadas con los colores de cada producto ───────── */
.mk-frame {
  position: relative;
  container-type: inline-size;
  width: 100%;
}

.mk {
  --mk-bg: var(--p-bg, var(--color-night-2));
  --mk-ink: var(--p-fg, var(--color-night-ink));
  --mk-soft: var(--p-muted, var(--color-night-muted));
  --mk-acc: var(--p-accent, var(--color-accent));
  --mk-on: var(--p-on, var(--color-accent-ink));
  --mk-surface: color-mix(in srgb, var(--mk-ink) 9%, var(--mk-bg));
  --mk-raised: color-mix(in srgb, var(--mk-ink) 17%, var(--mk-bg));
  --mk-line: color-mix(in srgb, var(--mk-ink) 26%, transparent);
  --mk-ok: var(--mock-ok);
  --mk-warn: var(--mock-warn);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: var(--radius-card);
  background: var(--mk-bg);
  color: var(--mk-ink);
  font-size: 3cqw;
  font-weight: 600;
  line-height: 1.25;
}

[data-product="salamanca"] .mk {
  --mk-ok: var(--mock-ok-light);
  --mk-warn: var(--mock-warn-light);
}

.mk::after {
  content: "";
  position: absolute;
  inset: 0.4em;
  z-index: 7;
  border: 1.5px dashed color-mix(in srgb, var(--mk-acc) 46%, transparent);
  border-radius: 0.4em;
  pointer-events: none;
}

.mk-win {
  position: absolute;
  inset: 1.05em;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.55em;
  background: var(--mk-surface);
}

.mk-top {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.8em;
  border-bottom: var(--rule-hair) solid var(--mk-line);
  color: var(--mk-soft);
  font-size: 0.7em;
  font-weight: 700;
}

.mk-dots {
  display: flex;
  gap: 0.4em;
}

.mk-dots i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--mk-raised);
}

.mk-dots i:first-child {
  background: var(--mk-acc);
}

.mk-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.mk-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65em;
  padding: 0.85em 1.05em;
}

div.mk-view:not(:last-of-type) {
  visibility: hidden;
}

.mk-view--cols {
  flex-direction: row;
  align-items: stretch;
}

.mk-view--cols > * {
  flex: 1 1 0;
  min-width: 0;
}

.mk-view--center,
.mk-view--sign,
.mk-view--board,
.mk-view--lab {
  align-items: center;
  justify-content: center;
}

.mk-h {
  font-size: 1.12em;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mk-t {
  color: var(--mk-soft);
  font-size: 0.78em;
  font-weight: 700;
}

.mk-n {
  font-size: 1.7em;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mk-card {
  display: grid;
  align-content: start;
  gap: 0.3em;
  min-width: 0;
  padding: 0.65em 0.8em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.5em;
  background: var(--mk-bg);
}

.mk-line {
  display: block;
  flex: 0 1 var(--w, 100%);
  height: 0.5em;
  border-radius: 99em;
  background: var(--mk-raised);
}

.mk-field {
  display: flex;
  align-items: center;
  min-height: 2.4em;
  padding: 0.5em 0.8em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.45em;
  background: var(--mk-bg);
  font-size: 0.9em;
  font-weight: 700;
}

.mk-field--area {
  align-items: flex-start;
  min-height: 4.3em;
}

.mk-field--chat {
  border-color: var(--mk-acc);
}

.mk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.mk-chips--col {
  flex-direction: column;
  align-items: flex-start;
}

.mk-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.85em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 99em;
  color: var(--mk-soft);
  font-size: 0.78em;
  font-weight: 700;
  white-space: nowrap;
}

.mk-chip__on {
  position: absolute;
  inset: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: var(--mk-acc);
  color: var(--mk-on);
  font-weight: 800;
}

.mk-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 1.1em;
  border-radius: 0.4em;
  background: var(--mk-acc);
  color: var(--mk-on);
  font-size: 0.82em;
  font-weight: 800;
}

.mk-end {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.mk-switch {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.mk-sw {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.3em;
  height: 1.3em;
  overflow: hidden;
  border-radius: 99em;
  background: var(--mk-raised);
}

.mk-sw__on {
  position: absolute;
  inset: 0;
  background: var(--mk-acc);
}

.mk-sw b {
  position: absolute;
  top: 0.15em;
  left: 1.15em;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background: var(--mk-on);
}

.mk-toast,
.mk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.4em 0.9em;
  border-radius: 99em;
  font-size: 0.8em;
  font-weight: 800;
}

.mk-toast {
  position: absolute;
  left: 1.1em;
  bottom: 0.9em;
  z-index: 4;
  background: var(--mk-ink);
  color: var(--mk-bg);
}

.mk-badge {
  align-self: flex-start;
  background: color-mix(in srgb, var(--mk-ok) 26%, transparent);
  color: var(--mk-ink);
}

.mk-badge .mk-check {
  color: var(--mk-ok);
}

.mk-check {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-width: 0;
  padding: 0.38em 0;
  border-bottom: var(--rule-hair) solid var(--mk-line);
  font-size: 0.82em;
}

.mk-row em {
  margin-left: auto;
  color: var(--mk-soft);
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.mk-row em.is-warn {
  color: var(--mk-warn);
}

.mk-row--stock > span:first-child,
.mk-row--rev > span:nth-child(2) {
  flex: none;
  width: 5.6em;
}

.mk-row--cat > span:first-child {
  flex: 1;
}

.mk-dot {
  flex: none;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--mk-raised);
}

.mk-dot.is-ok {
  background: var(--mk-ok);
}

.mk-dot.is-warn {
  background: var(--mk-warn);
}

.mk-bar {
  display: block;
  flex: 1;
  height: 0.5em;
  overflow: hidden;
  border-radius: 99em;
  background: var(--mk-raised);
}

.mk-bar i {
  display: block;
  width: var(--v, 60%);
  height: 100%;
  background: var(--mk-acc);
}

.mk-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35em;
  height: 5em;
}

.mk-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 0.2em 0.2em 0 0;
  background: var(--mk-acc);
}

.mk-bars--sm {
  height: 2.4em;
  margin-top: auto;
}

.mk-bars--meter {
  height: 2.2em;
  margin-top: auto;
}

.mk-qr {
  display: block;
  width: 7em;
  height: 7em;
}

.mk-qr .bg {
  fill: var(--mk-ink);
}

.mk-qr path {
  fill: var(--mk-bg);
}

.mk-qrbox {
  position: relative;
  display: grid;
  place-items: center;
}

.mk-qrbox .mk-qr {
  width: 9.5em;
  height: 9.5em;
}

.mk-verify {
  align-self: center;
}

.mk-scan {
  position: absolute;
  inset-inline: 12%;
  top: 18%;
  height: 0.22em;
  background: var(--mk-acc);
  opacity: 0;
}

.mk-ring {
  width: 7em;
  height: 7em;
}

.mk-ring .trk {
  fill: none;
  stroke: var(--mk-raised);
  stroke-width: 7;
}

.mk-ring .val {
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--v));
  transform: rotate(-90deg);
  transform-origin: 32px 32px;
}

.mk-ringbox {
  display: grid;
  place-items: center;
  justify-self: center;
}

.mk-ringbox > * {
  grid-area: 1 / 1;
}

.mk-n--ring {
  font-size: 1.35em;
}

.mk-gauge {
  justify-items: center;
  align-content: center;
  text-align: center;
}

.mk-cursor,
.mk-ripple {
  position: absolute;
  z-index: 6;
  left: 70%;
  top: 72%;
  opacity: 0;
  pointer-events: none;
}

.mk-cursor {
  width: 1.7em;
  height: 1.7em;
}

.mk-cursor svg {
  width: 100%;
  height: 100%;
  fill: var(--mock-pointer);
  stroke: var(--mock-pointer-ink);
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.mk-ripple {
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em 0 0 -1.2em;
  border: 2px solid var(--mk-acc);
  border-radius: 50%;
}

/* CognaGO */
.mk-doc {
  align-content: stretch;
}

.mk-log {
  align-content: start;
}

.mk-verify {
  align-content: center;
}

.mk-qrbox + .mk-verify {
  flex: 1.2 1 0;
}

/* Unitry */
.mk-week {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45em;
  min-height: 0;
}

.mk-day {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3em;
  padding: 0.4em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.4em;
}

.mk-day:last-child {
  border-color: var(--mk-acc);
}

.mk-day i {
  display: block;
  height: calc(var(--h) * 0.5em);
  border-radius: 0.25em;
  background: var(--mk-acc);
}

.mk-day .mk-t {
  text-align: center;
}

.mk-flag {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--mk-acc);
  font-size: 0.85em;
  font-weight: 800;
}

.mk-flag svg {
  width: 1.3em;
  height: 1.3em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-heart {
  width: 11em;
  height: 10em;
}

.mk-heart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mk-heart .body {
  fill: color-mix(in srgb, var(--mk-acc) 26%, transparent);
  stroke: var(--mk-acc);
  stroke-width: 2.4;
}

.mk-heart .vein {
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 2.2;
  opacity: 0.85;
}

.mk-label {
  position: absolute;
  padding: 0.25em 0.75em;
  border: var(--rule-hair) solid var(--mk-acc);
  border-radius: 99em;
  background: var(--mk-bg);
  font-size: 0.76em;
  font-weight: 800;
}

.mk-clock {
  font-size: 2.1em;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Respuestas del simulacro: una cuadrícula de puntos dibujada con un solo fondo; --p marca cuántas van contestadas. */
.mk-dotgrid {
  --p: 1;
  position: relative;
  margin-top: auto;
  aspect-ratio: 12 / 5;
  background: radial-gradient(circle at 50% 50%, var(--mk-raised) 0 38%, transparent 41%) 0 0 / calc(100% / 12) calc(100% / 5);
}

.mk-dotgrid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--mk-acc) 0 38%, transparent 41%) 0 0 / calc(100% / 12) calc(100% / 5);
  clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0);
}

/* CodeGO */
.mk-opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
}

.mk-opt {
  position: relative;
  align-content: center;
  padding: 0.9em 0.4em;
  overflow: hidden;
  text-align: center;
}

.mk-opt__on {
  position: absolute;
  inset: 0;
  border: 2px solid var(--mk-acc);
  border-radius: inherit;
  background: color-mix(in srgb, var(--mk-acc) 16%, transparent);
}

.mk-pinrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.mk-pins {
  display: flex;
  gap: 0.5em;
}

.mk-pins i {
  width: 0.95em;
  height: 0.95em;
  border-radius: 50%;
  background: var(--mk-acc);
}

.mk-code,
.mk-console,
.mk-json {
  padding: 0.65em 0.9em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.5em;
  background: var(--mk-bg);
  font-family: var(--font-outlier);
  font-size: 0.8em;
  line-height: 1.7;
}

.mk-code p,
.mk-console p,
.mk-json p {
  margin: 0;
  white-space: nowrap;
}

.mk code {
  font: inherit;
}

.c-f {
  color: var(--mk-acc);
}

.c-s {
  color: var(--mk-ok);
}

.mk-console {
  border-style: dashed;
  color: var(--mk-soft);
}

.mk-file {
  display: grid;
  gap: 0.4em;
  width: 72%;
  padding: 0.85em 1em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.5em;
  background: var(--mk-bg);
}

.mk-file .mk-line:nth-of-type(2) {
  margin-top: 0.1em;
}

.mk-sig {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

.mk-sig code {
  color: var(--mk-acc);
  font-family: var(--font-outlier);
  font-size: 0.9em;
  font-weight: 700;
}

.mk-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 1em;
  border: 2px solid var(--mk-ok);
  border-radius: 0.4em;
  color: var(--mk-ok);
  font-size: 0.95em;
  font-weight: 800;
  rotate: -4deg;
}

.mk-av {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: var(--mk-raised);
  font-size: 0.9em;
  font-weight: 800;
}

/* CodeGO Industrial */
.mk-pal__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5em;
}

.mk-ico {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.4em;
  background: var(--mk-raised);
}

.mk-ico svg {
  width: 72%;
  height: 72%;
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-canvas {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.4em;
  border: 1.5px dashed var(--mk-acc);
  border-radius: 0.5em;
  background-image:
    linear-gradient(var(--mk-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mk-line) 1px, transparent 1px);
  background-size: 1.6em 1.6em;
}

.mk-ico--big {
  width: 5.2em;
  background: var(--mk-bg);
}

.mk-ladder,
.mk-plant svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mk-ladder .rl {
  fill: none;
  stroke: var(--mk-soft);
  stroke-width: 3;
}

.mk-ladder .wr {
  fill: none;
  stroke: var(--mk-line);
  stroke-width: 3;
  stroke-linecap: round;
}

.mk-ladder .ct,
.mk-ladder .co {
  fill: none;
  stroke: var(--mk-ink);
  stroke-width: 3;
  stroke-linecap: round;
}

.mk-ladder .fl {
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 3.6;
  stroke-linecap: round;
}

.mk-ladder [data-d~="coil"] {
  fill: var(--mk-acc);
  stroke: var(--mk-acc);
}

.mk-ladder .tx {
  fill: var(--mk-soft);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
}

.mk-plant {
  position: relative;
  width: 100%;
  height: 100%;
}

.mk-plant .tank {
  fill: none;
  stroke: var(--mk-ink);
  stroke-width: 3;
}

.mk-plant .water {
  fill: color-mix(in srgb, var(--mk-acc) 68%, transparent);
}

.mk-plant .pipe {
  fill: none;
  stroke: var(--mk-raised);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-plant .pipe.flow {
  stroke: var(--mk-acc);
  stroke-width: 3;
  stroke-dasharray: 6 10;
  animation: mk-flow 0.9s linear infinite;
}

.mk-plant .pump {
  fill: var(--mk-bg);
  stroke: var(--mk-ink);
  stroke-width: 3;
}

.mk-plant .fan {
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 3;
  stroke-linecap: round;
}

.mk-n--plant {
  position: absolute;
  left: 49%;
  top: 42%;
  translate: -50% -50%;
  font-size: 1.5em;
}

.mk-plant__t {
  position: absolute;
  left: 49%;
  bottom: 4%;
  translate: -50% 0;
  white-space: nowrap;
}

.mk-board {
  position: relative;
  display: grid;
  place-items: end center;
  width: 14em;
  height: 8em;
  padding-bottom: 0.7em;
  border: 2px solid var(--mk-ink);
  border-radius: 0.7em;
  background: color-mix(in srgb, var(--mk-acc) 14%, var(--mk-bg));
}

.mk-chipic {
  position: absolute;
  top: 1.4em;
  left: 2.2em;
  width: 3.6em;
  height: 3.6em;
  border: 2px solid var(--mk-ink);
  border-radius: 0.3em;
}

.mk-chipic--b {
  left: auto;
  right: 2.2em;
  width: 3em;
  height: 2em;
  top: 2.2em;
}

.mk-board .led {
  position: absolute;
  top: 0.9em;
  right: 0.9em;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  background: var(--mk-ok);
}

.mk-usb {
  position: absolute;
  top: 50%;
  left: calc(50% - 10.2em);
  width: 3.2em;
  height: 2em;
  margin-top: -1.2em;
  border: 2px solid var(--mk-ink);
  border-radius: 0.3em;
  background: var(--mk-raised);
}

.mk-usb::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 6em;
  height: 0.35em;
  margin-top: -0.175em;
  background: var(--mk-soft);
}

.mk-badge--dock {
  position: absolute;
  bottom: 1em;
  align-self: auto;
}

/* NexoCesta */
.mk-filecard {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.6em;
  padding: 0.4em 0.9em;
  border: 1.5px dashed var(--mk-acc);
  border-radius: 0.45em;
  font-size: 0.8em;
  font-weight: 800;
}

.mk-filecard i {
  width: 1em;
  height: 1.3em;
  border: 2px solid var(--mk-acc);
  border-radius: 0.15em;
}

.mk-cartgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5em;
}

.mk-card--item {
  justify-items: center;
  padding: 0.5em;
  font-size: 0.8em;
  text-align: center;
}

.mk-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0.3em;
  background:
    radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--mk-acc) 78%, transparent) 0 26%, transparent 27%),
    color-mix(in srgb, var(--mk-acc) 22%, var(--mk-raised));
}

.mk-qty {
  color: var(--mk-acc);
}

.mk-cart {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6em;
  margin-top: auto;
  padding: 0.45em 0.2em 0;
  border-top: var(--rule-hair) solid var(--mk-line);
}

.mk-json {
  color: var(--mk-soft);
}

/* Traste Cero */
.mk-tab {
  position: relative;
  flex: 1;
  min-height: 7em;
  margin-block: 0.4em;
  border-left: var(--rule-hair) solid var(--mk-line);
}

.mk-str {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--s) * 30% + 10%);
  height: 1px;
  background: var(--mk-soft);
  opacity: 0.6;
}

.mk-note {
  position: absolute;
  top: calc(var(--s) * 30% + 10%);
  left: var(--x);
  min-width: 1.5em;
  margin: -0.75em 0 0 -0.75em;
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
  background: var(--mk-surface);
  color: var(--mk-acc);
  font-family: var(--font-outlier);
  font-size: 0.95em;
  font-weight: 800;
  text-align: center;
}

.mk-head {
  position: absolute;
  top: -0.2em;
  bottom: -0.2em;
  left: 96%;
  width: 2px;
  background: var(--mk-acc);
}

.mk-voices {
  display: grid;
  gap: 0.5em;
}

.mk-voice {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.5em 0.7em;
  border: var(--rule-hair) solid var(--mk-line);
  border-radius: 0.45em;
  background: var(--mk-bg);
}

.mk-voice .mk-t {
  flex: none;
  width: 3.4em;
}

/* ¡Aguas, Salamanca! */
.mk-view:has(> .mk-run) {
  padding: 0.55em;
}

.mk-run {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: 0.5em;
  background: linear-gradient(var(--mk-bg), color-mix(in srgb, var(--mk-acc) 20%, var(--mk-bg)));
}

.mk-hill {
  position: absolute;
  inset: auto -10% 26% -10%;
  height: 34%;
  border-radius: 50% 50% 0 0;
  background: color-mix(in srgb, var(--mk-acc) 26%, var(--mk-bg));
}

.mk-hill--far {
  inset: auto 20% 30% -30%;
  height: 46%;
  background: color-mix(in srgb, var(--mk-acc) 15%, var(--mk-bg));
}

.mk-ground {
  position: absolute;
  inset: auto 0 0;
  height: 26%;
  border-top: 2px solid var(--mk-ink);
  background: var(--mk-acc);
}

.mk-runner {
  position: absolute;
  bottom: 24%;
  left: 16%;
  width: 2.2em;
  height: 3.1em;
}

.mk-runner svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--mk-ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-obs {
  position: absolute;
  bottom: 24%;
  display: grid;
  place-items: center;
  width: 1.9em;
  height: calc(var(--hh) * 1.25em);
  border-radius: 0.25em 0.25em 0 0;
  background: var(--mk-ink);
  color: var(--mk-bg);
  font-weight: 800;
}

.mk-obs:nth-of-type(1) {
  left: 44%;
}

.mk-obs:nth-of-type(2) {
  left: 62%;
}

.mk-obs:nth-of-type(3) {
  left: 80%;
}

.mk-tap,
.mk-score {
  position: absolute;
  top: 0.8em;
  right: 0.9em;
  font-size: 0.85em;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.mk-tap {
  padding: 0.3em 0.9em;
  border: 2px solid var(--mk-ink);
  border-radius: 99em;
}

.mk-boss {
  position: absolute;
  right: 8%;
  bottom: 24%;
  width: 6em;
  height: 7em;
  border-radius: 1.4em 1.4em 0.4em 0.4em;
  background: var(--mk-ink);
}

.mk-boss::before,
.mk-boss::after {
  content: "";
  position: absolute;
  top: 2em;
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  background: var(--mk-warn);
}

.mk-boss::before {
  left: 1.3em;
}

.mk-boss::after {
  right: 1.3em;
}

.mk-hp {
  position: absolute;
  top: 0.9em;
  right: 8%;
  width: 6em;
  height: 0.6em;
  overflow: hidden;
  border-radius: 99em;
  background: var(--mk-raised);
}

.mk-hp i {
  display: block;
  width: 36%;
  height: 100%;
  background: var(--mk-warn);
}

.mk-row--rank b {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--mk-raised);
}

.mk-row--rank:first-of-type b {
  background: var(--mk-acc);
  color: var(--mk-on);
}

@keyframes mk-flow {
  to {
    stroke-dashoffset: -32;
  }
}

@keyframes mk-blink {
  50% {
    opacity: 0;
  }
}

/* Contenedores de lista y paneles de las pieles */
.mk-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
}

.mk-split {
  display: grid;
  flex: 1;
  grid-template-columns: 1.15fr 1fr;
  gap: 0.7em;
  min-height: 0;
}

.mk-split--qr {
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
}

.mk-split--plant {
  grid-template-columns: 1fr 1.25fr;
}

.mk-split > .mk-card {
  grid-template-rows: auto minmax(0, 1fr);
}

.mk-split > .mk-card > .mk-bars {
  height: 100%;
  min-height: 0;
}

.mk-list {
  display: grid;
  align-content: start;
  gap: 0.15em;
  min-width: 0;
}

.mk-card--qr {
  justify-items: center;
  gap: 0.5em;
}

.mk-items {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6em;
  min-height: 0;
}

.mk-plot {
  width: 100%;
  height: 3em;
}

.mk-plot polyline {
  fill: none;
  stroke: var(--mk-acc);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

/* ───────── Portada: una ventana cortada a la medida, con cinta métrica y costura ───────── */
.scene {
  position: relative;
  container-type: inline-size;
  width: min(100%, calc(var(--screen-h) * 0.96));
  margin-inline: auto;
}

.scene__sheet {
  position: relative;
  aspect-ratio: 6 / 5;
}

html.js:not(.story-ready) .scene__sheet,
html.js:not(.story-ready) .mscene__sheet {
  opacity: 0;
  animation: story-fallback 0s linear 4.5s forwards;
}

@keyframes story-fallback {
  to {
    opacity: 1;
  }
}

.scene__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.scene__svg--back {
  mask-image: radial-gradient(ellipse at center, var(--mock-mask) 52%, transparent 98%);
}

.s-grid {
  fill: none;
  stroke: color-mix(in srgb, var(--color-night-ink) 8%, transparent);
  stroke-width: 1;
}

.s-tape rect {
  fill: var(--color-accent);
}

.s-tape path {
  fill: none;
  stroke: var(--color-night);
  stroke-width: 1.1;
}

.s-tape path.maj {
  stroke-width: 1.6;
}

.s-tape text {
  fill: var(--color-night);
  font-family: var(--font-outlier);
  font-size: 7px;
  font-weight: 800;
}

.s-tape--v text {
  font-size: 6px;
  writing-mode: vertical-rl;
}

.s-cut {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
}

.s-seam {
  fill: none;
  stroke: var(--color-accent-hi);
  stroke-width: 2.6;
  stroke-dasharray: 9 7;
  stroke-linecap: round;
}

.s-path {
  stroke: none;
}

.s-pins circle {
  fill: var(--color-accent);
  stroke: var(--color-night);
  stroke-width: 1.4;
}

.s-pins .hi {
  fill: var(--color-accent-hi);
  stroke: none;
}

.s-needle {
  opacity: 0;
}

.s-needle .sh {
  fill: none;
  stroke: var(--color-night-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.s-needle ellipse {
  fill: none;
  stroke: var(--color-night-ink);
  stroke-width: 1.4;
}

.s-needle .th {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.s-label rect:first-child {
  fill: var(--color-accent);
}

.s-label .st {
  fill: none;
  stroke: var(--color-night);
  stroke-dasharray: 4 3;
  stroke-width: 1.2;
}

.s-label .a {
  fill: var(--color-night);
}

.s-label .b {
  fill: var(--color-paper);
}

.s-label text {
  fill: var(--color-night);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
}

.scene__win {
  --mk-bg: var(--color-paper);
  --mk-ink: var(--color-ink);
  --mk-soft: var(--color-muted);
  --mk-acc: var(--color-accent);
  --mk-on: var(--color-accent-ink);
  --mk-surface: var(--color-paper-2);
  --mk-raised: var(--color-paper-3);
  --mk-line: var(--color-rule);
  --mk-ok: var(--mock-ok-paper);
  --mk-warn: var(--mock-warn-light);
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 2.4cqw;
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: 2.5cqw;
  font-weight: 600;
  line-height: 1.25;
}

.scene__title {
  color: var(--color-ink-2);
  font-weight: 800;
}

.scene__skins {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--color-paper-2);
}

.skin {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  padding: 0.9em 1.1em;
  background: var(--color-paper-2);
}

.skin:not(.is-on) {
  visibility: hidden;
}

.skin .mk-card {
  background: var(--color-paper);
}

.hero .scene__win .mk-bars i,
.hero .scene__win .mk-bar i {
  background: var(--color-accent);
}

/* ───────── Método: medir con cinta, cortar y coser, entregar ───────── */
.mscene {
  position: relative;
  container-type: inline-size;
  width: min(100%, calc((var(--screen-h) - 10rem) * 1.42));
  margin-inline: auto;
}

.mscene__sheet {
  position: relative;
  aspect-ratio: 10 / 7;
}

.mscene__win {
  --mk-bg: var(--color-paper);
  --mk-ink: var(--color-ink);
  --mk-soft: var(--color-muted);
  --mk-acc: var(--color-accent);
  --mk-on: var(--color-accent-ink);
  --mk-surface: var(--color-paper-2);
  --mk-raised: var(--color-paper-3);
  --mk-line: var(--color-rule);
  --mk-ok: var(--mock-ok-paper);
  --mk-warn: var(--mock-warn-light);
  position: absolute;
  top: 13.333%;
  left: 8%;
  width: 84%;
  height: 74.286%;
  overflow: hidden;
  border-radius: 2cqw;
  background: var(--color-paper-2);
  color: var(--color-ink);
  font-size: 2.5cqw;
  font-weight: 600;
  line-height: 1.25;
}

.mscene__phase {
  position: absolute;
  inset: 0;
}

.mscene__phase:not(:last-of-type) {
  visibility: hidden;
}

.mscene__note {
  position: absolute;
  padding: 0.35em 0.9em;
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: 0.4em;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: 0.95em;
  font-weight: 800;
}

.mscene__blocks {
  position: absolute;
  inset: 7%;
  display: grid;
  grid-template: "a b" 1fr "c d" 1.2fr / 1.4fr 1fr;
  gap: 0.8em;
}

.mscene__block {
  border: 2px dashed var(--color-accent-deep);
  border-radius: 0.5em;
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.mscene__phase--3 .skin {
  inset: 0;
}

.mscene__scissors {
  opacity: 0;
}

.mscene__scissors path,
.mscene__scissors circle {
  fill: none;
  stroke: var(--color-accent-hi);
  stroke-linecap: round;
  stroke-width: 2.4;
}

.mscene__tag {
  position: absolute;
  right: 4%;
  bottom: 2%;
  display: grid;
  gap: 0.1em;
  padding: 0.55em 1.1em;
  border-radius: 0.4em;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: 2.6cqw;
  line-height: 1.15;
  transform-origin: 50% -1.6em;
}

.mscene__tag::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 1.6em;
  border-left: 1.5px solid var(--color-accent);
}

.mscene__tag i {
  position: absolute;
  top: 0.45em;
  left: 0.55em;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--color-night);
}

.mscene__tag b {
  padding-left: 0.9em;
  font-weight: 800;
}

.mscene__tag small {
  padding-left: 0.9em;
  font-size: 0.8em;
  font-weight: 700;
}

/* El método: copia a un lado y la escena de medidas al otro */
.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-3) var(--space-2xl);
}

@media (min-width: 60rem) {
  .method {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

.method__copy {
  display: grid;
  gap: var(--fit-3);
}

.method .stages {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--fit-1);
  margin-inline: 0;
  padding-inline: 0;
  overflow: visible;
}

.method .stage {
  flex: none;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3xs) var(--space-md);
  padding: var(--fit-1) 0 var(--fit-1) var(--space-md);
  border-top: 0;
  border-left: var(--rule-heavy) dashed color-mix(in srgb, var(--color-accent) 40%, transparent);
  transition: border-color var(--dur-long) var(--ease-out);
}

.method .stage .num {
  grid-row: 1 / span 2;
  font-size: var(--text-section);
}

.method .stage h3 {
  grid-column: 2;
  font-size: var(--text-title);
}

.method .stage > p {
  grid-column: 2;
  grid-row: 2;
  max-width: 34ch;
  font-size: var(--text-sm);
}

.method .stage > .link {
  display: none;
}

.method .stage.is-now {
  border-left-style: solid;
  border-left-color: var(--color-accent);
}

@media (max-width: 59.98rem) {
  .method {
    gap: var(--fit-2);
  }

  .method__copy {
    display: contents;
  }

  .method .head {
    order: 0;
  }

  .method .mscene {
    order: 1;
  }

  .method .stages {
    order: 2;
    gap: var(--space-2xs);
  }

  .method .stage {
    flex: none;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    padding-block: var(--space-2xs);
  }

  .method .stage .num {
    font-size: var(--text-xl);
  }

  .method .stage h3 {
    font-size: var(--text-lg);
  }

  .method .stage > p {
    display: none;
  }
}

@media (max-width: 59.98rem) and (min-height: 800px) {
  .method .stage > p {
    display: block;
    max-width: none;
    font-size: var(--text-xs);
    line-height: 1.3;
  }

  .method .stage {
    row-gap: 0;
  }
}

/* ───────── Productos: explicadores animados ───────── */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--fit-2) var(--space-xl);
}

@media (min-width: 60rem) {
  .demo {
    grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  }
}

.demo__copy {
  display: grid;
  align-content: center;
  gap: var(--fit-2);
  min-width: 0;
}

.demo__copy h3 {
  font-size: var(--text-section);
  line-height: 1;
}

.demo__solve {
  display: grid;
  gap: var(--space-3xs);
  padding-left: var(--space-md);
  border-left: var(--rule-heavy) dashed var(--p-accent);
}

.demo__solve s {
  color: var(--tone-faint);
  font-weight: 700;
  text-decoration-color: var(--p-accent);
}

.demo__solve b {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.demo__steps {
  display: grid;
  gap: var(--space-3xs);
  list-style: none;
}

.demo__step {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: 44px;
  padding: var(--space-3xs) var(--space-sm) var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-card);
  color: var(--p-muted);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  overflow: hidden;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}

.demo__step b {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: 50%;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.demo__step:hover {
  color: var(--p-fg);
}

.demo__step[aria-current="step"] {
  background: color-mix(in srgb, var(--p-fg) 9%, transparent);
  color: var(--p-fg);
}

.demo__step[aria-current="step"] b {
  border-color: var(--p-accent);
  background: var(--p-accent);
  color: var(--p-on);
}

.demo__fill {
  position: absolute;
  inset: auto 0 0;
  height: var(--rule-heavy);
  background: var(--p-accent);
  transform: scaleX(var(--prog, 0));
  transform-origin: left center;
}

.demo__media {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
}

.demo .mk-frame {
  width: min(100%, calc((var(--screen-h) - 16rem) * 1.6));
}

.demo__ctrl {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: var(--rule-hair) solid var(--tone-line);
  border-radius: 50%;
  background: transparent;
  color: var(--p-fg);
  transition: border-color var(--dur-short) var(--ease-out);
}

.demo__ctrl[hidden] {
  display: none;
}

.demo__ctrl:hover {
  border-color: var(--p-accent);
}

.demo__ctrl i {
  display: block;
  width: 12px;
  height: 14px;
  border-inline: 4px solid currentColor;
}

.demo__ctrl[data-paused="true"] i {
  width: 0;
  height: 0;
  border-block: 7px solid transparent;
  border-inline: 0;
  border-left: 12px solid currentColor;
}

@media (max-width: 59.98rem) {
  .demo__media {
    order: -1;
  }

  .demo .mk-frame {
    width: min(100%, calc((var(--screen-h) - 25rem) * 1.6));
    margin-inline: auto;
  }

  .demo__copy {
    gap: var(--fit-1);
  }

  .demo__copy h3 {
    display: none;
  }

  .demo__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo__step {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: var(--space-xs);
    padding-inline: var(--space-2xs);
    font-size: var(--text-sm);
  }

  .demo__step b {
    width: 1.75rem;
    height: 1.75rem;
  }

  .demo__copy .actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 44px;
    align-items: center;
    gap: var(--space-sm);
  }

  .demo__copy .actions .btn {
    flex: none;
    width: auto;
  }

  .demo__copy .actions .link {
    font-size: var(--text-sm);
    line-height: 1.2;
  }

  .demo__copy .actions .demo__ctrl {
    grid-column: 3;
  }
}

@media (max-width: 22.5rem) {
  .demo__copy .actions {
    grid-template-columns: auto 44px;
    justify-content: space-between;
  }

  .demo__copy .actions .link {
    display: none;
  }
}

@media (max-width: 59.98rem) and (max-height: 780px) {
  .demo__solve s {
    display: none;
  }
}

/* Teléfonos bajos: el título cede su sitio al explicador, que sigue nombrado para lectores de pantalla. */
@media (max-width: 59.98rem) and (max-height: 700px) {
  #productos .head h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #productos .stack {
    gap: var(--fit-1);
  }
}

#productos .head h2 {
  max-width: none;
}

/* ───────── Costuras entre secciones y detalles de sastrería ───────── */
.screen:not(.hero):not([data-flow])::before {
  content: "";
  position: absolute;
  inset: 0 var(--gutter) auto;
  height: 0;
  border-top: var(--rule-heavy) dashed color-mix(in srgb, var(--color-accent) 64%, transparent);
  pointer-events: none;
}

html.js .screen:not(.hero):not([data-flow])::before {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1100ms var(--ease-in-out);
}

html.js .screen.is-seamed::before {
  clip-path: inset(0);
}

.seam-scissors {
  position: absolute;
  top: -11px;
  left: var(--gutter);
  z-index: 2;
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  opacity: 0;
  pointer-events: none;
}

.seam-scissors svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

html.js .screen.is-seamed .seam-scissors {
  animation: seam-cut 1100ms var(--ease-in-out) both;
}

@keyframes seam-cut {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  92% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(100vw - 2 * var(--gutter) - 22px), 0, 0);
  }
}

/* Puntada corta sobre cada título de sección */
.screen:not(.hero) .head > h2 {
  position: relative;
}

html.js .head > h2:first-child[data-fx]::before {
  content: "";
  position: absolute;
  top: calc(var(--fit-1) * -1.4);
  left: 0;
  width: 3.4rem;
  border-top: var(--rule-heavy) dashed var(--color-accent);
}

/* Etiqueta de ropa que cuelga sobre el contacto */
.garment {
  position: absolute;
  top: 0;
  right: clamp(1rem, 6vw, 6rem);
  z-index: 2;
  display: none;
  transform-origin: 50% 0;
  pointer-events: none;
}

@media (min-width: 60rem) and (min-height: 640px) {
  .garment {
    display: block;
  }
}

.garment::before {
  content: "";
  display: block;
  width: 0;
  height: clamp(1.5rem, 6svh, 4rem);
  margin-inline: auto;
  border-left: 1.5px solid var(--color-accent);
}

.garment span {
  display: grid;
  gap: var(--space-3xs);
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hair) solid var(--color-accent);
  border-radius: var(--radius-card);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1.15;
}

.garment small {
  font-size: var(--text-xs);
  font-weight: 700;
}

html.js .garment {
  animation: garment-swing 4.6s var(--ease-in-out) infinite alternate;
}

@keyframes garment-swing {
  from {
    transform: rotate(-3.5deg);
  }

  to {
    transform: rotate(3.5deg);
  }
}

/* Cinta métrica sobre el pie */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--color-night) 0 1px, transparent 1px 8px) 0 100% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--color-night) 0 1.5px, transparent 1.5px 40px) 0 100% / 100% 9px no-repeat,
    var(--color-accent);
  opacity: 0.92;
}

/* El flujo de la portada es una escena: sin JavaScript conserva el cuadro final */
html.has-story {
  scroll-snap-type: none;
}

/* La escena ocupa lo que deja el titular: alto de pantalla menos titular, texto, botones y espacios. */
@media (max-width: 59.98rem) {
  .hero {
    --h1-size: var(--text-hero);
  }

  .scene {
    width: min(100%, calc((var(--screen-h) - 4.3 * var(--h1-size) - 14rem - 5 * var(--fit-3)) * 1.2));
  }
}

@media (max-width: 59.98rem) and (max-height: 700px) {
  .scene {
    display: none;
  }
}

/* Tabletas y portátiles chicos: más aire para el texto y menos alto para la maqueta */
@media (min-width: 40rem) and (max-width: 59.98rem) {
  .hero {
    --h1-size: min(var(--text-hero), 4.4rem);
  }

  .hero .head h1 {
    font-size: var(--h1-size);
  }

  .demo .mk-frame {
    width: min(100%, calc((var(--screen-h) - 35rem) * 1.6));
  }
}

@media (min-width: 60rem) and (max-width: 79.99rem) {
  .demo {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .demo__step {
    font-size: var(--text-sm);
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* ── 90-motion.css ── */
/* ───────── Movimiento: los veinte efectos de texto y los revelados ─────────
   Se activan con data-fx="..." desde js/zolvek.js. Contenido visible por defecto: el estado inicial sólo existe
   bajo html.js, siempre con un temporizador de seguridad, y prefers-reduced-motion lo anula. */
:root {
  --fx-cyan: #00d9ff;
  --fx-red: #ff3158;
  --fx-ext: var(--color-accent);
}

.fx-w {
  display: inline-block;
}

.fx-word {
  white-space: nowrap;
}

.fx-c {
  display: inline-block;
  white-space: pre;
}

.fx-count {
  font-variant-numeric: tabular-nums;
}

/* Revelados: recorte ascendente, nunca opacidad. */
html.js [data-reveal]:not(.is-in) {
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 24px, 0);
  animation: fx-safety 0s linear 2.6s forwards;
}

html.js [data-reveal] {
  transition: clip-path 820ms var(--ease-out), transform 820ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}

html.js [data-reveal].is-in {
  clip-path: inset(-80px -80px -80px -80px);
}

@keyframes fx-safety {
  to {
    clip-path: inset(-80px -80px -80px -80px);
    transform: none;
  }
}

html.js [data-fx]:not(.fx-ready) {
  visibility: hidden;
  animation: fx-visible 0s linear 1.6s forwards;
}

@keyframes fx-visible {
  to {
    visibility: visible;
  }
}

/* 01 · Typewriter: texto escrito con cursor activo */
.fx-caret {
  display: inline-block;
  width: 0.09em;
  height: 1.05em;
  margin-left: 0.12em;
  background: currentColor;
  vertical-align: -0.14em;
  animation: fx-blink 1s steps(2, start) infinite;
}

.fx-caret.is-done {
  animation: none;
  visibility: hidden;
}

@keyframes fx-blink {
  to {
    visibility: hidden;
  }
}

/* 02 · Mask Rise: revelado vertical con overflow oculto */
html.js .fx-mask .fx-w {
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.12em 0.05em 0.18em;
  margin: -0.12em -0.05em -0.18em;
}

html.js .fx-mask .fx-wi {
  display: inline-block;
  transform: translate3d(0, 112%, 0);
}

html.js .fx-mask.is-in .fx-wi {
  transform: none;
  transition: transform 900ms var(--ease-out);
  transition-delay: calc(min(var(--i), 20) * 55ms + var(--d, 0) * 1ms);
}

/* 04 · Gradient Flow: gradiente de latón en movimiento continuo (una sola gama, ambos extremos son tokens) */
.fx-gradient {
  background: linear-gradient(100deg, var(--color-accent) 0%, var(--color-accent-hi) 30%, var(--color-accent) 60%, var(--color-accent-hi) 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
  animation: fx-flow 7s linear infinite;
  animation-play-state: paused;
}

.fx-gradient.is-in {
  animation-play-state: running;
}

.fx-gradient.is-offscreen {
  animation-play-state: paused;
}

@keyframes fx-flow {
  to {
    background-position: -240% 0;
  }
}

/* 05 · Word Stagger: entrada escalonada palabra por palabra */
html.js .fx-stagger .fx-w {
  visibility: hidden;
  transform: translate3d(0, 0.55em, 0);
  filter: blur(8px);
}

html.js .fx-stagger.is-in .fx-w {
  visibility: visible;
  transform: none;
  filter: blur(0);
  transition: transform 760ms var(--ease-out), filter 760ms var(--ease-out), visibility 0s linear;
  transition-delay: calc(min(var(--i), 28) * 38ms + var(--d, 0) * 1ms), calc(min(var(--i), 28) * 38ms + var(--d, 0) * 1ms), calc(min(var(--i), 28) * 38ms + var(--d, 0) * 1ms);
}

/* 06 · Blur In: del desenfoque a la nitidez */
html.js .fx-blur:not(.fx-split-words) {
  filter: blur(14px);
  transform: scale(1.035);
}

html.js .fx-blur:not(.fx-split-words).is-in {
  filter: blur(0);
  transform: none;
  transition: filter 1000ms var(--ease-out), transform 1000ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}

html.js .fx-blur.fx-split-words .fx-w {
  visibility: hidden;
  filter: blur(10px);
}

html.js .fx-blur.fx-split-words.is-in .fx-w {
  visibility: visible;
  filter: blur(0);
  transition: filter 800ms var(--ease-out), visibility 0s linear;
  transition-delay: calc(min(var(--i), 24) * 45ms + var(--d, 0) * 1ms), calc(min(var(--i), 24) * 45ms + var(--d, 0) * 1ms);
}

/* 07 · Letter Bounce: rebote elástico por letra */
html.js .fx-bounce .fx-c {
  visibility: hidden;
}

html.js .fx-bounce.is-in .fx-c {
  animation: fx-bounce 1000ms forwards;
  animation-delay: calc(var(--i) * 38ms + var(--d, 0) * 1ms);
}

@keyframes fx-bounce {
  0% {
    visibility: visible;
    transform: translate3d(0, -0.95em, 0) scale(0.9, 1.12);
    filter: blur(4px);
    animation-timing-function: cubic-bezier(0.3, 0, 0.8, 0.6);
  }

  44% {
    visibility: visible;
    transform: translate3d(0, 0.06em, 0) scale(1.1, 0.84);
    filter: blur(0);
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  66% {
    visibility: visible;
    transform: translate3d(0, -0.13em, 0) scale(0.97, 1.04);
    animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
  }

  84% {
    visibility: visible;
    transform: translate3d(0, 0.02em, 0) scale(1.02, 0.98);
  }

  100% {
    visibility: visible;
    transform: none;
  }
}

/* 08 · Marker Highlight: trazo de resaltador detrás del texto */
.fx-marker {
  padding: 0 0.14em;
  margin: 0 -0.14em;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-position: 0 58%;
  background-repeat: no-repeat;
  background-size: 100% 78%;
  color: var(--color-accent-ink);
  white-space: nowrap;
}

html.js .fx-marker {
  background-size: 0% 78%;
  color: inherit;
}

html.js .fx-marker.is-in {
  background-size: 100% 78%;
  color: var(--color-accent-ink);
  transition: background-size 900ms var(--ease-out) calc(200ms + var(--d, 0) * 1ms), color 240ms linear calc(520ms + var(--d, 0) * 1ms);
}

/* 10 · Rotating Word: carrusel 3D vertical, sólo la palabra visible vive en el DOM */
.fx-rotor {
  position: relative;
  display: inline-grid;
  vertical-align: baseline;
}

.fx-rotor::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.06em;
  height: 0.07em;
  border-radius: var(--space-3xs);
  background: var(--color-accent);
}

.fx-rotor > .fx-rw {
  grid-area: 1 / 1;
  display: inline-block;
  white-space: nowrap;
}

html.js .fx-rotor.is-live {
  perspective: 800px;
}

html.js .fx-rotor.is-live > .fx-rw {
  opacity: 0;
  transform: rotateX(-88deg) translate3d(0, 46%, 0);
  transform-origin: 50% 50% -0.5em;
  backface-visibility: hidden;
  /* La opacidad salta a mitad del giro (sin tonos intermedios): la palabra es siempre legible o está oculta. */
  transition: transform 720ms var(--ease-out), opacity 0s linear 330ms;
}

html.js .fx-rotor.is-live > .fx-rw.is-current {
  opacity: 1;
  transform: none;
}

html.js .fx-rotor.is-live > .fx-rw.is-leaving {
  opacity: 0;
  transform: rotateX(88deg) translate3d(0, -46%, 0);
}

/* 11 · Tracking Expand: expansión cinematográfica del letter-spacing */
.fx-track {
  letter-spacing: var(--fx-track-to, var(--tracking-display));
}

html.js .fx-track {
  letter-spacing: -0.08em;
}

html.js .fx-track.is-in {
  letter-spacing: var(--fx-track-to, var(--tracking-display));
  transition: letter-spacing 1700ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1ms);
}

/* 12 · Outline to Fill: de contorno lineal a relleno sólido */
.fx-outline {
  color: var(--fx-fill, currentColor);
}

html.js .fx-outline {
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.5px var(--fx-stroke, currentColor);
  background: linear-gradient(90deg, var(--fx-fill, currentColor) 50%, transparent 50%) 100% 0 / 200% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

html.js .fx-outline.is-in {
  background-position: 0 0;
  transition: background-position 1500ms var(--ease-out);
}

@supports (animation-timeline: view()) {
  html.js .fx-outline[data-fx-scroll] {
    transition: none;
    animation: fx-fill linear both;
    animation-timeline: view();
    animation-range: entry 15% cover 52%;
  }
}

@keyframes fx-fill {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

/* 13 · RGB Glitch: separación cromática cian y rojo */
.fx-glitch {
  position: relative;
  display: inline-block;
}

.fx-glitch::before,
.fx-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  white-space: inherit;
}

.fx-glitch::before {
  color: var(--fx-cyan);
}

.fx-glitch::after {
  color: var(--fx-red);
}

.fx-glitch.is-glitching::before {
  animation: fx-glitch-a 560ms steps(2, end) 1 both;
}

.fx-glitch.is-glitching::after {
  animation: fx-glitch-b 560ms steps(2, end) 1 both;
}

@keyframes fx-glitch-a {
  0% {
    opacity: 0.85;
    transform: translate(-3px, 0);
    clip-path: inset(8% 0 62% 0);
  }

  25% {
    transform: translate(3px, -1px);
    clip-path: inset(54% 0 14% 0);
  }

  50% {
    transform: translate(-2px, 1px);
    clip-path: inset(28% 0 42% 0);
  }

  75% {
    transform: translate(2px, 0);
    clip-path: inset(68% 0 6% 0);
  }

  100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0);
  }
}

@keyframes fx-glitch-b {
  0% {
    opacity: 0.85;
    transform: translate(3px, 1px);
    clip-path: inset(48% 0 20% 0);
  }

  25% {
    transform: translate(-3px, 0);
    clip-path: inset(12% 0 58% 0);
  }

  50% {
    transform: translate(2px, -1px);
    clip-path: inset(62% 0 10% 0);
  }

  75% {
    transform: translate(-2px, 1px);
    clip-path: inset(22% 0 48% 0);
  }

  100% {
    opacity: 0;
    transform: none;
    clip-path: inset(0);
  }
}

/* 14 · Wave: oscilación senoidal fluida entre letras */
.fx-wave .fx-c {
  animation: fx-wave 2400ms ease-in-out infinite;
  animation-delay: calc(var(--i) * -120ms);
  animation-play-state: paused;
}

.fx-wave.is-in .fx-c {
  animation-play-state: running;
}

.fx-wave.is-offscreen .fx-c {
  animation-play-state: paused;
}

@keyframes fx-wave {
  0%,
  100% {
    transform: translate3d(0, 0.05em, 0);
  }

  50% {
    transform: translate3d(0, -0.13em, 0);
  }
}

/* 15 · Letter Flip: rotación 3D en el eje Y */
html.js .fx-flip {
  perspective: 700px;
}

html.js .fx-flip .fx-c {
  visibility: hidden;
  transform: rotateY(-92deg);
  transform-origin: 50% 60%;
  backface-visibility: hidden;
}

html.js .fx-flip.is-in .fx-c {
  visibility: visible;
  transform: none;
  transition: transform 850ms var(--ease-out), visibility 0s linear;
  transition-delay: calc(var(--i) * 55ms + var(--d, 0) * 1ms), calc(var(--i) * 55ms + var(--d, 0) * 1ms);
}

/* 16 · Squiggle Underline: subrayado SVG dinámico en onda */
.fx-squiggle {
  position: relative;
  display: inline-block;
}

.fx-squig {
  position: absolute;
  left: 0;
  bottom: -0.22em;
  width: 100%;
  height: 0.26em;
  overflow: visible;
  pointer-events: none;
}

.fx-squig path {
  fill: none;
  stroke: var(--fx-squiggle, var(--color-accent));
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

html.js .fx-squig path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

html.js .fx-squiggle.is-in .fx-squig path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1100ms var(--ease-out) 250ms;
}

/* 17 · 3D Extrude: extrusión volumétrica en capas (el color sale de --fx-ext) */
.fx-extrude {
  --fx-d: 1;
  text-shadow:
    calc(var(--fx-d) * 1px) calc(var(--fx-d) * 1px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 4%),
    calc(var(--fx-d) * 2px) calc(var(--fx-d) * 2px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 10%),
    calc(var(--fx-d) * 3px) calc(var(--fx-d) * 3px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 16%),
    calc(var(--fx-d) * 4px) calc(var(--fx-d) * 4px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 23%),
    calc(var(--fx-d) * 5px) calc(var(--fx-d) * 5px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 31%),
    calc(var(--fx-d) * 6px) calc(var(--fx-d) * 6px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 40%),
    calc(var(--fx-d) * 7px) calc(var(--fx-d) * 7px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 50%),
    calc(var(--fx-d) * 8px) calc(var(--fx-d) * 8px) 0 color-mix(in srgb, var(--fx-ext), var(--color-ink) 60%);
}

@property --fx-d {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

html.js .fx-extrude {
  --fx-d: 0;
}

html.js .fx-extrude.is-in {
  --fx-d: 1;
  transition: --fx-d 1100ms var(--ease-out);
}

/* 18 · Zoom Punch: impacto con onda expansiva concéntrica */
.fx-punch {
  position: relative;
  display: inline-block;
}

html.js .fx-punch {
  visibility: hidden;
  transform: scale(1.8);
}

.fx-punch::before,
.fx-punch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.7em;
  height: 1.7em;
  margin: -0.85em 0 0 -0.85em;
  border: 2px solid var(--p-accent, var(--color-accent));
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

html.js .fx-punch.is-in {
  visibility: visible;
  transform: none;
  transition: transform 560ms cubic-bezier(0.2, 1.35, 0.4, 1), visibility 0s linear;
  transition-delay: calc(var(--d, 0) * 1ms), calc(var(--d, 0) * 1ms);
}

html.js .fx-punch.is-in::before {
  animation: fx-ring 950ms var(--ease-out) calc(var(--d, 0) * 1ms + 140ms) 1 both;
}

html.js .fx-punch.is-in::after {
  animation: fx-ring 950ms var(--ease-out) calc(var(--d, 0) * 1ms + 320ms) 1 both;
}

@keyframes fx-ring {
  0% {
    opacity: 0.75;
    transform: scale(0.3);
  }

  100% {
    opacity: 0;
    transform: scale(3.6);
  }
}

/* 19 · Strike & Replace: tachado de la objeción vieja a la oferta nueva */
.fx-swap s {
  position: relative;
  color: var(--fx-old, inherit);
  text-decoration: none;
}

.fx-swap s::after {
  content: "";
  position: absolute;
  inset: 54% -0.12em auto;
  height: 0.11em;
  border-radius: var(--space-3xs);
  background: var(--fx-strike, var(--color-accent));
}

html.js .fx-swap s::after {
  transform: scaleX(0);
  transform-origin: left center;
}

html.js .fx-swap b {
  display: inline-block;
  visibility: hidden;
  transform: translate3d(0, 0.55em, 0);
}

html.js .fx-swap.is-in s::after {
  transform: scaleX(1);
  transition: transform 560ms var(--ease-out) calc(var(--d, 0) * 1ms + 150ms);
}

html.js .fx-swap.is-in b {
  visibility: visible;
  transform: none;
  transition: transform 640ms var(--ease-out) calc(var(--d, 0) * 1ms + 780ms), visibility 0s linear calc(var(--d, 0) * 1ms + 780ms);
}

/* 20 · Split Halves: fractura horizontal que revela la palabra oculta */
.fx-split {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.fx-split .fx-final {
  display: inline-block;
}

.fx-split .fx-ghost {
  display: none;
}

.fx-split .fx-sp {
  position: absolute;
  left: 50%;
  top: 0;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.fx-split .fx-sp-top {
  clip-path: polygon(0 0, 100% 0, 100% 46%, 91% 55%, 80% 44%, 69% 56%, 57% 45%, 45% 55%, 33% 44%, 21% 56%, 10% 45%, 0 54%);
}

.fx-split .fx-sp-bot {
  clip-path: polygon(0 54%, 10% 45%, 21% 56%, 33% 44%, 45% 55%, 57% 45%, 69% 56%, 80% 44%, 91% 55%, 100% 46%, 100% 100%, 0 100%);
}

html.js .fx-split.is-live .fx-final {
  visibility: hidden;
}

html.js .fx-split.is-live.is-in .fx-final {
  visibility: visible;
  transition: visibility 0s linear calc(var(--d, 0) * 1ms + 520ms);
}

html.js .fx-split.is-live.is-in .fx-sp-top {
  animation: fx-split-top 1100ms var(--ease-out) calc(var(--d, 0) * 1ms + 300ms) both;
}

html.js .fx-split.is-live.is-in .fx-sp-bot {
  animation: fx-split-bot 1100ms var(--ease-out) calc(var(--d, 0) * 1ms + 300ms) both;
}

html:not(.js) .fx-split .fx-sp {
  display: none;
}

@keyframes fx-split-top {
  0% {
    opacity: 1;
    transform: translateX(-50%);
  }

  22% {
    opacity: 1;
    transform: translate(-51%, -0.02em) rotate(-0.8deg);
  }

  100% {
    opacity: 0;
    transform: translate(-96%, -0.5em) rotate(-7deg);
  }
}

@keyframes fx-split-bot {
  0% {
    opacity: 1;
    transform: translateX(-50%);
  }

  22% {
    opacity: 1;
    transform: translate(-49%, 0.02em) rotate(0.8deg);
  }

  100% {
    opacity: 0;
    transform: translate(-4%, 0.5em) rotate(7deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal]:not(.is-in),
  html.js [data-fx]:not(.fx-ready) {
    clip-path: none;
    visibility: visible;
    transform: none;
  }

  .fx-split .fx-sp {
    display: none;
  }
}
