@font-face {
  font-family: Norwester;
  src: local("Norwester"), local("Norwester-Regular");
}
:root {
  --green: #2e4a2c;
  --red: #c5341e;
  --cream: #eee2c9;
  --yellow: #e6a119;
  --ink: #201d1a;
  --header: 4.25rem;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 5px; }
.header {
  position: sticky;
  z-index: 5;
  top: 0;
  height: var(--header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: clamp(1rem, 4vw, 4.5rem);
  color: var(--cream);
  background: var(--ink);
  border-bottom: 1px solid #f3e3c945;
}
.brand {
  font-family: Norwester, system-ui, sans-serif;
  font-synthesis: none;
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.08em;
  text-decoration: none;
}
.brand span { color: var(--yellow); margin-left: .22em; }
nav { display: flex; gap: clamp(.65rem, 3vw, 2.8rem); align-items: center; }
nav a, nav span { font-size: .82rem; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--yellow); }
nav span { opacity: .65; }
#inicio, #festival { scroll-margin-top: var(--header); }
.header {
  --red: #cd2a10;
  --cream: #f3e3c9;
  --yellow: #fca200;
  --ink: #201c1a;
}
.opening { background: var(--red); }
.frame {
  position: relative;
  height: calc(100svh - var(--header));
  min-height: 28rem;
  overflow: hidden;
  isolation: isolate;
  --wipe: 1;
  --swell: 0;
  --settle: 1;
  --title: 1;
  --event: 1;
  --poster: 0;
  --cue: 0;
  --release: 1;
  --lockup-width: min(88vw, 110svh, 62rem);
  --exit: 0;
  --progress: 1;
}
.has-scroll .opening { height: max(280svh, 75rem); }
.has-scroll .frame { position: sticky; top: var(--header); }
.opening-cover {
  position: absolute;
  inset: 0;
  background: var(--cream);
  opacity: var(--poster);
}
.opening-lockup {
  position: absolute;
  top: 48%;
  left: 50%;
  width: var(--lockup-width);
  height: auto;
  opacity: var(--poster);
  transform: translate(calc(-50% + 9vw * (1 - var(--poster))), -50%);
  /* Crop in the clear gap between the original lion and the lettering. */
  clip-path: inset(0 0 0 38%);
}
.paper {
  position: absolute;
  inset: 0;
  background: var(--cream);
  clip-path: polygon(27% 0, 100% 0, 100% 100%, 57% 100%, 38% 72%, 43% 40%);
  transform: translateX(calc(76% * (1 - var(--wipe))));
  visibility: var(--paper-visible, visible);
}
.opening-edition {
  position: absolute;
  top: calc(48% + var(--lockup-width) * .24 + 1rem);
  left: 50%;
  margin: 0;
  color: var(--ink);
  opacity: var(--poster);
  transform: translate(calc(-50% + 9vw * (1 - var(--poster))), 0);
  white-space: nowrap;
}
.opening-edition, .intro-label, .intro-date {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.lion {
  /* Match the visible bounds of the lion in the 1080 × 518 lockup. */
  --lockup-lion-width: calc(.3496 * var(--lockup-width));
  --lion-left: calc(26% + 29% * var(--swell) - 3% * var(--settle));
  --lion-top: calc(51% - 3% * var(--swell) - 1% * var(--settle));
  --lion-width: min(35vw, 43svh, 36rem);
  --lion-scale: calc(.94 + .42 * var(--swell) - .09 * var(--settle));
  --display-scale: calc(1 + (var(--lion-scale) - 1) * var(--release));
  --shadow-x: .42rem;
  --shadow-y: .58rem;
  position: absolute;
  display: block;
  left: calc((50% - .3273 * var(--lockup-width)) * (1 - var(--release)) + var(--lion-left) * var(--release));
  top: calc(48% * (1 - var(--release)) + var(--lion-top) * var(--release));
  width: max(
    calc(var(--lockup-lion-width) * (1 - var(--release)) + var(--lion-width) * var(--release)),
    calc(var(--lockup-lion-width) * (1 - var(--settle)) / var(--display-scale))
  );
  height: auto;
  transform: translate(-50%, -50%) scale(var(--display-scale));
  filter: drop-shadow(
    var(--shadow-x) var(--shadow-y)
    color-mix(in srgb, transparent, var(--ink) calc(100% * var(--release)))
  );
}
.lion path { fill: color-mix(in srgb, #151615, var(--yellow) calc(100% * var(--release))); }
.title-block {
  position: absolute;
  left: calc(48% - 3% * var(--settle));
  top: calc(49% - 10% * var(--settle));
  width: min(calc(41% + 8% * var(--settle)), 78svh);
  transform: translate(calc(2rem * (1 - var(--title))), -50%);
}
.title-block h1 { margin: 0; opacity: var(--title); }
.title-block h1 svg { display: block; width: 100%; height: auto; overflow: hidden; }
.event {
  position: absolute;
  top: 100%;
  width: 100%;
  display: grid;
  gap: .3rem;
  border-top: 2px solid var(--ink);
  margin: clamp(.5rem, 1.8vh, 1.4rem) 0 0;
  padding-top: clamp(.45rem, 1.6vh, 1.1rem);
  opacity: var(--event);
  transform: translateY(calc(1.4rem * (1 - var(--event))));
}
.event time { font-size: clamp(1.05rem, 2.3vw, 2.4rem); font-weight: 900; letter-spacing: -.045em; text-transform: uppercase; }
.event span { font-size: clamp(.78rem, 1.5vw, 1.12rem); font-weight: 650; }
.frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 100%;
  background: var(--ink);
  transform: translateY(calc(100% - 100% * var(--exit)));
  pointer-events: none;
}
.scroll-cue {
  display: none;
  position: absolute;
  z-index: 1;
  bottom: 1.8rem;
  left: 7%;
  margin: 0;
  color: var(--cream);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.has-scroll .scroll-cue { display: block; opacity: var(--cue); visibility: var(--cue-visible, visible); }
.opening .scroll-cue { color: color-mix(in srgb, var(--cream), var(--ink) calc(100% * var(--poster))); }
.scroll-cue span { margin-left: .4rem; font-size: 1rem; }
.frames {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 2rem;
  display: none;
  gap: .25rem;
  mix-blend-mode: difference;
  color: white;
  opacity: calc(1 - var(--exit));
}
.has-scroll .frames { display: flex; }
.frames i { width: clamp(1rem, 2.5vw, 2rem); height: 2px; background: #ffffff50; }
.frames i::after { content: ""; display: block; height: 100%; background: currentColor; width: clamp(0%, calc(400% * var(--progress) - var(--start)), 100%); }
.frames i:nth-child(1) { --start: 0%; }
.frames i:nth-child(2) { --start: 100%; }
.frames i:nth-child(3) { --start: 200%; }
.frames i:nth-child(4) { --start: 300%; }
.intro { color: var(--cream); background: var(--ink); padding: clamp(3rem, 9vw, 8rem) 7%; }
.intro-inner { max-width: 82rem; margin: auto; }
.intro-label, .intro-date {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .7rem 1rem;
  border-top: 1px solid #f3e3c973;
  padding-top: 1rem;
}
.intro-label { color: var(--yellow); }
.intro-content {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  align-items: end;
  gap: clamp(1.5rem, 6vw, 6rem);
  margin-block: clamp(2.5rem, 6vw, 6rem);
}
h2 { margin: 0; color: var(--yellow); font-size: clamp(3rem, 7vw, 7.6rem); font-weight: 950; line-height: .9; letter-spacing: -.075em; }
.intro-content p { font-size: clamp(1rem, 1.65vw, 1.35rem); max-width: 30ch; line-height: 1.6; margin: 0; }
.intro-date { margin: 0; }
@media (max-width: 640px) {
  :root { --header: 5.25rem; }
  .header { flex-direction: column; justify-content: center; align-items: flex-start; gap: .65rem; }
  nav { width: 100%; justify-content: space-between; }
  nav a, nav span { font-size: clamp(.7rem, 3.25vw, .83rem); }
  .intro-content { grid-template-columns: 1fr; }
}
@media (max-width: 640px) and (orientation: portrait), (max-width: 640px) and (min-height: 531px) {
  .paper {
    clip-path: polygon(0 48%, 51% 44%, 100% 49%, 100% 100%, 0 100%);
    transform: translateY(calc(58% * (1 - var(--wipe))));
  }
  .opening-edition { font-size: .6rem; }
  .opening-lockup, .opening-edition {
    opacity: calc(var(--poster) * max(0, 1 - 1.6 * var(--release)));
  }
  .opening-lockup {
    transform: translate(calc(-50% + 9vw * (1 - var(--poster))), calc(-50% - 31svh * var(--release)));
  }
  .opening-edition {
    transform: translate(calc(-50% + 9vw * (1 - var(--poster))), calc(-31svh * var(--release)));
  }
  .lion {
    --lion-left: 50%;
    --lion-top: calc(67% - 18% * var(--swell) - 43% * var(--settle));
    --lion-width: min(55vw, 32svh, 15rem);
    --lion-scale: calc(.94 + .4 * var(--swell) - .24 * var(--settle));
    --shadow-x: .3rem;
    --shadow-y: .42rem;
  }
  .title-block {
    top: calc(24% + 41% * var(--settle));
    left: 50%;
    width: min(calc(84% + 2% * var(--settle)), 55svh);
    transform: translate(-50%, calc(-50% + 1rem * (1 - var(--title))));
  }
}
@media (max-height: 530px) {
  .frame { min-height: 0; }
  .lion { --lion-width: min(35vw, 39svh, calc((100svh - var(--header)) * .48)); }
  .title-block { width: min(calc(41% + 8% * var(--settle)), 67svh); }
}
@media (max-width: 640px) and (max-height: 530px) and (orientation: portrait) {
  .lion { --lion-width: min(54vw, 29svh); }
  .title-block { top: calc(27% + 36% * var(--settle)); width: min(84%, 49svh); }
  .scroll-cue { bottom: 1rem; }
  .frames { bottom: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .has-scroll .opening { height: auto; }
  .has-scroll .frame { position: relative; top: auto; }
  .has-scroll .scroll-cue, .has-scroll .frames { display: none; }
}
