/* refresh */
/* =====================================================================
   Lea Rozmarin — portfolio (2026)
   Built 1:1 from Figma frame "Desktop - 3" (file sungKEctUkiWpPun0IuVBD,
   node 1:389). Design canvas 1920 x 4059.

   Design tokens (from the Figma node):
     type        : "Hikasami" VF (wght 400–700)
     h1          : 40px / 1.48  bold
     body        : 25px / 1.83  regular
     label       : 17px / 1.83  regular
     card title  : 30.838px / 1.48 bold
     nav link    : 23.213px / 1.454
     ink         : #000
     card ground : #e2e2e2
     nav ground  : rgba(255,255,255,.6) + 25px backdrop blur
     accent      : #f04e15 (cut-out shapes) · #be1b42 (bottle cards)
     radius      : 14px cards · 9.5–32.4px inside the collage strip
   ===================================================================== */

@font-face {
  font-family: "Hikasami";
  src: url("assets/Hikasami-VF.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000;
  --bg: #fff;
  --card: #e2e2e2;
  --nav-bg: rgba(255, 255, 255, 0.6);
  --line-icon: #33363f;
  --font: "Hikasami", "Assistant", "Heebo", -apple-system, "Segoe UI", sans-serif;

  /* fluid type — design values are the ceiling */
  --fs-h1: clamp(32px, calc(2.08vw + 4px), 44px);
  --fs-body: clamp(21px, calc(1.302vw + 4px), 29px);
  --fs-label: clamp(18px, calc(0.885vw + 4px), 21px);
  --fs-card-title: clamp(25px, calc(1.606vw + 4px), 34.838px);
  --fs-card-sub: clamp(18px, calc(0.885vw + 4px), 21px);
  --fs-nav: clamp(19px, calc(1.209vw + 4px), 27.213px);

  --lh-body: 1.83;
  --lh-tight: 1.48;

  --content: 1492px;
  /* the nav bar keeps a narrow 44px inset; every content section uses the
     wider ~214px margin from the Figma canvas (214/1920 = 11.15vw) so the
     layout stays proportionally correct instead of collapsing to the
     nav's narrow padding once the viewport drops below ~1580px */
  --nav-pad: clamp(20px, 2.29vw, 44px);
  --gutter: clamp(20px, 11.15vw, 214px);
  --section-gap: clamp(90px, 10.2vw, 196px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: clamp(84px, 7vw, 124px);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: min(100% - var(--gutter) * 2, var(--content));
  margin-inline: auto;
}

/* ---------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: clamp(68px, 5.52vw, 106px);
  isolation: isolate;
}

/* the blur sits on its own compositing layer (pseudo-element + translateZ)
   instead of directly on the fixed nav — Safari can otherwise render a
   fixed + backdrop-filter element as solid black on some GPUs */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  transform: translateZ(0);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: var(--nav-pad);
}

.nav__logo {
  width: clamp(30px, 2.25vw, 43.131px);
  height: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.4vw, 46px);
  font-size: var(--fs-nav);
  line-height: 1.454;
  text-align: center;
}

.nav__links a { transition: opacity 0.18s ease; letter-spacing: 0.04em; }
.nav__links a:hover { opacity: 0.55; }

/* --------------------------------------------------------------- hero */

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(40px, 5.99vw, 115px);
  padding-top: clamp(170px, 17vw, 320px);
}

.hero__portrait {
  flex: 0 0 auto;
  width: clamp(240px, 26.2vw, 503px);
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  object-position: bottom;
  margin-bottom: 15px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 24px;
  max-width: 776px;
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-tight);
}

.hero__text { font-size: var(--fs-body); line-height: var(--lh-body); }

/* ------------------------------------------------------------ sections */

.sections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--section-gap);
  padding-top: clamp(80px, 7.8vw, 150px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-label);
  line-height: var(--lh-body);
}

.eyebrow img {
  width: clamp(14px, 0.94vw, 18.113px);
  height: auto;
}

.section-title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-tight);
}

/* ------------------------------------------------------ selected work */

.work { display: flex; flex-direction: column; gap: 19px; }

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3.18vw, 61px);
  row-gap: clamp(24px, 2.71vw, 52px);
}

