@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("fonts/space-grotesk-600.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("fonts/source-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url("fonts/source-sans-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url("fonts/source-sans-600.woff2") format("woff2");
}

:root {
  --ink: #2b1224;
  --cream: #fff6ec;
  --cream-2: #ffe8d0;
  --gold: #ffc44d;
  --orange: #ff4e1a;
  --rose: #ff4d88;
  --mint: #14c4a4;
  --muted: #5c3144;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #07040c;
}
body {
  color: var(--cream);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 30px;
  line-height: 1.28;
}
body:not(.ready) #stage { visibility: hidden; }
button { font-family: inherit; }

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  overflow: hidden;
  background:
    radial-gradient(980px 560px at 96% -6%, rgba(255, 78, 26, 0.38), transparent 58%),
    radial-gradient(860px 640px at -4% 108%, rgba(255, 77, 136, 0.32), transparent 56%),
    radial-gradient(720px 480px at 78% 118%, rgba(20, 196, 164, 0.2), transparent 52%),
    linear-gradient(168deg, #2a1438 0%, #16091f 48%, #1c0c26 100%);
}
.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 6% 12%, rgba(255,255,255,.9), transparent),
    radial-gradient(2px 2px at 14% 38%, rgba(255,220,160,.8), transparent),
    radial-gradient(1.5px 1.5px at 22% 78%, rgba(255,255,255,.75), transparent),
    radial-gradient(2.5px 2.5px at 31% 18%, rgba(255,196,77,.9), transparent),
    radial-gradient(1.5px 1.5px at 40% 64%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 48% 28%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.5px 1.5px at 57% 84%, rgba(255,180,140,.75), transparent),
    radial-gradient(2px 2px at 66% 16%, rgba(255,255,255,.8), transparent),
    radial-gradient(2.5px 2.5px at 74% 46%, rgba(255,196,77,.85), transparent),
    radial-gradient(1.5px 1.5px at 82% 72%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 90% 22%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 94% 58%, rgba(180,255,230,.7), transparent),
    radial-gradient(2px 2px at 11% 92%, rgba(255,255,255,.6), transparent),
    radial-gradient(2px 2px at 52% 8%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.5px 1.5px at 86% 90%, rgba(255,196,77,.7), transparent);
}

.slides { position: absolute; inset: 0; }
.slide {
  position: absolute;
  inset: 0;
  padding: 42px 56px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(28px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 1;
  pointer-events: auto;
}

h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3, .kicker, .who, .meta, .digit, .coin-num, .cell, .bar-name {
  font-family: "Space Grotesk", "Source Sans 3", sans-serif;
}
.kicker {
  color: var(--gold);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.kicker.ink { color: var(--orange); }
h2 {
  font-size: 54px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff8f2;
}
h3 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
}
.lead {
  font-size: 30px;
  line-height: 1.28;
  color: #ffe7d4;
}
.card {
  background: linear-gradient(180deg, #fff8f1 0%, #ffefdf 100%);
  color: var(--ink);
  border-radius: 28px;
  padding: 22px 26px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 196, 77, 0.38);
}
.card p { font-size: 28px; line-height: 1.28; }
.note {
  font-size: 28px;
  line-height: 1.28;
  font-style: italic;
  color: #4c2438;
}
.grow { flex: 1 1 auto; min-height: 0; }
.top { flex: 0 0 auto; }
.tex { font-size: 1em; }
.katex { font-size: 1em; }
.formula { font-size: 34px; }

.pre { opacity: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 720px;
  gap: 22px;
  min-height: 0;
  align-items: center;
}
.split > * { min-width: 0; min-height: 0; }
.split.even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 1040px;
  justify-self: start;
}
.stack .lead { color: #ffe7d4; }
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 0;
}
.duo .card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.diagram {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

/* matrices */
.bmat, .stack-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
}
.bl, .brack {
  width: 14px;
  border: 5px solid currentColor;
  border-radius: 12px;
}
.bl { border-right: 0; }
.brack { border-left: 0; }
.bcol {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  font-size: 58px;
}

