/* ==========================================================================
   Promill — estilos globales
   Tokens, tipografía y componentes compartidos por todas las vistas.
   Las piezas propias de una página viven en su archivo (home.css, galeria.css…).
   ========================================================================== */

/* ---- Fuentes (servidas desde public/fonts) ------------------------------ */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-mono-variable.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */

:root {
  /* Paleta Promill */
  --c1: #C0BFED;   /* lavanda: acentos y líneas sobre fondo oscuro */
  --c2: #A1ACDE;   /* azul pizarra: textos secundarios sobre fondo oscuro */
  --c3: #3D57DB;   /* azul real: acciones y acentos sobre fondo claro */
  --c4: #2E41B4;   /* azul profundo: estados activos y degradados */
  --c5: #171575;   /* índigo: superficie oscura principal */

  /* Derivados de la paleta */
  --indigo-2: #100F58;
  --indigo-3: #0A0A3D;
  --ink: #12113F;
  --ink-2: #474A75;
  --ink-3: #6A6E9B;
  --paper: #F5F6FD;
  --mist: #E8EAF8;
  --line: rgba(23, 21, 117, .12);
  --line-strong: rgba(23, 21, 117, .24);

  /* Superficie por defecto (clara). .s-papel y .s-oscuro redefinen estos valores */
  --fondo: #fff;
  --txt: var(--ink);
  --txt-2: var(--ink-2);
  --txt-3: var(--ink-3);
  --acento: var(--c3);
  --linea: var(--line);
  --linea-2: var(--line-strong);

  --shadow: 0 30px 70px -34px rgba(16, 15, 88, .5);
  --shadow-sm: 0 16px 36px -22px rgba(16, 15, 88, .42);
  --glow: 0 14px 26px -12px rgba(61, 87, 219, .8);

  --maxw: 1200px;
  --gutter: 24px;
  --r: 18px;
  --r-lg: 26px;

  --ff-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --ff-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-draw: cubic-bezier(.65, 0, .35, 1);

  /* Muescas de las pestañas recortadas (notch-card) */
  --notch-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M0 12h12C5.373 12 0 6.627 0 0v12z'/%3E%3C/svg%3E");
  --notch-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M12 12H0c6.627 0 12-5.373 12-12v12z'/%3E%3C/svg%3E");
  --notch-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M0 0h12C5.373 0 0 5.373 0 12V0z'/%3E%3C/svg%3E");
}

.s-papel {
  --fondo: var(--paper);
  background: var(--paper);
}

.s-oscuro {
  --fondo: var(--c5);
  --txt: #fff;
  --txt-2: #CFD0F3;
  --txt-3: var(--c2);
  --acento: var(--c1);
  --linea: rgba(192, 191, 237, .17);
  --linea-2: rgba(192, 191, 237, .36);
  background: var(--c5);
  color: #fff;
}

/* ---- Base --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.sin-scroll { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

::selection { background: var(--c3); color: #fff; }

h1,
h2 {
  color: var(--txt);
  font-family: var(--ff-display);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.02;
  letter-spacing: -.012em;
  text-wrap: balance;
}

h2 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }

/* La única palabra de acento de cada título */
h1 em,
h2 em {
  color: var(--acento);
  font-style: italic;
}

p { text-wrap: pretty; }

/* ---- Utilidades --------------------------------------------------------- */

.pm-wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.pm-section { padding-block: clamp(76px, 9vw, 124px); }

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

.saltar {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--c5);
  color: #fff;
  font-weight: 700;
  transform: translateY(-200%);
}

.saltar:focus { transform: none; }