.card {
  position: relative;
  container: card / inline-size;
  aspect-ratio: 715.5 / 518;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  display: block;
  cursor: pointer;
  will-change: transform;
  transform: translateY(0) scale(1);
  transform-origin: center;
  backface-visibility: hidden;
  box-shadow: 0 2px 10px -8px rgba(17, 17, 17, 0.12);
  /* settle back a touch slower than the lift — reads as easing out, not snapping */
  transition:
    transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* soft ambient wash that fades in on hover — reads as depth, not a border */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.028), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.card__media {
  transform: scale(1);
  transition: transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.card:hover,
.card:focus-visible {
  transform:
    perspective(1100px)
    translateY(-4px)
    scale(1.012)
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
  box-shadow: 0 16px 32px -24px rgba(17, 17, 17, 0.16);
  z-index: 2;
  transition:
    transform 520ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 520ms cubic-bezier(0.33, 1, 0.68, 1);
  /* starts once the lift has settled, so the two never fight */
  animation: card-float 6.5s 520ms cubic-bezier(0.45, 0, 0.55, 1) infinite both;
}

/* continuous drift: a few px of vertical travel plus a fraction of a degree —
   small enough to read as breathing, not as motion */
@keyframes card-float {
  0%, 100% {
    transform: perspective(1100px) translateY(-3.5px) scale(1.011) rotate(-0.08deg)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
  50% {
    transform: perspective(1100px) translateY(-5.5px) scale(1.014) rotate(0.08deg)
      rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }
}
.card:hover .card__media,
.card:focus-visible .card__media {
  transform: scale(1.008);
  transition: transform 700ms cubic-bezier(0.33, 1, 0.68, 1);
}
.card:hover::after,
.card:focus-visible::after { opacity: 1; }
.card:active {
  animation: none;
  transform: translateY(-2px) scale(1.005);
  transition:
    transform 160ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 160ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* while the cursor is inside, the tilt tracks it closely so it feels
   responsive; the settle back out keeps the long soft ease above */
.card.is-tilting:hover { transition: transform 180ms cubic-bezier(0.33, 1, 0.68, 1), box-shadow 520ms cubic-bezier(0.33, 1, 0.68, 1); }

.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .card,
  .card::after,
  .card__media,
  .card:hover,
  .card:focus-visible,
  .card:hover .card__media,
  .card:focus-visible .card__media { transition-duration: 0.01ms; }
  .card:hover,
  .card:focus-visible,
  .card:active { transform: none; animation: none; }
  .card.is-tilting:hover { transition-duration: 0.01ms; }
}

/* project photos are pre-cropped to match the card framing in Figma, so a
   plain cover fill (no overscan) reproduces them without distortion */
.card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card__copy {
  position: absolute;
  left: 5.876%;
  top: 5.792%;
  width: 53.879%;
  line-height: var(--lh-tight);
}

.card__title { font-size: var(--fs-card-title); font-weight: 700; }
.card__sub { font-size: var(--fs-card-sub); font-weight: 400; }

/* the sub-line drops as soon as the card is too narrow to keep it clear of
   the artwork — measured on the card itself, so wide screens keep it */
@container card (max-width: 420px) {
  .card__sub { display: none; }
}

/* ------------------------------------------------------------ journey */

.journey {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.03vw, 39px);
  width: min(100% - var(--gutter) * 2, 1502.8px);
}

.journey__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(16px, 1.6vw, 32px);
  flex-wrap: wrap;
}

