/* Russell Castaloni — portfolio
   Direction: the print shop and the proof sheet. Paper and ink neutrals, one screen-print yellow accent,
   crop marks on every image frame as the single signature detail.
   Spacing sits on a 4px grid. Type weights are 400 and 500. Motion uses transform and opacity only. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque-opsz.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("assets/fonts/dm-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t1: 150ms;   /* feedback */
  --t2: 400ms;   /* things that enter */
  --t3: 800ms;   /* hero only */
  --edge: 20px;
  --nav-h: 64px;
  --max: 1360px;
  --r: 8px;
  --r-lg: 12px;
  --accent: #f2b705;
  --accent-hover: #ffc933;
  --on-accent: #17150f;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3eee2;
  --surface: #faf7ef;
  --surface-2: #e8e1cf;
  --ink: #17150f;
  --ink-2: #4d473b;
  --ink-3: #6a6455;
  --line: rgba(23, 21, 15, 0.1);
  --line-strong: rgba(23, 21, 15, 0.5);
  --field: rgba(23, 21, 15, 0.55);
  --err: #b3261e;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110;
  --surface: #1a1816;
  --surface-2: #252220;
  --ink: #f2ede1;
  --ink-2: #bab3a3;
  --ink-3: #9a9382;
  --line: rgba(242, 237, 225, 0.12);
  --line-strong: rgba(242, 237, 225, 0.4);
  --field: rgba(242, 237, 225, 0.6);
  --err: #ff8f86;
}
@media (min-width: 900px) {
  :root { --edge: 32px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--edge) * 2);
  margin-inline: auto;
  padding-inline: var(--edge);
}
.mono {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.skip {
  position: fixed; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 12px 16px; border-radius: var(--r); text-decoration: none;
  transition: transform var(--t2) var(--ease);
}
.skip:focus { transform: translateY(80px); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  border-radius: var(--r);
  font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--t1) var(--ease), border-color var(--t1) var(--ease), transform var(--t2) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost { border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  border-radius: var(--r); color: var(--ink-2);
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn:disabled:hover { background: none; color: var(--ink-2); }

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  background: var(--bg);
  transition: transform var(--t2) var(--ease), box-shadow var(--t1) var(--ease);
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-in { height: var(--nav-h); display: flex; align-items: center; gap: 8px; }
.brand { font-size: 18px; font-weight: 500; text-decoration: none; margin-right: auto; letter-spacing: -0.01em; }
.links { display: none; gap: 4px; margin-right: 16px; }
.links a, .menu a {
  position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 12px;
  font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: var(--r);
  transition: color var(--t1) var(--ease);
}
.links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t2) var(--ease);
}
.links a:hover, .links a[aria-current="true"] { color: var(--ink); }
.links a:hover::after, .links a[aria-current="true"]::after { transform: scaleX(1); }
.nav-cta { display: none; margin-left: 8px; }

.theme-btn .ico-sun, .menu-btn .ico-close { display: none; }
:root[data-theme="dark"] .theme-btn .ico-sun { display: block; }
:root[data-theme="dark"] .theme-btn .ico-moon { display: none; }
.menu-btn[aria-expanded="true"] .ico-open { display: none; }
.menu-btn[aria-expanded="true"] .ico-close { display: block; }

