/* Shared by both story prototypes. Colours and type follow the Atelier site
   (site/src/assets/site.css): the grey room, Helvetica for reading, IM Fell for asides. */
:root {
  --room: #dcdcd7;
  --floor: #c9c9c3;
  --stone: #575651;
  --ink: #1c1c1a;
  --card: #f7f7f4;
  --seal: #b3261e;
  --gutter: clamp(16px, 5vw, 72px);
  --column: 30rem;
  --old: "IM Fell English", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--room); color: var(--ink); font: 400 1.0625rem/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0.005em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 4px; }

/* Prototype bar: which option this is, and the way to the other */
.proto { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 12px var(--gutter); background: var(--ink); color: var(--card); font-size: .8125rem; }
.proto a { text-underline-offset: 3px; }

.head { padding: clamp(40px, 9vh, 96px) var(--gutter) 24px; }
.head .kind { margin: 0 0 6px; font-weight: 700; font-size: .875rem; }
.head h1 { margin: 0; font: italic clamp(2.4rem, 7vw, 4.2rem)/1 var(--old); }
.head .play { display: inline-block; margin-top: 18px; font-size: .875rem; text-underline-offset: 3px; }

.frame-mark { margin: 0; text-align: center; color: var(--stone); font: italic 1.4rem/1 var(--old); }
.prose p { margin: 0 0 1em; }
.prose p.first::first-letter { font: italic 3.1em/0.8 var(--old); float: left; margin: 0.08em 0.08em 0 0; }

/* The plate: the card, with one scene in its window */
.plate { position: relative; aspect-ratio: 1200 / 1697; container-type: inline-size; user-select: none; -webkit-user-select: none; }
.pframe { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.pwin { position: absolute; overflow: hidden; background: #e9dcc0; z-index: 1; }
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.scene.on { opacity: 1; visibility: visible; transition: opacity 1s ease, visibility 0s; }
.scene .fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pnight { opacity: 0; }
.pbird, .pbarrel, .pfeather { position: absolute; display: block; }
.pgun { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.pbird img { display: block; width: 100%; }
.pspin { position: relative; transform-origin: 50% 55%; }
.pbird img.plimp { position: absolute; opacity: 0; max-width: none; }
.pdown { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(.4px); }
.ploose { position: absolute; display: block; pointer-events: none; }
.pfeather { will-change: transform; }
.pshadow { position: absolute; border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(22, 32, 12, .6), rgba(22, 32, 12, 0)); }
.pleaves { position: absolute; }
.pleaves img { position: absolute; top: 0; height: 100%; }
.leaf-l { left: 0; transform-origin: 0% 50%; }
.leaf-r { right: 0; transform-origin: 100% 50%; }
.pmother { inset: -2% !important; width: 104% !important; height: 104% !important; }
.pshoot { position: absolute; z-index: 6; translate: -50% -50%; width: max(44px, 10cqw); aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: transparent; cursor: crosshair; touch-action: manipulation; }
.pshoot:focus-visible { outline: 2px solid var(--seal); outline-offset: -4px; }
.pshoot[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .scene, .scene.on { transition-duration: .3s; }
}
