/* Layout: una sala de edición. Fondo grafito para que manden las imágenes, cabezal ámbar de línea de tiempo y un color por película. */
:root {
  --bg: #14161B; --raise: #1E2128; --line: #30343E; --fg: #F1F0EA; --muted: #A4A8B3; --accent: #FFB224; --playhead: #FFB224;
  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: .98; letter-spacing: .005em; margin: 0; text-wrap: balance; text-transform: uppercase; }
p { margin: 0; }
.gut { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.wide { max-width: 1180px; margin-inline: auto; }

/* barra */
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-block: 18px; }
.bar a { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.bar .all { font: 500 15px var(--body); text-transform: none; letter-spacing: 0; }
.bar.solid { position: static; }

/* portada */
.intro { padding-block: 84px 28px; display: grid; gap: 14px; }
.intro h1 { font-size: clamp(58px, 12vw, 150px); }
.intro h1 em { font-style: normal; color: var(--accent); }
.intro p { font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); }
.reel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-block: 18px 22px; }
.strip.drag { cursor: grabbing; }
.strip.drag * { pointer-events: none; }
.film { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--raise); text-decoration: none; display: block; -webkit-user-drag: none; }
.film:hover h2 { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.film img, .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.film video { opacity: 0; transition: opacity .25s; }
.film.on video { opacity: 1; }
.film::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,11,14,.92), rgba(10,11,14,.05) 62%); pointer-events: none; }
.film .t { position: absolute; left: 18px; right: 18px; bottom: 15px; z-index: 2; display: grid; gap: 3px; }
.film h2 { font-size: clamp(36px, 5vw, 56px); }
.film .tag { font-size: 16px; line-height: 1.3; color: #E7E6E0; }
.film .num { position: absolute; z-index: 2; top: 13px; left: 16px; font: 500 13px var(--mono); color: #fff; text-shadow: 0 1px 5px #000; }
.hint { font: 400 14px var(--mono); color: var(--muted); }

/* héroe de película */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; overflow: hidden; background: #000; }
.hero img, .hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg), rgba(20,22,27,.3) 42%, rgba(0,0,0,.25) 78%, rgba(0,0,0,.55)); }
.hero .in { position: relative; z-index: 2; width: 100%; padding-block: 90px 26px; display: grid; gap: 12px; }
.hero h1 { font-size: clamp(66px, 14vw, 190px); text-shadow: 0 2px 26px rgba(0,0,0,.45); }
.hero .tl { font-size: clamp(20px, 2.6vw, 30px); font-weight: 500; line-height: 1.2; max-width: 26em; text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.hero .by { font: 400 14px var(--mono); color: #E0DFD8; text-shadow: 0 1px 6px #000; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 34px; padding-block: 14px 0; }
.stats div { display: grid; }
.stats b { font: 800 clamp(38px, 5vw, 58px)/1 var(--display); color: var(--accent); }
.stats span { font-size: 14.5px; color: var(--muted); }

/* módulos */
.mods { display: grid; gap: 84px; padding-block: 62px 34px; }
.mod { display: grid; gap: 16px; min-width: 0; }
.mod > * { min-width: 0; }
.mod h2 { font-size: clamp(38px, 6vw, 68px); }
.mod .bl { color: var(--muted); font-size: 19px; max-width: 34em; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.stage img, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage video { opacity: 0; transition: opacity .15s; }
.stage video.live { opacity: 1; }
.cap { display: grid; gap: 4px; min-height: 3.2em; }
.cap .n { font-size: 20px; font-weight: 600; line-height: 1.25; }
.q { font: 400 15px/1.5 var(--mono), "Hiragino Sans", "PingFang SC", "Noto Sans CJK SC", sans-serif; color: var(--fg); overflow-wrap: anywhere; }
.q::before { content: "“"; color: var(--accent); } .q::after { content: "”"; color: var(--accent); }
.gl { font-size: 15px; color: var(--muted); }

/* línea de tiempo: el control para arrastrar */
.tl-wrap { position: relative; padding-block: 2px; }
input[type=range].tl { -webkit-appearance: none; appearance: none; width: 100%; height: 46px; margin: 0; background: transparent; cursor: ew-resize; display: block; touch-action: pan-y; }
input[type=range].tl::-webkit-slider-runnable-track { height: 34px; background: repeating-linear-gradient(90deg, var(--raise) 0 calc(var(--step) - 2px), var(--bg) calc(var(--step) - 2px) var(--step)); }
input[type=range].tl::-moz-range-track { height: 34px; background: repeating-linear-gradient(90deg, var(--raise) 0 calc(var(--step) - 2px), var(--bg) calc(var(--step) - 2px) var(--step)); }
input[type=range].tl::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 46px; margin-top: -6px; background: var(--playhead); border: 0; box-shadow: 0 0 14px rgba(255,178,36,.55); }
input[type=range].tl::-moz-range-thumb { width: 8px; height: 46px; background: var(--playhead); border: 0; border-radius: 0; box-shadow: 0 0 14px rgba(255,178,36,.55); }
.ticks { display: flex; justify-content: space-between; font: 400 13px var(--mono); color: var(--muted); margin-top: -2px; }
.ticks span.on { color: var(--playhead); }

/* comparador */
.cmp { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; cursor: ew-resize; touch-action: pan-y; user-select: none; }
.cmp img, .cmp video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.cmp .top { clip-path: inset(0 calc(100% - var(--x, 50%)) 0 0); }
.cmp .hd { position: absolute; top: 0; bottom: 0; left: var(--x, 50%); width: 3px; margin-left: -1.5px; background: var(--playhead); box-shadow: 0 0 12px rgba(0,0,0,.6); pointer-events: none; }
.cmp .hd::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--playhead); color: #181818; display: grid; place-items: center; font: 700 19px/1 var(--body); }
.cmp .lb { position: absolute; top: 10px; font: 500 13px var(--mono); background: rgba(0,0,0,.65); color: #fff; padding: 3px 8px; pointer-events: none; }
.cmp .lb.a { left: 10px; } .cmp .lb.b { right: 10px; }
.cmp input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 3; width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--playhead); color: #181818; cursor: pointer; display: grid; place-items: center; font-size: 26px; box-shadow: 0 4px 24px rgba(0,0,0,.5); }
.play:hover { transform: translate(-50%,-50%) scale(1.07); }
.play[hidden] { display: none; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { background: var(--raise); border: 1px solid var(--line); padding: 7px 13px; cursor: pointer; font-size: 15px; font-weight: 500; }
.pills button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #15161a; }

/* uniones */
.seamtl { position: relative; height: 12px; background: var(--raise); overflow: hidden; }
.seamtl i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.seamtl b { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #fff; }

/* tira */
.strip { display: flex; gap: 10px; overflow-x: auto; cursor: grab; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding-bottom: 12px; }
.strip figure { flex: 0 0 auto; margin: 0; display: grid; gap: 7px; width: min(70vw, 400px); }
.strip .fr { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.strip .fr img, .strip .fr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.strip .fr video { opacity: 0; transition: opacity .2s; } .strip .fr.on video { opacity: 1; }
.strip figcaption { font-size: 15.5px; line-height: 1.3; color: var(--muted); }
.strip button.fr { display: block; width: 100%; border: 0; padding: 0; cursor: zoom-in; }

/* mazo */
.deck { position: relative; height: clamp(240px, 26vw, 290px); max-width: 620px; margin-right: 18px; touch-action: pan-y; }
.card { position: absolute; inset: 0; background: var(--raise); border: 1px solid var(--line); padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; overflow: hidden; cursor: grab; user-select: none; will-change: transform; transition: transform .28s cubic-bezier(.2,.8,.3,1), opacity .28s; }
.card.held { transition: none; cursor: grabbing; }
.card .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; pointer-events: none; }
.card > :not(.bg) { position: relative; }
.card .pb { font: 800 clamp(30px, 4.5vw, 44px)/1.02 var(--display); text-transform: uppercase; }
.card .ct { font: 400 13px var(--mono); color: var(--muted); }
.deckctl { display: flex; align-items: center; gap: 12px; }
.deckctl button { background: var(--raise); border: 1px solid var(--line); padding: 8px 15px; cursor: pointer; font-weight: 500; font-size: 15px; }

/* barras */
.bars { display: grid; gap: 7px; }
.brow { display: grid; grid-template-columns: minmax(70px, 150px) minmax(0, 1fr) 72px; gap: 10px; align-items: center; font-size: 15.5px; }
.brow .tr { height: 26px; background: var(--raise); }
.brow .fi { height: 100%; background: var(--off, #6d7280); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.brow.hl .fi { background: var(--accent); }
.brow .v { text-align: right; font: 400 14px var(--mono); }
.brow .lb { overflow-wrap: anywhere; }

/* la oveja */
.game { position: relative; width: 100%; aspect-ratio: 16 / 8.2; min-height: 330px; background: linear-gradient(#55708a, #93a0a0 64%, #6f7a55 64%, #4d5a3b); overflow: hidden; touch-action: none; user-select: none; }
.game svg { position: absolute; display: block; }
.game .house { left: 50%; bottom: 7%; width: min(62%, 520px); transform: translateX(-50%); }
#sheep { position: absolute; width: clamp(72px, 11%, 118px); left: 50%; top: 22%; cursor: grab; z-index: 3; transition: transform .1s; }
#sheep svg { position: static; width: 100%; height: auto; pointer-events: none; }
#sheep.held { cursor: grabbing; transform: scale(1.1) rotate(-6deg); }
#sheep.back { transition: left .55s cubic-bezier(.3,1.3,.5,1), top .55s cubic-bezier(.3,1.3,.5,1); }
.water { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(rgba(70,84,74,.86), rgba(36,48,44,.96)); transition: height 1.2s ease; z-index: 2; border-top: 2px solid rgba(255,255,255,.28); }
.meh { position: absolute; z-index: 4; font: 800 clamp(26px, 4vw, 46px)/1 var(--display); color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; opacity: 0; transition: opacity .3s, transform .9s; }
.meh.on { opacity: 1; transform: translateY(-20px); }
.gmsg { position: absolute; z-index: 5; left: 18px; top: 14px; font: 500 15px var(--mono); color: #fff; text-shadow: 0 1px 5px #000; }
.gbig { position: absolute; z-index: 6; left: 0; right: 0; top: 0; display: grid; justify-items: center; text-align: center; padding: 4% 16px 0; pointer-events: none; opacity: 0; transition: opacity .9s; }
.gbig.on { opacity: 1; }
.gbig h3 { font-size: clamp(42px, 8vw, 96px); text-shadow: 0 3px 24px #000; }
.snd { position: absolute; right: 10px; bottom: 10px; z-index: 4; background: rgba(0,0,0,.68); border: 1px solid rgba(255,255,255,.28); color: #fff; padding: 6px 11px; cursor: pointer; font: 500 13.5px var(--mono); }
.snd[aria-pressed=true] { background: var(--playhead); border-color: var(--playhead); color: #16171b; }

/* pie */
.next { display: block; position: relative; aspect-ratio: 21 / 8; min-height: 200px; overflow: hidden; text-decoration: none; background: var(--raise); }
.next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .6s; }
.next:hover img { transform: scale(1.03); }
.next div { position: absolute; left: 22px; bottom: 16px; }
.next small { font: 400 14px var(--mono); }
.next h2 { font-size: clamp(44px, 8vw, 96px); }
.more { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-block: 8px 30px; font-size: 16px; }
.foot { padding-block: 22px 44px; margin-top: 30px; color: var(--muted); font-size: 14.5px; display: grid; gap: 8px; }
.foot p { max-width: 66ch; }

/* lightbox */
dialog.lb { padding: 0; border: 0; background: #000; max-width: 94vw; max-height: 92vh; }
dialog.lb::backdrop { background: rgba(0,0,0,.86); }
dialog.lb img, dialog.lb video { max-width: 94vw; max-height: 92vh; object-fit: contain; }
dialog.lb button { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,.65); border: 0; color: #fff; padding: 6px 12px; cursor: pointer; font-size: 15px; }

/* análisis largo */
.ana { max-width: 760px; margin-inline: auto; padding-block: 24px 40px; font-size: 18px; line-height: 1.62; }
.ana h1 { font-size: clamp(42px, 7vw, 76px); margin-bottom: 14px; }
.ana .sum { font-size: 21px; line-height: 1.4; color: var(--muted); margin-bottom: 28px; }
.ana h2 { font-size: 38px; margin-block: 50px 12px; scroll-margin-top: 14px; }
.ana h3 { font-size: 27px; margin-block: 30px 8px; }
.ana p { margin-bottom: 15px; }
.ana ul, .ana ol { padding-left: 24px; margin-block: 0 16px; }
.ana li { margin-block: 5px; }
.ana a { color: var(--accent); }
.ana blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 3px solid var(--accent); }
.ana code { font: 400 .82em var(--mono), "Hiragino Sans", "PingFang SC", monospace; background: var(--raise); padding: 1px 5px; overflow-wrap: anywhere; }
.ana pre { background: var(--raise); padding: 15px; overflow-x: auto; margin-block: 0 18px; line-height: 1.5; }
.ana pre code { background: none; padding: 0; font-size: 13.5px; overflow-wrap: normal; white-space: pre; }
.ana .scroll { overflow-x: auto; margin-block: 0 20px; }
.ana table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.4; }
.ana th, .ana td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ana th { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.ana td[align=right], .ana th[align=right] { text-align: right; font-variant-numeric: tabular-nums; }
.ana thead:has(th:empty:first-child + th:empty:last-child) { display: none; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .reel { grid-template-columns: minmax(0, 1fr); }
  .mods { gap: 62px; }
  .gauges { grid-template-columns: 1fr 1fr; }
  .brow { grid-template-columns: 82px minmax(0, 1fr) 58px; font-size: 14px; }
  .next { aspect-ratio: 16 / 9; }
}