/* portada */
.cover { padding: 48px 64px; }
.cover-grid {
  height: 100%;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 28px;
}
.cover-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  height: 100%;
}
.logo-plate {
  display: inline-flex;
  background: #fff;
  border-radius: 16px;
  padding: 8px 16px 8px 12px;
  margin-bottom: 18px;
}
.logo { height: 74px; width: auto; display: block; }
.cover h1 {
  min-height: 1.05em;
  font-size: 78px;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: #fff8f2;
}
.caret {
  display: inline-block;
  width: 5px;
  height: 0.78em;
  margin-left: 6px;
  background: var(--orange);
  vertical-align: -2px;
  opacity: 0;
}
.slide.run .caret { animation: blink 0.7s steps(1, end) infinite; }
.slide.run .caret.off { animation: none; opacity: 0; }
@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.orange-line {
  width: 0;
  height: 8px;
  margin: 16px 0 14px;
  border-radius: 8px;
  background: var(--orange);
}
.slide.run .orange-line { animation: linegrow 0.55s ease 1.15s forwards; }
@keyframes linegrow { to { width: 240px; } }
.subtitle {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 600;
  color: #ffd7b0;
  line-height: 1.15;
}
.activity { margin-top: 8px; font-size: 28px; color: #ffc9a8; }
.who { font-size: 30px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.team { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.team li {
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #fff8f2;
}
.meta p { font-size: 28px; line-height: 1.25; color: #ffe1c8; }
.slide.run .who { animation: rise 0.45s ease 1.28s both; }
.slide.run .n1 { animation: rise 0.45s ease 1.48s both; }
.slide.run .n2 { animation: rise 0.45s ease 1.72s both; }
.slide.run .n3 { animation: rise 0.45s ease 1.96s both; }
.slide.run .n4 { animation: rise 0.45s ease 2.2s both; }

.hero-visual { position: relative; height: 100%; }
.orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed rgba(255, 196, 77, 0.55);
  box-shadow: inset 0 0 0 18px rgba(255, 78, 26, 0.08), 0 0 80px rgba(255, 77, 136, 0.16);
}
.hero-slot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.coin-body {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 32%, #fff3c9, #ffc44d 46%, #e08a16 78%);
  box-shadow: inset 0 0 0 12px rgba(122, 61, 12, 0.28), inset 0 0 0 22px rgba(255, 244, 214, 0.45);
}
.face svg { width: 62%; height: 62%; }
.face.back {
  opacity: 0;
  background: radial-gradient(circle at 35% 32%, #ffe0d6, #ff6a45 48%, #c4321c 80%);
  box-shadow: inset 0 0 0 12px rgba(90, 20, 12, 0.35), inset 0 0 0 22px rgba(255, 220, 200, 0.35);
}
.face.back::after {
  content: "";
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 10px solid #fff6ec;
  box-shadow: inset 0 0 0 16px rgba(255, 246, 236, 0.15);
}
.slide.run .cover-coin { animation: coinMorph 2.55s ease 0.25s both; }
.slide.run .cover-coin .coin-body { animation: squish 0.55s ease-in-out 0.4s 2; }
.slide.run .cover-coin .back { animation: flashface 0.55s steps(1, end) 0.4s 2; }
.hero-vec {
  background: var(--cream);
  color: var(--ink);
  border-radius: 32px;
  padding: 28px 32px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}
.slide.run .hero-vec { animation: popvec 0.6s cubic-bezier(.2,.8,.2,1) 1.85s both; }
@keyframes coinMorph {
  0% { opacity: 0; transform: scale(0.84); }
  12% { opacity: 1; transform: scale(1); }
  62% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.7); }
}
@keyframes squish {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0.08); }
  100% { transform: scaleX(1); }
}
@keyframes flashface {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
@keyframes popvec {
  0% { opacity: 0; transform: scale(0.86); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeout { to { opacity: 0; } }

/* intro */
.switchbox { display: flex; align-items: center; gap: 28px; }
.digit { position: relative; width: 150px; height: 150px; }
.digit span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 128px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}
.d1 { opacity: 0; }
.track {
  width: 300px;
  height: 124px;
  border-radius: 999px;
  background: #2b1224;
  padding: 8px;
}
.knob {
  display: block;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #ffd8c2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}
.slide.run .switchbox { animation: fadein 0.4s ease 0.25s both; }
.slide.run .d0 { animation: fadeout 0.25s ease 1.2s forwards; }
.slide.run .d1 { animation: fadein 0.25s ease 1.2s both; }
.slide.run .knob { animation: slideknob 0.45s ease 1.05s both; }
@keyframes slideknob { to { transform: translateX(176px); } }

.spin-coin .coin-body { width: 250px; height: 250px; }
.slide.run .spin-coin { animation: fadein 0.4s ease 0.2s both; }
.slide.run .spin-coin .coin-body { animation: squish 0.8s ease-in-out 0.25s infinite; }
.slide.run .spin-coin .back { animation: flashface 0.8s steps(1, end) 0.25s infinite; }
.slide.run .late { animation: rise 0.5s ease 1.15s both; }

/* superposicion */
.plane-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.plane {
  position: relative;
  width: 680px;
  height: 680px;
  flex: none;
  border-radius: 32px;
  background:
    radial-gradient(circle at 30% 70%, rgba(255, 196, 77, 0.14), transparent 46%),
    linear-gradient(180deg, #321848, #1a0c28);
  border: 1px solid rgba(255, 196, 77, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}
.plane svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.axis {
  stroke: #ffd98a;
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
}
.shaft, .basis, .super, .arc {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
}
.shaft, .super { stroke: #ff4e1a; stroke-width: 2.1; }
.basis.b0 { stroke: #14c4a4; stroke-width: 1.8; }
.basis.b1 { stroke: #ffc44d; stroke-width: 1.8; }
.arc { stroke: rgba(255, 216, 160, 0.45); stroke-width: 0.7; }
.ghost {
  stroke: rgba(255, 246, 236, 0.35);
  stroke-width: 0.45;
  stroke-dasharray: 1.6 1.5;
  opacity: 0;
}
.head { fill: #ff4e1a; opacity: 0; }
.head.h0 { fill: #14c4a4; }
.head.h1 { fill: #ffc44d; }
.plab {
  position: absolute;
  color: #fff6ec;
  font-size: 28px;
  line-height: 1;
}
.ax0 { left: 4%; top: 3%; }
.ax1 { right: 2%; bottom: 8%; }
.amp-v { left: 2%; top: 28%; color: var(--gold); font-size: 28px; }
.amp-h { left: 50%; bottom: 6%; color: var(--gold); font-size: 28px; }
.tip { left: 46%; top: 18%; font-size: 26px; color: #ffd0b8; }
.slide.run .plane .axis { animation: draw 0.7s ease 0.3s forwards; }
.slide.run .plane .shaft { animation: draw 0.85s ease 1.15s forwards; }
.slide.run .plane .head { animation: fadein 0.3s ease 1.9s forwards; }
.slide.run .plane .ghost { animation: fadein 0.4s ease 2.05s forwards; }
.slide.run .ax0, .slide.run .ax1 { animation: fadein 0.4s ease 0.85s forwards; }
.slide.run .amp, .slide.run .tip { animation: rise 0.45s ease 2.15s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* entrelazamiento */
.entangle {
  display: grid;
  grid-template-rows: 1.35fr 0.75fr;
  gap: 16px;
  min-height: 0;
}
.pair {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}
.drop-coin { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-coin .coin-body { width: 300px; height: 300px; }
.coin-tag {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
}
.pair-cap {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 28px;
  color: #ffe7d4;
}
.tether { width: 220px; height: 36px; align-self: center; }
.tether line {
  stroke: #ffd98a;
  stroke-width: 4;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}
.ent-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 0;
}
.ent-notes .card { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.slide.run .drop-coin { animation: dropcoin 0.8s cubic-bezier(.18,.8,.2,1) 0.25s both; }
.slide.run .tether { animation: fadein 0.4s ease 1.05s both; }
.slide.run .tether line { animation: pulse 1.5s ease-in-out 1.2s infinite; }
.slide.run .care { animation: rise 0.5s ease 1.45s both; }
@keyframes dropcoin {
  0% { opacity: 0; transform: translateY(-80px) rotate(-12deg); }
  25% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { stroke-opacity: 0.35; }
  50% { stroke-opacity: 1; }
}

/* plano del qubit */
.card.tight { padding: 14px 20px; }
.card.tight h3 { font-size: 28px; margin-bottom: 4px; }
.card.tight p { font-size: 28px; }
.eq { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.aside { font-size: 28px; color: var(--muted); }
.rule-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--orange);
  margin-right: 8px;
}
.stack > .note { color: #ffd7c2; }
.p5-0 { left: 8%; top: 2%; }
.p5-1 { right: 1%; bottom: 11%; }
.p5-v0 { left: 1%; top: 16%; color: #9af3df; font-size: 26px; }
.p5-v1 { left: 58%; bottom: 1%; color: #ffe09a; font-size: 26px; }
.p5-vs { left: 44%; top: 24%; color: #ffd0c0; font-size: 24px; }
.slide.run .plane5 .axis { animation: draw 0.6s ease 0.2s forwards; }
.slide.run .plane5 .basis { animation: draw 0.7s ease 0.85s forwards; }
.slide.run .plane5 .h0, .slide.run .plane5 .h1 { animation: fadein 0.3s ease 1.4s forwards; }
.slide.run .plane5 .super { animation: draw 0.8s ease 1.7s forwards; }
.slide.run .plane5 .hs { animation: fadein 0.3s ease 2.35s forwards; }
.slide.run .plane5 .arc { animation: draw 0.8s ease 2.2s forwards; }
.slide.run .p5-0, .slide.run .p5-1 { animation: fadein 0.35s ease 0.7s forwards; }
.slide.run .p5-v0, .slide.run .p5-v1 { animation: fadein 0.4s ease 1.35s forwards; }
.slide.run .p5-vs { animation: rise 0.45s ease 2.4s both; }
.slide.run .ruleline { animation: writein 0.9s ease 2.35s both; }
@keyframes writein {
  0% { opacity: 1; clip-path: inset(0 100% 0 0); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* compuertas */
.gates { align-items: stretch; }
.gate { gap: 6px; }
.gate h3 { font-size: 30px; }
.gate .def { font-size: 30px; }
.gate p { font-size: 28px; }
.gate-body {
  flex: 1;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 0;
}
.mathcol { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.rline, .result, .also { font-size: 28px; }
.swap { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); }
.ketlab { position: relative; width: 90px; height: 48px; font-size: 36px; }
.ketlab .from, .ketlab .to { position: absolute; left: 0; top: 0; }
.ketlab .to { opacity: 0; }
.vstack { position: relative; width: 96px; height: 210px; }
.cell {
  position: absolute;
  left: 0;
  width: 96px;
  height: 86px;
  display: grid;
  place-items: center;
  background: #2b1224;
  color: #fff8f2;
  border-radius: 14px;
  font-size: 42px;
  font-weight: 700;
}
.cell.hi { top: 0; }
.cell.lo { top: 118px; }
.slide.run .swap { animation: fadein 0.4s ease 0.3s both; }
.slide.run .cell.hi { animation: crossDown 0.85s ease 1.15s both; }
.slide.run .cell.lo { animation: crossUp 0.85s ease 1.15s both; }
.slide.run .ketlab .from { animation: fadeout 0.25s ease 2.05s forwards; }
.slide.run .ketlab .to { animation: fadein 0.3s ease 2.05s both; }
.slide.run .r1 { animation: rise 0.4s ease 1.35s both; }
.slide.run .r2 { animation: rise 0.4s ease 1.9s both; }
.slide.run .rx { animation: rise 0.4s ease 2.35s both; }
.slide.run .ax { animation: rise 0.4s ease 2.7s both; }
@keyframes crossDown {
  0% { transform: none; }
  50% { transform: translate(52px, 59px); }
  100% { transform: translate(0, 118px); }
}
@keyframes crossUp {
  0% { transform: none; }
  50% { transform: translate(-52px, -59px); }
  100% { transform: translate(0, -118px); }
}

.tiltbox {
  position: relative;
  width: 230px;
  height: 280px;
  justify-self: center;
  align-self: center;
}
.tax {
  position: absolute;
  background: #ffd98a;
  border-radius: 4px;
}
.tax.v { left: 28px; top: 16px; bottom: 24px; width: 4px; }
.tax.h { left: 28px; right: 10px; bottom: 24px; height: 4px; }
.tlab { position: absolute; font-size: 22px; color: var(--muted); }
.t0 { left: 0; top: 0; }
.t1 { right: 0; bottom: 0; }
.h-arrow {
  position: absolute;
  left: 4px;
  bottom: 8px;
  width: 48px;
  height: 200px;
  color: var(--orange);
  transform-origin: 50% 94%;
  opacity: 0;
}
.slide.run .h-arrow { animation: tilt 1.7s ease 1.05s both; }
@keyframes tilt {
  0% { opacity: 1; transform: rotate(0deg); }
  100% { opacity: 1; transform: rotate(45deg); }
}
.slide.run .h1 { animation: rise 0.4s ease 1.25s both; }
.slide.run .h2 { animation: rise 0.4s ease 1.9s both; }
.slide.run .rh { animation: rise 0.45s ease 2.55s both; }
.foot-note {
  font-size: 28px;
  line-height: 1.25;
  color: #2b1224;
  background: var(--cream);
  border-radius: 18px;
  padding: 12px 20px;
}

/* medicion */
.measure-copy, .measure-vis {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.measure-copy p { font-size: 28px; }
.probs {
  display: flex;
  gap: 28px;
  font-size: 36px;
  padding: 4px 0;
}
.measure-vis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bars {
  display: flex;
  gap: 16px;
  height: 100%;
  min-height: 0;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
}
.pval { font-size: 32px; color: var(--ink); min-height: 48px; }
.bar-track {
  flex: 1;
  width: 72%;
  min-height: 160px;
  background: rgba(43, 18, 36, 0.08);
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffb15a, #ff4e1a);
  transform: scaleY(0);
  transform-origin: bottom;
  border-radius: 18px;
}
.bar-name { font-size: 28px; font-weight: 700; color: var(--ink); }
.slide.run .bar-fill { animation: growbar 0.9s ease 0.35s both; }
.slide.run .pval { animation: fadein 0.4s ease 0.9s both; }
@keyframes growbar { to { transform: scaleY(1); } }
.fallzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  min-height: 0;
}
.fall-coin .coin-body {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}
.coin-num {
  font-size: 84px;
  font-weight: 700;
  color: #9a3412;
  opacity: 0;
}
.slide.run .fall-coin { animation: dropcoin 0.9s cubic-bezier(.18,.8,.2,1) 1.45s both; }
.slide.run .tumble { animation: tumble 0.9s linear 1.45s both; }
.slide.run .coin-num { animation: fadein 0.3s ease 2.3s both; }
@keyframes tumble {
  from { transform: rotate(-180deg); }
  to { transform: rotate(0deg); }
}
.collapse {
  position: relative;
  width: 180px;
  height: 180px;
}
.c-axis { position: absolute; background: #c9842a; border-radius: 3px; }
.c-axis.v { left: 22px; top: 8px; bottom: 22px; width: 4px; }
.c-axis.h { left: 22px; right: 8px; bottom: 22px; height: 4px; }
.c-arrow {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 8px;
  height: 112px;
  background: var(--orange);
  border-radius: 6px;
  transform-origin: 50% 100%;
  opacity: 0;
}
.c-arrow::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 14px solid var(--orange);
}
.clab { position: absolute; font-size: 22px; color: var(--ink); }
.clab.top { left: 32px; top: 0; }
.clab.right { right: 0; bottom: 24px; }
.slide[data-face="0"].run .c-arrow { animation: toZero 3.1s ease 0.35s both; }
.slide[data-face="1"].run .c-arrow { animation: toOne 3.1s ease 0.35s both; }
@keyframes toZero {
  0% { opacity: 0; transform: rotate(45deg); }
  14% { opacity: 1; transform: rotate(45deg); }
  68% { opacity: 1; transform: rotate(45deg); }
  100% { opacity: 1; transform: rotate(0deg); }
}
@keyframes toOne {
  0% { opacity: 0; transform: rotate(45deg); }
  14% { opacity: 1; transform: rotate(45deg); }
  68% { opacity: 1; transform: rotate(45deg); }
  100% { opacity: 1; transform: rotate(90deg); }
}

/* aplicaciones */
.apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  min-height: 0;
}
.app {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 20px 18px;
}
.app p { font-size: 28px; }
.app h3 { font-size: 30px; }
.ico {
  width: 100%;
  flex: 1 1 auto;
  min-height: 150px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: #2b1224;
  color: var(--gold);
}
.ico svg { width: 96px; height: 96px; }
.app:nth-child(2) .ico { background: #0e3d36; color: #b8fff0; }
.app:nth-child(3) .ico { background: var(--orange); color: #fff8f2; }
.app:nth-child(4) .ico { background: #8c1d4a; color: #ffd0e4; }
.app p { flex: 1; }
.devband h3 { margin-bottom: 6px; }
.devband p { font-size: 28px; }
.mark { border-radius: 8px; }
.slide.run .app:nth-child(1) { animation: rise 0.45s ease 0.15s both; }
.slide.run .app:nth-child(2) { animation: rise 0.45s ease 0.42s both; }
.slide.run .app:nth-child(3) { animation: rise 0.45s ease 0.69s both; }
.slide.run .app:nth-child(4) { animation: rise 0.45s ease 0.96s both; }
.slide.run .devband { animation: rise 0.45s ease 1.35s both; }
.slide.run .mark { animation: glow 1.15s ease 1.9s both; }
@keyframes glow {
  0% { background: transparent; color: inherit; }
  28% { background: var(--gold); color: var(--ink); }
  72% { background: var(--gold); color: var(--ink); }
  100% { background: transparent; color: inherit; }
}

/* limites */
.limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 0;
}
.limit {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  padding: 22px 22px 18px;
}
.vis {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.limit h3 { font-size: 32px; margin-bottom: 8px; }
.limit p { font-size: 28px; }
.fridge {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  height: 100%;
  width: 100%;
}
.fridge-body {
  width: 180px;
  height: 420px;
  border: 6px solid #2b1224;
  border-radius: 18px;
  position: relative;
  background: linear-gradient(180deg, #fff, #ffe8d6);
}
.handle {
  position: absolute;
  right: 12px;
  top: 28px;
  width: 8px;
  height: 42px;
  border-radius: 6px;
  background: var(--orange);
}
.shelf {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 78px;
  height: 6px;
  background: #2b1224;
  border-radius: 4px;
}
.thermo { position: relative; width: 96px; height: 460px; }
.tube {
  position: absolute;
  left: 28px;
  top: 0;
  width: 36px;
  height: 340px;
  border: 4px solid #2b1224;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}
.merc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 94%;
  background: linear-gradient(#ff6a45, #ffc44d);
  transform-origin: bottom;
  opacity: 0;
}
.bulb {
  position: absolute;
  left: 10px;
  top: 312px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ff6a45;
  border: 4px solid #2b1224;
}
.zero {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.noise-vis {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--orange);
}
.wave { width: 340px; height: 120px; }
.jvec {
  width: 24px;
  height: 220px;
  position: relative;
  opacity: 0;
}
.jvec span {
  position: absolute;
  left: 6px;
  bottom: 0;
  width: 10px;
  height: 180px;
  background: #2b1224;
  border-radius: 6px;
  transform-origin: 50% 100%;
}
.jvec span::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 14px solid #2b1224;
}
.laptop { color: #2b1224; display: grid; place-items: center; height: 100%; width: 100%; }
.laptop svg { width: 380px; height: 300px; }
.slide.run .limit:nth-child(1) { animation: fromLeft 0.55s ease 0.15s both; }
.slide.run .limit:nth-child(2) { animation: fromLeft 0.55s ease 0.4s both; }
.slide.run .limit:nth-child(3) { animation: fromLeft 0.55s ease 0.65s both; }
.slide.run .merc { animation: dropmerc 1.5s ease 1.05s both; }
.slide.run .bulb { animation: coolbulb 1.5s ease 1.05s both; }
.slide.run .jvec { animation: jitter 1.35s ease 1.15s both; }
@keyframes fromLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: none; }
}
@keyframes dropmerc {
  0% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 1; transform: scaleY(0.08); background: #c8fff4; }
}
@keyframes coolbulb {
  0% { background: #ff6a45; }
  100% { background: #9af3df; }
}
@keyframes jitter {
  0% { opacity: 1; transform: rotate(0deg); }
  18% { opacity: 1; transform: rotate(-9deg); }
  36% { opacity: 1; transform: rotate(8deg); }
  54% { opacity: 1; transform: rotate(-11deg); }
  72% { opacity: 1; transform: rotate(6deg); }
  100% { opacity: 1; transform: rotate(16deg); }
}

/* preguntas */
.qstage { position: relative; min-height: 0; }
[data-anim="super"] .stack { height: 680px; justify-content: space-between; }
[data-anim="super"] .example {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
[data-anim="super"] .lead { font-size: 32px; }
.qcard {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(180deg, #fff8f1, #ffedd8);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 196, 77, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: stretch;
  gap: 28px;
  padding: 36px 48px;
}
.qinner { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.qvis {
  height: 100%;
  min-height: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 78, 26, 0.16), transparent 62%),
    #2b1224;
  color: #fff6ec;
  display: grid;
  place-items: center;
  padding: 24px;
}
.bigbit {
  display: flex;
  gap: 28px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}
.bigbit span + span { color: var(--orange); }
.qvis .tex { font-size: 78px; color: #fff6ec; }
.qcard.on { opacity: 1; visibility: visible; transform: none; }
.qinner { max-width: 1500px; }
.qcard h3 {
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin-bottom: 12px;
}
.qcard .q {
  font-family: "Space Grotesk", sans-serif;
  font-size: 46px;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
}
.ans {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.ans p { font-size: 34px; line-height: 1.3; }
.ans .uline {
  display: block;
  height: 7px;
  margin-top: 12px;
  border-radius: 6px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}
.qcard.answered .ans {
  max-height: 200px;
  opacity: 1;
  margin-top: 26px;
  transition: max-height 0.45s ease, opacity 0.4s ease, margin-top 0.45s ease;
}
.qcard.answered .ans .uline {
  transform: scaleX(1);
  transition: transform 0.55s ease 0.12s;
}

/* cierre */
.takeaways {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 12px;
  min-height: 0;
}
.take {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 26px;
  min-height: 0;
}
.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
  box-shadow: 0 0 0 6px rgba(255, 78, 26, 0.18);
}
.take p { font-size: 30px; line-height: 1.25; }
.slide.run .take:nth-child(1) { animation: rise 0.45s ease 0.15s both; }
.slide.run .take:nth-child(2) { animation: rise 0.45s ease 0.45s both; }
.slide.run .take:nth-child(3) { animation: rise 0.45s ease 0.75s both; }
.slide.run .take:nth-child(4) { animation: rise 0.45s ease 1.05s both; }
.closing {
  background: var(--cream);
  color: var(--ink);
  border-radius: 24px;
  padding: 16px 28px 18px;
  min-height: 168px;
}
.typed {
  min-height: 78px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.thanks {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  opacity: 0;
}
.thanks .t {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
}
.thanks .uline {
  height: 6px;
  width: 100%;
  background: var(--orange);
  border-radius: 6px;
  transform: scaleX(0);
  transform-origin: left;
}
.slide.show-thanks .thanks { animation: rise 0.45s ease both; }
.slide.show-thanks .thanks .uline { animation: growx 0.5s ease 0.2s both; }
@keyframes growx { to { transform: scaleX(1); } }
