/* Cormorant Garamond, © the Cormorant Project Authors. SIL Open Font License 1.1.
   See licenses/Cormorant-Garamond.txt. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/inscription.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  background: #fff;
  color: #272727;
  font-family: "Cormorant Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-snap-type: y mandatory; overscroll-behavior-y: none; scrollbar-width: none; }
html.film-gestures { touch-action: pan-x pinch-zoom; }
html::-webkit-scrollbar { display: none; }
body { margin: 0; background: white; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; padding: 0; background: none; }
[hidden] { display: none !important; }
#stage, .scene, #intro, #contact { position: fixed; inset: 0; }
#stage { isolation: isolate; pointer-events: none; overflow: hidden; }
.scene, #intro, #contact { display: grid; place-items: center; }
.scene, #contact { opacity: 0; visibility: hidden; }
.in-dissolve .scene, .in-dissolve #contact { mix-blend-mode: plus-lighter; }
#intro { background: #fff; z-index: 5; }
#intro.presenting h1 { animation: opening 1540ms both; }
#intro.presenting.fading h1 { animation: opening-out 720ms ease-in-out both; }
#intro.revealing {
  pointer-events: none;
  animation: reveal-film 900ms cubic-bezier(.42, 0, .36, 1) both;
}
@keyframes reveal-film {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes opening {
  0%, 19% { opacity: 0; }
  60%, 100% { opacity: 1; }
}
@keyframes opening-out {
  from { opacity: 1; }
  100% { opacity: 0; }
}
.inscription {
  font-family: inherit;
  font-size: clamp(1.35rem, 1.8vw, 1.875rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: .005em;
  font-kerning: normal;
  font-style: normal;
  text-align: center;
  margin: 0;
}
.projection {
  position: relative;
  width: min(66vw, 940px, 112svh);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
}
.standard .projection { width: min(58vw, 740px, 84svh); aspect-ratio: 4 / 3; }
.portrait .projection { width: min(66vw, 355px, 36svh); aspect-ratio: 9 / 16; }
.first-frame, .surface {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%; border: 0;
}
.first-frame { object-fit: contain; }
/* The master contains narrow black columns. Apply the same overscan to
   the first decoded still and the live picture so the handoff lines up. */
.first-frame { inset: -.4% auto auto -.4%; width: 100.8%; height: 100.8%; }
.surface { z-index: 2; pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.surface:focus-visible { outline: 2px solid #788597; outline-offset: -4px; border-radius: inherit; }
.scene[inert] .surface { pointer-events: none; }
#contact a {
  padding: 12px 16px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 260ms ease-out;
}
#contact:not([inert]) a {
  opacity: 1;
  transition: opacity 680ms cubic-bezier(.42, 0, .28, 1) 150ms;
}
#contact[inert] a { pointer-events: none; }
#contact a:hover { color: #676767; }
a:focus-visible { outline: 1px solid #969696; outline-offset: 4px; }
#track { pointer-events: none; }
.stop {
  height: clamp(100px, 22.5vh, 200px);
  height: clamp(100px, 22.5svh, 200px);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.stop:last-child { height: 100vh; height: 100lvh; }
@media (max-width: 700px) {
  .projection { width: min(85vw, 112svh); }
  .standard .projection { width: min(85vw, 84svh); }
  .portrait .projection { width: min(76vw, 37.5svh); }
}
@media (prefers-reduced-motion: reduce) {
  #intro.presenting h1 { animation-duration: 1150ms; }
  #intro.presenting.fading h1 { animation-duration: 350ms; }
  #intro.revealing { animation-duration: 160ms; }
  #contact a, #contact:not([inert]) a { transition-duration: 180ms; transition-delay: 0s; }
}

/* The paused first frame and the first moving frame share the same crop. */


.opening-player {
  position: absolute; inset: -.4% auto auto -.4%; width: 100.8%; height: 100.8%;
  pointer-events: none;
}
.opening-player video { display: block; width: 100%; height: 100%; object-fit: contain; }
.opener .opening-player.preparing-opener { opacity: 0; }
.opening-player.resuming-picture:not(.has-picture) { opacity: 0; }
@keyframes waiting-visible { to { opacity: 1; } }
@keyframes waiting-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .scene[data-waiting] .projection::after { animation: waiting-visible .01s .6s forwards; }
}
html.in-intro { overflow: hidden; }

.scene[data-waiting] .projection::after {
  content: ''; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px);
  width: 18px; height: 18px; border-radius: 50%; pointer-events: none; z-index: 1;
  border: 1.5px solid rgba(255,255,255,.3); border-top-color: white;
  opacity: 0; animation: waiting-visible .15s .6s forwards, waiting-turn .9s linear infinite;
}

.scene[data-retry] .surface::after {
  content: 'Tap to retry'; position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  color: white; background: rgba(0,0,0,.65); border-radius: 1em; padding: .3em .85em; font: 13px system-ui;
}