.cv-link {
  font-size: var(--fs-label);
  line-height: 1;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.cv-link:hover,
.cv-link:focus-visible { background: var(--ink); color: #fff; }

.journey__cols {
  display: grid;
  grid-template-columns: 721.798fr 717fr;
  gap: clamp(28px, 3.07vw, 59px);
}

.journey__col { display: flex; flex-direction: column; gap: clamp(28px, 2.4vw, 46px); }

.block { display: flex; flex-direction: column; gap: 12px; }

.block__label { font-size: var(--fs-label); line-height: var(--lh-body); }

.block__items { display: flex; flex-direction: column; gap: 20px; }

.block__items p { font-size: var(--fs-body); line-height: var(--lh-body); }

.block__items b { font-weight: 600; }

/* -------------------------------------------------------- things I make */

.make { width: 100%; }

.make__head {
  display: flex;
  align-items: baseline;
  gap: clamp(12px, 1.2vw, 24px);
  width: min(100% - var(--gutter) * 2, var(--content));
  margin-inline: auto;
  flex-wrap: wrap;
}

.make__head p { font-size: var(--fs-body); }

/* the collage is a fixed-geometry strip (design: 13160 x 600) that scrolls
   sideways; --s scales the whole thing down on smaller screens while the
   scroll width stays correct */
.strip {
  --s: 1;
  --strip-w: 13160px;
  margin-top: clamp(60px, 7.36vw, 141.38px);
  overflow: hidden;
  height: calc(600px * var(--s));
  cursor: grab;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}

.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; }

.strip__scaler {
  width: max-content;
  height: 600px;
  transform-origin: top left;
  transform: scale(var(--s));
}

.strip__anim {
  display: flex;
  width: max-content;
  height: 600px;
  will-change: transform;
  animation: strip-marquee var(--dur, 160s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.strip.is-dragging .strip__anim { animation-play-state: paused; }

@keyframes strip-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.strip__row {
  display: flex;
  align-items: center;
  gap: 160px;
  width: var(--strip-w);
  height: 600px;
  padding-left: 211.11px;
  flex: 0 0 auto;
}

.strip__row > * { flex: 0 0 auto; }

.si { position: relative; }
.si img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; }

/* A — four card mock-ups, 2 x 2 */
.tm-a { display: flex; flex-direction: column; gap: 20px; width: 537.142px; }
.tm-a__row { display: flex; align-items: center; overflow: hidden; width: 534px; }
.tm-a__row--1 { height: 254px; border-radius: 15.27px; }
.tm-a__row--2 { height: 264.928px; border-radius: 15.918px; }
.tm-a__row .si { flex: 0 0 auto; }

/* B — three posters plus the rotated bucket hat */
.tm-b { width: 893px; height: 539px; position: relative; }
.tm-b__row {
  position: absolute;
  left: -0.14px;
  top: 139.29px;
  display: flex;
  align-items: center;
  gap: 22.5px;
}
.tm-b__hat {
  position: absolute;
  left: 124.99px;
  top: -82.43px;
  width: 360.282px;
  height: 361.076px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-b__hat > div {
  transform: rotate(-32.27deg);
  width: 260.191px;
  height: 262.738px;
  border-radius: 12.921px;
  overflow: hidden;
  position: relative;
}

/* C — two logo plates */
.tm-c { display: flex; flex-direction: column; gap: 29.169px; width: 389.372px; }
.tm-c__plate {
  position: relative;
  height: 256.416px;
  border-radius: 9.497px;
  overflow: hidden;
}
.tm-c__plate--light { background: #fff; }
.tm-c__plate--blue { background: #00f; }
.tm-c__plate img { position: absolute; display: block; width: 100%; height: 100%; }

/* D — two bottle-brand cards with hand-drawn doodles around them */
.tm-d { width: 1078px; height: 542px; position: relative; }
.tm-d__cards { position: absolute; left: 12.3px; top: 39.17px; display: flex; gap: 33.662px; }
.tm-d__card {
  position: relative;
  width: 502.787px;
  background: #be1b42;
  border-radius: 27.539px;
  overflow: hidden;
}
.tm-d__card--1 { height: 456.356px; }
.tm-d__card--2 { height: 458.323px; }
.tm-d__inner { position: absolute; background: #be1b42; overflow: hidden; }
.doodle { position: absolute; display: flex; align-items: center; justify-content: center; }
.doodle img { position: static; }

/* E — wide screenshots */
.tm-e { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 1015px; }
.tm-e__top { display: flex; align-items: flex-end; gap: 18px; height: 218px; }
.tm-e__stack { position: relative; width: 377.763px; height: 248.171px; }
.tm-e__bottom { display: flex; align-items: center; gap: 21.772px; width: 1022.854px; }

/* F — four framed posters */
.tm-f { display: flex; align-items: center; gap: 20px; }
.tm-f__pair { display: flex; gap: 20px; width: 807.792px; }
.tm-f__pair--end { align-items: flex-end; }
.tm-f__poster {
  position: relative;
  height: 542.055px;
  border: 0.414px solid #000;
  border-radius: 10.025px;
  overflow: hidden;
}

/* H — orange cut-outs beside two wide stills */
.tm-h { display: flex; align-items: center; gap: 35.784px; }
.tm-h__pair { display: flex; align-items: center; gap: 35.784px; }
.cutouts { position: relative; }
.cutout {
  position: absolute;
  background: #f04e15;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
}
.cutouts--col { position: relative; width: 121.146px; height: 394.404px; }

/* J — the illustration plate */
.tm-j {
  position: relative;
  width: 1376px;
  height: 542px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 13.481px;
  overflow: hidden;
}
.tm-j__row {
  position: absolute;
  left: 77.65px;
  top: 89.87px;
  display: flex;
  align-items: center;
  gap: 94px;
  height: 360.263px;
}
.tm-j__art { position: relative; overflow: hidden; }
.tm-j__art img { position: absolute; display: block; width: 100%; height: 100%; object-fit: fill; }

/* ------------------------------------------------------------- footer */

.footer {
  padding: clamp(60px, 6.9vw, 132px) var(--gutter) clamp(28px, 2.5vw, 48px);
}

.footer p { font-size: var(--fs-label); line-height: var(--lh-body); }

/* --------------------------------------------------------- responsive */

@media (max-width: 1280px) { .strip { --s: 0.78; } }
@media (max-width: 1100px) {
  .strip { --s: 0.7; }
  .card__copy { width: 62%; }
}

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-top: 120px;
  }
  .hero__portrait { width: min(100%, 420px); margin-bottom: 0; }
  .work__grid { grid-template-columns: minmax(0, 1fr); }
  .journey__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(16px, 1.6vw, 32px);
  flex-wrap: wrap;
}

.cv-link {
  font-size: var(--fs-label);
  line-height: 1;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.cv-link:hover,
.cv-link:focus-visible { background: var(--ink); color: #fff; }

.journey__cols { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .strip { --s: 0.62; }
}

@media (max-width: 560px) {
  .nav__links { gap: 14px; }
  .card__copy { width: 74%; }
  .strip { --s: 0.46; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ------------------------------------------------------- project pages */

.project-hero {
  padding-top: clamp(140px, 14vw, 240px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-label);
  color: var(--ink);
  opacity: 0.6;
  width: fit-content;
  transition: opacity 0.18s ease;
}
.project-back:hover { opacity: 1; }

.project-title {
  font-size: clamp(34px, 4.2vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  max-width: 16ch;
}

.project-tagline {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  max-width: 48ch;
  opacity: 0.82;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 3vw, 56px);
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.project-meta__item { display: flex; flex-direction: column; gap: 4px; }
.project-meta__label { font-size: var(--fs-label); opacity: 0.55; }
.project-meta__value { font-size: var(--fs-card-sub); font-weight: 600; }

/* video reel */
.reel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  margin-top: clamp(48px, 6vw, 96px);
}

.reel video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--card);
}

.reel__badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.reel__badge svg { width: 30px; height: 30px; }
.reel__badge span { font-size: var(--fs-label); opacity: 0.7; }

/* once a real video source loads, hide the "coming soon" badge */
.reel.has-video .reel__badge { opacity: 0; }

.project-gallery {
  margin-top: clamp(48px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-figure {
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}

.project-figure img { width: 100%; display: block; }

.project-nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(64px, 7vw, 120px);
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-size: var(--fs-card-sub);
  font-weight: 600;
}
.project-nav-links a { transition: opacity 0.18s ease; }
.project-nav-links a:hover { opacity: 0.55; }

@media (max-width: 640px) {
  .project-title { max-width: 100%; }
}

/* -------------------------------------------------------- case studies */

.case {
  width: min(100% - var(--gutter) * 2, var(--content));
  margin-inline: auto;
  padding-top: clamp(90px, 8.5vw, 130px);
}

.case__hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1494 / 778;
  border-radius: clamp(16px, 2vw, 34px);
  overflow: hidden;
  background: linear-gradient(180deg, #e0eafc, #cfdef3);
}
.case__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.case__body {
  display: flex;
  align-items: flex-start;
  gap: clamp(32px, 4.5vw, 64px);
  margin-top: clamp(70px, 8vw, 105px);
}

.case__nav {
  flex: 0 0 158px;
  position: sticky;
  top: clamp(90px, 8vw, 130px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: var(--fs-label);
  line-height: var(--lh-body);
}
.case__nav a { color: #939393; transition: color 0.18s ease; }
.case__nav a:hover,
.case__nav a.active { color: var(--ink); }

.case__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(90px, 10vw, 150px);
}

.case__intro { display: flex; flex-direction: column; gap: 30px; max-width: 640px; }
.case__intro p { font-size: var(--fs-body); line-height: var(--lh-body); }
.case__intro .case__label { font-size: var(--fs-label); opacity: 0.75; }

.case__section {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 4vw, 54px);
}

.case__section-copy { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.case__section-copy h2 { font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-tight); }
.case__section-copy .case__body-text { display: flex; flex-direction: column; gap: 26px; font-size: var(--fs-body); line-height: var(--lh-body); }
.case__section-copy .case__accent { font-weight: 600; }

.case__figure { display: flex; flex-direction: column; gap: 35px; }
.case__figure img,
.case__figure-row img { width: 100%; display: block; border-radius: 14px; object-fit: cover; }
.case__caption { font-size: var(--fs-label); opacity: 0.8; }

/* stretches a figure back out to the full case width (page margins),
   cancelling the sticky-nav column offset */
.case__figure--bleed {
  margin-left: 0;
  width: calc(100% + (158px + clamp(32px, 4.5vw, 64px)) * 2);
  max-width: calc(100vw - var(--gutter) * 2);
}
.case__figure--bleed img { border-radius: 0; }
@media (max-width: 900px) {
  .case__figure--bleed { margin-left: 0; width: 100%; }
}

.case__figure-row { display: flex; gap: 20px; align-items: flex-start; }
.case__figure-row > * { flex: 1 1 0; min-width: 0; }

.case__persona-row { display: flex; flex-direction: column; gap: 61px; }
.persona { display: flex; align-items: flex-end; gap: 24px; }
/* height:auto so the intrinsic height attribute can't override the ratio */
.persona img { width: 253px; height: auto; aspect-ratio: 252 / 274; border-radius: 13px; object-fit: cover; flex: 0 0 auto; }
.persona p { font-size: var(--fs-body); line-height: var(--lh-body); padding-bottom: 8px; max-width: 640px; }
.persona b { color: var(--case-accent, #3da98a); font-weight: 600; }

/* sits as a sibling of .case__body, not inside the narrow text column, so
   it spans the full ~1494px case width — matching the Figma frame, where
   this block is full-width like the hero shot rather than sidebar-width */
.case__more { display: flex; flex-direction: column; gap: 72px; margin-top: clamp(90px, 10vw, 150px); }
.case__more .more__grid { display: flex; gap: clamp(28px, 3vw, 63px); }
.case__more .more__grid .card { flex: 1 1 0; min-width: 0; }

@media (max-width: 900px) {
  .case__body { flex-direction: column; }
  .case__nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 18px; }
  .case__more .more__grid { flex-direction: column; }
  .persona { flex-direction: column; align-items: flex-start; }
}

.case__intro { position: relative; }
.case__float {
  position: absolute;
  top: 180px;
  right: -428px;
  width: clamp(200px, 24vw, 340px);
  pointer-events: none;
  user-select: none;
  height: auto;
  flex: none;
  transform: rotate(-1.5deg);
  animation: caseFloat 6s ease-in-out infinite;
  will-change: transform;
}
@keyframes caseFloat {
  0%, 100% { transform: translateY(-6px) rotate(-1.5deg); }
  50%      { transform: translateY(6px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .case__float { animation: none; }
}
@media (max-width: 760px) {
  .case__float { position: static; display: block; width: 200px; margin: 20px auto 0; }
}

.case__intro .project-title { max-width: none; white-space: nowrap; text-wrap: nowrap; }
@media (max-width: 640px) {
  .case__intro .project-title { white-space: normal; text-wrap: balance; }
}



.laptop {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.laptop__screen {
  background: #1b1b1b;
  border: 10px solid #1b1b1b;
  border-radius: 14px 14px 4px 4px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.laptop__screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.laptop__base {
  position: relative;
  height: 14px;
  margin: 0 -5.5%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(#d7d7d7, #b4b4b4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.laptop__notch {
  width: 14%;
  height: 5px;
  border-radius: 0 0 6px 6px;
  background: rgba(0, 0, 0, 0.18);
}
@media (max-width: 640px) {
  .laptop__base { height: 10px; }
}

.screen-mock { position: relative; width: 100%; }
.screen-mock > img { width: 100%; display: block; }
.screen-mock__video {
  position: absolute;
  left: 2.375%;
  top: 3.15%;
  width: 95.25%;
  height: 71%;
  object-fit: cover;
  object-position: center top;
  background: #fff;
  display: block;
}

/* =====================================================================
   Motion, loading and responsive polish (2026 pass)
   No visual-identity changes: same type, colour, spacing and hierarchy —
   only entrance motion, media loading behaviour and small-screen fitting.
   ===================================================================== */

/* ------------------------------------------------- page enter / leave */

/* the page itself is never hidden — only individual elements settle in */
html.js.is-leaving body {
  opacity: 0;
  transition: opacity 0.22s ease;
}

/* ----------------------------------------------------- scroll reveals */

/* Only what JS has explicitly claimed is ever hidden, so a script hiccup
   can never leave the page blank. One motion everywhere: a short fade up
   from the white page into place — no bounce, no overshoot. */
html.reveal [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.44s cubic-bezier(0.33, 0.9, 0.35, 1),
              transform 0.62s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

html.reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* the strip is huge — fade only, never move it */
html.reveal [data-reveal].strip {
  transform: none;
  transition: opacity 0.55s cubic-bezier(0.33, 0.9, 0.35, 1);
}

/* intrinsic width/height attributes reserve the box; the rendered height
   still follows the fluid width */
.case__figure > img,
.case__figure-row > img,
.project-figure img,
.screen-mock > img { height: auto; }

/* ------------------------------------------------------- media loading */

/* images keep their box before they decode, so nothing jumps */
.card,
.case__hero,
.project-figure,
.case__figure > img,
.case__figure-row > img,
.persona img,
.reel,
.laptop__screen,
.screen-mock > img {
  background-color: var(--card);
}

/* cut-out PNGs must sit on the page itself, not on the loading plate */
.case__figure > img[src$=".png"],
.case__figure-row > img[src$=".png"] { background-color: transparent; }

img[loading="lazy"],
html.js img[data-lazy] {
  opacity: 0;
  transition: opacity 0.5s ease;
}
html.js img[loading="lazy"].is-loaded,
html.js img[data-lazy].is-loaded,
html:not(.js) img[loading="lazy"],
html:not(.js) img[data-lazy] { opacity: 1; }

/* videos fade in once the first frames are decoded */
video[data-src] {
  opacity: 0;
  transition: opacity 0.55s ease;
  background-color: var(--card);
}
video[data-src].is-ready { opacity: 1; }

/* gentle shimmer while a heavy video is still fetching */
.media-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0) 80%);
  background-size: 220% 100%;
  animation: media-shimmer 1.5s linear infinite;
}
@keyframes media-shimmer {
  from { background-position: 140% 0; }
  to { background-position: -60% 0; }
}

.laptop__screen,
.reel,
.screen-mock { position: relative; }

/* --------------------------------------------- fluid scaler (phone row) */

[data-fit-shell] { overflow: visible; }
[data-fit] { transform-origin: top center; }

/* ------------------------------------------------------ small screens */

@media (max-width: 1000px) {
  .strip { --s: 0.64; }
}

@media (max-width: 760px) {
  :root {
    --fs-h1: clamp(27px, 5.6vw, 34px);
    --fs-body: clamp(17px, 3.5vw, 21px);
    --fs-label: 16px;
    --fs-card-title: clamp(22px, 4.7vw, 28px);
    --fs-card-sub: 16px;
    --fs-nav: 17px;
    --lh-body: 1.7;
    --gutter: 22px;
    --section-gap: clamp(72px, 14vw, 110px);
  }

  .nav { height: 66px; }
  .nav__links { gap: 16px; }
  .nav__logo { width: 30px; }

  .hero { padding-top: 104px; gap: 26px; }
  .hero__copy { gap: 18px; max-width: 100%; }
  .sections { padding-top: 62px; }

  .card { aspect-ratio: 16 / 11; border-radius: 12px; }
  .card__copy { width: 82%; left: 6.5%; top: 6.5%; }

  .journey { gap: 22px; }
  .journey__cols { gap: 34px; }
  .block__items { gap: 16px; }
  .cv-link { padding: 9px 16px; }

  .make__head { gap: 8px; }
  .strip { --s: 0.52; margin-top: 44px; }

  .case { padding-top: 84px; }
  .case__body { margin-top: 48px; gap: 26px; }
  .case__main { gap: 72px; }
  .case__section { gap: 28px; }
  .case__figure { gap: 22px; }
  .case__figure-row { gap: 12px; }
  .case__more { gap: 40px; margin-top: 78px; }
  .case__intro { gap: 20px; }

  /* the case index becomes a sticky, swipeable rail under the nav */
  .case__nav {
    position: sticky;
    top: 66px;
    z-index: 20;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 18px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 12px var(--gutter);
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }
  .case__nav::-webkit-scrollbar { display: none; }
  .case__nav a { white-space: nowrap; scroll-snap-align: start; }

  .persona { gap: 16px; }
  .persona img { width: min(70%, 220px); }
  .persona p { padding-bottom: 0; }

  .footer { padding-bottom: 32px; }
}

@media (max-width: 480px) {
  :root { --fs-nav: 15px; --gutter: 18px; }
  .nav { height: 60px; }
  .nav__links { gap: 13px; }
  .nav__inner { padding-inline: 18px; }
  .hero { padding-top: 92px; }
  .card { aspect-ratio: 4 / 3; }
  .card__copy { width: 88%; }
  .case__nav { top: 60px; }
  .strip { --s: 0.42; }
  .case__figure-row { flex-direction: column; }
}

@media (max-width: 380px) {
  :root { --fs-nav: 14px; }
  .nav__links { gap: 11px; }
  .strip { --s: 0.36; }
}

/* the marquee only runs while it is actually on screen */
.strip.is-offscreen .strip__anim { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html.reveal [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; filter: none !important; transition: none !important; }
  .strip__anim { animation: none !important; }
  .media-loading::after { animation: none; }
}


/* ------------------------------------------- case hero: opens from a rectangle */
/* The project is revealed by a small centred rectangle that grows to the
   full hero, with the image easing back to scale 1 behind it. */
@keyframes case-open {
  0%   { clip-path: inset(30% 30% 30% 30% round 20px); }
  100% { clip-path: inset(0% 0% 0% 0% round clamp(16px, 2vw, 34px)); }
}
@keyframes case-open-img {
  0%   { transform: scale(1.08); }
  100% { transform: scale(1); }
}

html.js .case__hero {
  animation: case-open 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
  will-change: clip-path;
}
html.js .case__hero img {
  animation: case-open-img 2s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
@media (prefers-reduced-motion: reduce) {
  html.js .case__hero,
  html.js .case__hero img { animation: none !important; }
}

/* ------------------------------------------------------- CV language menu */

.cv-menu { position: relative; display: inline-flex; }

.cv-menu__btn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.cv-menu__btn:hover { opacity: 0.55; }
.cv-menu--solid .cv-menu__btn:hover { opacity: 1; }

.cv-menu__panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, -4px) scale(0.98);
  transform-origin: top center;
  display: grid;
  gap: 1px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.18s;
  z-index: 60;
}
.cv-menu.is-open .cv-menu__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.cv-menu--solid .cv-menu__panel {
  left: 0;
  transform-origin: top left;
  transform: translate(0, -4px) scale(0.98);
}
.cv-menu--solid.is-open .cv-menu__panel { transform: translate(0, 0) scale(1); }

.cv-menu__panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: clamp(15px, 0.78vw + 4px, 18px);
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.cv-menu__panel a::after {
  content: "PDF";
  font-size: 0.68em;
  letter-spacing: 0.1em;
  opacity: 0.4;
}
.cv-menu__panel a:hover,
.cv-menu__panel a:focus-visible { background: var(--ink); color: #fff; }
.cv-menu__panel a:hover::after,
.cv-menu__panel a:focus-visible::after { opacity: 0.55; }

/* ------------------------------------------------- mobile-only removals */

@media (max-width: 760px) {
  .nav__links > a { display: none; }
  .case__nav { display: none; }

  /* "There's More to See" — two image-only squares side by side */
  .case__more .more__grid { flex-direction: row; gap: 12px; }
  .case__more .more__grid .card { aspect-ratio: 1 / 1; }
  .case__more .more__grid .card__copy { display: none; }
  .case__more .more__grid .card__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 64% 50%;
  }
}