.menu { position: absolute; inset: var(--nav-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding-block: 8px 16px; }
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu a { height: 56px; font-size: 20px; color: var(--ink); padding: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.menu a:last-child { border-bottom: 0; }

@media (min-width: 860px) {
  .links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-btn, .menu { display: none !important; }
}

/* ---------- hero ---------- */
.hero { min-height: 100svh; padding-top: calc(var(--nav-h) + 16px); display: grid; grid-template-rows: 1fr auto; }
.hero-grid { display: grid; gap: 40px; align-items: center; padding-block: 32px; }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.display {
  font-weight: 400; font-size: clamp(48px, 6.6vw, 96px); line-height: 1; letter-spacing: -0.035em;
}
.ln { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.ln > span { display: block; }
.lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-art { position: relative; width: min(100%, 560px); justify-self: end; display: grid; gap: 16px; }
.hero-art .frame { aspect-ratio: 1; }
.reveal-clip { position: relative; overflow: hidden; height: 100%; }
.hero-art .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-strip { position: relative; display: flex; justify-content: space-between; gap: 16px; padding-block: 20px; }
.hero-strip::before { content: ""; position: absolute; top: 0; left: var(--edge); right: var(--edge); height: 1px; background: var(--line); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
}

/* ---------- sections ---------- */
.sec { padding-block: 96px; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 24px; margin-bottom: 48px; }
.sec-head p { color: var(--ink-2); max-width: 32em; }
h2 { font-weight: 400; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.02; letter-spacing: -0.03em; }
@media (min-width: 900px) {
  .sec { padding-block: 144px; }
  .sec-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 48px; margin-bottom: 64px; }
}

/* ---------- frames and crop marks (signature) ---------- */
.frame {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--surface-2); cursor: zoom-in;
}
.frame.static { cursor: default; }
.frame img {
  width: min(100%, calc(var(--nw, 99999) * 1.25px)); margin-inline: auto;
  background: var(--dom, transparent);
}
.marks {
  position: absolute; inset: -12px; z-index: 2; pointer-events: none; color: var(--ink); opacity: 0.8;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-position:
    0 12px, 12px 0,
    100% 12px, calc(100% - 12px) 0,
    0 calc(100% - 12px), 12px 100%,
    100% calc(100% - 12px), calc(100% - 12px) 100%;
  background-size:
    8px 1px, 1px 8px,
    8px 1px, 1px 8px,
    8px 1px, 1px 8px,
    8px 1px, 1px 8px;
  transition: transform var(--t2) var(--ease), opacity var(--t2) var(--ease);
}
.frame:not(.static):hover .marks, .frame:focus-visible .marks { transform: scale(1.03); opacity: 1; }
.frame:focus-visible { outline-offset: 8px; }

.cap { display: grid; gap: 2px; margin-top: 16px; font-size: 14px; line-height: 1.4; }
.cap .ttl { font-weight: 500; }

/* ---------- work wall ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r); font-size: 14px; font-weight: 500;
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease), border-color var(--t1) var(--ease);
}
.chip:hover { background: var(--surface-2); }
.chip .n { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: 0.75; }

.grid { columns: 2; column-gap: 32px; }
.card { break-inside: avoid; margin-bottom: 48px; }
.card[hidden] { display: none; }
@media (min-width: 860px) { .grid { columns: 3; } }
@media (min-width: 1200px) { .grid { columns: 4; } }
@media (max-width: 520px) { .grid { column-gap: 24px; } .card { margin-bottom: 40px; } }

/* ---------- creative strip ---------- */
.strip {
  --pad: max(var(--edge), calc((100% - var(--max)) / 2));
  display: flex; gap: 40px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 16px var(--pad) 24px; scroll-padding-inline: var(--pad);
  scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip.is-drag .frame { cursor: grabbing; }
.pcard { flex: none; height: clamp(280px, 34vw, 480px); scroll-snap-align: start; display: grid; grid-template-rows: 1fr auto; }
.pcard .frame { height: 100%; min-height: 0; }
.pcard .frame img { width: 100%; height: 100%; object-fit: cover; }
.pcard .cap { margin-top: 16px; }
.strip-ui { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.track { position: relative; flex: 1; height: 1px; background: var(--line-strong); margin-right: 16px; }
.thumb { position: absolute; left: 0; top: -1px; height: 3px; width: 20%; background: var(--ink); will-change: transform; }

/* ---------- approach ---------- */
.approach-grid { display: grid; gap: 48px; }
.step { display: grid; gap: 12px; padding-block: 32px; border-top: 1px solid var(--line); }
.step h3 { font-weight: 500; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.step p { color: var(--ink-2); max-width: 30em; }
.stage { display: grid; gap: 40px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pi { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .approach-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 96px; align-items: start; }
  .step { min-height: 44vh; align-content: start; padding-block: 40px; }
  .js .step { opacity: 0.38; transition: opacity var(--t2) var(--ease); }
  .js .step.is-active { opacity: 1; }
  .stage { position: sticky; top: calc(var(--nav-h) + 32px); height: min(640px, calc(100svh - var(--nav-h) - 64px)); display: block; }
  .pair { position: absolute; inset: 0; display: block; }
  .js .pair { opacity: 0; pointer-events: none; transition: opacity var(--t2) var(--ease); }
  .js .pair.is-active { opacity: 1; pointer-events: auto; }
  .pi { position: absolute; }
  .pi.a { left: 0; top: 0; width: 62%; }
  .pi.b { right: 0; bottom: 0; width: 48%; }
}

/* ---------- about ---------- */
.about-grid { display: grid; gap: 48px; align-items: start; }
.portrait { max-width: 260px; }
@media (min-width: 900px) { .portrait { max-width: 380px; } }
.lead { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.25; letter-spacing: -0.015em; max-width: 24em; margin-block: 24px 48px; }
.about-cols { display: grid; gap: 32px; }
.about-cols h3 { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.02em; color: var(--ink-3); margin-bottom: 12px; }
.about-cols p { font-size: 15px; color: var(--ink-2); }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 96px; }
  .about-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- contact ---------- */
.contact { background: var(--surface); }
.contact-grid { display: grid; gap: 48px; }
.contact h2 { margin-block: 16px 24px; }
.direct { margin-top: 32px; display: grid; gap: 4px; }
.direct[hidden] { display: none; }
.direct-row { display: flex; align-items: center; gap: 8px; }
.direct-row a { font-size: 20px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.form { display: grid; gap: 32px; align-content: start; }
.row2 { display: grid; gap: 32px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0; }
.field legend { margin-bottom: 12px; }
.field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--field); border-radius: 0; padding: 8px 0 12px;
  transition: box-shadow var(--t1) var(--ease), border-color var(--t1) var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: 0; box-shadow: 0 1px 0 var(--ink); border-bottom-color: var(--ink); }
.field input[aria-invalid="true"] { border-bottom-color: var(--err); box-shadow: 0 1px 0 var(--err); }
.err { min-height: 0; font-size: 13px; line-height: 1.4; color: var(--err); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 14px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease), border-color var(--t1) var(--ease);
}
.opt:hover span { background: var(--surface-2); }
.opt input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.note { font-size: 14px; color: var(--ink-3); }
.status { min-height: 24px; font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.status button { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 96px; }
  .row2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- footer, dock, toast ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 32px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.foot-in a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); }
