@font-face {
  font-family: "Big Shoulders";
  font-weight: 100 900;
  font-display: swap;
  src: url(./assets/fonts/BigShoulders.ttf) format("truetype");
}

@view-transition {
  navigation: auto;
}

:root {
  color-scheme: dark;
  --ground: #0a0908;
  --ground-2: #0f0d0c;
  --base: #161412;
  --base-hole: #0a0908;
  --paper: #efece6;
  --paper-dim: rgba(239, 236, 230, 0.74);
  --paper-faint: rgba(239, 236, 230, 0.16);
  --edge: #a3957f;
  --safelight: #d1361f;
  --gutter: clamp(20px, 5.5vw, 88px);
  --display: "Big Shoulders", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --text: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --fh: clamp(250px, 44svh, 440px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
html.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--paper); color: var(--ground); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--paper);
  color: var(--ground);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.edge {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.76rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--edge);
}

/* ---- top bar */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter) 34px;
  background: linear-gradient(to bottom, rgba(10, 9, 8, 0.92) 40%, rgba(10, 9, 8, 0));
  transition: transform 0.5s var(--ease-out);
}
.top.is-away { transform: translateY(-110%); }
.mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.top-links { display: flex; gap: clamp(16px, 2.4vw, 34px); font-size: 0.9rem; }
.top-links a,
.lost-link,
.end a,
.entry-link a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease-out);
}
.top-links a:hover,
.lost-link:hover,
.end a:hover { background-size: 100% 1px; }

/* ---- the tray (first screen) */
.tray {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 30vw);
  grid-template-rows: auto 1fr auto;
  column-gap: 2vw;
  min-height: 100svh;
  padding: clamp(96px, 15svh, 150px) var(--gutter) clamp(28px, 5svh, 48px);
  overflow: hidden;
  isolation: isolate;
}
.safelight {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 62% 58% at 78% -6%, rgba(209, 54, 31, 0.34), rgba(209, 54, 31, 0.1) 48%, rgba(209, 54, 31, 0) 72%),
    radial-gradient(ellipse 90% 60% at 20% 110%, rgba(209, 54, 31, 0.06), rgba(209, 54, 31, 0) 70%);
}
.tray-edge {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.motto {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 14vw, 14rem);
  line-height: 0.84;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.motto-line { display: block; overflow: hidden; padding-top: 0.04em; }
.motto-line > span { display: block; }
.motto-aside {
  display: block;
  margin-top: 0.9rem;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--paper-dim);
}
.print {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  z-index: 2;
  width: 100%;
}
.print-link { display: block; text-decoration: none; }
.paper {
  position: relative;
  display: block;
  padding: clamp(8px, 0.9vw, 14px) clamp(8px, 0.9vw, 14px) clamp(28px, 3vw, 44px);
  background: var(--paper);
  transform: rotate(-2.2deg);
  box-shadow: 0 34px 60px -24px rgba(0, 0, 0, 0.9);
}
.paper-pic {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #000;
}
.paper-pic img { width: 100%; height: 100%; object-fit: cover; }
.paper-note {
  position: absolute;
  left: clamp(8px, 0.9vw, 14px);
  bottom: clamp(8px, 1vw, 14px);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: #4a4238;
}
.print-cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  margin-top: 22px;
}
.print-frame { grid-column: 1; }
.print-title {
  grid-column: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
}
.print-controls { grid-column: 2; grid-row: 1 / 3; align-self: end; display: flex; gap: 4px; }
.print-btn {
  padding: 6px 8px;
  border: 0;
  background: none;
  font-size: 0.82rem;
  color: var(--paper-dim);
  cursor: pointer;
  transition: color 0.2s ease;
}
.print-btn:hover { color: var(--paper); }
.print-btn[aria-pressed="true"] { color: var(--paper); }
.cue {
  grid-column: 1;
  grid-row: 3;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
  text-decoration: none;
}
.cue-line { width: 46px; height: 1px; background: currentColor; transition: transform 0.5s var(--ease-out); transform-origin: left; }
.cue:hover .cue-line { transform: scaleX(1.6); }

