:root {
  color-scheme: dark;
  --dark: #091b18;
  --deeper: #05110f;
  --gold: #e5c582;
  --ivory: #f9eed8;
  --mint: #a4d5c7;
  --muted: #becac1;
  --line: #e5c58245;
  --serif: Georgia, 'Times New Roman', serif;
  font: 16px/1.6 'Segoe UI', Arial, sans-serif;
  background: var(--dark);
  color: var(--ivory);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .3em; }
a:hover { color: var(--gold); }
button, select, summary { cursor: pointer; }
button, select {
  color: var(--ivory);
  background: #19332ded;
  border: 1px solid var(--line);
  border-radius: .35rem;
  padding: .48rem .8rem;
  font: inherit;
}
button:hover, button[aria-pressed=true], button[aria-current=true] { border-color: var(--gold); color: var(--gold); background: #294239; }
button:disabled, input:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 2px solid #fff0ae; outline-offset: 4px; }
input[type=range], input[type=checkbox] { accent-color: var(--gold); }
input[type=range] { min-width: 0; }
.skip { position: absolute; z-index: 20; transform: translateY(-150%); padding: 1rem; background: var(--dark); }
.skip:focus { transform: none; }
.masthead,.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 1.2rem;
  padding: .9rem clamp(1.15rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line); background: var(--deeper);
}
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; }
.brand img,.footer img { border-radius: 50%; border: 1px solid var(--gold); }
.brand span { display: grid; line-height: 1.24; }
.brand strong { font: 1.25rem var(--serif); letter-spacing: .15em; }
.brand small { color: var(--muted); font-size: .64rem; letter-spacing: .13em; }
.masthead nav { display: flex; flex-wrap: wrap; gap: clamp(.85rem, 3vw, 2.4rem); }
.masthead nav a { text-decoration: none; font-size: .94rem; }
.stage {
  position: relative; min-height: min(46rem, 83svh); isolation: isolate; overflow: hidden;
  display: grid; align-items: center; background: #061712;
}
.hero-image,.atmosphere,.scene-media,.particles,.opening { position: absolute; inset: 0; }
.hero-image {
  left: 36%; background: url('assets/fotos/equipo.webp') center 40% / cover no-repeat;
  transform: translate(var(--pan-x,0px),var(--pan-y,0px)) scale(1.035); transition: opacity .65s ease, transform .35s ease-out;
}
.atmosphere {
  pointer-events: none;
  background: linear-gradient(90deg, #041411 0%, #051813 28%, #07221bf2 40%, #071a16a1 52%, transparent 76%),
      linear-gradient(0deg,#020c0bef 0%,#04120e49 32%,transparent 59%), radial-gradient(ellipse at 68% 12%,#f1bc562a,transparent 58%);
}
.particles { pointer-events: none; }
.stage:has(.opening:not([hidden])) .particles { z-index: 4; }
.particles i {
  position: absolute; top: var(--y); left: var(--x); width: var(--size); aspect-ratio: 1; border-radius: 50%;
  background: #ffe3a8b0; box-shadow: 0 0 12px 2px #e6c46e62;
  animation: drift var(--speed) var(--delay) ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate(0,0); opacity: .12; } to { transform: translate(30px,-36px); opacity: .76; } }
.stage.started:not(.playing) .particles i,.stage.started:not(.playing) .opening * { animation-play-state: paused; }
.hero-copy,.scene-copy {
  z-index: 1; width: min(66%, 54rem); padding: 3rem 0 7rem; margin-left: clamp(1.25rem,8vw,8rem);
}
.eyebrow { color: var(--gold); font-size: .77rem; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; }
.edition { display: flex; align-items: center; gap: .75rem; }
.edition span { width: 2rem; height: 1px; background: currentColor; }
h1,h2,p { margin-top: 0; }
h1,.scene-copy h2,.section-head h2,.credits h2 { font-family: var(--serif); font-weight: 400; line-height: .96; }
h1 { margin: 1rem 0 1.5rem; max-width: 9ch; font-size: clamp(4.35rem, 8.9vw, 9.5rem); letter-spacing: -.071em; text-shadow: 0 12px 36px #00100daa; }
h1 em,.opening em,.section-head em {
  display: inline-block; font-weight: 400; padding: 0 .11em .13em 0; margin-bottom: -.13em;
  background-image: linear-gradient(110deg,#b58d50 3%,#f4db9e 30%,#fff5cd 49%,#b89553 66%,#eac88b 94%);
  background-size: 180% 100%; color: var(--gold); background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none;
  animation: gild 12s ease-in-out infinite alternate;
}
@keyframes gild { to { background-position: 100% 0; } }
.hero-copy p,.scene-copy p { margin-bottom: .95rem; color: #e6f4ea; font-size: clamp(1rem, 2vw, 1.35rem); }
.place { color: #c1d4c8; font-size: .94rem; }
.place span::before { content: ' · '; margin-inline: .33rem; }
.primary { margin-top: 1.45rem; color: #16231c; background: #e7c982; padding: .67rem 1.15rem; font-weight: 650; display: inline-flex; gap: .65rem; align-items: center; }
.primary:hover { color: #0c211a; background: #f7e1ad; }
.ribbon-mark { position: absolute; right: 3.8vw; top: 5%; filter: drop-shadow(0 5px 14px #300307); transform: rotate(12deg); }
.stage.playing .hero-image { opacity: 0; }
.scene-media { left: 37%; overflow: hidden; background: radial-gradient(ellipse at 55% 40%, #2d4d40, #071916 75%); }
.scene-media img { position: absolute; width: 100%; height: 100%; object-fit: contain; object-position: 75% 50%; }
.scene-media span { position: absolute; z-index: 1; right: 4vw; bottom: 6.7rem; font-size: .75rem; text-shadow: 0 1px 5px black; background: #051210e3; padding: .24rem .55rem; max-width: 42%; }
.scene-copy { width: min(52%,47rem); pointer-events: none; }
.scene-copy h2 { font-size: clamp(3rem,7.1vw,7.1rem); letter-spacing: -.055em; margin: .55rem 0 1.05rem; text-wrap: balance; }
.scene-copy.enter { animation: rise .75s both; }
.end-card { z-index: 4; position: absolute; inset: 0; align-content: center; justify-items: center; display: grid; text-align: center; gap: .6rem; padding: 1.2rem 1.2rem 6rem; background: #051813ef; animation: rise .75s both; }
.end-card h2 { font: clamp(2.5rem,7vw,5.75rem)/1 var(--serif); margin: .55rem 0; text-wrap: balance; }
.end-card a { color: var(--gold); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.opening { display: flex; z-index: 3; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center; padding: .6rem 1rem 4.5rem; background: radial-gradient(ellipse at center,#15342cf2,#020908fc 78%); }
.opening img { border-radius: 50%; animation: rise .45s .27s both; }
.opening strong { font: clamp(2.15rem,7vw,6.6rem)/1.07 var(--serif); letter-spacing: -.06em; animation: rise .48s .63s both; }
.opening span,.opening small { animation: rise .4s 1.05s both; }
.ribbon-path { stroke-dasharray: 220; animation: ribbon .85s both; }
@keyframes ribbon { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
.subtitle { z-index: 5; position: absolute; bottom: 6.55rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(72ch,89%); padding: .52rem .9rem; text-align: center; background: #061310f5; border-radius: .28rem; color: #fff9eb; box-shadow: 0 4px 24px #0007; font-size: clamp(.94rem,1.8vw,1.15rem); }
.stage:has(.subtitle:not([hidden])) .scene-media span { visibility: hidden; }
.transport { position: absolute; z-index: 6; bottom: 0; inset-inline: 0; padding: .65rem clamp(1rem, 5vw, 5rem) 1rem; background: linear-gradient(0deg,#020b09 30%,#020b09ad 80%,transparent); transition: opacity .35s ease; }
@media (hover:hover) and (pointer:fine) { .transport.idle:not(:focus-within) { opacity: 0; pointer-events: none; } }
.seek-row,.transport-row,.settings,.gallery-options,.gallery-modes { display: flex; align-items: center; gap: .65rem; }
.seek-row input { flex: 1; width: 100%; margin: 0; }
.seek-row output { min-width: 6.5rem; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .83rem; }
.transport-row { margin-top: .42rem; }
.transport-spacer { flex: 1; }
.round { padding: .2rem .52rem; min-width: 2.5rem; min-height: 2.5rem; border-radius: 50%; }
.main-control { color: #0a1c16; background: var(--gold); font-size: 1rem; }
.stage:fullscreen,.stage.expanded { width: 100%; height: 100%; }
.stage.expanded { position: fixed; inset: 0; z-index: 12; }
body.film-expanded { overflow: hidden; }
.player-panel,.gallery,.credits { padding-inline: clamp(1.15rem, 5vw, 5rem); }
.player-panel { padding-block: 1.35rem 1.6rem; border-bottom: 1px solid var(--line); }
.chapters-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem 1rem; }
.chapters-heading h2 { margin: 0; font-size: 1.05rem; }
#status { margin: 0; color: var(--mint); font-size: .9rem; }
.chapters { display: flex; gap: .55rem; padding: .75rem .3rem .85rem; overflow-x: auto; scrollbar-color: #9c895c #142a23; }
.chapters button { flex: none; font-size: .84rem; }
.chapters button span { color: var(--gold); margin-right: .38rem; font-variant-numeric: tabular-nums; }
.settings { flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .88rem; margin-top: .5rem; }
.settings label,.gallery-options label { display: inline-flex; align-items: center; gap: .45rem; }
.settings input[type=range],.gallery-options input[type=range] { width: 5.3rem; }
details { color: var(--muted); margin-top: .95rem; }
details p { max-width: 66ch; margin: .7rem 0 0; }
summary { width: fit-content; color: var(--mint); }
.gallery { position: relative; padding-block: clamp(3rem,7vw,7rem); background: radial-gradient(ellipse at 52% 62%,#225044,#102d26 38%,#091e19 70%); }
.section-head { display: flex; gap: 1.1rem; justify-content: space-between; align-items: end; flex-wrap: wrap; }
.section-head h2,.credits h2 { margin: .6rem 0 0; font-size: clamp(2.7rem,6.1vw,6rem); letter-spacing: -.055em; }
.gallery-options { margin-top: 1.45rem; flex-wrap: wrap; gap: .55rem 1rem; font-size: .88rem; }
.gallery-options select { max-width: 15rem; }
.carousel { margin: 1.15rem auto 0; width: min(100%, 70rem); touch-action: pan-y; }
.frames { position: relative; min-height: clamp(16rem,48vw,32rem); perspective: 1150px; isolation: isolate; overflow: hidden; }
.frame {
  position: absolute; top: 7%; left: 50%; width: min(61%, 34rem); height: 86%; padding: .48rem;
  border: 1px solid #f1d69599; border-radius: .7rem; background: linear-gradient(140deg,#83c0a640,#14352bf2);
  box-shadow: 0 2rem 5rem #0008, inset 0 1px 0 #fef6b440; transform: translateX(-50%);
  display: grid; place-items: center; overflow: hidden; animation: frame-in .4s ease both;
}
.frame img { width: 100%; height: 100%; min-height: 0; object-fit: contain; border-radius: .32rem; }
.frame.side-left { transform: translateX(-84%) translateZ(-170px) rotateY(34deg); opacity: .69; z-index: -1; }
.frame.side-right { transform: translateX(-16%) translateZ(-170px) rotateY(-34deg); opacity: .69; z-index: -1; }
.frame.center { transition: box-shadow .25s ease; }
.frame.center:hover { box-shadow: 0 1.4rem 5rem #000a, 0 0 2.5rem #ead29155; }
@keyframes frame-in { from { opacity: .12; } }
.carousel-footer,.light-footer { display: flex; align-items: center; justify-content: center; gap: 1rem; text-align: center; }
#gallery-caption { width: min(30rem,75%); }
#gallery-count { color: var(--gold); font-size: .81rem; font-variant-numeric: tabular-nums; }
#gallery-description,.light-footer p { margin: 0; }
.mosaic { margin-top: 1.45rem; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: .85rem; }
.mosaic button { text-align: left; padding: .5rem; background: #102922; }
.mosaic img { width: 100%; height: 12rem; object-fit: contain; display: block; border-radius: .25rem; background: #071915; }
.mosaic span { display: block; padding: .58rem .45rem; font-size: .88rem; }
video { display: block; width: min(100%, 34rem); max-height: 60vh; margin-top: 1rem; }
.credits { padding-block: clamp(3rem,6vw,6rem); display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.5rem clamp(2rem,8vw,8rem); border-top: 1px solid var(--line); }
.credits h2 { margin-bottom: 1.2rem; }
.credits p,.credits dd { color: var(--muted); }
.credits .eyebrow,.text-link,.credits a { color: var(--gold); }
.credits dl { margin-bottom: 1.1rem; }
.credits dt { font-weight: 650; }
.credits dd { margin: 0 0 .45rem; }
.credit-notes { grid-column: 1 / -1; max-width: 78ch; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .9rem; }
.credit-notes p { margin-bottom: .56rem; }
.footer { justify-content: flex-start; font-size: .88rem; border-top: 1px solid var(--line); border-bottom: 0; }
.footer a { margin-left: auto; }
dialog { color: var(--ivory); background: #071915; border: 1px solid var(--line); width: min(94vw,70rem); max-width: none; max-height: 95vh; padding: .8rem; }
dialog::backdrop { background: #000c; backdrop-filter: blur(7px); }
dialog:fullscreen,dialog.light-expanded { width: 100%; height: 100%; max-height: 100%; }
.light-toolbar { display: flex; flex-wrap: wrap; gap: .45rem; }
#light-stage { height: min(64vh,45rem); display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: grab; margin: .6rem 0; }
#light-img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; min-height: 0; }
.light-footer p { flex: 1; max-width: 55ch; }
:root.reduced *, :root.reduced *::before { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
:root.reduced .hero-image { transform: none; }
@media (max-width: 730px) {
  .masthead { gap: .75rem; padding-block: .62rem; }
  .masthead nav { gap: .65rem; }
  .masthead nav a { font-size: .8rem; }
  .brand img { width: 35px; height: 35px; }
  .brand small { display: none; }
  .brand strong { font-size: 1rem; }
  .stage { min-height: max(34rem, 78svh); align-items: end; }
  .hero-image { left: 0; bottom: 12%; background-position: center 36%; }
  .atmosphere { background: linear-gradient(0deg,#020e0c 5%,#061813 26%,#061813dc 39%,#04130f25 74%),linear-gradient(90deg,#020d0a6b,transparent 70%); }
  .hero-copy,.scene-copy { margin-left: 1.15rem; width: calc(100% - 2.3rem); padding: 2rem 0 6.7rem; }
  h1 { font-size: clamp(3.55rem,13vw,6.3rem); margin: .6rem 0 .75rem; }
  .hero-copy p { margin-bottom: .55rem; }
  .place { font-size: .79rem; }
  .place span { display: block; }
  .place span::before { display: none; }
  .primary { margin-top: .85rem; }
  .edition { letter-spacing: .15em; }
  .ribbon-mark { top: 3%; right: 5%; }
  .ribbon-mark svg { width: 48px; }
  .scene-media { inset: 0 0 24%; }
  .scene-media img { object-position: center top; }
  .scene-media span { display: none; }
  .scene-copy { padding-bottom: 11.6rem; }
  .scene-copy h2 { font-size: clamp(2rem,9vw,4rem); margin: .4rem 0 .55rem; }
  .scene-copy p { margin-bottom: 0; font-size: 1rem; }
  .subtitle { bottom: 6.2rem; }
  .frame { width: 68%; }
  .credits { grid-template-columns: 1fr; }
  .credit-notes { grid-column: auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .stage:fullscreen,.stage.expanded { min-height: 100%; }
  .stage:is(:fullscreen,.expanded) .scene-copy { padding-block: 1rem 7rem; }
  .stage:is(:fullscreen,.expanded) .scene-copy h2 { font-size: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  :root:not(.motion-allowed) *, :root:not(.motion-allowed) *::before { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
