/* The existing layout, colours and transport remain in estilo.css. */
.motion-hero-title,.motion-ink,.motion-hero-motto span,#gallery-title span { display: inline-block; }
.motion-hero-title {
  text-shadow: 0 2px 0 #453224, 0 7px 21px #06120fae;
  translate: calc(var(--pan-x,0px) * -.5) calc(var(--pan-y,0px) * -.5);
}
.motion-ink { position: relative; translate: calc(var(--pan-x,0px) * -.85) calc(var(--pan-y,0px) * -.78); }
.motion-ink::after {
  content: ''; position: absolute; left: 18%; bottom: .03em; width: 70%; height: .017em;
  border-radius: 100%; background: linear-gradient(90deg,transparent,#f3d9a478,transparent);
  transform: rotate(-2deg) scaleX(0); transform-origin: left center;
}
.motion-prepared .motion-ink::after { animation: motion-flourish 1s .75s both; }
.motion-hero-motto span { color: #e6f4ea; }
.motion-prepared .motion-hero-title { animation: motion-hero-entry 1.18s .04s both, motion-light 3s .8s both; }
.motion-prepared .hero-copy .motion-ink {
  animation: motion-ink-entry 1.48s .25s both, motion-light 3s 1.08s both;
  background-image: linear-gradient(110deg,#b89155 8%,#f6dfaa 32%,#fff5dc 45%,#e0b879 53%,#ac854c 69%,#f0d7a2);
  background-size: 210% 100%;
}
.motion-prepared .motion-hero-motto span { animation: motion-phrase .66s .66s both; }
.motion-prepared .motion-hero-motto span + span { animation-delay: .9s; color: #f0dfc1; }
.motion-prepared .brand strong { animation: motion-brand 1s .14s both; display: inline-block; }
.motion-prepared .motion-gallery-enter #gallery-title span { animation: motion-phrase .78s both; }
.motion-prepared .motion-gallery-enter #gallery-title em { animation: motion-ink-entry 1.35s .16s both, motion-light 3s .55s both; }
.motion-prepared .motion-credits-enter #credit-title { animation: motion-credit 1s both; }
.motion-prepared .motion-credits-enter dt { animation: motion-credit .72s var(--motion-delay) both; }
.motion-prepared .stage.playing .end-card h2,.motion-prepared .end-card:not([hidden]) h2 {
  animation: motion-credit 1.2s both; text-shadow: 0 2px 1px #5c4531, 0 0 26px #e6c27b27;
}
.motion-prepared .stage.started .scene-copy.enter { animation: none; }
.motion-word { display: inline-block; }
.motion-prepared .scene-copy.enter .motion-word {
  animation: motion-chapter .72s var(--motion-delay) both;
  text-shadow: 0 2px 1px #6b5435a0, 0 13px 35px #061711dc;
}
.motion-prepared .scene-copy.enter #scene-subtitle { animation: motion-phrase .57s .23s both; }
.motion-prepared .stage.started:not(.playing) .scene-copy :is(.motion-word,#scene-subtitle) { animation-play-state: paused; }
.motion-prepared .stage.started:not(.playing) .scene-copy.motion-preview :is(.motion-word,#scene-subtitle) { animation: none; }
.motion-prepared #gallery-description,.motion-prepared #light-caption { color: #f7ebd8; }
.motion-prepared #gallery-count { text-shadow: 0 0 13px #d4ae5e54; }
.motion-prepared .opening strong { text-shadow: 0 2px 1px #4e3723, 0 10px 24px #0008; }
.motion-prepared .opening span { color: #fae7c2; }

@supports (background-clip: text) {
  .motion-prepared :is(.motion-hero-title,.motion-word,#gallery-title span,#credit-title) {
    background-image: linear-gradient(112deg,#ddc9a9 2%,#fff5df 31%,#fff9ee 48%,#f2dfbd 66%,#e0c6a2 96%);
    background-size: 154% 100%;
    background-clip: text;
    color: transparent;
    text-shadow: none;
  }
  .motion-prepared .motion-hero-title { filter: drop-shadow(0 3px 1px #211a12a3); }
}
@media (forced-colors: active) {
  .motion-prepared :is(.motion-hero-title,.motion-word,.motion-ink,#gallery-title span,#gallery-title em,#credit-title),[data-foil] {
    color: CanvasText; background: none; -webkit-text-fill-color: currentColor;
  }
}

@keyframes motion-hero-entry {
  from { opacity: .14; clip-path: inset(0 0 88% 0); filter: blur(7px); transform: translateY(11px); }
  to { opacity: 1; clip-path: inset(-15% -6% -15% -6%); filter: blur(0); }
}
@keyframes motion-ink-entry {
  from { opacity: .18; clip-path: inset(-10% 99% -18% -5%); filter: blur(3px); }
  to { opacity: 1; clip-path: inset(-10% -5% -18% -5%); filter: blur(0); }
}
@keyframes motion-light { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@keyframes motion-flourish { 70% { transform: rotate(-2deg) scaleX(1); opacity: .8; } to { transform: rotate(-2deg) scaleX(1); opacity: .47; } }
@keyframes motion-phrase {
  from { opacity: .48; transform: translateY(5px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes motion-brand { from { opacity: .4; filter: blur(3px); } to { opacity: 1; filter: none; } }
@keyframes motion-chapter {
  from { opacity: .5; filter: blur(4px); clip-path: inset(-15% 50% -15% -5%); transform: translateY(6px); }
  to { opacity: 1; filter: none; clip-path: inset(-15% -7% -18% -7%); transform: none; }
}
@keyframes motion-credit { from { opacity: .32; transform: translateY(8px); } to { opacity: 1; transform: none; } }

body.motion-intro-open { overflow: hidden; }
.motion-intro-open .stage .particles i { animation-play-state: paused; }
dialog.motion-intro {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  padding: 0; border: 0; overflow: hidden; color: #fff0d6; isolation: isolate;
  background: #041416; opacity: var(--motion-opacity,1);
}
.motion-intro::backdrop { background: transparent; backdrop-filter: none; }
.motion-atmosphere,.motion-dust,.motion-ribbon { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.motion-atmosphere {
  background:
    radial-gradient(ellipse at 49% 35%,rgba(54,116,107,.36) 0%,rgba(17,53,55,.31) 32%,transparent 62%),
    radial-gradient(ellipse at 22% 1%,#123b40 0%,transparent 52%),
    radial-gradient(ellipse at 83% 95%,#0a2427 0%,transparent 46%),
    linear-gradient(168deg,#071d20,#041215 63%,#030f12);
}
.motion-dust { z-index: 1; }
.motion-ribbon,.motion-ribbon-fallback { z-index: 2; }
.motion-ribbon-fallback {
  position: absolute; top: var(--ribbon-y,39%); left: 50%; width: min(25vw,27vh,14rem);
  transform: translate(-50%,-50%); opacity: var(--ribbon-opacity,0);
  filter: drop-shadow(0 12px 24px #600d2e8c);
}
.motion-lockup {
  position: absolute; z-index: 3; left: 50%; top: 57%; width: min(94%,60rem);
  text-align: center; transform: translateX(-50%); pointer-events: none;
}
.motion-lockup p { margin: 0; }
.motion-name {
  font: 400 clamp(2.4rem,7.2vw,6.1rem)/.95 var(--serif);
  letter-spacing: .16em; text-indent: .16em;
  opacity: var(--name-opacity,0); transform: translateY(var(--name-y,0));
  filter: drop-shadow(0 3px 1px #493325) drop-shadow(0 7px 16px #e7ae4b49);
}
.motion-name span { display: inline-block; opacity: var(--letter-opacity,0); }
.motion-film {
  font: 400 clamp(1.55rem,4.4vw,3.8rem)/1.16 var(--serif); letter-spacing: -.046em;
  opacity: var(--film-opacity,0); transform: translateY(var(--film-y,0));
  text-shadow: 0 2px 1px #4e3428, 0 9px 26px #0008;
}
.motion-film em { text-shadow: none; }
[data-foil] {
  background: linear-gradient(108deg,#bd9054 11%,#f8e4b7 35%,#fff3d4 43%,#c9a266 57%,#a97944 70%,#fbe2a5 95%);
  background-size: 210% 100%; background-position: var(--foil-position,50%) center;
  -webkit-background-clip: text; background-clip: text; color: #f0cd88;
  -webkit-text-fill-color: transparent;
}
.motion-motto {
  font-size: clamp(.85rem,2.4vw,1.08rem); line-height: 1.45; color: #eef5eb;
  padding-top: clamp(.27rem,1.2vh,.68rem);
}
.motion-motto span { display: inline-block; opacity: var(--motto-one,0); }
.motion-motto span + span { opacity: var(--motto-two,0); }
.motion-place {
  color: #d3b479; font-size: clamp(.63rem,2.2vw,.77rem); letter-spacing: .19em; text-transform: uppercase;
  opacity: var(--place-opacity,0); padding-top: .55rem;
}
.motion-intro-controls {
  position: absolute; z-index: 4; right: max(1rem,env(safe-area-inset-right)); bottom: max(1rem,env(safe-area-inset-bottom));
  display: flex; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 2rem);
}
.motion-intro-controls button {
  min-height: 2.75rem; background: #0c2022d9; border-color: #ba9d686b; font-size: .83rem;
}
.motion-intro-controls button:focus-visible { outline-color: #e4c990; }
.motion-meter {
  position: absolute; inset: auto 0 0; height: 2px; background: #b89352a0;
  transform: scaleX(var(--motion-progress,0)); transform-origin: left center;
}
#motion-replay { margin-left: auto; font-size: .86rem; }
.footer:has(#motion-replay:not([hidden])) > a { margin-left: 0; }
.motion-still .motion-meter,.motion-still #motion-sound { display: none; }
@media (max-width: 600px) {
  .motion-lockup { top: 54%; }
  .footer:has(#motion-replay:not([hidden])) { flex-wrap: wrap; }
  #motion-replay { margin-left: 0; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .motion-lockup { top: 53%; }
  .motion-name { font-size: 2.5rem; }
  .motion-film { font-size: 1.7rem; }
  .motion-motto { padding-top: .14rem; }
  .motion-place { padding-top: .14rem; }
}
:root.reduced .motion-prepared *, :root.reduced .motion-prepared *::before { animation: none !important; }
:root.reduced :is(.motion-hero-title,.motion-ink) { translate: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not(.motion-allowed) .motion-prepared *, :root:not(.motion-allowed) .motion-prepared *::before { animation: none !important; }
  :root:not(.motion-allowed) :is(.motion-hero-title,.motion-ink) { translate: none; }
}