.icono {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Eyebrow: abre cada sección ----------------------------------------- */

.pm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  color: var(--acento);
  font: 700 .72rem/1.3 var(--ff-sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.pm-eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 1.5px;
  background: currentColor;
}

/* ---- Encabezado de sección ---------------------------------------------- */

.pm-cabeza {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.pm-cabeza h2 { margin-top: 18px; }

.pm-cabeza p {
  margin-top: 18px;
  color: var(--txt-2);
  font-size: 1.08rem;
}

.pm-cabeza--partida {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px 64px;
  align-items: end;
  max-width: none;
}

.pm-cabeza--partida p { margin-top: 0; }
.pm-cabeza--partida .pm-enlace { margin-top: 18px; }

.pm-cabeza--centrada {
  margin-inline: auto;
  text-align: center;
}

.pm-cabeza--centrada .pm-eyebrow { justify-content: center; }

/* ---- Botones ------------------------------------------------------------ */

.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 15px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: none;
  font: 700 .96rem/1 var(--ff-sans);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, background-color .18s, color .18s, border-color .18s;
}

.pm-btn .icono {
  width: 18px;
  height: 18px;
  transition: transform .3s var(--ease);
}

.pm-btn:hover { transform: translateY(-2px); }
.pm-btn:hover .icono { transform: translate(2px, -2px); }

.pm-btn-primario {
  background: var(--c3);
  color: #fff;
  box-shadow: var(--glow);
}

.pm-btn-primario:hover { background: var(--c4); }

.pm-btn-fantasma {
  border-color: rgba(255, 255, 255, .36);
  color: #fff;
}

.pm-btn-fantasma:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
}

.pm-btn-claro {
  background: #fff;
  color: var(--c5);
  box-shadow: 0 14px 26px -14px rgba(10, 10, 61, .7);
}

.pm-btn-claro:hover { background: var(--c1); }

.pm-btn-linea {
  border-color: var(--line-strong);
  color: var(--c5);
}

.pm-btn-linea:hover {
  border-color: var(--c5);
  background: rgba(23, 21, 117, .04);
}

.pm-btn-sm {
  padding: 11px 18px;
  font-size: .88rem;
}

.pm-btn-sm .icono {
  width: 16px;
  height: 16px;
}

/* Enlace de texto con subrayado que se dibuja */
.pm-enlace {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 0 0 5px;
  border: 0;
  background: none;
  color: var(--acento);
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
}

.pm-enlace::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(.28);
  transform-origin: left;
  transition: transform .45s var(--ease);
}

.pm-enlace:hover::after { transform: scaleX(1); }

.pm-enlace .icono {
  width: 17px;
  height: 17px;
  transition: transform .3s var(--ease);
}

.pm-enlace:hover .icono { transform: translateX(3px); }

/* ---- Chip --------------------------------------------------------------- */

.pm-chip {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 8px 14px;
  border: 1px solid var(--linea-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--txt-2);
  font-size: .86rem;
  font-weight: 600;
}

.pm-chip .icono {
  width: 15px;
  height: 15px;
  color: var(--acento);
  stroke-width: 2.4;
}

/* ---- Pestaña recortada (técnica notch-card) ----------------------------- */
/* --bleed es el color de lo que está DETRÁS de la tarjeta: por defecto,
   el fondo de la sección. La pestaña y sus dos muescas se pintan de ese color. */

.notch {
  --bleed: var(--fondo);
  --radius: var(--r);
  --gap: 8px;
  --notch-size: 14px;
  position: relative;
}

.notch__body {
  border-radius: var(--radius);
  overflow: hidden;
}

.notch__tab {
  position: absolute;
  z-index: 3;
  background: var(--bleed);
}