/* ---- rolls of film */
.rolls { padding: clamp(40px, 8svh, 90px) 0 0; }
.roll { padding: clamp(64px, 12svh, 140px) 0 0; }
.roll-head { padding: 0 var(--gutter); }
.roll-title {
  margin-top: 6px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 10vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.roll-title > span { display: block; }
.strip {
  position: relative;
  margin-top: clamp(22px, 4svh, 40px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
}
.strip::-webkit-scrollbar { display: none; }
.frames {
  display: flex;
  width: max-content;
  padding: 0 var(--gutter);
}
.frame { flex: none; }
.frame-link { position: relative; display: block; text-decoration: none; }
.film {
  position: relative;
  display: block;
  padding: 30px 10px 46px;
  background-color: var(--base);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='14'%3E%3Crect x='6' y='2' width='14' height='10' rx='2.5' fill='%230A0908'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='14'%3E%3Crect x='6' y='2' width='14' height='10' rx='2.5' fill='%230A0908'/%3E%3C/svg%3E");
  background-repeat: repeat-x, repeat-x;
  background-size: 26px 14px, 26px 14px;
  background-position: 0 8px, 0 calc(100% - 7px);
}
.film-edge {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 23px;
  display: flex;
  gap: 18px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--edge);
  white-space: nowrap;
}
.film-edge b { font-weight: 700; color: #c4b49a; }
.pic {
  display: block;
  height: var(--fh);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #050404;
}
.pic img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.72) contrast(1.15);
  transition: filter 0.7s ease, transform 0.9s var(--ease-out);
}
.frame--blank .pic { background: #110f0e; box-shadow: inset 0 0 0 1px rgba(239, 236, 230, 0.035); }
.cap {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 2px 8px;
  width: calc(var(--fh) * 0.75 + 20px);
  padding: 18px 10px 0;
}
.cap-no {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  color: var(--edge);
  padding-top: 0.42em;
}
.cap-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 2px no-repeat;
  padding-bottom: 4px;
  justify-self: start;
  transition: background-size 0.5s var(--ease-out);
}
.cap-meta { grid-column: 2; font-size: 0.8rem; color: var(--paper-dim); }
.frame-link:focus-visible { outline: none; }
.frame-link:focus-visible .film { outline: 2px solid var(--paper); outline-offset: -2px; }
.frame-link:focus-visible .pic img { filter: none; }
.frame-link:focus-visible .cap-title { background-size: 100% 2px; }
@media (hover: hover) and (pointer: fine) {
  .frame-link:hover .pic img { filter: none; }
  .frame-link:hover .cap-title { background-size: 100% 2px; }
  html.has-loupe .frame-link .pic { cursor: none; }
}

.loupe {
  position: fixed;
  left: 0; top: 0;
  z-index: 60;
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
  border-radius: 50%;
  pointer-events: none;
  background-color: #000;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgba(239, 236, 230, 0.9), 0 0 0 7px var(--ground), 0 0 0 8px rgba(239, 236, 230, 0.28), 0 24px 40px -10px rgba(0, 0, 0, 0.8);
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.2s ease, scale 0.35s var(--ease-out);
}
.loupe.is-on { opacity: 1; scale: 1; }
.loupe::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  background:
    linear-gradient(var(--paper), var(--paper)) center / 1px 100% no-repeat,
    linear-gradient(var(--paper), var(--paper)) center / 100% 1px no-repeat;
  opacity: 0.55;
}

