:root {
  --paper: #e7edf3;
  --ink: #162033;
  --muted: #5c6b80;
  --line: #d3dce6;
  --card: #fbfcfd;
  --blue: #2a62d6;
  --blue-soft: #e7eefb;
  --shadow: 0 18px 50px rgba(22, 32, 51, 0.12);
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.45;
}

.app { height: 100%; display: flex; flex-direction: column; }
.top, .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
}
.top { border-bottom: 1px solid var(--line); }
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.logo {
  width: 2rem;
  height: 2rem;
  display: block;
  /* Un logo que no es cuadrado (ERNE, de Naro) entra entero. */
  object-fit: contain;
}
.brand .times { color: var(--muted); font-weight: 500; }
.cover-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cover-brand .logo { width: 2.6rem; height: 2.6rem; }
.cover-brand .times { color: var(--muted); font-weight: 500; }
.client-logo { height: 1.65rem; width: auto; display: block; }
/* El logo del emisor cuando ya lleva su nombre (4Heart): solo, a la altura del texto. */
.logotipo { height: 1.4rem; width: auto; display: block; }
.cover-brand .logotipo { height: 1.9rem; }
/* La empresa en el pie, cuando la cabecera lleva la marca del producto. */
.maker { color: var(--muted); font-size: 0.86rem; font-weight: 600; margin-right: 0.4rem; }
.cover-brand .client-logo { height: 2.15rem; }