.notch__tab::before,
.notch__tab::after {
  content: "";
  position: absolute;
  width: var(--notch-size);
  height: var(--notch-size);
  background: var(--bleed);
  -webkit-mask: var(--notch-shape) no-repeat;
  mask: var(--notch-shape) no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.notch__tab--bl {
  left: 0;
  bottom: 0;
  padding: var(--gap) var(--gap) 0 0;
  border-top-right-radius: var(--radius);
}

.notch__tab--bl::before { left: 0; bottom: 100%; --notch-shape: var(--notch-tl); }
.notch__tab--bl::after { left: 100%; bottom: 0; --notch-shape: var(--notch-tl); }

.notch__tab--br {
  right: 0;
  bottom: 0;
  padding: var(--gap) 0 0 var(--gap);
  border-top-left-radius: var(--radius);
}

.notch__tab--br::before { right: 0; bottom: 100%; --notch-shape: var(--notch-tr); }
.notch__tab--br::after { right: 100%; bottom: 0; --notch-shape: var(--notch-tr); }

.notch__tab--tl {
  left: 0;
  top: 0;
  padding: 0 var(--gap) var(--gap) 0;
  border-bottom-right-radius: var(--radius);
}

.notch__tab--tl::before { left: 0; top: 100%; --notch-shape: var(--notch-bl); }
.notch__tab--tl::after { left: 100%; top: 0; --notch-shape: var(--notch-bl); }

.notch__pill {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 11px;
  background: var(--c3);
  color: #fff;
  font: 500 .72rem/1 var(--ff-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---- Espécimen: pieza ovalada sobre sus ejes de centro ------------------ */

.espec {
  --eje: rgba(192, 191, 237, .34);
  --aro: rgba(192, 191, 237, .42);
  position: relative;
  display: grid;
  place-items: center;
  container-type: size;
  aspect-ratio: 4 / 3;
}

/* Ejes de centro como en un plano: trazo largo, punto */
.espec::before,
.espec::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.espec::before {
  left: 3%;
  right: 3%;
  top: 50%;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--eje) 0 14px, transparent 14px 18px, var(--eje) 18px 20px, transparent 20px 24px);
}

.espec::after {
  top: 4%;
  bottom: 4%;
  left: 50%;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--eje) 0 14px, transparent 14px 18px, var(--eje) 18px 20px, transparent 20px 24px);
}

.espec-lente {
  position: relative;
  z-index: 1;
  display: block;
  /* "contain" dentro de la escena, según la proporción de cada óvalo */
  width: min(82cqw, calc(82cqh * var(--ar)));
  aspect-ratio: var(--ar);
  transition: transform .7s var(--ease);
}

.espec-lente::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--aro);
  border-radius: 50%;
  transition: inset .7s var(--ease), border-color .4s;
}

.espec-lente img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Tarjeta de pieza (galería y portada) ------------------------------- */

.obras {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 28px;
}

.obra { position: relative; }
.obra[hidden] { display: none; }

/* Escena índigo con trama de puntos donde se presenta cada pieza o ilustración */
.escena {
  position: relative;
  background:
    radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(120% 130% at 85% -10%, var(--c4) 0%, var(--c5) 52%, var(--indigo-2) 100%);
}

.obra-flecha {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--c5);
  opacity: 0;
  transform: translate(-6px, 6px) scale(.9);
  transition: opacity .3s, transform .45s var(--ease);
}

.obra-flecha .icono {
  width: 18px;
  height: 18px;
}

.obra-pie { padding: 18px 4px 0; }

.obra h3 {
  color: var(--txt);
  font-family: var(--ff-display);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
}

.obra-abrir {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* Toda la tarjeta es clicable, pero el nombre accesible es el título */
.obra-abrir::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
}