/* ---- fixer: the statement and the hotline */
.fix {
  margin-top: clamp(120px, 20svh, 220px);
  padding: clamp(80px, 14svh, 150px) var(--gutter) clamp(80px, 14svh, 150px);
  background: var(--ground-2);
  border-top: 1px solid var(--paper-faint);
}
.fix-title { margin-top: 26px; }
.fix-title img {
  width: min(100%, 1120px);
  height: auto;
  filter: invert(1) brightness(0.95);
}
.fix-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(36px, 6vw, 110px);
  align-items: end;
  margin-top: clamp(48px, 9svh, 96px);
  max-width: 1320px;
}
.fix-copy { max-width: 62ch; }
.fix-copy p { font-size: 1.04rem; line-height: 2; color: var(--paper-dim); }
.fix-copy p + p { margin-top: 1.2em; }
.fix-copy .fix-final { margin-top: 2em; color: var(--paper); font-weight: 600; }
.hotline { display: inline-flex; flex-direction: column; gap: 10px; justify-self: start; text-decoration: none; }
.hotline-label { font-size: 0.86rem; letter-spacing: 0.08em; color: var(--paper-dim); }
.hotline-number {
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5.4rem, 15vw, 13rem);
  line-height: 0.86;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.grease {
  position: absolute;
  left: -14%; top: -26%;
  width: 128%; height: 152%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}
.grease path {
  fill: none;
  stroke: var(--safelight);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.hotline:focus-visible { outline-offset: 10px; }

/* ---- contact */
.contact { padding: clamp(70px, 12svh, 130px) var(--gutter) 40px; }
.contacts { margin-top: 18px; max-width: 1320px; border-top: 1px solid var(--paper-faint); }
.contacts a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 1.4rem;
  align-items: baseline;
  gap: 0 18px;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--paper-faint);
  text-decoration: none;
}
.c-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
  transition: transform 0.5s var(--ease-out);
}
.c-arrow { justify-self: end; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .contacts a:hover .c-value { transform: translateX(12px); }
  .contacts a:hover .c-arrow { transform: translate(4px, -4px); }
}
.end {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 64px;
  max-width: 1320px;
  font-size: 0.86rem;
  color: var(--paper-dim);
}