.fit {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  gap: 1.1rem;
  min-height: 0;
  flex: 1;
  align-items: start;
}
.quote {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0.2rem 0 0;
}
.lines { display: flex; flex-direction: column; gap: 0.45rem; }
.lines article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
}
.lines strong { display: block; }
.lines span { color: var(--muted); font-size: 0.95rem; }
.brought {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0.45rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}
.brought img {
  height: 28px;
  width: auto;
}
.adapt {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.adapt article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.adapt .num {
  font-family: var(--display);
  color: var(--blue);
  font-size: 1.4rem;
}
.adapt h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.adapt p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.cap {
  position: relative;
  height: 86px;
  margin: 0 0 0.45rem;
  border-radius: 12px;
  background: #eef3f8;
  border: 1px solid var(--line);
  overflow: hidden;
}
.cap-meter, .cap-wound {
  position: absolute;
  inset: 7px;
}
.cap-meter { display: grid; place-items: center; animation: cap-meter 8s ease-in-out infinite; }
.cap-lcd {
  width: 116px;
  background: #162033;
  color: #d7e4f5;
  border-radius: 8px;
  padding: 0.32rem 0.5rem 0.28rem;
  text-align: center;
}
.cap-lcd b {
  display: block;
  font-family: var(--display);
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1;
  animation: cap-lock 8s ease-in-out infinite;
}
.cap-lcd small {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.cap-beam {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  animation: cap-beam 8s ease-in-out infinite;
}
.cap-wound {
  display: grid;
  place-items: end center;
  padding-bottom: 0.35rem;
  background:
    radial-gradient(circle at 38% 42%, #e7b8b0 0 16px, transparent 17px),
    radial-gradient(circle at 64% 56%, #f3d2cb 0 20px, transparent 21px),
    #f7f1ee;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0;
  animation: cap-wound 8s ease-in-out infinite;
}
.cap-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
  animation: cap-tag 8s ease-in-out infinite;
}
.cap-food {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 7px 9px;
}
.cap-plate {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fbfcfd;
  border: 5px solid #d5dee8;
  position: relative;
}
.cap-plate i { position: absolute; border-radius: 50%; }
.cap-plate i:nth-child(1) { width: 20px; height: 14px; background: #7d9a62; left: 7px; top: 12px; }
.cap-plate i:nth-child(2) { width: 14px; height: 14px; background: #c4a36a; right: 7px; top: 14px; }
.cap-plate i:nth-child(3) { width: 24px; height: 10px; background: #d08a5a; left: 12px; bottom: 11px; border-radius: 7px; }
.cap-analysis b {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  animation: cap-wait 8s ease-in-out infinite;
}
.cap-analysis ol { margin: 0.15rem 0 0; padding: 0; list-style: none; font-size: 0.78rem; color: var(--ink); }
.cap-analysis li { opacity: 0; animation: cap-line 8s ease-in-out infinite; }
.cap-analysis li + li { margin-top: 0.12rem; animation-delay: 0.35s; }
@keyframes cap-beam {
  0% { top: 12px; opacity: 0; }
  8% { opacity: 1; }
  36% { top: 66px; opacity: 1; }
  46%, 100% { top: 66px; opacity: 0; }
}
@keyframes cap-lock {
  0%, 16% { opacity: 0.2; filter: blur(1.5px); }
  32%, 58% { opacity: 1; filter: none; }
  72%, 100% { opacity: 0; }
}
@keyframes cap-meter {
  0%, 58% { opacity: 1; }
  72%, 92% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes cap-wound {
  0%, 58% { opacity: 0; }
  72%, 92% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes cap-tag {
  0%, 28% { opacity: 0; }
  40%, 58% { opacity: 1; }
  72%, 100% { opacity: 0; }
}
@keyframes cap-wait {
  0%, 24% { opacity: 1; }
  40%, 100% { opacity: 0; }
}
@keyframes cap-line {
  0%, 32% { opacity: 0; transform: translateY(3px); }
  48%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cap-meter, .cap-lcd b, .cap-beam, .cap-wound, .cap-tag, .cap-analysis b, .cap-analysis li { animation: none; }
  .cap-wound, .cap-beam, .cap-analysis b { opacity: 0; }
  .cap-tag, .cap-analysis li, .cap-lcd b { opacity: 1; filter: none; }
}
.ico {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.adapt .ico { width: 1.35rem; height: 1.35rem; }
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.metrics li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.72rem 0.28rem 0.5rem;
  font-size: 0.92rem;
}
.menudos {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 1.6rem;
  align-items: center;
  min-height: 0;
  flex: 1;
}
.menudos .phone { width: 210px; justify-self: end; }
/* Un bloque de producto solo móvil (bibliotecas.ts): el texto a una medida que se lee y el teléfono a su lado. */
.menudos.movil { grid-template-columns: minmax(260px, 560px) 230px; justify-content: start; column-gap: 5rem; }
.menudos.movil .phone { justify-self: center; }
.doc-tag { color: var(--muted); font-size: 0.86rem; }
.stage { flex: 1; overflow: hidden; }
.slides {
  height: 100%;
  width: 100%;
  display: flex;
  transition: transform 0.38s ease;
}
.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  padding: 1.3rem 2.2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: hidden;
}
.kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 4.6vw, 4.3rem); max-width: 16ch; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: 28ch; }
.lead { font-size: 1.2rem; max-width: 42rem; margin: 0; }
.note { color: var(--muted); margin: 0; max-width: 46rem; }
.fine { color: var(--muted); font-size: 0.82rem; margin: 0; }

.cover {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: end;
  height: 100%;
}
.cover-copy { display: flex; flex-direction: column; gap: 0.85rem; padding-bottom: 0.4rem; }
.pair { display: flex; gap: 0.7rem; margin-top: 0.4rem; }
.pair article {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
}
.pair strong { display: block; font-size: 1.02rem; }
.pair span { color: var(--muted); font-size: 0.92rem; }
.cover-art { position: relative; height: 100%; min-height: 0; }
.cover-art .web {
  width: 92%;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.cover-art .phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 132px;
}
/* Solo móvil (Naro): el teléfono solo, centrado y más grande. */
.cover-art.solo-movil { display: flex; align-items: center; justify-content: center; }
.cover-art.solo-movil .phone { position: static; width: 230px; }

.split {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 1.2rem;
  min-height: 0;
  flex: 1;
}
.copy { display: flex; flex-direction: column; gap: 0.55rem; }
.copy ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.copy li + li { margin-top: 0.28rem; }
.frame {
  min-height: 0;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
}
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
/* Una ilustración, entera y centrada en vez de recortada como una captura. */
.frame.contain { background: #fff; }
.frame.contain img { object-fit: contain; object-position: center; }

.phone {
  background: #0e1522;
  border-radius: 28px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: #f4f1ea;
}

.tools { display: flex; align-items: center; gap: 0.7rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips button, .ghost, .nav button, .langs button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}
.langs { display: flex; }
.langs button:first-child { border-radius: 999px 0 0 999px; }
.langs button:last-child { border-radius: 0 999px 999px 0; margin-left: -1px; }
.langs button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.chips button[aria-current="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.ghost { border-radius: 999px; }

.mobile-stage {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.6rem;
  min-height: 0;
  flex: 1;
  align-items: center;
}
.mobile-stage .phone { width: 290px; border-radius: 38px; padding: 10px; }
.mobile-stage .phone img { border-radius: 29px; }
.picker { display: flex; flex-direction: column; gap: 0.55rem; max-width: 40rem; }
.picker h3 { margin: 0.4rem 0 0; font-family: var(--display); font-weight: 560; font-size: 1.75rem; letter-spacing: -0.02em; }
.picker p { margin: 0; color: var(--muted); font-size: 1.08rem; min-height: 4.5em; }

.protocol {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1.2rem;
  min-height: 0;
  flex: 1;
  align-items: start;
}
/* Plan y precio (plantilla estándar, cuicon-142). */
.price { width: 100%; border-collapse: collapse; margin: 0.6rem 0 0.4rem; font-size: 1rem; }
.price td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.price .unit { color: var(--muted); font-size: 0.9rem; }
.price .amount { text-align: right; white-space: nowrap; font-weight: 600; padding-left: 1rem; }
.price tfoot td { border-bottom: 0; font-weight: 700; font-size: 1.1rem; padding-top: 0.7rem; }

.rail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rail article {
  display: grid;
  grid-template-columns: 3.6rem 1fr;
  gap: 0.65rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.42rem 0.8rem;
}
.rail article.zero { border-color: var(--blue); background: var(--blue-soft); }
.rail .when {
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
  color: var(--blue);
}
.rail p { margin: 0; font-size: 0.98rem; }

.nav { border-top: 1px solid var(--line); }
.ctrl { display: flex; gap: 0.4rem; align-items: center; }
.dots { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: center; }
.dots button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 99px;
  border: 0;
  padding: 0;
  background: #b7c3d1;
  cursor: pointer;
}
.dots button[aria-current="true"] { background: var(--ink); width: 1.2rem; }
#pos { color: var(--muted); font-size: 0.85rem; min-width: 3.2rem; }

@media (max-width: 980px) {
  .cover, .split, .mobile-stage, .menudos, .menudos.movil { grid-template-columns: 1fr; }
  .menudos .phone { justify-self: start; }
  .slide { overflow: auto; }
  .cover-art { display: none; }
  .frame { min-height: 280px; }
}

/* Formato vertical (cuicon-159): las mismas secciones, una debajo de otra y con scroll, sin diapositivas. */
body.vertical { height: auto; }
.vertical .app { display: block; height: auto; }
.vertical .top { position: sticky; top: 0; z-index: 20; background: var(--paper); }
.vertical .stage { overflow: visible; }
.vertical .slides { display: block; height: auto; transform: none !important; transition: none; }
.vertical .slide {
  height: auto;
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.2rem 2.2rem;
  overflow: visible;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}
.vertical .slide:last-child { border-bottom: 0; }
.vertical .cover { min-height: min(78vh, 720px); }
.vertical .cover-art { min-height: 420px; }
.vertical .frame { min-height: 360px; }
.vertical .nav { display: none; }

@page {
  size: 338.67mm 190.5mm;
  margin: 0;
}

@media print {
  html, body {
    height: auto;
    background: var(--paper) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .top, .nav, .print-hide, #cuicon-email, #cuicon-legal { display: none !important; }
  .app { display: block; height: auto; background: var(--paper); }
  .stage { overflow: visible; height: auto; }
  .slides {
    display: block;
    width: auto;
    height: auto;
    transform: none !important;
  }
  .slide {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    break-after: page;
    break-inside: avoid;
    overflow: hidden;
  }
  .slide:last-child { break-after: auto; }
  .cover { grid-template-columns: 1.05fr 0.95fr; height: 100%; }
  .cover-art { display: block; }
  .split { grid-template-columns: minmax(240px, 340px) 1fr; }
  .mobile-stage { grid-template-columns: 300px 1fr; }
  .menudos { grid-template-columns: 1fr 230px; }
  .frame { min-height: 0; }
  .frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
  }
}

/* Motion. Only with .motion on <html> (deck.js sets it unless the reader asks for reduced motion). */
:root { --ease-out: cubic-bezier(0.22, 1, 0.36, 1); }

.motion .slide > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out);
}
.motion .slide.in > * { opacity: 1; transform: none; }
.motion .slide.in > :nth-child(2) { transition-delay: 0.08s; }
.motion .slide.in > :nth-child(3) { transition-delay: 0.16s; }
.motion .slide.in > :nth-child(4) { transition-delay: 0.24s; }
.motion .slide.in > :nth-child(5) { transition-delay: 0.32s; }

/* Screenshots settle into their frame. */
.motion .frame img { transform: scale(1.06); transition: transform 1.6s var(--ease-out) 0.2s; }
.motion .slide.in .frame img { transform: none; }
.frame { transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.frame:hover { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(22, 32, 51, 0.18); }

/* The phone rises in, slightly turned, then rests. */
.motion .mobile-stage .phone {
  transform: translateY(40px) rotate(-3deg);
  opacity: 0;
  transition: transform 1s var(--ease-out) 0.25s, opacity 0.7s ease 0.25s;
}
.motion .slide.in .mobile-stage .phone { transform: none; opacity: 1; }
.phone img { transition: opacity 0.18s ease, transform 0.35s var(--ease-out), filter 0.18s ease; }
.phone img.is-swapping { opacity: 0; transform: scale(0.97); filter: blur(2px); }
.picker h3, .picker p { transition: opacity 0.18s ease, transform 0.3s var(--ease-out); }
.picker.is-swapping h3, .picker.is-swapping p { opacity: 0; transform: translateY(6px); }

/* Cover: the panel slides in from the right, the phone rises over it and keeps floating. */
.motion .cover-art .web {
  opacity: 0;
  transform: translateX(48px) rotate(1.5deg);
  transition: opacity 0.9s ease 0.15s, transform 1.2s var(--ease-out) 0.15s;
}
.motion .cover-art .phone {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease 0.55s, transform 1.1s var(--ease-out) 0.55s;
}
.motion .slide.in .cover-art .web { opacity: 1; transform: none; }
.motion .slide.in .cover-art .phone { opacity: 1; transform: none; }
.motion .slide.in .cover-art .phone img { animation: float 6s ease-in-out 1.8s infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Measurement pills and protocol days arrive one after another. */
.motion .metrics li, .motion .rail article, .motion .pair article, .motion .lines article, .motion .adapt article {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out), border-color 0.2s, background 0.2s;
}
.motion .slide.in .metrics li, .motion .slide.in .rail article, .motion .slide.in .pair article,
.motion .slide.in .lines article, .motion .slide.in .adapt article { opacity: 1; transform: none; }
.motion .rail article { transform: translateX(-18px); }
.motion .metrics li:nth-child(n) { transition-delay: calc(0.25s + var(--i, 0) * 0.04s); }
.motion .rail article:nth-child(1) { transition-delay: 0.3s; }
.motion .rail article:nth-child(2) { transition-delay: 0.42s; }
.motion .rail article:nth-child(3) { transition-delay: 0.54s; }
.motion .rail article:nth-child(4) { transition-delay: 0.66s; }
.motion .rail article:nth-child(5) { transition-delay: 0.78s; }
.motion .rail article:nth-child(6) { transition-delay: 0.9s; }
.motion .pair article:nth-child(2), .motion .lines article:nth-child(2), .motion .adapt article:nth-child(2) { transition-delay: 0.12s; }
.motion .lines article:nth-child(3), .motion .adapt article:nth-child(3) { transition-delay: 0.24s; }
.motion .lines article:nth-child(4) { transition-delay: 0.36s; }
.metrics li:hover, .rail article:hover { border-color: var(--blue); background: var(--blue-soft); }
.motion .rail article.zero { animation: pulse-zero 2.4s ease-in-out 1.4s 2; }
@keyframes pulse-zero {
  0%, 100% { box-shadow: 0 0 0 0 rgba(42, 98, 214, 0); }
  50% { box-shadow: 0 0 0 6px rgba(42, 98, 214, 0.16); }
}

.chips button { transition: background 0.25s, color 0.25s, border-color 0.25s; }
.chips button:hover { border-color: var(--ink); }

/* Story bars: one per screen of the phone, so it is plain that each screen lasts a while and moves on. */
.story { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.4rem; }
.story-bars { display: flex; gap: 8px; }
.story-bars span { flex: 1; height: 12px; border-radius: 99px; background: #c9d3df; overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; }
.story-bars span.done i { background: var(--ink); }
.story-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.story-label { font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.story-label b { color: var(--blue); font-variant-numeric: tabular-nums; }
.story-pos {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.story-toggle {
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.story.paused .story-toggle { background: var(--blue); border-color: var(--blue); color: #fff; }
.story.paused .story-bars i { background: #8aa4cf; }

/* PDF and print take every section as it ends, never mid-animation. */
.pdf-capture .slide > *, .pdf-capture .slide * { transition: none !important; animation: none !important; }
/* A 720 px page fits the phone only at its earlier size. */
.pdf-capture .mobile-stage { grid-template-columns: 240px 1fr; }
.pdf-capture .mobile-stage .phone { width: 220px; }
.pdf-capture .story { display: none; }
.pdf-capture .tri img { height: 125px; }
@media print {
  .motion .slide > *, .motion .slide * { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
  .story { display: none; }
  .mobile-stage .phone { width: 220px; }
}

/* Tailored content: three kinds of material, how it is made, and examples per profile. */
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.tri article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tri img { display: block; width: 100%; height: 170px; object-fit: cover; object-position: center 70%; border-bottom: 1px solid var(--line); }
.tri h3 { margin: 0.7rem 1rem 0.2rem; font-family: var(--display); font-weight: 560; font-size: 1.3rem; letter-spacing: -0.02em; }
.tri p { margin: 0 1rem 0.9rem; color: var(--muted); font-size: 0.92rem; line-height: 1.38; }
.made { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; align-items: start; }
.made ol { margin: 0; padding: 0; list-style: none; counter-reset: made; display: flex; flex-direction: column; gap: 0.4rem; }
.made ol li { counter-increment: made; position: relative; padding-left: 2.1rem; font-size: 0.98rem; }
.made ol li::before { content: counter(made); position: absolute; left: 0; top: -0.2rem; font-family: var(--display); font-size: 1.45rem; color: var(--blue); }
.examples { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.examples li { background: var(--blue-soft); border-radius: 12px; padding: 0.45rem 0.8rem; font-size: 0.9rem; color: var(--ink); }
.examples strong { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.motion .tri article, .motion .made li { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.7s var(--ease-out); }
.motion .slide.in .tri article, .motion .slide.in .made li { opacity: 1; transform: none; }
.motion .tri article:nth-child(2) { transition-delay: 0.12s; }
.motion .tri article:nth-child(3) { transition-delay: 0.24s; }
.motion .made li:nth-child(1) { transition-delay: 0.35s; }
.motion .made li:nth-child(2) { transition-delay: 0.45s; }
.motion .made li:nth-child(3) { transition-delay: 0.55s; }
@media (max-width: 980px) { .tri, .made { grid-template-columns: 1fr; } }

/* Gamification concept: two phone screens drawn in HTML with the app's "Clínico" palette. */
.soon {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #e8b04a;
  color: #1a3a5c;
  letter-spacing: 0.08em;
}
.gx { display: grid; grid-template-columns: 560px 1fr; gap: 2.4rem; align-items: center; flex: 1; min-height: 0; }
.gx-phones { position: relative; height: 575px; }
.gx-phone { position: absolute; top: 0; left: 0; width: 262px; z-index: 2; }
.gx-phone.gx-second { left: 286px; top: 22px; z-index: 1; transform: rotate(3deg); }
.gx-screen {
  --g-ink: #1a3a5c;
  --g-blue: #3b7fd4;
  --g-green: #3daa8c;
  --g-paper: #fbfaf7;
  --g-line: #e7e2d8;
  --g-muted: #6b7f95;
  position: relative;
  aspect-ratio: 1206 / 2622;
  border-radius: 22px;
  overflow: hidden;
  background: var(--g-paper);
  color: var(--g-ink);
  font-family: "Plus Jakarta Sans", var(--sans);
  font-size: 10px;
  line-height: 1.3;
  padding: 0 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.gx-status { display: flex; justify-content: space-between; align-items: center; height: 26px; font-weight: 700; font-size: 10px; padding: 0 8px; }
.gx-status i { width: 62px; height: 17px; border-radius: 99px; background: #0e1522; }
.gx-batt { width: 18px; height: 8px; border-radius: 3px; border: 1.5px solid var(--g-ink); }
.gx-head { display: grid; grid-template-columns: 20px 1fr 20px; text-align: center; font-size: 13px; }
.gx-head span:first-child { font-size: 18px; line-height: 0.8; text-align: left; }
.gx-hero { background: #fff; border: 1px solid var(--g-line); border-radius: 16px; padding: 10px 10px 9px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gx-ring { position: relative; width: 104px; height: 104px; }
.gx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gx-ring circle { fill: none; stroke: #eceae4; stroke-width: 10; }
.gx-ring .gx-ring-fg { stroke: var(--g-green); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 44.9; }
.gx-ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gx-ring strong { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.gx-ring small { font-size: 9px; color: var(--g-muted); font-weight: 600; }
.gx-next { margin: 0; font-size: 9px; color: var(--g-muted); text-align: center; }
.gx-next b { color: var(--g-ink); }
.gx-week { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }
.gx-week li {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  background: #efece6;
  color: var(--g-muted);
}
.gx-week li.ok { background: var(--g-green); color: #fff; }
.gx-week li.today { background: #fff; color: var(--g-blue); border: 2px solid var(--g-blue); }
.gx-card { background: #fff; border: 1px solid var(--g-line); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.gx-card > small { font-size: 8px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--g-muted); }
.gx-card > b { font-size: 11.5px; }
.gx-card > span { font-size: 9px; color: var(--g-muted); }
.gx-bar { height: 7px; border-radius: 99px; background: #efece6; overflow: hidden; }
.gx-bar i { display: block; height: 100%; width: 60%; border-radius: inherit; background: var(--g-green); }
.gx-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 4px; margin: 2px 0 0; padding: 0; list-style: none; }
.gx-badges li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; }
.gx-medal {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e3f3ee;
  border: 2px solid var(--g-green);
  margin-bottom: 2px;
}
.gx-medal svg, .gx-big-medal svg { width: 58%; height: 58%; fill: none; stroke: var(--g-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gx-badges li.lock .gx-medal { background: #f1efea; border-color: #dcd8cf; }
.gx-badges li.lock .gx-medal svg { stroke: #a7b1bd; }
.gx-badges b { font-size: 8.5px; line-height: 1.15; }
.gx-badges small { font-size: 8px; color: var(--g-muted); }
.gx-kudos {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--g-ink);
  color: var(--g-paper);
  border-radius: 14px;
  padding: 8px 10px;
}
.gx-kudos > span {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--g-paper);
  color: var(--g-ink);
  font-size: 9px;
  font-weight: 800;
}
.gx-kudos p { margin: 0; font-size: 9.5px; }
.gx-kudos b { display: block; font-size: 10px; }

.gx-win { align-items: center; text-align: center; background: linear-gradient(180deg, #e9f5f1 0%, var(--g-paper) 55%); gap: 9px; }
.gx-win .gx-status { align-self: stretch; }
.gx-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gx-confetti i { position: absolute; top: -12px; left: var(--x); width: 6px; height: 10px; border-radius: 2px; background: var(--c); opacity: 0; }
.gx-win-kicker { margin: 44px 0 0; font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--g-green); }
.gx-big-medal {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef8f4;
  border: 5px solid var(--g-green);
  box-shadow: 0 14px 30px rgba(61, 170, 140, 0.28);
}
.gx-big-medal svg { stroke-width: 1.6; }
.gx-win h4 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.gx-win-copy { margin: 0 6px; font-size: 11px; color: var(--g-muted); }
.gx-week-full li { width: 24px; height: 24px; }
.gx-win-note { margin: 0; font-size: 9px; color: var(--g-muted); }
.gx-btn {
  align-self: stretch;
  border-radius: 14px;
  padding: 10px;
  background: var(--g-ink);
  color: var(--g-paper);
  font-weight: 700;
  font-size: 11px;
}
.gx-btn:first-of-type { margin-top: auto; }
.gx-btn-soft { background: transparent; color: var(--g-ink); border: 1px solid var(--g-line); }
.gx-copy { display: flex; flex-direction: column; gap: 0.8rem; }
.gx-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.gx-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.55rem 0.85rem; }
.gx-list b { display: block; }
.gx-list span { color: var(--muted); font-size: 0.93rem; }

/* Gamification motion: the ring closes, the week ticks in, the challenge fills, medals pop, confetti falls. */
.motion .gx-ring-fg { stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.8s var(--ease-out) 0.5s; }
.motion .slide.in .gx-ring-fg { stroke-dashoffset: 44.9; }
.motion .gx-hero .gx-week li.ok { background: #efece6; color: var(--g-muted); transition: background 0.3s, color 0.3s; }
.motion .slide.in .gx-hero .gx-week li.ok { background: var(--g-green); color: #fff; }
.motion .slide.in .gx-hero .gx-week li:nth-child(1) { transition-delay: 0.9s; }
.motion .slide.in .gx-hero .gx-week li:nth-child(2) { transition-delay: 1.1s; }
.motion .slide.in .gx-hero .gx-week li:nth-child(3) { transition-delay: 1.3s; }
.motion .slide.in .gx-week li.today { animation: gx-today 1.6s ease-in-out 1.6s infinite; }
@keyframes gx-today { 50% { box-shadow: 0 0 0 4px rgba(59, 127, 212, 0.18); } }
.motion .gx-bar i { width: 0; transition: width 1.4s var(--ease-out) 1.2s; }
.motion .slide.in .gx-bar i { width: 60%; }
.motion .gx-badges li { opacity: 0; transform: scale(0.6); transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
.motion .slide.in .gx-badges li { opacity: 1; transform: none; }
.motion .slide.in .gx-badges li:nth-child(1) { transition-delay: 1.5s; }
.motion .slide.in .gx-badges li:nth-child(2) { transition-delay: 1.62s; }
.motion .slide.in .gx-badges li:nth-child(3) { transition-delay: 1.74s; }
.motion .slide.in .gx-badges li:nth-child(4) { transition-delay: 1.86s; }
.motion .slide.in .gx-badges li:nth-child(5) { transition-delay: 1.98s; }
.motion .slide.in .gx-badges li:nth-child(6) { transition-delay: 2.1s; }
.motion .gx-kudos { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease 2.5s, transform 0.7s var(--ease-out) 2.5s; }
.motion .slide.in .gx-kudos { opacity: 1; transform: none; }
.motion .gx-second { opacity: 0; transform: translateX(40px) rotate(8deg); transition: opacity 0.8s ease 0.6s, transform 1.1s var(--ease-out) 0.6s; }
.motion .slide.in .gx-second { opacity: 1; transform: rotate(3deg); }
.motion .slide.in .gx-big-medal { animation: gx-pop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s both, gx-glow 2.8s ease-in-out 2.4s infinite; }
@keyframes gx-pop { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gx-glow { 50% { box-shadow: 0 14px 40px rgba(61, 170, 140, 0.5); } }
.motion .slide.in .gx-confetti i { animation: gx-fall 3.6s linear var(--d) infinite; }
@keyframes gx-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0); }
  8% { opacity: 1; }
  100% { opacity: 0.2; transform: translateY(560px) rotate(540deg); }
}
/* A 720 px PDF page: the two phones shrink as one piece, their inner sizes are fixed pixels. */
.pdf-capture .gx { grid-template-columns: 470px 1fr; }
.pdf-capture .gx-phones { transform: scale(0.82); transform-origin: top left; margin-bottom: -104px; }
.pdf-capture .gx-confetti { display: none; }
@media (max-width: 980px) { .gx { grid-template-columns: 1fr; } }
@media print { .gx-confetti { display: none; } }

/* The demo video: full width of the section, the poster stands in for it in the PDF. */
.video-wrap { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #0e1522; max-width: 1100px; }
.deck-video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0e1522; }
.video-poster { display: none; width: 100%; }
.pdf-capture .deck-video { display: none; }
.pdf-capture .video-poster { display: block; }
@media print { .deck-video { display: none; } .video-poster { display: block; } }
