/* ===== Versión 2 · motion graphics editorial =====
   Serif en cursiva · fondos negro y crema · acentos coral y azul eléctrico · formas que se transforman entre escenas */
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; src: url(../assets/fonts/instrument-italic.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; src: url(../assets/fonts/instrument.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 100 900; font-stretch: 62% 125%; src: url(../assets/fonts/archivo.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 100 700; src: url(../assets/fonts/plexsans.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; src: url(../assets/fonts/plexmono.woff2) format('woff2'); }
:root {
  --black: #0c0b0a; --cream: #f0ebe2; --coral: #f04e37; --blue: #2a2ff0; --lime: #d9f43c;
  --ink: var(--cream); --muted: #8f887c; --line: #2b2825; --panel: rgba(255,255,255,.045);
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: 'IBM Plex Sans', system-ui, sans-serif; cursor: none; }
body.show-cursor { cursor: default; }
#vp { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; overflow: hidden; background: var(--black); transform-origin: center; }
#world { position: absolute; inset: 0; width: 1920px; height: 1080px; z-index: 0; }
#shapes { position: absolute; inset: 0; width: 1920px; height: 1080px; z-index: 1; pointer-events: none; overflow: visible; }
#grain { position: absolute; inset: -50%; pointer-events: none; z-index: 8; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} 100%{transform:translate(0,0)} }

/* Escenas: el fondo de cada una es un color pleno (negro, crema, coral, azul eléctrico o lima).
   --acc / --acc2 son los acentos que mejor contrastan con ese fondo. */
.slide { position: absolute; inset: 0; z-index: 2; visibility: hidden; color: var(--ink); }
.slide.on { visibility: visible; }
.slide.dark  { --ink: var(--cream); --muted: #948d80; --line: #2e2a26; --panel: rgba(240,235,226,.05); --acc: var(--coral); --acc2: var(--blue); }
.slide.cream { --ink: var(--black); --muted: #776e62; --line: #d3c9b6; --panel: rgba(12,11,10,.045); --acc: var(--blue); --acc2: var(--coral); }
.slide.coral { --ink: var(--black); --muted: rgba(12,11,10,.62); --line: rgba(12,11,10,.22); --panel: rgba(12,11,10,.08); --acc: var(--cream); --acc2: var(--blue); }
.slide.blue  { --ink: var(--cream); --muted: rgba(240,235,226,.68); --line: rgba(240,235,226,.25); --panel: rgba(240,235,226,.08); --acc: var(--lime); --acc2: var(--coral); }
.slide.lime  { --ink: var(--black); --muted: rgba(12,11,10,.6); --line: rgba(12,11,10,.2); --panel: rgba(12,11,10,.07); --acc: var(--blue); --acc2: var(--coral); }
.acc { color: var(--acc); } .acc2 { color: var(--acc2); }

/* Display pesado y extendido (como un reel de motion) */
.X { font: 900 150px/.86 'Archivo', sans-serif; font-stretch: 125%; text-transform: uppercase; letter-spacing: -.01em; margin: 0; }
.X.xl { font-size: 230px; } .X.l { font-size: 190px; } .X.m { font-size: 120px; } .X.s { font-size: 84px; } .X.xs { font-size: 60px; }

/* Marco tipo cámara: esquinas, etiquetas y código de tiempo */
#frame { position: absolute; inset: 0; z-index: 9; pointer-events: none; color: var(--hud, #f0ebe2); font: 500 17px/1 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; transition: color .3s; }
#frame .c { position: absolute; width: 34px; height: 34px; border-color: currentColor; border-style: solid; opacity: .8; }
#frame .c1 { left: 32px; top: 32px; border-width: 2px 0 0 2px; } #frame .c2 { right: 32px; top: 32px; border-width: 2px 2px 0 0; }
#frame .c3 { left: 32px; bottom: 32px; border-width: 0 0 2px 2px; } #frame .c4 { right: 32px; bottom: 32px; border-width: 0 2px 2px 0; }
#frame .f-tl { position: absolute; left: 82px; top: 44px; opacity: .75; } #frame .f-tr { position: absolute; right: 82px; top: 44px; opacity: .75; }
#frame .f-bl { position: absolute; left: 82px; bottom: 44px; opacity: .75; font-variant-numeric: tabular-nums; } #frame .f-br { position: absolute; right: 82px; bottom: 44px; opacity: .75; }
#frame .rec { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); margin-right: 8px; animation: rec 1s steps(2) infinite; }
@keyframes rec { 50% { opacity: .2; } }
#frame .pips { display: inline-flex; gap: 4px; margin: 0 14px; vertical-align: middle; }
#frame .pips i { width: 14px; height: 4px; background: currentColor; opacity: .3; } #frame .pips i.on { opacity: 1; }

/* Tipografía */
.k { font: 500 26px/1 'IBM Plex Mono', monospace; letter-spacing: .22em; text-transform: uppercase; color: var(--acc, var(--coral)); }
.H { font: italic 400 170px/.9 var(--serif); letter-spacing: -.02em; margin: 0; }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.01em; }
.H.xl { font-size: 260px; } .H.l { font-size: 210px; } .H.m { font-size: 130px; } .H.s { font-size: 92px; } .H.xs { font-size: 68px; }
.up { font-style: normal; }                       /* contraste: palabra recta dentro de un titular en cursiva */
.T { font-size: 48px; line-height: 1.24; margin: 0; font-weight: 400; }
.T.s { font-size: 38px; } .T b { font-weight: 600; }
.num { font: italic 400 360px/.82 var(--serif); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: lining-nums; }
.co { color: var(--coral); } .bl { color: var(--blue); } .muted { color: var(--muted); }
.src { position: absolute; left: 118px; right: 400px; bottom: 82px; font-size: 21px; color: var(--muted); z-index: 3; margin: 0; }
.abs { position: absolute; }

/* Piezas */
.logo { height: 116px; padding: 0 30px; background: #fff; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.cream .logo { box-shadow: 0 0 0 2px var(--line); }
.logo img { height: 76px; width: auto; max-width: 330px; object-fit: contain; display: block; }
.logo.sq { width: 116px; padding: 0; } .logo.sq img { height: 92px; border-radius: 14px; }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 30px; padding: 36px 40px; }
.chip { display: inline-block; padding: 16px 30px; border-radius: 999px; border: 2px solid var(--ink); font-size: 38px; font-weight: 500; }
.chip.acc { border-color: var(--acc); }
.stamp { display: inline-block; font: 900 52px/1 'Archivo'; font-stretch: 125%; letter-spacing: .02em; text-transform: uppercase; color: var(--coral); border: 7px solid var(--coral); padding: 10px 24px; border-radius: 12px; transform: rotate(-7deg); background: rgba(12,11,10,.55); }
.cream .stamp { background: rgba(242,234,217,.8); }
.rule { position: absolute; height: 3px; background: var(--ink); transform-origin: left center; }
.dot { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); }
.meme { width: 560px; height: 560px; border-radius: 30px; overflow: hidden; position: relative; background: #111; box-shadow: 0 40px 100px rgba(0,0,0,.45); }
.meme img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meme .cap { position: absolute; left: 16px; right: 16px; text-align: center; font: 700 50px/1.02 'IBM Plex Sans', sans-serif; text-transform: uppercase; color: #fff; -webkit-text-stroke: 3px #000; paint-order: stroke fill; }
.meme .cap.t { top: 18px; } .meme .cap.b { bottom: 18px; }
.meme .via { position: absolute; right: 8px; top: 40%; font: 500 13px 'IBM Plex Mono'; color: rgba(255,255,255,.75); writing-mode: vertical-rl; }
.doc { background: #fbf7ee; color: #1b1b1f; border-radius: 20px; box-shadow: 0 40px 100px rgba(0,0,0,.35); }
.photo { border-radius: 26px; overflow: hidden; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag { display: inline-block; font: 600 22px 'IBM Plex Sans'; padding: 8px 14px; border-radius: 10px; background: var(--blue); color: #fff; }
.tag.co { background: var(--coral); }

/* HUD discreto */
#hud { position: fixed; left: 0; bottom: 0; height: 4px; width: 0; background: var(--coral); opacity: .6; z-index: 30; display: none; }
#hud.done { opacity: 0; transition: opacity .6s; }
body.clean #hud { display: none; }
#black { position: fixed; inset: 0; background: #000; z-index: 50; display: none; }
body.black #black { display: block; }
#help { position: fixed; left: 20px; bottom: 20px; z-index: 60; background: rgba(20,20,24,.95); color: #ddd; padding: 16px 20px; border-radius: 12px; font: 15px/1.6 'IBM Plex Mono', monospace; display: none; }
body.help #help { display: block; }

/* Presentador */
#presenter { position: fixed; inset: 0; background: #0f0e0d; color: #eee; padding: 20px 24px; font: 18px/1.5 'IBM Plex Sans'; overflow: auto; cursor: default; display: none; }
body.presenter #presenter { display: block; }
body.presenter #vp, body.presenter #hud { display: none; }
#presenter header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #2b2b33; padding-bottom: 12px; margin-bottom: 16px; }
#presenter .t { font: italic 400 34px var(--serif); } #presenter .n { font: 500 20px 'IBM Plex Mono'; color: #ff6a55; margin-right: 10px; }
#presenter .clk b { font: 600 30px 'IBM Plex Sans'; margin: 0 14px 0 4px; }
#presenter .dim { color: #8a8a93; font-size: 16px; }
#presenter .notes { font-size: 25px; line-height: 1.5; background: #1a1816; border-radius: 12px; padding: 18px 22px; }
#presenter .bar2 { height: 10px; background: #26262c; border-radius: 6px; overflow: hidden; margin: 14px 0 6px; } #presenter .bar2 i { display: block; height: 100%; width: 0; background: #ff6a55; }
#presenter button { background: #23232a; color: #eee; border: 1px solid #3a3a44; border-radius: 10px; padding: 12px 18px; font: 600 17px 'IBM Plex Sans'; cursor: pointer; margin-right: 8px; }
#presenter button.go { background: #ff6a55; color: #160805; border-color: #ff6a55; }

.slide p, .slide h1, .slide h2, .slide h3 { margin: 0; }
.X, .num { white-space: nowrap; }

/* Video de espera en loop antes de empezar (el primer clic lo quita) */
#intro { position: fixed; inset: 0; z-index: 45; background: #000; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
body.intro #intro { opacity: 1; visibility: visible; transition: opacity .8s ease; }
#intro video { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Una escena inactiva no muestra nada, aunque algún elemento tenga visibility: visible en línea */
.slide:not(.on), .slide:not(.on) * { visibility: hidden !important; }

/* Atajo a cualquier diapositiva (abajo a la derecha) */
#jump { position: absolute; right: 70px; bottom: 36px; z-index: 11; font: 500 17px/1 'IBM Plex Mono', monospace; letter-spacing: .12em; }
#jump-btn { cursor: pointer; background: transparent; color: var(--hud, #f0ebe2); border: 1.5px solid currentColor; border-radius: 999px; padding: 10px 16px; font: inherit; letter-spacing: inherit; opacity: .55; transition: opacity .2s; }
#jump-btn:hover, #jump.open #jump-btn { opacity: 1; }
#jump-list { position: absolute; right: 0; bottom: 56px; width: 980px; max-height: 860px; overflow: auto; background: rgba(12,11,10,.96); color: #f0ebe2; border: 1.5px solid #2e2a26; border-radius: 18px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
#jump-list[hidden] { display: none; }
#jump-list button { text-align: left; background: none; border: 0; color: inherit; font: 400 21px/1.25 'IBM Plex Sans', sans-serif; letter-spacing: 0; padding: 8px 10px; border-radius: 10px; cursor: pointer; display: flex; gap: 12px; }
#jump-list button b { font: 500 17px/1.5 'IBM Plex Mono'; color: #f04e37; min-width: 28px; }
#jump-list button:hover, #jump-list button.cur { background: rgba(240,235,226,.1); }
body.clean #jump { display: none; }