/* ---- print pages */
.pp, .lost { padding: clamp(110px, 17svh, 170px) var(--gutter) 0; }
.pp-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 30vw);
  gap: clamp(28px, 5vw, 90px);
  align-items: end;
  max-width: 1440px;
}
.pp-title {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 7.4vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.pp-sub { margin-top: 18px; font-size: 1.1rem; color: var(--paper-dim); }
.pp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-faint);
  font-size: 0.86rem;
  color: var(--paper-dim);
}
.pp-print .paper { transform: rotate(1.8deg); }
.pp-img { view-transition-name: frame-pic; }
.pp-body { margin-top: clamp(64px, 12svh, 130px); max-width: 1440px; }
.sheet--timeline {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 90px);
}
.timeline { position: sticky; top: 16svh; align-self: start; }
.timeline a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.84rem;
  color: var(--paper-dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 236, 230, 0.07);
  transition: color 0.3s ease, transform 0.4s var(--ease-out);
}
.t-no { font-family: var(--display); font-weight: 600; letter-spacing: 0.1em; color: var(--edge); }
.timeline a:hover, .timeline a.is-current { color: var(--paper); }
.timeline a.is-current { transform: translateX(8px); }
.entries { max-width: 44rem; }
.entry { scroll-margin-top: 100px; max-width: 44rem; }
.entry + .entry {
  margin-top: clamp(70px, 12svh, 130px);
  padding-top: clamp(40px, 6svh, 64px);
  border-top: 1px solid var(--paper-faint);
}
.entry-date {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 1.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}
.entry p { font-size: 1.06rem; line-height: 2; color: var(--paper-dim); overflow-wrap: anywhere; }
.entry p + p { margin-top: 1.1em; }
.entry-link a { color: var(--paper); font-weight: 600; background-size: 100% 1px; }
.entry-link a:hover { background-size: 0 1px; }
.shot { margin: 2.4rem 0; }
.shot-btn {
  display: block;
  width: 100%;
  padding: clamp(6px, 0.8vw, 12px);
  border: 0;
  background: var(--paper);
  cursor: zoom-in;
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.95);
}
.shot img { width: 100%; height: auto; background: #000; }
.line {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 48px);
  padding-top: 26px;
  margin-bottom: clamp(56px, 10svh, 110px);
}
.line::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1); top: 12px;
  height: 1px;
  background: rgba(239, 236, 230, 0.32);
}
.hung {
  position: relative;
  flex: 1 1 0;
  max-width: 300px;
  transform-origin: 50% -14px;
  rotate: calc((var(--i) - 1) * 2.4deg);
}
.clip {
  position: absolute;
  left: 50%; top: -22px;
  width: 16px; height: 30px;
  margin-left: -8px;
  z-index: 2;
  background: #2b2723;
  border: 1px solid rgba(239, 236, 230, 0.22);
}
.hung .shot-btn img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.entry--letter { margin: 0 auto; }
.passage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(20px, 4vw, 64px);
  max-width: 1440px;
  margin-top: clamp(100px, 16svh, 180px);
  padding-bottom: clamp(70px, 12svh, 130px);
}
.passage-link { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--paper); text-decoration: none; }
.passage-link--next { text-align: right; align-items: flex-end; }
.passage-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
  transition: transform 0.5s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .passage-link--prev:hover .passage-title { transform: translateX(-12px); }
  .passage-link--next:hover .passage-title { transform: translateX(12px); }
}
.lightbox {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 56px 20px 64px;
  border: 0;
  background: rgba(10, 9, 8, 0.97);
  color: var(--paper);
}
.lightbox::backdrop { background: transparent; }
.lightbox-stage { width: 100%; height: 100%; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox button { border: 0; background: none; cursor: pointer; padding: 10px 14px; }
.lightbox-close { position: absolute; right: 12px; top: 10px; font-size: 0.9rem; }
.lightbox-bar {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}
body.page-lost { background: var(--paper); color: var(--ground); }
.page-lost .edge { color: #6d6253; }
.lost { min-height: 100svh; }
.lost p:last-child { margin-top: 2rem; }

/* ---- motion: only when the reader has not asked for less */
@keyframes safelight-on {
  0% { opacity: 0; }
  6% { opacity: 0.7; }
  10% { opacity: 0.12; }
  17% { opacity: 0.9; }
  23% { opacity: 0.35; }
  32%, 100% { opacity: 1; }
}
@keyframes rise { from { transform: translateY(106%); } to { transform: translateY(0); } }
@keyframes settle { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes develop {
  0% { filter: brightness(0) contrast(2.2) grayscale(1); }
  35% { filter: brightness(0.3) contrast(1.9) grayscale(1); }
  72% { filter: brightness(0.86) contrast(1.25) grayscale(0.5); }
  100% { filter: brightness(1) contrast(1) grayscale(0); }
}
@keyframes develop-mono {
  0% { filter: brightness(0) contrast(2.2) grayscale(1); }
  100% { filter: grayscale(1) brightness(0.72) contrast(1.15); }
}
@keyframes agitate {
  0%, 100% { translate: 0 0; }
  25% { translate: 3px -1px; }
  50% { translate: -2px 1px; }
  75% { translate: 2px 1px; }
}
@keyframes sway {
  0%, 100% { rotate: calc((var(--i) - 1) * 2.4deg - 1.1deg); }
  50% { rotate: calc((var(--i) - 1) * 2.4deg + 1.1deg); }
}

html.motion .safelight { animation: safelight-on 1.5s linear both; }
html.motion .motto-line > span { animation: rise 1s var(--ease-out) calc(450ms + var(--i) * 120ms) both; }
html.motion .motto-aside,
html.motion .tray-edge,
html.motion .print-cap,
html.motion .cue,
html.motion .top { animation: settle 0.9s var(--ease-out) 1.1s both; }
html.motion .print { animation: settle 1s var(--ease-out) 0.7s both; }
html.motion .print-img { animation: develop 3.2s ease-out 0.9s both; }
html.motion .print .paper { animation: agitate 1.5s ease-in-out 1s 2; }
html.motion .print.is-washing .print-img { opacity: 0; transition: opacity 0.45s ease; }
html.motion .print.is-developing .print-img { animation: develop 2.8s ease-out both; }
html.motion .print.is-developing .paper { animation: agitate 1.4s ease-in-out 2; }
html.motion .tray.is-away .print .paper { animation-play-state: paused; }

html.motion .roll-title > span { transform: translateY(106%); transition: transform 1s var(--ease-out); }
html.motion .roll.is-in .roll-title > span { transform: none; }
html.motion .roll:not(.is-in) .pic img { filter: brightness(0) contrast(2); }
html.motion .roll.is-in .pic img { animation: develop-mono 1.6s ease-out calc(0.25s + var(--i) * 0.12s) backwards; }
html.motion .fix-title img {
  opacity: calc(0.05 + var(--dev, 1) * 0.95);
  filter: invert(1) brightness(0.95) blur(calc((1 - var(--dev, 1)) * 7px));
}
html.motion .fix-copy > p { opacity: 0; translate: 0 16px; transition: opacity 0.8s ease, translate 1s var(--ease-out); }
html.motion .fix-copy > p.is-in { opacity: 1; translate: 0 0; }
html.motion .grease path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-in-out) 0.35s; }
html.motion .hotline.is-in .grease path { stroke-dashoffset: 0; }

html.motion .pp-words > * { animation: settle 0.9s var(--ease-out) both; }
html.motion .pp-words > *:nth-child(2) { animation-delay: 80ms; }
html.motion .pp-words > *:nth-child(n+3) { animation-delay: 160ms; }
html.motion .pp-img { animation: develop 2.6s ease-out 0.2s both; }
html.motion .shot:not(.is-in) img { filter: brightness(0); }
html.motion .shot.is-in img { animation: develop 2.4s ease-out both; }
html.motion .shot.is-in .shot-btn { animation: agitate 1.3s ease-in-out 2; }
html.motion .hung { animation: sway 6.5s ease-in-out calc(var(--i) * -2.1s) infinite; }
html.motion .lightbox { opacity: 0; transition: opacity 0.18s ease, overlay 0.18s allow-discrete, display 0.18s allow-discrete; }
html.motion .lightbox[open] { opacity: 1; transition-duration: 0.3s; }
@starting-style { html.motion .lightbox[open] { opacity: 0; } }
html.motion .lightbox img { transition: opacity 0.2s ease; }
html.motion .lightbox img.is-swapping { opacity: 0; }

::view-transition-group(frame-pic) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
::view-transition-old(root) { animation-duration: 0.25s; }
::view-transition-new(root) { animation-duration: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---- narrow screens */
@media (pointer: coarse) {
  .strip { scroll-snap-type: x mandatory; }
  .frame { scroll-snap-align: start; }
}
@media (max-width: 900px) {
  :root { --fh: clamp(220px, 42svh, 360px); }
  .tray {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    row-gap: 28px;
    min-height: auto;
    padding-bottom: 40px;
  }
  .motto { grid-row: 2; font-size: clamp(3.4rem, 17vw, 7rem); }
  .print { grid-column: 1; grid-row: 3; width: min(78vw, 360px); justify-self: end; margin-top: -12px; }
  .cue { grid-row: 4; }
  .fix-body { grid-template-columns: minmax(0, 1fr); }
  .contacts a { grid-template-columns: 4.6rem minmax(0, 1fr) 1.2rem; gap: 0 10px; }
  .pp-head { grid-template-columns: minmax(0, 1fr); }
  .pp-print { width: min(80vw, 380px); justify-self: end; }
  .sheet--timeline { grid-template-columns: minmax(0, 1fr); }
  .timeline { position: static; min-width: 0; }
  .timeline ol { display: flex; gap: 0 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--paper-faint); }
  .timeline ol::-webkit-scrollbar { display: none; }
  .timeline a { display: flex; white-space: nowrap; border-bottom: 0; padding: 8px 0 10px; }
  .timeline a.is-current { transform: none; box-shadow: inset 0 -2px 0 var(--paper); }
  .passage { grid-template-columns: 1fr; gap: 28px; }
  .line { gap: 8px; }
}