.obra-meta {
  margin-top: 8px;
  color: var(--txt-3);
  font: 500 .72rem/1.4 var(--ff-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.obra-meta i {
  margin-inline: .35em;
  font-style: normal;
  opacity: .6;
}

.obra:hover .espec-lente,
.obra:focus-within .espec-lente { transform: scale(1.05); }

.obra:hover .espec-lente::after,
.obra:focus-within .espec-lente::after {
  inset: -13px;
  border-color: var(--c1);
}

.obra:hover .obra-flecha,
.obra:focus-within .obra-flecha {
  opacity: 1;
  transform: none;
}

.obra:hover .obra-abrir { color: var(--acento); }

/* ---- Portadilla de páginas interiores ----------------------------------- */

.portadilla {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 150% at 100% 0%, rgba(61, 87, 219, .6) 0%, rgba(46, 65, 180, .22) 38%, transparent 68%),
    var(--c5);
}

.portadilla-fondo {
  position: absolute;
  inset: 0;
  color: var(--c1);
  pointer-events: none;
}

.portadilla-fondo .trazo {
  position: absolute;
  right: -90px;
  bottom: -250px;
  width: 720px;
  max-width: none;
  opacity: .55;
}

.portadilla-contenido {
  position: relative;
  padding-block: clamp(56px, 7vw, 88px) clamp(60px, 7vw, 96px);
}

.migas {
  display: flex;
  gap: .7em;
  margin-bottom: 30px;
  color: var(--c2);
  font: 500 .74rem/1 var(--ff-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.migas a { transition: color .15s; }
.migas a:hover { color: #fff; }
.migas [aria-current] { color: #fff; }

.portadilla h1 {
  max-width: 17ch;
  margin-top: 18px;
  font-size: clamp(2.7rem, 5.6vw, 4.8rem);
}

.portadilla-bajada {
  max-width: 56ch;
  margin-top: 22px;
  color: var(--txt-2);
  font-size: 1.12rem;
}

.portadilla-linea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--linea-2);
}

/* ---- Cierre: llamado a cotizar ------------------------------------------ */

.pm-section--cierre { padding-block: clamp(56px, 7vw, 96px); }

.cta {
  --txt: #fff;
  --txt-2: #D5D7F6;
  --acento: var(--c1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(40px, 5vw, 68px) clamp(28px, 5vw, 64px);
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(120deg, var(--c5) 0%, var(--c4) 100%);
  box-shadow: var(--shadow);
  color: #fff;
}

.cta-fondo {
  position: absolute;
  inset: 0;
  color: var(--c1);
  pointer-events: none;
}

.cta-fondo .trazo {
  position: absolute;
  right: -40px;
  top: -210px;
  width: 620px;
  max-width: none;
  opacity: .5;
}

.cta-texto {
  position: relative;
  max-width: 600px;
}

.cta h2 {
  margin-top: 16px;
  font-size: clamp(2rem, 3.6vw, 3rem);
}

.cta p {
  margin-top: 14px;
  color: var(--txt-2);
  font-size: 1.06rem;
}

.cta-acciones {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: none;
}

/* ---- Páginas de error (404, 419, 429) ------------------------------------ */

.falla {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 150% at 100% 0%, rgba(61, 87, 219, .6) 0%, rgba(46, 65, 180, .22) 38%, transparent 68%),
    var(--c5);
}

.falla-fondo {
  position: absolute;
  inset: 0;
  color: var(--c1);
  pointer-events: none;
}

.falla-fondo .trazo {
  position: absolute;
  right: -80px;
  top: 50%;
  width: 760px;
  max-width: none;
  opacity: .5;
  transform: translateY(-62%);
}

.falla-contenido {
  position: relative;
  padding-block: clamp(72px, 10vw, 140px);
}

.falla-codigo {
  margin-bottom: 26px;
  color: var(--c1);
  font-family: var(--ff-display);
  font-size: clamp(5rem, 13vw, 9.5rem);
  font-style: italic;
  line-height: .85;
}

.falla h1 {
  margin-top: 18px;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.falla-texto {
  max-width: 50ch;
  margin-top: 20px;
  color: var(--txt-2);
  font-size: 1.1rem;
}

.falla-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

/* ---- Ilustraciones de línea ---------------------------------------------- */
/* Dibujos técnicos en SVG que se trazan solos dentro de una .escena.
   Clases de apoyo: .tenue (línea secundaria), .eje (línea de centro) y
   .a .b .c .d (rellenos suaves de la paleta que aparecen tras el contorno). */

.ilustra {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ilustra * {
  stroke: var(--c1);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ilustra .tenue {
  stroke-opacity: .46;
  stroke-width: 1.2;
}

.ilustra .eje {
  stroke-opacity: .5;
  stroke-width: 1;
  stroke-dasharray: 12 4 2 4;
}

.ilustra .a { fill: rgba(192, 191, 237, .2); }
.ilustra .b { fill: rgba(161, 172, 222, .3); }
.ilustra .c { fill: rgba(61, 87, 219, .55); }
.ilustra .d { fill: rgba(46, 65, 180, .6); }

.ilustra .punto {
  fill: var(--c1);
  stroke: none;
}

.ilustra text {
  fill: var(--c1);
  stroke: none;
  font: 500 10px/1 var(--ff-mono);
  letter-spacing: .06em;
}

/* Línea de cota de un plano: abre las cifras */
.cota {
  display: block;
  width: 150px;
  max-width: 72%;
  height: auto;
  margin: 0 auto 16px;
  overflow: visible;
}

.cota path {
  fill: none;
  stroke: var(--linea-2);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Subrayado a mano alzada bajo la palabra de acento: toma el color del texto */
.subraya {
  position: relative;
  white-space: nowrap;
}

.subraya::after {
  --trazo-subrayado: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 200 12%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M2 8C40 2 80 11 120 6S180 4 198 7%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 vector-effect=%22non-scaling-stroke%22/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  left: -.03em;
  right: -.03em;
  bottom: -.13em;
  height: .2em;
  background: currentColor;
  -webkit-mask: var(--trazo-subrayado) center / 100% 100% no-repeat;
  mask: var(--trazo-subrayado) center / 100% 100% no-repeat;
  opacity: .8;
}

/* ---- Movimiento --------------------------------------------------------- */
/* Las entradas solo ocultan contenido cuando hay JS (clase .js en <html>). */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .8s var(--ease);
  transition-delay: var(--retraso, 0s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Entrada escalonada de una portada: el contenedor recibe .is-listo y cada .entra
   aparece según su --rd. La animación de respaldo lo muestra igual a los pocos
   segundos si el JS que marca .is-listo llegara a fallar. */
.js .entra {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s ease, transform .9s var(--ease);
  transition-delay: var(--rd, 0s);
  animation: entra-respaldo .6s ease 6s forwards;
}

.js .is-listo .entra {
  opacity: 1;
  transform: none;
}

@keyframes entra-respaldo {
  to { opacity: 1; transform: none; }
}

.js .entra .subraya::after,
.js .reveal .subraya::after {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease-draw);
  transition-delay: calc(var(--rd, 0s) + .85s);
}

.js .is-listo .entra .subraya::after,
.js .reveal.in .subraya::after { clip-path: inset(0); }

/* ---- svg-draw-in: trazos que se dibujan solos ---------------------------- */
/* Un contenedor [data-draw] espera a entrar en pantalla (js/app.js le agrega .in)
   y entonces sus hijos se animan:
     .draw     traza el contorno (el elemento necesita pathLength="1")
     .relleno  además aparece su relleno cuando el contorno va avanzado
     .pop      hace brotar puntos
     .fill-in  funde lo que no puede trazarse (líneas punteadas, textos)
   Cada elemento elige su turno con --d y su duración con --dur.
   --ritmo comprime o estira todos los turnos de un contenedor. */

.trazo { overflow: visible; }

.js [data-draw] .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.js [data-draw].in .draw {
  animation: dibujar var(--dur, 1.2s) var(--ease-draw) forwards;
  animation-delay: calc(var(--d, 0s) * var(--ritmo, 1));
}

.js [data-draw] .pop {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
}

.js [data-draw].in .pop {
  animation: brotar .55s cubic-bezier(.34, 1.56, .64, 1) forwards;
  animation-delay: calc(var(--d, 0s) * var(--ritmo, 1));
}

.js [data-draw] .fill-in { opacity: 0; }

.js [data-draw].in .fill-in {
  animation: fundir .7s ease forwards;
  animation-delay: calc(var(--d, 0s) * var(--ritmo, 1));
}

.js [data-draw] .relleno { fill-opacity: 0; }

.js [data-draw].in .relleno {
  animation: dibujar var(--dur, 1.2s) var(--ease-draw) forwards, rellenar .7s ease forwards;
  animation-delay: calc(var(--d, 0s) * var(--ritmo, 1)), calc(var(--d, 0s) * var(--ritmo, 1) + var(--dur, 1.2s) * .6);
}

@keyframes dibujar { to { stroke-dashoffset: 0; } }
@keyframes brotar { to { transform: scale(1); } }
@keyframes fundir { to { opacity: 1; } }
@keyframes rellenar { to { fill-opacity: 1; } }

/* La "herramienta": un punto que recorre la trayectoria una vez dibujada */
.trazo-herramienta {
  fill: #fff;
  stroke: none;
  filter: drop-shadow(0 0 6px var(--c1));
}

.js [data-draw] .trazo-herramienta { opacity: 0; }

.js [data-draw].in .trazo-herramienta {
  animation: fundir .8s ease forwards;
  animation-delay: 2.4s;
}

/* Iconos que se trazan cuando su bloque entra en pantalla.
   Van dentro de un <use>, así que el guion se hereda desde el <svg> exterior. */
.js .icono-dibuja .icono {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.js .in .icono-dibuja .icono,
.js .icono-dibuja.in .icono {
  animation: dibujar 1.3s var(--ease-draw) forwards;
  animation-delay: calc(var(--retraso, 0s) + var(--i, 0) * .11s + .3s);
}

/* Entrada del espécimen: se trazan los ejes, luego el aro, y la foto se abre como un lente.
   --espera retrasa toda la secuencia, para escalonar varias piezas seguidas. */
@property --arco {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

.js .espec[data-draw]::before {
  transform: scaleX(0);
  transition: transform .9s var(--ease-draw) var(--espera, 0s);
}

.js .espec[data-draw]::after {
  transform: scaleY(0);
  transition: transform .9s var(--ease-draw) calc(var(--espera, 0s) + .1s);
}

.js .espec[data-draw].in::before,
.js .espec[data-draw].in::after { transform: none; }

.js .espec[data-draw] .espec-lente::after {
  --arco: 0deg;
  -webkit-mask-image: conic-gradient(#000 var(--arco), transparent 0);
  mask-image: conic-gradient(#000 var(--arco), transparent 0);
  transition: --arco 1.2s var(--ease-draw) calc(var(--espera, 0s) + .2s), inset .7s var(--ease), border-color .4s;
}

.js .espec[data-draw].in .espec-lente::after { --arco: 360deg; }

.js .espec[data-draw] .espec-lente img {
  clip-path: ellipse(0% 0% at 50% 50%);
  transition: clip-path 1.1s var(--ease) calc(var(--espera, 0s) + .35s);
}

.js .espec[data-draw].in .espec-lente img { clip-path: ellipse(50% 50% at 50% 50%); }

/* Líneas HTML que se dibujan de izquierda a derecha */
.js .linea {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-draw);
  transition-delay: var(--d, 0s);
}

.js .linea.in { transform: scaleX(1); }

/* Elementos que se "forman": la línea se dibuja y el texto entra escalonado por --i */
.forma { position: relative; }

.js .forma .forma-texto {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * .11s + .16s);
}

.js .forma.in .forma-texto {
  opacity: 1;
  transform: none;
}

/* Separador inferior que se dibuja junto con el elemento */
.forma--linea::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--linea-2);
  transform-origin: left;
  transition: transform 1s var(--ease-draw);
  transition-delay: calc(var(--i, 0) * .11s);
}

.js .forma--linea::after { transform: scaleX(0); }
.js .forma--linea.in::after { transform: scaleX(1); }

/* ---- Detalles interactivos ------------------------------------------------ */

/* Destello que cruza el botón principal */
.pm-btn-primario,
.pm-btn-claro {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.pm-btn-primario::before,
.pm-btn-claro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .3) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform .75s var(--ease);
}

.pm-btn-claro::before { background: linear-gradient(105deg, transparent 32%, rgba(61, 87, 219, .22) 50%, transparent 68%); }

.pm-btn-primario:hover::before,
.pm-btn-claro:hover::before { transform: translateX(130%); }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  /* Lo que se mueve sin fin simplemente no se muestra */
  .trazo-herramienta { display: none; }
}