.foot-in a:hover { color: var(--ink); }
.foot-in .i { width: 16px; height: 16px; }

.dock {
  position: fixed; inset: auto 0 0 0; z-index: 55; padding: 12px var(--edge) calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform var(--t2) var(--ease);
}
.dock.is-on { transform: none; }
.dock .btn { width: 100%; }
@media (min-width: 760px) { .dock { display: none; } }
@media (max-width: 759px) { body { padding-bottom: 72px; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r); font-size: 14px;
  transition: opacity var(--t2) var(--ease), transform var(--t2) var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 759px) { .toast { bottom: 88px; } }

/* ---------- viewer ---------- */
.viewer {
  border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  background: var(--bg); color: var(--ink); overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: auto 1fr; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.5); }
.v-bar { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--edge); }
.v-body { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.v-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 24px calc(var(--edge) + 48px); }
.v-frame { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; }
.v-img {
  /* up to 1.5x native size, never taller than the stage, aspect ratio kept */
  --maxh: calc(100svh - var(--nav-h) - 48px - 220px);
  width: min(calc(var(--nw, 600) * 1.5px), 100%, calc(var(--maxh) * var(--nw, 600) / var(--nh, 600)));
  height: auto; background: var(--surface-2);
}
.v-nav { position: absolute; top: 50%; margin-top: -18px; background: var(--surface); }
.v-prev { left: var(--edge); }
.v-next { right: var(--edge); }
.v-side { padding: 16px var(--edge) 32px; display: grid; gap: 8px; align-content: start; }
.v-title { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.v-credit { color: var(--ink-2); }
.v-cta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.v-cta p { color: var(--ink-2); font-size: 14px; }
@media (min-width: 900px) {
  .v-body { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: minmax(0, 1fr); }
  .v-img { --maxh: calc(100svh - var(--nav-h) - 48px); }
  .v-side { padding: 32px var(--edge); border-left: 1px solid var(--line); }
  .v-title { font-size: 32px; }
}

/* ---------- theme switch: circular reveal via View Transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* ---------- motion (only when JS runs and motion is welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* hero: the one entrance */
  .js .ln > span { transform: translateY(105%); }
  .js [data-hero] { opacity: 0; transform: translateY(12px); }
  /* the image paints at once (fast LCP); a paper-coloured sheet slides off it */
  .js .hero-art .reveal-clip::after { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--bg); transform-origin: bottom; }
  .js .hero-art .marks, .js .hero-art figcaption { opacity: 0; }
  .js.is-ready .ln > span { transform: none; transition: transform var(--t3) var(--ease) calc(var(--i) * 90ms + 100ms); }
  .js.is-ready [data-hero] { opacity: 1; transform: none; transition: opacity var(--t2) var(--ease) 500ms, transform var(--t2) var(--ease) 500ms; }
  .js.is-ready .hero-art .reveal-clip::after { transform: scaleY(0); transition: transform var(--t3) var(--ease) 100ms; }
  .js.is-ready .hero-art .marks { opacity: 0.8; transition: opacity var(--t2) var(--ease) 900ms; }
  .js.is-ready .hero-art figcaption { opacity: 1; transition: opacity var(--t2) var(--ease) 900ms; }

  /* scroll reveals: same small rise everywhere */
  .js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity var(--t2) var(--ease) calc(var(--d, 0) * 1ms), transform var(--t2) var(--ease) calc(var(--d, 0) * 1ms); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  /* crop marks draw outward when their piece arrives */
  .js .card .marks, .js .pcard .marks, .js .pi .marks, .js .portrait .marks { opacity: 0; transform: scale(0.94); }
  .js .card.in .marks, .js .pcard.in .marks, .js .pi.in .marks, .js .portrait.in .marks { opacity: 0.8; transform: none; transition-delay: 200ms; }
  .js .card.in .frame:hover .marks, .js .pcard.in .frame:hover .marks, .js .pi.in .frame:hover .marks { opacity: 1; transform: scale(1.03); transition-delay: 0ms; }
  .js .frame img[loading="lazy"] { transition: opacity var(--t2) var(--ease); }
  .js .frame img[loading="lazy"]:not(.is-loaded) { opacity: 0; }

  .viewer[open] { animation: v-in 250ms var(--ease); }
  @keyframes v-in { from { opacity: 0; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marks, .btn, .nav, .dock, .toast { transition: none; }
}
