/* =========================================================
   Jordana Katz Portfolio · "Campaign book"
   ========================================================= */
:root {
  --paper: #f1ece3;
  --paper-2: #e7e0d4;
  --ink: #141414;
  --ink-2: #3a3732;
  --muted: #645e56;
  --line: rgba(20, 20, 20, 0.14);

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.is-book { scroll-snap-type: y mandatory; }
@media (max-width: 860px) { html.is-book { scroll-snap-type: y proximity; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-book { background: #111; }
body.menu-open { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
/* Inline icons (drawn, so phones never swap in emoji) */
.i { display: inline-block; width: 0.78em; height: 0.78em; vertical-align: -0.04em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i--fill { fill: currentColor; stroke: none; }
.press__arrow .i { width: 18px; height: 18px; }
.cell__chip { display: inline-flex; align-items: center; gap: 5px; }
.on-touch { display: none; }
@media (hover: none) { .on-hover { display: none; } .on-touch { display: inline; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------------- Nav (blends over any spread color) ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  color: var(--nav, var(--ink));
  transition: transform 0.45s var(--ease), color 0.4s ease;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 26px; font-size: 14px; }
.nav__links a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.nav__links a:hover { background-size: 100% 1px; }
.nav__burger { display: none; width: 42px; height: 42px; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform 0.35s var(--ease), top 0.35s var(--ease); }
.nav__burger span:first-child { top: 16px; }
.nav__burger span:last-child { top: 24px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; padding: 90px var(--gutter) 40px;
}
.mobile-menu a { font-family: var(--display); text-transform: uppercase; font-size: clamp(56px, 17vw, 96px); line-height: 1.05; border-bottom: 1px solid rgba(255,255,255,.15); }
.mobile-menu[hidden] { display: none; }
@media (max-width: 860px) {
  .nav { background: var(--navbg, var(--paper)); padding-block: 10px; transition: transform 0.45s var(--ease), color 0.4s ease, background-color 0.4s ease; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
}

/* ---------------- Rail (book page indicator) ---------------- */
.rail {
  position: fixed; right: clamp(12px, 2vw, 28px); top: 50%; transform: translateY(-50%); z-index: 45;
  display: flex; flex-direction: column; gap: 10px; color: var(--nav, var(--ink)); transition: color 0.4s ease;
}
.rail[hidden] { display: none; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.45; transition: opacity 0.3s; }
.rail a i { width: 18px; height: 2px; background: currentColor; transition: width 0.4s var(--ease); }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity 0.3s, transform 0.3s; white-space: nowrap; }
.rail a.on { opacity: 1; }
.rail a.on i { width: 36px; }
.rail:hover a span { opacity: 1; transform: none; }
@media (max-width: 1024px) { .rail { display: none; } }

/* ---------------- Main transitions & reveals ---------------- */
main { outline: none; transition: opacity 0.22s ease; }
main.is-leaving { opacity: 0; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; padding-bottom: 0.02em; }
.reveal-up { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease) var(--d, 0s); }
.reveal-up.is-in { transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.96); transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
.reveal-scale.is-in { opacity: 1; transform: none; }

/* =========================================================
   The book
   ========================================================= */
.spread {
  position: relative; min-height: 100svh; scroll-snap-align: start; overflow: hidden;
  background: var(--bg, var(--paper)); color: var(--fg, var(--ink));
  padding: 90px var(--gutter) 40px;
}

/* Intro / index page */
.spread--intro { --bg: var(--paper); --fg: var(--ink); display: grid; grid-template-rows: auto 1fr auto; gap: 24px; }
.intro__eyebrow { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.intro__title {
  margin: 0; align-self: center;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(96px, 21vw, 360px); line-height: 0.84; letter-spacing: -0.005em;
}
.intro__index {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line);
}
.intro__index a {
  position: relative; display: flex; align-items: baseline; gap: 10px; padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; isolation: isolate;
  transition: color 0.3s, padding 0.4s var(--ease);
}
.intro__index a::before {
  content: ""; position: absolute; inset: 0 0 -1px; z-index: -1; background: var(--bg);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.4s var(--ease);
}
.intro__index a:hover { color: var(--fg); padding-left: 12px; }
.intro__index a:hover::before { transform: none; }
.intro__index span { font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.intro__index i { margin-left: auto; font-style: normal; font-size: 12px; opacity: 0.55; }
.intro__hint { position: absolute; right: calc(var(--gutter) + 80px); top: 50%; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; writing-mode: vertical-rl; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.intro__hint i { width: 1px; height: 56px; background: currentColor; animation: drip 1.8s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 900px) { .intro__index { grid-template-columns: repeat(2, 1fr); } .intro__hint { display: none; } }

/* Project spreads */
.spread--project { display: grid; grid-template-rows: auto auto auto 1fr; align-content: start; }
.spread__meta {
  position: relative; z-index: 3; margin: 0;
  display: grid; grid-template-columns: repeat(4, max-content); gap: 8px 40px; font-size: 13px;
}
.spread__meta dt { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.spread__meta dd { margin: 4px 0 0; font-weight: 500; }
.spread__tag {
  position: relative; z-index: 3; max-width: 20ch; margin: clamp(24px, 4vh, 48px) 0 0;
  font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3.2vw, 50px); line-height: 1.02;
}
.spread__cta {
  position: relative; z-index: 4; justify-self: start; align-self: start; margin-top: 26px;
  display: inline-flex; gap: 10px; align-items: center; padding: 14px 22px; border-radius: 99px;
  background: var(--fg); color: var(--bg); font-weight: 500; font-size: 14px;
  transition: transform 0.35s var(--ease), gap 0.35s var(--ease);
}
.spread__cta:hover { transform: translateY(-2px); gap: 16px; }
.spread__num { position: absolute; z-index: 3; right: calc(var(--gutter) + 56px); top: 90px; font-family: var(--display); font-size: 22px; }
.spread__title {
  position: absolute; z-index: 1; left: clamp(8px, 2.6vw, 40px); bottom: -0.11em; margin: 0;
  font-family: var(--display); font-weight: 400; text-transform: uppercase; white-space: nowrap;
  font-size: clamp(96px, 21vw, 380px); line-height: 0.82;
  transform: translateX(calc(var(--p, 0) * -8vw));
}
.stack {
  position: absolute; z-index: 2; right: clamp(56px, 9vw, 150px); top: 50%;
  width: min(46vw, 640px); height: min(70svh, 660px);
  transform: translateY(calc(-50% + var(--p, 0) * -40px));
}
.stack figure {
  position: absolute; margin: 0; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,.15);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.55);
  transition: transform 0.7s var(--ease);
}
.stack img, .stack video { width: 100%; height: 100%; object-fit: cover; }
.stack figure:nth-child(1) { inset: 0 18% 14% 0; transform: rotate(-3deg); z-index: 2; }
.stack figure:nth-child(2) { width: 44%; height: 56%; right: 0; top: 4%; transform: rotate(5deg); z-index: 1; }
.stack figure:nth-child(3) { width: 38%; height: 40%; right: 6%; bottom: 0; transform: rotate(-6deg); z-index: 3; }
.stack:hover figure:nth-child(1) { transform: rotate(-1deg) translateY(-6px); }
.stack:hover figure:nth-child(2) { transform: rotate(8deg) translateX(14px); }
.stack:hover figure:nth-child(3) { transform: rotate(-9deg) translate(10px, 10px); }
/* first arrival on a spread: the stack deals itself onto the table */
.spread--project:not(.is-seen) .stack figure { transform: translateY(40px) rotate(0); opacity: 0; }
.stack figure { transition: transform 0.9s var(--ease), opacity 0.6s; }
.stack figure:nth-child(2) { transition-delay: 0.08s; }
.stack figure:nth-child(3) { transition-delay: 0.16s; }

@media (max-width: 860px) {
  .spread { padding-top: 76px; }
  .spread__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin-top: 30px; }
  .spread__num { top: 70px; left: var(--gutter); right: auto; font-size: 16px; }
  .stack { position: relative; right: auto; top: auto; transform: none; width: 100%; height: 56svh; margin: 28px 0 22vw; }
  .spread__title { transform: none; font-size: 24vw; }
}

/* About page */
.spread--about {
  --bg: var(--paper); --fg: var(--ink);
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start;
  padding-bottom: clamp(120px, 19vw, 320px);
}
.about__photos { position: relative; height: min(76svh, 720px); margin-top: 10px; }
.about__photos figure {
  position: absolute; margin: 0; border-radius: 6px; overflow: hidden; background: var(--paper-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.35); transition: transform 0.7s var(--ease);
}
.about__photos img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.6s; }
.about__photos figure:nth-child(1) { inset: 0 12% 2% 0; transform: rotate(-3deg); z-index: 2; }
.about__photos:hover figure:nth-child(1) { transform: rotate(-1deg) translateY(-6px); }
.about__photos:hover img { filter: none; }
.about__sticker {
  position: absolute; z-index: 4; left: 58%; top: 8%; transform: rotate(8deg);
  padding: 12px 18px; border-radius: 99px; background: #CF4919; color: #FFFFFF;
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 28px); white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.4);
}
.about__copy { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 18px; padding-right: clamp(0px, 5vw, 72px); }
.about__lead { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 40px); line-height: 1.12; letter-spacing: -0.01em; }
.about__body { margin: 0; max-width: 60ch; color: var(--ink-2); }
.about__caps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about__caps li { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 14px; }
.about__cards { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 6px; }
.about__ooo, .about__exp { border-radius: 12px; padding: clamp(18px, 2vw, 26px); }
.about__ooo { background: var(--paper-2); }
.about__ooo p:last-child { margin: 0; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.25; }
.about__exp { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; gap: 14px; }
.about__exp img { width: min(100%, 190px); margin: auto; opacity: 0.92; }
.pill--ink { --fg: var(--ink); --bg: var(--paper); align-self: flex-start; }
@media (max-width: 860px) {
  .spread--about { grid-template-columns: 1fr; padding-bottom: 30vw; }
  .about__photos { height: 62svh; }
  .about__cards { grid-template-columns: 1fr; }
}

/* Contact page */
.spread--contact { --bg: var(--ink); --fg: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.contact__title { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(64px, 11vw, 190px); line-height: 0.88; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.contact__email {
  font-size: clamp(22px, 3.2vw, 44px); letter-spacing: -0.03em; word-break: break-all; padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}
.pill { display: inline-flex; padding: 13px 20px; border-radius: 99px; background: var(--fg); color: var(--bg); font-weight: 500; font-size: 14px; transition: transform 0.3s var(--ease); }
.pill:hover { transform: translateY(-2px); }
.contact__links { list-style: none; margin: 24px 0 0; padding: 22px 0 0; display: flex; flex-wrap: wrap; gap: 28px; border-top: 1px solid rgba(255,255,255,.15); font-size: 15px; }
.contact__links a { opacity: 0.8; } .contact__links a:hover { opacity: 1; }
.contact__copy { margin-left: auto; opacity: 0.5; }
.notfound { min-height: 100svh; }

/* =========================================================
   Case study
   ========================================================= */
.project__band {
  background: var(--bg); color: var(--fg);
  padding: clamp(100px, 13vw, 150px) var(--gutter) clamp(140px, 18vw, 260px);
}
.project__bandInner { max-width: var(--max); margin: 0 auto; }
.back {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: clamp(28px, 4vw, 48px);
  padding: 9px 16px 9px 12px; border-radius: 99px; border: 1px solid currentColor; transition: gap 0.3s var(--ease), background 0.3s, color 0.3s;
}
.back:hover { gap: 12px; background: var(--fg); color: var(--bg); }
.project__eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.project__title { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(80px, 15vw, 260px); line-height: 0.86; }
.project__tagline { margin: 18px 0 0; max-width: 26ch; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 44px); line-height: 1.08; }
.project__cover, .project__info, .gallery { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.project__cover { margin-top: clamp(-220px, -15vw, -110px); }
.project__cover img, .project__cover video {
  width: 100%; max-height: 82vh; border-radius: var(--radius);
  object-fit: var(--fit, cover); object-position: var(--pos, 50% 50%);
  padding: var(--pad, 0); background: var(--cbg, var(--paper-2));
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
}
/* Framed cover: whole image at (at most) its real size, centered on a matching panel */
.project__cover--framed .frame {
  display: flex; align-items: center; justify-content: center;
  background: var(--frame); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 64px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
}
.project__cover--framed .frame img,
.project__cover--framed .frame video {
  width: auto; height: auto; max-width: min(100%, var(--nw)); max-height: min(70vh, var(--nh));
  object-fit: contain; padding: 0; background: none; box-shadow: none; border-radius: 4px;
}
.project__info {
  display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(48px, 7vw, 110px); padding-bottom: clamp(48px, 7vw, 110px);
}
.project__meta { margin: 0; align-self: start; position: sticky; top: 90px; border-top: 1px solid var(--line); }
.project__meta div { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.project__meta dt { color: var(--muted); font-size: 13px; }
.project__meta dd { margin: 0; font-size: 15px; font-weight: 500; }
.project__desc p { margin: 0 0 22px; color: var(--ink-2); max-width: 62ch; }
.project__desc .lead { color: var(--ink); }
.press { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.press a {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 20px 52px 20px 20px; border-radius: 12px; background: var(--paper-2);
  transition: background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.press__label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.press__title { font-size: 17px; font-weight: 500; line-height: 1.3; }
.press__arrow { position: absolute; top: 18px; right: 18px; font-size: 18px; transition: transform 0.4s var(--ease); }
.press a:hover { background: var(--bg); color: var(--fg); transform: translateY(-3px); }
.press a:hover .press__arrow { transform: translate(3px, -3px); }
@media (max-width: 860px) {
  .project__info { grid-template-columns: 1fr; }
  .project__meta { position: relative; top: 0; }
}

/* Next project: a preview of the next spread */
.next {
  position: relative; display: grid; align-content: end; gap: 10px; overflow: hidden; isolation: isolate;
  min-height: 70svh; margin-top: clamp(70px, 10vw, 150px);
  padding: clamp(28px, 5vw, 64px) var(--gutter);
  background: var(--bg); color: var(--fg);
}
.next__label { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.next__title { font-family: var(--display); text-transform: uppercase; font-size: clamp(72px, 14vw, 240px); line-height: 0.86; transition: transform 0.7s var(--ease); }
.next__tag { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 30px); max-width: 30ch; }
.next__art {
  position: absolute; z-index: -1; right: var(--gutter); top: clamp(28px, 5vw, 64px);
  width: min(34vw, 440px); aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden;
  transform: rotate(4deg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); transition: transform 0.8s var(--ease);
}
.next__art img, .next__art video { width: 100%; height: 100%; object-fit: cover; }
.next:hover .next__title { transform: translateX(12px); }
.next:hover .next__art { transform: rotate(0) scale(1.03); }
@media (max-width: 700px) { .next__art { width: 46vw; } }

/* =========================================================
   Gallery: justified rows
   Every cell in a row gets flex-grow equal to its aspect ratio
   and the same aspect-ratio, so a row's images share one height
   and run exactly edge to edge with no cropping.
   ========================================================= */
.gallery {
  --g: clamp(10px, 1.3vw, 18px);
  display: flex; flex-direction: column; gap: var(--g);
}
.chapter {
  display: flex; align-items: baseline; gap: 14px;
  margin: clamp(40px, 6vw, 88px) 0 clamp(6px, 1vw, 14px);
  font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.03em; line-height: 1;
}
.chapter:first-child { margin-top: 0; }
.chapter span {
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; color: var(--muted);
  transform: translateY(-0.4em);
}
.chapter::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; margin-left: 8px; }

.row {
  display: flex; gap: var(--g);
  width: calc(var(--w, 1) * 100%); margin-inline: auto;
}
.cell {
  position: relative; display: block; min-width: 0;
  flex: var(--ar) 1 0%; aspect-ratio: var(--ar);
  border-radius: 10px; overflow: hidden; background: var(--paper-2); cursor: zoom-in;
  isolation: isolate;
}
.cell img, .cell video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.cell:hover > img, .cell:hover > video { transform: scale(1.03); }

/* Logos & cut-outs: contained on a colored panel */
.cell--panel { background: var(--panel); }
.cell--panel img { object-fit: contain; padding: clamp(16px, 9%, 64px); max-width: calc(var(--nw) + 2 * clamp(16px, 9%, 64px)); margin: 0 auto; }

/* Long web pages: a frame that scrolls through the page on hover */
.cell--scroll { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.cell--scroll::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 22px; z-index: 2;
  background:
    radial-gradient(circle at 12px 11px, #e0dcd4 3.5px, transparent 4px),
    radial-gradient(circle at 24px 11px, #e0dcd4 3.5px, transparent 4px),
    radial-gradient(circle at 36px 11px, #e0dcd4 3.5px, transparent 4px),
    #f7f5f1;
  border-bottom: 1px solid var(--line);
}
.cell--scroll img {
  position: absolute; left: 0; right: 0; margin: 0 auto; top: 22px; width: min(100%, var(--nw)); height: auto; object-fit: initial;
  transition: top 6s cubic-bezier(0.45, 0, 0.55, 1), transform 6s cubic-bezier(0.45, 0, 0.55, 1);
}
.cell--scroll:hover img { top: 100%; transform: translateY(-100%); }

.cell__chip {
  position: absolute; z-index: 3; left: 10px; bottom: 10px;
  font-size: 11px; font-weight: 500; padding: 6px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.3s;
}
.cell--scroll:hover .cell__chip { opacity: 0; }
.cell::after {
  content: "+"; position: absolute; z-index: 3; right: 10px; bottom: 10px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); font-size: 18px; line-height: 1;
  opacity: 0; transform: scale(0.7); transition: opacity 0.3s, transform 0.4s var(--ease);
}
.cell:hover::after { opacity: 1; transform: none; }

/* Phones: 1–2 item rows stay justified; busier rows become a swipeable strip */
@media (max-width: 700px) {
  .row { width: 100%; }
  .row--many {
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); width: auto;
    scroll-padding-inline: var(--gutter);
  }
  .row--many::-webkit-scrollbar { display: none; }
  .row--many .cell { flex: 0 0 auto; height: 68vw; width: auto; scroll-snap-align: start; }
  .cell--scroll img { position: static; }
  .cell--scroll { overflow-y: auto; }
  .cell--scroll:hover img { transform: none; }
}

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 14, 14, 0.94); color: #f3f0ea;
  display: grid; grid-template-columns: 72px 1fr 72px; align-items: center;
  opacity: 0; transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__stage { margin: 0; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 72px 0 56px; }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: calc(100svh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 6px; animation: lbIn 0.35s var(--ease); }
.lightbox__stage figcaption { font-size: 13px; opacity: 0.6; text-align: center; }
.lightbox__close { position: absolute; top: 18px; right: var(--gutter); font-size: 14px; display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.2); }
.lightbox__close:hover { background: #f3f0ea; color: #141414; }
.lightbox__nav { width: 52px; height: 52px; margin: auto; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); font-size: 18px; transition: background 0.25s, color 0.25s; }
.lightbox__nav:hover { background: #f3f0ea; color: #141414; }
.lightbox__count { position: absolute; left: var(--gutter); top: 28px; font-size: 13px; opacity: 0.6; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 18px; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
  .lightbox__stage { padding: 72px 12px 90px; }
}

.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 24px; align-items: flex-start; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes lbIn { from { opacity: 0; transform: scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
}

/* =========================================================
   Phone sizing: keep each book page to roughly one screen
   ========================================================= */
@media (max-width: 860px) {
  .spread { padding: 70px var(--gutter) 22px; }

  /* Project spreads: number → title → tagline → artwork (fills) → details → button */
  .spread--project {
    min-height: 100svh;
    grid-template-rows: auto auto auto minmax(220px, 1fr) auto auto;
    grid-template-areas: "num" "title" "tag" "stack" "meta" "cta";
    gap: 12px; align-content: stretch;
  }
  .spread--project .spread__num { grid-area: num; position: static; font-size: 14px; }
  .spread--project .spread__title {
    grid-area: title; position: static; transform: none; z-index: 3;
    white-space: normal; font-size: clamp(52px, 17.5vw, 120px); line-height: 0.86;
  }
  .spread__tag { grid-area: tag; margin: 0; max-width: none; font-size: clamp(20px, 5.6vw, 28px); line-height: 1.1; }
  .stack { grid-area: stack; position: relative; inset: auto; transform: none; width: 100%; height: auto; min-height: 0; margin: 4px 0 8px; }
  .stack figure:nth-child(1) { inset: 0 16% 10% 0; transform: rotate(-2deg); }
  .stack figure:nth-child(2) { transform: rotate(4deg); }
  .stack figure:nth-child(3) { transform: rotate(-4deg); }
  .spread__meta {
    grid-area: meta; margin: 0; font-size: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px;
  }
  .spread__meta dt { font-size: 10px; }
  .spread__meta dd { margin-top: 2px; }
  .spread__cta { grid-area: cta; margin: 4px 0 0; justify-self: stretch; justify-content: center; padding: 13px 18px; }

  /* Title page */
  .spread--intro { min-height: 100svh; gap: 18px; }
  .intro__title { font-size: clamp(72px, 25vw, 160px); }
  .intro__index a { padding: 11px 8px 11px 0; font-size: 14px; }
  .intro__index i { display: none; }

  /* About */
  .spread--about { padding-bottom: 26vw; gap: 24px; }
  .about__photos { height: min(52svh, 440px); }
  .about__sticker { left: auto; right: 0; top: 4%; font-size: 18px; padding: 9px 14px; }
  .about__lead { font-size: clamp(22px, 6vw, 30px); }
  .about__caps li { font-size: 13px; padding: 7px 12px; }
  .spread--about .spread__title { font-size: 26vw; }

  /* Contact */
  .spread--contact { min-height: 100svh; }
  .contact__title { font-size: clamp(56px, 18vw, 120px); }
  .contact__email { font-size: clamp(20px, 6vw, 30px); }
  .contact__copy { margin-left: 0; width: 100%; }

  /* Case study */
  .project__band { padding: 92px var(--gutter) 120px; }
  .back { margin-bottom: 24px; font-size: 13px; }
  .project__title { font-size: clamp(56px, 17.5vw, 120px); overflow-wrap: anywhere; }
  .project__tagline { font-size: clamp(22px, 6vw, 30px); }
  .project__cover { margin-top: -88px; }
  .project__cover img, .project__cover video { max-height: 60svh; }
  .project__info { padding-top: 40px; padding-bottom: 48px; gap: 28px; }
  .next { min-height: 62svh; }
  .next__title { font-size: clamp(52px, 17vw, 120px); }
  .next__art { width: 42vw; }
  .chapter { margin-top: 44px; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .spread--project { grid-template-rows: auto auto auto minmax(180px, 1fr) auto auto; gap: 8px; }
  .spread--project .spread__title { font-size: clamp(46px, 15vw, 100px); }
  .spread__tag { font-size: 19px; }
}
