:root {
  color-scheme: dark;
  --backdrop: #160f13;
  --ivory: #fff4e9;
  --champagne: #f7cda7;
  --gutter: clamp(26px, 6.1vw, 108px);
  --bar-height: clamp(60px, 8.3vh, 84px);
  --credit-height: 56px;
  --sans: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Baskervville", "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--backdrop); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ivory); font-family: var(--sans); }
.page-link {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  color: inherit;
  background: var(--backdrop);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.page { position: relative; margin-inline: auto; }
.masthead, .brand, .mast-actions, .mast-cta, .audience, .genre, .credit, .destination { display: flex; align-items: center; }
.masthead, .credit {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  justify-content: space-between;
  gap: 12px;
  padding-inline: var(--gutter);
  text-shadow: 0 1px 5px #1e1920;
}
.masthead { top: 0; min-height: var(--bar-height); }
.mast-actions { gap: clamp(10px, 1.4vw, 22px); white-space: nowrap; }
.mast-cta {
  gap: 7px;
  padding-inline-start: clamp(10px, 1.4vw, 22px);
  border-inline-start: 1px solid #bbaba080;
  color: var(--champagne);
  font-size: 13px;
  font-weight: 650;
}
.brand { gap: 10px; font-weight: 750; font-size: 22px; letter-spacing: .055em; }
.brand img { display: block; width: 38px; height: 38px; }
.audience { gap: 8px; margin: 0; font-size: 12px; color: #f0e6df; }
.age { padding: 2px 5px; border: 1px solid currentColor; border-radius: 4px; font: 650 11px/1.2 var(--sans); }
.poster { margin: 0; }
.scene {
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  height: 100vh;
  height: 100svh;
  background: radial-gradient(ellipse at 78% 38%, #8c8881, #686460 34%, #423a3b 66%, #282128);
}
.scene::before, .scene::after {
  position: absolute;
  content: "";
  pointer-events: none;
}
.scene::before {
  z-index: -1;
  inset: -22px;
  background-repeat: no-repeat;
}
.scene::after {
  z-index: 1;
  inset: 0;
}
.photo, .artwork, .artwork img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Anchor the caption to the same point in the photograph at every size. */
.photo {
  z-index: 0;
  --mouth-x: 56%;
  --mouth-y: 38%;
  --caption-gap: clamp(31px, 3.7vw, 64px);
}
.artwork img { display: block; object-fit: contain; object-position: var(--mouth-x) var(--mouth-y); }
.actor-line {
  position: absolute;
  z-index: 2;
  isolation: isolate;
  right: 55%;
  right: min(calc(100% - var(--mouth-x) + var(--caption-gap)), calc(100% - 6.8em));
  top: calc(var(--mouth-y) + .18em);
  display: flex;
  align-items: center;
  gap: .32em;
  margin: 0;
  color: #fff8ed;
  font: 600 clamp(16px, 1.55vw, 26px)/1.35 var(--serif);
  letter-spacing: .09em;
  white-space: nowrap;
  text-shadow: 0 1px 3px #32252b, 0 1px 7px #251c22, 0 2px 13px #241c24;
}
.actor-line::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -.16em -.14em -.16em -.42em;
  border-radius: .4em;
  background: linear-gradient(90deg, rgba(40,30,34,.60), rgba(40,30,34,.36) 70%, transparent);
  filter: blur(3px);
}
.actor-line::after { content: ""; width: .65em; height: 1px; background: #fff2dd; box-shadow: 0 1px 3px #211522; }
.story {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: 55%;
  align-self: center;
  padding: 26px 0 26px var(--gutter);
}
.genre {
  gap: 12px;
  margin: 0 0 18px;
  color: var(--champagne);
  font: 600 14px/1.4 var(--sans);
  letter-spacing: .13em;
}
.genre::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.genre [aria-hidden] { font-weight: 400; opacity: .65; }
h1 {
  margin: 0 0 0 -.05em;
  color: var(--ivory);
  font: 650 clamp(48px, 6.4vw, 110px)/1.08 var(--serif);
  letter-spacing: .018em;
  white-space: nowrap;
}
.entry-cta {
  display: inline-flex;
  min-height: 55px;
  min-width: 194px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: clamp(22px, 3.8vh, 40px);
  padding: 0 26px;
  border-radius: 999px;
  background: var(--champagne);
  color: #27151d;
  font-size: 17px;
  font-weight: 720;
  line-height: 1.4;
  transition: background-color .18s ease;
}
.arrow { position: relative; width: 19px; height: 2px; background: currentColor; transition: transform .18s ease; }
.arrow::after { content: ""; position: absolute; top: 50%; right: 0; width: 8px; height: 8px; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg); }
.mast-cta .arrow { width: 14px; height: 1px; }
.mast-cta .arrow::after { width: 6px; height: 6px; border-width: 1px 1px 0 0; }
.page-link:focus-visible { outline: 2px solid var(--champagne); outline-offset: -3px; }
.page-link:focus-visible .entry-cta { outline: 3px solid white; outline-offset: 5px; }
.page-link:active .entry-cta { background: #ffe0c3; }
@media (hover: hover) {
  .entry-cta:hover { background: #ffe0c3; }
  .entry-cta:hover .arrow, .mast-cta:hover .arrow { transform: translateX(3px); }
}
.credit {
  bottom: 0;
  min-height: var(--credit-height);
  color: #e4d9d3;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.destination { gap: 9px; }
#entry-hint { color: #edd2b9; }
.destination bdi { color: #efded5; font: 500 13px/1.4 "Space Mono", ui-monospace, Menlo, Consolas, monospace; }

@media (min-width: 921px), (orientation: landscape) {
  .page { --gutter: max(5vw, calc(50% - 820px)); }
  .scene { min-height: 320px; }
  /* Enlarge just the window in the upper-left of the same image behind the lettering. */
  .scene::before {
    background-image: url("images/window.jpg");
    background-image: image-set(url("images/window.webp") type("image/webp"), url("images/window.jpg") type("image/jpeg"));
    background-position: left top;
    background-size: max(184%, 170vh) auto;
    filter: blur(10px) saturate(.66);
    -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 83%);
    mask-image: linear-gradient(90deg, #000 50%, transparent 83%);
  }
  .scene::after {
    background:
      linear-gradient(0deg, #17131ad6, #1e18202b 12%, transparent 25%, transparent 76%, #1f192110 89%, #19161c85),
      linear-gradient(90deg, #201b22ee, #261d25d6 22%, #292128ae 36%, #342a2e77 46%, #362b2f29 56%, transparent 66%),
      linear-gradient(270deg, #2821278c, transparent 19%);
  }
  .photo {
    inset: 50% auto auto calc(50% + min(17vw, 300px));
    width: min(66.6667vh, 65%);
    width: min(66.6667svh, 65%);
    height: auto;
    aspect-ratio: 2 / 3;
    transform: translate(-50%, -50%);
  }
  .artwork {
    -webkit-mask-image: linear-gradient(90deg, transparent, #0007 6%, #000e 15%, #000 22%, #000 85%, #000e 90%, #0007 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #0007 6%, #000e 15%, #000 22%, #000 85%, #000e 90%, #0007 96%, transparent);
  }
  .story {
    width: max-content;
    max-width: 56%;
    margin-inline-start: calc(50% - min(35vw, 570px));
    padding: 0;
    transform: translateY(5vh);
    text-shadow: 0 2px 16px #221b2360;
  }
  .genre { color: #ffdfbf; }
  h1 { font-size: clamp(48px, 6.2vw, 103px); }
  .entry-cta { text-shadow: none; }
}

@media (min-width: 921px) and (max-aspect-ratio: 40/39) {
  .photo {
    -webkit-mask-image: linear-gradient(transparent, #000 5%, #000 94%, transparent);
    mask-image: linear-gradient(transparent, #000 5%, #000 94%, transparent);
  }
}

@media (max-width: 920px) and (orientation: portrait) {
  :root {
    --gutter: clamp(22px, 6vw, 49px);
    --bar-height: clamp(52px, 7vh, 68px);
    --credit-height: clamp(36px, 5vh, 46px);
  }
  .masthead { min-height: calc(var(--bar-height) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .brand { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }
  .audience { gap: 6px; font-size: 11px; }
  .mast-cta { font-size: 12px; }
  .scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 360px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--credit-height) + env(safe-area-inset-bottom, 0px) + clamp(10px, 1.8vh, 20px));
    background: radial-gradient(ellipse at 70% 33%, #8a827a, #645a59 44%, #3b3136 76%, #2a2229);
  }
  .scene::before {
    background-image: url("images/window-mobile.jpg");
    background-image: image-set(url("images/window-mobile.webp") type("image/webp"), url("images/window-mobile.jpg") type("image/jpeg"));
    background-position: left 12%;
    background-size: 245% auto;
    filter: blur(14px) saturate(.66) brightness(.75);
  }
  .scene::after {
    background:
      linear-gradient(0deg, #19141bed, #231b22e8 9%, #291f279c 18%, #30252d27 29%, transparent 41%),
      linear-gradient(180deg, #1f1921c7, #27212a50 8%, transparent 18%),
      linear-gradient(100deg, #281c242e, transparent 33%, transparent 87%, #29222b2e);
  }
  .photo {
    position: relative;
    inset: auto;
    grid-row: 1;
    place-self: center;
    width: auto;
    max-width: 100%;
    height: min(100%, 150vw);
    min-height: 0;
    aspect-ratio: 2 / 3;
    --caption-gap: clamp(24px, 7vw, 48px);
  }
  .artwork {
    -webkit-mask-image: linear-gradient(180deg, transparent, #000d 4%, #000 9%, #000 85%, #000e 92%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000d 4%, #000 9%, #000 85%, #000e 92%, transparent);
  }
  .artwork img {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000d 5%, #000 10%, #000 90%, #000d 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000d 5%, #000 10%, #000 90%, #000d 95%, transparent);
  }
  .actor-line { font-size: clamp(15px, 3.7vw, 22px); }
  .story {
    grid-row: 2;
    display: grid;
    justify-items: start;
    align-self: end;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin-block-start: clamp(-54px, calc(100vw - 52vh), -18px);
    padding: 0 var(--gutter);
    text-shadow: 0 2px 12px #21192188;
  }
  .genre { gap: 9px; margin: 0; color: #ffdfbf; font-size: clamp(11px, 2.9vw, 15px); }
  .genre::before { width: 20px; }
  h1 { font-size: clamp(32px, 10vw, 64px); }
  .entry-cta {
    min-width: 144px;
    min-height: 44px;
    margin: 4px 0 0;
    gap: 20px;
    padding-inline: 19px;
    font-size: clamp(14px, 3.8vw, 18px);
    text-shadow: none;
  }
  .credit {
    min-height: calc(var(--credit-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-size: 11px;
  }
}
@media (max-width: 920px) and (orientation: portrait) and (max-height: 740px) {
  .story { grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-block-start: -12px; }
  .genre { grid-column: 1 / -1; }
  h1 { font-size: clamp(25px, 7.5vw, 56px); }
  .entry-cta { min-width: 107px; margin: 0; padding-inline: clamp(12px, 3.7vw, 23px); gap: 12px; }
}
@media (max-width: 360px) {
  .masthead { padding-inline: 14px; gap: 6px; }
  .brand { gap: 6px; font-size: 18px; }
  .brand img { width: 28px; height: 28px; }
  .mast-actions { gap: 8px; }
  .mast-cta { gap: 5px; padding-inline-start: 8px; }
}
@media (orientation: landscape) and (max-height: 560px) {
  :root { --gutter: clamp(23px, 6vw, 63px); --bar-height: 44px; --credit-height: 30px; }
  .brand { gap: 7px; font-size: 17px; }
  .brand img { width: 27px; height: 27px; }
  .audience { font-size: 11px; }
  .scene { min-height: 228px; }
  .story { max-width: 56%; transform: translateY(3vh); }
  .genre { margin-bottom: 7px; font-size: 11px; }
  h1 { font-size: clamp(32px, 5.7vw, 58px); }
  .entry-cta { margin-top: 12px; min-width: 160px; min-height: 44px; padding-inline: 16px; font-size: 15px; }
  .credit { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-cta, .arrow { transition: none; }
  .entry-cta:hover .arrow, .mast-cta:hover .arrow { transform: none; }
}
@media (forced-colors: active) {
  .story { background: Canvas; }
  .entry-cta { border: 2px solid LinkText; color: LinkText; }
  .arrow { background: LinkText; }
}
