/* ============================================================
   Zhanna Cherneichuk — Portfolio
   Design system + Home (hero)
   ============================================================ */

:root {
  /* Color — light theme, no accent (all black). */
  --bg:     #FAFAF8;   /* warm off-white */
  --fg:     #0E0E0E;   /* near-black text */
  --muted:  #6B6B68;   /* secondary text */
  --dim:    #C7C7C2;   /* inactive / dimmed text */
  --line:   #E6E6E1;   /* hairlines / placeholder bg */

  /* Type */
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout — small, even margins all around */
  --pad: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--pad);
}

/* ============================================================
   Header — identity (left) + nav (right)
   ============================================================ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.identity { display: flex; align-items: center; gap: 11px; }

.avatar {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--line);
  overflow: hidden;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translateY(20%) scale(1.4);
  transform-origin: 50% 50%;   /* head lower, centred in the circle */
  display: block;
}

.identity__name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

.nav__links { display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); font-size: 15px; }
.nav__links a { position: relative; color: var(--muted); transition: color 0.25s var(--ease); }
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cv { color: var(--fg); font-weight: 500; }

/* ============================================================
   Hero — text block, vertically centered
   ============================================================ */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 80px);
}

.hero__domains {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.4rem, 6.4vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero__line { display: block; }        /* always two lines */

.hero__sub {
  flex: none;
  margin: 0;
  max-width: 32ch;
  text-align: right;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--muted);
  line-height: 1.4;
  text-wrap: balance;
}

/* Rotating last word in the headline */
.rotator { display: inline-block; }
.rotator__word {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1),
              opacity 0.4s ease,
              filter 0.4s ease;
}
.rotator__word.is-out { transform: translateY(-0.4em); opacity: 0; filter: blur(5px); }
/* new word parked below & invisible, repositioned with no transition, then it rises in */
.rotator__word.is-pre { transform: translateY(0.4em); opacity: 0; filter: blur(5px); transition: none; }

/* ============================================================
   Bottom row — badges (left) + CTA (right)
   ============================================================ */
.page__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(28px, 5vh, 56px);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 72px);
}
.badge { display: flex; flex-direction: column; gap: 5px; }
.badge__label { color: var(--muted); font-size: 14px; }
.badge__value { color: var(--fg); font-size: 17px; font-weight: 400; }

/* CTA button — black. Hover: diagonal arrow swap */
.btn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

/* arrow glyph with a diagonal swap on hover */
.swp {
  position: relative;
  display: inline-block;
  width: 1em; height: 1.1em;
  overflow: hidden;
  vertical-align: baseline;
}
.swp i {
  position: absolute; left: 0; top: 0;
  font-style: normal;
  line-height: 1.1;
  transition: transform 0.6s var(--ease);
}
.swp i:nth-child(2) { transform: translate(-130%, 130%); }
a:hover .swp i:nth-child(1),
.btn:hover .swp i:nth-child(1) { transform: translate(130%, -130%); }
a:hover .swp i:nth-child(2),
.btn:hover .swp i:nth-child(2) { transform: translate(0, 0); }
@media (prefers-reduced-motion: reduce) { .swp i { transition: none; } }

/* ============================================================
   Entrance animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .rotator__word { transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .hero__row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero__sub { text-align: left; max-width: 46ch; }
}

@media (max-width: 760px) {
  .page__bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
}

@media (max-width: 680px) {
  body { font-size: 17px; }

  /* Header stays one horizontal row: avatar + name (left), nav (right) */
  .site-header { flex-direction: row; align-items: center; gap: 12px; flex-wrap: nowrap; }
  .identity { gap: 9px; min-width: 0; }
  .avatar { width: 38px; height: 38px; }
  .identity__name { font-size: 14px; white-space: nowrap; }
  .nav__links { flex: none; gap: 15px; font-size: 14px; }
  .nav__cv { white-space: nowrap; }

  .hero__title { font-size: clamp(2.1rem, 9vw, 3.3rem); }
  .hero__sub { max-width: 30ch; text-wrap: balance; }   /* hold to two lines */

  /* All three badges in a single row; labels one line, values two lines.
     Stretch full width and spread the slack evenly so the gaps look symmetric. */
  .badges { width: 100%; display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: 20px 10px; }
  .badge__label { font-size: clamp(11.5px, 3.2vw, 13px); line-height: 1.3; white-space: nowrap; }
  .badge__value { font-size: 16px; line-height: 1.25; }
  .badge__line2 { display: block; }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-up.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-up { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Selected Work — list + sticky media that swaps per active case
   ============================================================ */
.work { position: relative; }
.work__track { height: 300vh; }
.work__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(36px, 6vh, 64px) var(--pad);
  overflow: hidden;
}

.work__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label__count { color: var(--muted); }

.work__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.work-item { border-top: 1px solid var(--line); }
.work-item__thumb { display: none; }   /* desktop uses the swapping media panel instead */
.work-item__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; display: block; }
.work-item__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: clamp(14px, 2vw, 32px);
  padding: clamp(18px, 2.6vh, 34px) 0;
  color: var(--fg);
}
.work-item__index {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  padding-top: 0.55em;
}
.work-item__main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.work-item__title {
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--dim);
  transition: color 0.45s var(--ease);
}
.work-item__meta {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  opacity: 0.55;
  transition: opacity 0.45s var(--ease);
}
.work-item__cat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 0.7em;
  opacity: 0.55;
  transition: opacity 0.45s var(--ease);
}
.work-item__arrow {
  display: inline-block;
  font-family: var(--sans);   /* lighter ↗ than Space Mono's chunky glyph */
  font-weight: 400;
  font-size: 1.5em;           /* a bit bigger than the label */
  line-height: 1;
  margin-top: 0.1em;          /* optically centre the ↗ glyph */
  transition: transform 0.45s var(--ease);
}

/* active case highlighted, the rest dim */
.work-item.is-active .work-item__title { color: var(--fg); }
.work-item.is-active .work-item__meta,
.work-item.is-active .work-item__cat { opacity: 1; }
.work-item.is-active .work-item__arrow { transform: translate(3px, -3px); }

/* Media panel (swaps with the active case) */
.work__media { height: 100%; }
.work__media-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--line);
}
.work__media-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}
.work__media-card.is-active { opacity: 1; transform: none; }
.work__media-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.work__media-card img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; display: block; }

@media (max-width: 860px) {
  .work__track { height: auto; }
  .work__sticky {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    gap: clamp(32px, 6vh, 48px);
    padding: clamp(56px, 10vh, 110px) var(--pad);
  }
  .work__left { gap: clamp(28px, 5vh, 40px); justify-content: flex-start; }

  /* mobile: drop the desktop swap-panel; each case shows its own thumb */
  .work__media { display: none; }

  .work__list {
    border-bottom: none;
    display: flex;
    flex-direction: column;
    gap: var(--pad);               /* line → next photo = side gutter */
  }
  .work-item {
    border-top: none;
    border-bottom: 1px solid var(--line);   /* one line under each case */
    padding-bottom: clamp(26px, 4vh, 40px);
  }
  .work-item__link { padding: 0; }

  .work-item__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--line);
    margin-bottom: 18px;
  }
  .work-item__thumb-label {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* no scroll-swap on mobile → every case stays fully visible */
  .work-item__title { color: var(--fg); }
  .work-item__meta,
  .work-item__cat { opacity: 1; }
  .work-item.is-active .work-item__arrow { transform: none; }
}
@media (max-width: 680px) {
  .work-item__link { grid-template-columns: auto 1fr; gap: 10px 16px; }
  .work-item__cat { grid-column: 2; justify-self: start; padding-top: 4px; }
  .work-item__title { font-size: clamp(1.5rem, 7vw, 2.2rem); }
}

/* ============================================================
   About — photo full-height (ends with the text), left-aligned
   ============================================================ */
.about {
  padding: clamp(110px, 18vh, 220px) var(--pad);
}
.about__grid {
  display: grid;
  grid-template-columns: clamp(240px, 30vw, 380px) 1fr;
  gap: clamp(28px, 3.5vw, 56px);
  align-items: start;
}

.about__media { position: sticky; top: clamp(24px, 10vh, 96px); }
.about__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;         /* square (override the height attr) */
  object-fit: cover;
  object-position: 52% 34%;
  display: block;
  border-radius: 0;            /* no rounding */
}
.about__badge {
  position: absolute;
  bottom: 14px; left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;        /* round pill */
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
}
.about__badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #35C759;         /* availability green */
  animation: badgePulse 2.4s var(--ease) infinite;
}
@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 199, 89, 0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(53, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 199, 89, 0); }
}
@media (prefers-reduced-motion: reduce) { .about__badge-dot { animation: none; } }

.about .section-label { margin: 0 0 clamp(24px, 3vh, 40px); }

.about__intro { margin: 0 0 clamp(44px, 6vh, 80px); }
.about__lead {
  display: block;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 3rem);     /* = Selected Work case titles */
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.about__intro-desc {
  display: block;
  max-width: 64ch;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.45;
  color: var(--fg);
}
.about__intro-desc strong { font-weight: 600; }

.about__blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;       /* 2 × 2 grid */
  gap: clamp(40px, 6vh, 84px) clamp(32px, 3vw, 56px);
  margin-top: clamp(24px, 3.5vh, 42px); /* drop the blocks a bit lower */
}
.about__block { margin: 0; }
.about__block .about__label {
  margin: 0 0 14px;           /* clear gap before the description */
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;     /* tighter tracking */
  text-transform: uppercase;
  color: var(--fg);
}
.about__block p:not(.about__label) {
  margin: 0;
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  line-height: 1.45;
  color: var(--fg);
}

.about__cta { margin-top: clamp(40px, 5vh, 68px); }
.about__chat {
  margin: 0 0 20px;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
}
.about__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;       /* fully round */
  background: #EEEEE9;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pill:hover { background: #E5E5DE; transform: translateY(-1px); }
.pill.is-copied { background: var(--fg); color: var(--bg); }

@media (max-width: 860px) {
  .about { padding: clamp(72px, 12vh, 140px) var(--pad); }

  /* reorder: label + intro → photo → blocks */
  .about__grid { display: flex; flex-direction: column; gap: clamp(28px, 4vh, 44px); }
  .about__text { display: contents; }
  .about .section-label { order: 1; margin: 0; }
  .about__intro { order: 2; margin: 0; }
  .about__media { order: 3; position: relative; top: auto; max-width: 340px; }
  .about__blocks { order: 4; margin: 0; grid-template-columns: 1fr 1fr; gap: clamp(30px, 4vh, 44px) clamp(18px, 3vw, 30px); }

  .about__media img { aspect-ratio: 1 / 1; }
}

/* ============================================================
   Contact / footer — big social links + scattered details
   ============================================================ */
.contact {
  padding: clamp(100px, 16vh, 200px) var(--pad) clamp(28px, 4vh, 48px);
}
.contact .section-label { margin: 0 0 clamp(40px, 7vh, 88px); }

.contact__main {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
  margin-bottom: clamp(56px, 12vh, 150px);
}

/* big social links — same scale as the section headings */
.contact__big { display: flex; flex-direction: column; gap: clamp(4px, 0.8vh, 12px); }
.contact__big a {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  width: fit-content;
  font-weight: 600;
  font-size: clamp(2.2rem, 5.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--fg);
  transition: opacity 0.25s var(--ease);
}
.contact__big a:hover { opacity: 0.5; }
.contact__big .swp { transform: translateY(0.1em); }   /* optically centre the ↗ glyph */

/* scattered details, Mirko-style */
.contact__details { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 2.5vw, 44px); }
.contact__col { display: flex; flex-direction: column; gap: clamp(22px, 3vh, 38px); }
.contact__item { display: flex; flex-direction: column; gap: 8px; }
.contact__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact__value {
  position: relative;
  width: fit-content;
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--fg);
}
a.contact__value::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
a.contact__value:hover::after { transform: scaleX(1); }

.contact__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 4vh, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .contact__main { grid-template-columns: 1fr; gap: clamp(40px, 8vh, 72px); }
}
@media (max-width: 680px) {
  /* 2 × 2 block with rows that stay level even when the email wraps */
  .contact__details { grid-template-columns: 1fr 1fr; gap: clamp(22px, 4vh, 34px) clamp(18px, 5vw, 30px); }
  .contact__col { display: contents; }
  .contact__value { font-size: 15px; overflow-wrap: anywhere; }

  /* meta: name (left) facing the credit (right) */
  .contact__meta { flex-direction: row; align-items: flex-start; gap: 16px; }
  .contact__meta span { flex: 1; min-width: 0; }
  .contact__meta span:last-child { text-align: right; }

  /* keep the About blocks readable when two per row */
  .about__block p:not(.about__label) { font-size: 14.5px; line-height: 1.4; }
  .about__block .about__label { font-size: 11.5px; margin-bottom: 10px; }
}

/* ============================================================
   Case study pages (work/*.html) — Clariq
   Reuses the design tokens. Even --pad gutter, no max-width
   centring. Square media (no rounding), round buttons, ↗ glyph.
   One subtle accent on this page only: a calm product green,
   used sparingly (solution chips, "after" tags, eyebrow dot).
   Even vertical rhythm: --case-gap between sections, the top
   hairline sits --case-line-gap above each section's heading.
   ============================================================ */
.case {
  padding: var(--pad);
  background: #fff;        /* case pages are pure white */
  --bg:         #ffffff;
  --green:      #4E9D74;   /* product accent, used sparingly */
  --green-tint: #E9F3EC;   /* solution chip background */
  --green-ink:  #2E7D52;
  --red-tint:   #FBEAEA;   /* problem chip background */
  --red-ink:    #C0392B;
  --card-bg:     #F9F9F9;  /* near-white card fill (no shadow) */
  --card-border: #EFEFEF;  /* faint outline */
  --case-gap:      clamp(104px, 15vh, 160px);  /* between sections — airy */
  --case-line-gap: clamp(20px, 3vh, 30px);     /* hairline → heading */
}

.case a.identity { color: inherit; }

/* no orphan last lines (one or two words alone) in body copy */
.case p, .case li { text-wrap: pretty; }

/* ---- Hero ---- */
.case-hero { padding: clamp(36px, 8vh, 96px) 0 0; }
.case-hero__eyebrow {
  margin: 0 0 clamp(22px, 3vh, 36px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-hero__title {
  margin: 0;
  max-width: 24ch;
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.case-hero__offer {
  margin: clamp(24px, 3.5vh, 40px) 0 0;
  max-width: 56ch;
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.4;
  color: var(--fg);
}

/* meta spec row (role / timeline / type) */
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(22px, 2.5vw, 40px);
  margin-top: clamp(34px, 5vh, 56px);
  padding-top: clamp(24px, 3.5vh, 36px);
  border-top: 1px solid var(--line);
}
.case-meta__label {
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-meta__value { margin: 0; font-size: 15px; line-height: 1.35; }

/* tools — real brand logos as overlapping app-icon tiles, no labels */
.case-tools { list-style: none; margin: 2px 0 0; padding: 0; display: flex; align-items: center; }
.case-tool { margin-left: -10px; }
.case-tool:first-child { margin-left: 0; }
.case-tool__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 11px;            /* app-icon rounded square */
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s var(--ease);
}
.case-tool:hover .case-tool__logo { transform: translateY(-2px); }
.case-tool__logo img { width: 66%; height: 66%; object-fit: contain; }
.case-tool__logo--full img { width: 100%; height: 100%; object-fit: cover; }

/* hero image slot */
.case-hero__media { margin-top: clamp(34px, 5vh, 64px); }
.case-fig--laptop { background: #EDECEA; }
.case-fig--laptop img { object-position: center top; transform: scale(1.32) translate(-7%, -4%); transform-origin: center 32%; }

/* ---- Figures / placeholders ---- */
.case-figure { margin: clamp(28px, 4vh, 48px) 0 0; }
.case-fig {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
}
.case-fig--wide { aspect-ratio: 16 / 8; }
.case-fig--tall { aspect-ratio: 4 / 5; }
.case-fig--video { flex-direction: column; gap: 14px; }
/* whole screenshot, uncropped, full column width */
.case-fig--full { aspect-ratio: auto; display: block; background: transparent; border: 1px solid var(--card-border); }
.case-fig--full img { position: static; width: 100%; height: auto; object-fit: contain; }
/* before/after screenshot sitting on a FigJam-style dotted canvas */
.case-fig--shot {
  aspect-ratio: auto;
  display: block;
  padding: clamp(46px, 4.5vw, 60px) clamp(14px, 1.5vw, 22px) clamp(14px, 1.5vw, 22px);
  background-color: var(--card-bg);           /* light canvas, like the other sections */
  background-image: radial-gradient(circle, var(--line) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: 11px 11px;             /* FigJam dot grid */
  border: 1px solid var(--card-border);
}
.case-fig--shot img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: #fff;
}
.case-fig--shot .case-fig__tag { box-shadow: 0 1px 4px rgba(20, 20, 18, 0.10); }

/* ---- 10 · Final UI — looping parallax wall ---- */
.ui-parallax {
  position: relative;
  margin-top: 6px;
  height: clamp(480px, 68vh, 740px);
  display: flex;
  justify-content: center;                          /* centred → left & right columns crop */
  gap: clamp(12px, 1.3vw, 22px);
  background-color: var(--card-bg);                 /* light dotted canvas */
  background-image: radial-gradient(circle, var(--line) 1.1px, transparent 1.3px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;                                 /* hard crop on every side — no fade */
}
.ui-col { flex: 0 0 clamp(300px, 27vw, 430px); min-width: 0; }   /* big cards, like the wireframe wall */
.ui-col__track {
  display: flow-root;                 /* contains the last card's margin → exact -50% loop */
  will-change: transform;
  backface-visibility: hidden;
  animation: ui-scroll 54s linear infinite;
}
.ui-card {
  display: block;
  margin-bottom: clamp(12px, 1.3vw, 22px);
  background: #fff;
  border: 1px solid #E3E3DE;
  border-radius: 0;                                 /* sharp corners */
  box-shadow: 0 10px 26px rgba(20, 20, 18, 0.12);
  overflow: hidden;
}
.ui-card img { display: block; width: 100%; height: auto; }
/* track holds the set twice; -50% lands exactly on the duplicate → seamless, no jump */
@keyframes ui-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.ui-col:nth-child(1) .ui-col__track { animation-duration: 50s; animation-delay: -9s; }
.ui-col:nth-child(2) .ui-col__track { animation-duration: 64s; animation-delay: -33s; animation-direction: reverse; }
.ui-col:nth-child(3) .ui-col__track { animation-duration: 44s; animation-delay: -17s; }
.ui-col:nth-child(4) .ui-col__track { animation-duration: 58s; animation-delay: -41s; animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) {
  .ui-col__track { animation: none; }
}
@media (max-width: 680px) {
  .ui-parallax { height: clamp(440px, 72vh, 640px); justify-content: stretch; }
  .ui-col { flex: 1 1 0; }
  .ui-col:nth-child(3), .ui-col:nth-child(4) { display: none; }   /* 2 columns on phones */
}
.case-fig img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
/* full-width autoplay flow video — square corners, thin frame */
.case-video { display: block; width: 100%; height: auto; border: 1px solid var(--card-border); background: var(--line); }
.case-fig__ph {
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-fig__play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg);
  padding-left: 3px;   /* optically centre the ▶ */
}
.case-fig__tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}
.case-fig__tag--after { background: var(--green-tint); color: var(--green-ink); }
/* 'After' shots — soft green frame so they read apart from the gray 'Before' */
.case-fig--shot:has(.case-fig__tag--after) { border-color: #BEDFCB; }
.case-figure__cap {
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---- 07 · Wireframe wall (FigJam canvas) ---- */
.wfwall {
  position: relative;
  margin-top: 6px;
  height: clamp(440px, 54vw, 760px);           /* fixed window → the bottom row bleeds off */
  background-color: var(--card-bg);            /* same light canvas as the research sections */
  background-image: radial-gradient(circle, #E3E3DE 1.2px, transparent 1.4px);
  background-size: 26px 26px;
  background-position: 13px 13px;              /* FigJam dot grid */
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.wfwall__scene {
  display: grid;
  grid-template-columns: repeat(4, clamp(290px, 26vw, 430px));
  justify-content: center;                     /* centred → left & right columns bleed off */
  gap: clamp(20px, 2vw, 32px);                 /* equal gaps between every frame */
  padding-top: clamp(20px, 2vw, 32px);         /* clean top edge; sides & bottom are cropped */
}
.wf {
  margin: 0;
  background: #fff;
  border: 1px solid #E3E3DE;
  box-shadow: 0 10px 28px rgba(20, 20, 18, 0.09);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.wf img { display: block; width: 100%; height: auto; }
.wf:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 44px rgba(20, 20, 18, 0.16);
  z-index: 2;
  position: relative;
}
@media (prefers-reduced-motion: reduce) {
  .wf, .wf:hover { transition: none; }
}
@media (max-width: 860px) {
  .wfwall { height: auto; }
  .wfwall__scene { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 18px; }
}
@media (max-width: 560px) {
  .wfwall__scene { grid-template-columns: 1fr; }
}

/* ---- Overview / TL;DR (3 columns, right under the hero image) ---- */
.case-overview { margin-top: clamp(40px, 6vh, 68px); }
.case-overview__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vh, 40px) clamp(32px, 4vw, 64px);
  max-width: 72ch;
}
.case-ov__label {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}
.case-ov__text { margin: 0; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.45; }

/* roles as minimal plaques */
.case-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.4vw, 18px); margin-top: clamp(26px, 3.5vh, 40px); }
.case-roles .case-card { display: flex; flex-direction: column; gap: 8px; }
.case-roles p { margin: 0; font-size: clamp(0.98rem, 1.05vw, 1.08rem); line-height: 1.45; }

/* ---- Numbered section ---- */
.case-sec {
  margin-top: var(--case-gap);
  padding-top: var(--case-line-gap);
  border-top: 1px solid var(--line);
}
.case-sec__grid {
  display: grid;
  grid-template-columns: clamp(84px, 11vw, 150px) 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* a weightier section set apart with a soft full-bleed band */
.case-sec--feature {
  background: #F6FDF8;   /* soft green — a weightier, highlighted section */
  margin-left: calc(-1 * var(--pad));
  margin-right: calc(-1 * var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
  padding-top: clamp(52px, 8vh, 96px);    /* more air above the heading */
  padding-bottom: clamp(56px, 9vh, 104px);
  border-top-color: #D8EADF;              /* faint green line on the mint band */
}
.case-sec--feature .case-decision + .case-decision { border-top-color: #D8EADF; }
.case-sec__num {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.4em;
}
.case-sec__content { min-width: 0; }
.case-sec__title {
  margin: 0 0 clamp(22px, 3vh, 38px);
  max-width: 34ch;
  font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.case-prose { max-width: 68ch; }
.case-prose p { margin: 0 0 1em; font-size: clamp(1rem, 1.15vw, 1.15rem); line-height: 1.5; }
.case-prose p:last-child { margin-bottom: 0; }
.case-prose strong { font-weight: 600; }
.case-pending { color: var(--muted); }

/* small mono sub-label inside a section */
.case-sub {
  display: block;
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}

/* plain numbered list — no hairlines */
.case-steps { margin: clamp(10px, 1.5vh, 18px) 0 0; padding: 0; list-style: none; counter-reset: step; max-width: 72ch; }
.case-steps li {
  position: relative;
  padding: 0 0 0 clamp(40px, 4vw, 56px);
  margin-bottom: clamp(18px, 2.4vh, 26px);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.45;
}
.case-steps li:last-child { margin-bottom: 0; }
.case-steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.15em;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green-ink);
}
.case-steps strong { font-weight: 600; }

.case-bullets { margin: 0; padding: 0; list-style: none; max-width: 72ch; }
.case-bullets li {
  position: relative;
  padding: 0 0 0 20px;
  margin-bottom: 11px;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.45;
}
.case-bullets li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* a labelled key/value stack (roles, flows, etc.) */
.case-kv { margin: clamp(22px, 3vh, 34px) 0 0; display: grid; gap: clamp(18px, 2.4vh, 28px); max-width: 72ch; }
.case-kv__row { display: grid; grid-template-columns: clamp(110px, 14vw, 180px) 1fr; gap: clamp(14px, 2vw, 28px); }
.case-kv__row p { margin: 0; font-size: clamp(0.98rem, 1.05vw, 1.08rem); line-height: 1.45; }

/* competitor compare — two compact cards with short bullets */
.case-compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.5vw, 20px); margin-top: clamp(24px, 3vh, 36px); }
.case-compare .case-card { display: flex; flex-direction: column; gap: 12px; }
.case-compare .case-bullets li { margin-bottom: 8px; font-size: clamp(0.96rem, 1vw, 1.04rem); }
.case-src { margin: 2px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }

/* ---- Competitor research board — exported from Figma ---- */
.case-boardshot { margin-top: clamp(24px, 4vh, 40px); border: 1px solid var(--card-border); overflow: hidden; background: #2b2b2b; }
.case-boardshot img { width: 100%; display: block; }

/* ---- FigJam-style research canvas with pinned cards ---- */
.case-canvas {
  margin-top: clamp(26px, 4vh, 44px);
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  background-image: radial-gradient(#DFDFD9 1.3px, transparent 1.3px);
  background-size: 24px 24px;
  background-position: -12px -12px;
  padding: clamp(30px, 4vw, 56px) clamp(22px, 3vw, 44px);
}
.case-canvas__links { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.case-canvas__links a {
  width: fit-content;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--green-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease);
}
.case-canvas__links a:hover { color: var(--fg); }
.case-matrix { display: block; width: 100%; max-width: 1040px; margin: 0 auto; background: #fff; border: 1px solid var(--card-border); }
.case-canvas__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 3.5vw, 56px); align-items: start; }
.case-canvas__col { display: flex; flex-direction: column; gap: clamp(26px, 3.2vh, 40px); }
.case-canvas__label { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pincard {
  position: relative;
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 18px 18px 16px;
}
.pincard:nth-child(odd)  { transform: rotate(-1.1deg); }
.pincard:nth-child(even) { transform: rotate(0.9deg); }
.pincard__pin { position: absolute; top: -9px; left: 24px; width: 17px; height: 17px; border-radius: 50%; background: var(--green); }
.pincard__pin::after { content: ""; position: absolute; top: 3px; left: 4px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); }
.pincard--red .pincard__pin { background: var(--red-ink); }
.pincard--neutral .pincard__pin { background: #8A8A84; }
.pincard__title { margin: 2px 0 0; font-weight: 600; font-size: 1rem; line-height: 1.32; }
.pincard__meta { margin: 7px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--muted); }
.pincard__text { margin: 7px 0 0; font-size: 13.5px; line-height: 1.42; color: var(--fg); }
.pincard--take { background: var(--green-tint); border-color: #BEDFCB; }
.pincard--shot { padding: 10px; }
.pincard--shot img { width: 100%; display: block; }
.pincard__cap { margin: 10px 2px 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ---- Competitor research board (FigJam-style, dotted canvas) ---- */
.case-board {
  margin: clamp(24px, 4vh, 40px) 0 0;
  border: 1px solid var(--card-border);
  background-color: #F6F6F3;
  background-image: radial-gradient(#DEDED7 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  padding: clamp(18px, 2.5vw, 30px);
}
.case-board__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(18px, 2.5vw, 34px); align-items: start; }
.case-board__label { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case-board__col { display: flex; flex-direction: column; gap: clamp(12px, 1.5vh, 16px); }
.case-screencard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: #EAEAE5;
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.case-screencard img { width: 100%; height: 100%; object-fit: cover; }
.case-screencard__ph { padding: 16px; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.case-tag {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.case-tag--avoid { background: var(--red-tint); color: var(--red-ink); border: 1px solid #EDC8C2; }
.case-tag--keep { background: var(--green-tint); color: var(--green-ink); border: 1px solid #BEDFCB; }
.case-note { background: #fff; border: 1px solid var(--card-border); padding: 14px 16px; }
.case-note--keep { background: var(--green-tint); border-color: #BEDFCB; }
.case-note__title { margin: 0; font-weight: 600; font-size: 0.98rem; }
.case-note__meta { margin: 5px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
.case-note__ph {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3;
  background: #EAEAE5;
  border: 1px solid var(--card-border);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 12px; line-height: 1.5;
}
.case-links { display: flex; flex-direction: column; gap: 9px; margin-top: 11px; }
.case-link { display: inline-flex; align-items: center; width: fit-content; font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fg); transition: color 0.2s var(--ease); }
.case-link:hover { color: var(--green-ink); }

/* horizontal chips (MVP modules) — compact, not a tall list */
.case-chips { list-style: none; margin: clamp(22px, 3vh, 32px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.case-chips li { padding: 8px 16px; border-radius: 999px; background: var(--card-bg); border: 1px solid var(--card-border); font-size: 14px; color: var(--fg); }

/* ---- Problem → Solution pairs (minimal cards, equal height) ---- */
.case-ps { margin: clamp(30px, 4.5vh, 54px) 0 0; display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 2.5vw, 32px); align-items: start; max-width: 100ch; }
.case-ps__col { display: flex; flex-direction: column; gap: clamp(14px, 2vh, 20px); }
.case-ps__arrow { align-self: center; font-size: 1.4rem; color: var(--dim); }
.case-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: clamp(20px, 2.4vw, 28px); }
.case-ps p { margin: 0; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.45; text-wrap: pretty; }
.case-pill {
  display: inline-block;
  margin: 0 0 11px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-ink);
  border: 1px solid #BEDFCB;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.case-pill--problem { background: var(--red-tint); color: var(--red-ink); border-color: #EDC8C2; }

/* problem / solution cards tinted from their label colours (no dirty grey) */
.case-ps__col--problems  > .case-card { background: #FDF7F6; border-color: #F2DED9; }
.case-ps__col--solutions > .case-card { background: #F5FBF7; border-color: #DBECE1; }

/* method block — text left, prototype button bottom-right */
.case-method { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap; }
.case-method .case-prose { flex: 1 1 420px; }
.case-proto { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; margin-left: auto; }
.case-proto .btn { padding: 13px 24px; font-size: 15px; }
.case-proto__note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--muted); }

/* ---- Before / after ---- */
.case-ba { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); margin-top: clamp(24px, 3.5vh, 40px); }
.case-ba .case-figure { margin-top: 0; }

/* taller figure for an interactive/animated mock */
.case-fig--mock { aspect-ratio: 4 / 5; padding: 18px; }

/* ---- Lesson builder mock (animated "after" for Build your lesson) ---- */
.lb {
  width: min(84%, 340px);
  background: #fff;
  border: 1px solid var(--card-border);
  padding: 16px;
  text-align: left;
}
.lb__head {
  margin: 0 0 13px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.lb__list { display: flex; flex-direction: column; gap: 8px; min-height: 126px; }
.lb__block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--fg);
}
.lb__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--green); }
.lb__tag { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green-ink); }
.lb__add {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-ink);
  border: 1px solid #BEDFCB;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform-origin: left center;
}
.lb__chev { font-size: 1.1em; line-height: 1; }
.lb--static .lb__head { color: var(--muted); }
.lb--static .lb__block { color: var(--muted); }
.lb__note { margin: 12px 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim); }

/* animated variant — blocks drop in, add-button pulses, loops */
.lb--anim .lb__block { opacity: 0; transform: translateY(8px); }
.lb--anim .lb__block--1 { animation: lbB1 8.5s var(--ease) infinite; }
.lb--anim .lb__block--2 { animation: lbB2 8.5s var(--ease) infinite; }
.lb--anim .lb__block--3 { animation: lbB3 8.5s var(--ease) infinite; }
.lb--anim .lb__add { animation: lbAdd 8.5s var(--ease) infinite; }
@keyframes lbB1 { 0%,8%{opacity:0;transform:translateY(8px)} 15%,90%{opacity:1;transform:translateY(0)} 97%,100%{opacity:0;transform:translateY(8px)} }
@keyframes lbB2 { 0%,30%{opacity:0;transform:translateY(8px)} 37%,90%{opacity:1;transform:translateY(0)} 97%,100%{opacity:0;transform:translateY(8px)} }
@keyframes lbB3 { 0%,52%{opacity:0;transform:translateY(8px)} 59%,90%{opacity:1;transform:translateY(0)} 97%,100%{opacity:0;transform:translateY(8px)} }
@keyframes lbAdd { 0%,9%{transform:scale(1)} 11%{transform:scale(0.93)} 14%{transform:scale(1)} 31%{transform:scale(0.93)} 34%{transform:scale(1)} 53%{transform:scale(0.93)} 56%{transform:scale(1)} 100%{transform:scale(1)} }
@media (prefers-reduced-motion: reduce) {
  .lb--anim .lb__block { opacity: 1; transform: none; animation: none; }
  .lb--anim .lb__add { animation: none; }
}

/* ---- Decisions (before/after changes from testing) ---- */
.case-decisions { margin-top: clamp(26px, 4vh, 44px); }
.case-decision { padding-top: clamp(40px, 6vh, 64px); }
.case-decision + .case-decision { margin-top: clamp(40px, 6vh, 64px); border-top: 1px solid var(--line); }
.case-decision__num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-ink);
}
.case-decision__title {
  margin: 12px 0 clamp(20px, 2.6vh, 30px);
  max-width: 30ch;
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.case-decision__rows { display: grid; gap: clamp(16px, 2.2vh, 24px); max-width: 72ch; }
.case-decision__row p { margin: 0; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.45; }

.case-brief { margin-top: clamp(40px, 6vh, 64px); padding-top: clamp(28px, 4vh, 40px); border-top: 1px solid var(--line); }
.case-brief__label {
  margin: 0 0 clamp(18px, 2.4vh, 26px);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---- Gallery ---- */
.case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 22px); margin-top: clamp(26px, 4vh, 44px); }
.case-gallery .case-fig { aspect-ratio: 2880 / 1900; margin: 0; }   /* match the screens → no crop */
.case-gallery .case-fig img { object-position: center; }
.case-gallery .gal { margin: 0; }

/* ---- Design system — layered foundations + tokens showcase ---- */
.ds-showcase {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--card-bg);                                      /* dotted canvas, like the before/after shots */
  background-image: radial-gradient(circle, var(--line) 1.1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  border: 1px solid var(--card-border);
  overflow: hidden;
}
.ds-showcase img {
  position: absolute;
  display: block;
  border: 1px solid var(--card-border);
  box-shadow: 0 26px 60px -22px rgba(20, 20, 18, 0.30);
}
.ds-showcase .ds-a { left: 3%;    bottom: -5%; height: 78%; width: auto; z-index: 1; }   /* Foundations — smaller, sits lower */
.ds-showcase .ds-b { right: -15%; bottom: -5%; width: 72%; height: auto; z-index: 2; }   /* Figma — bigger & taller, bottom-aligned, empty right edge runs off the frame */
@media (max-width: 680px) {
  .ds-showcase { aspect-ratio: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px; overflow: visible; }
  .ds-showcase img { position: static; width: 100%; height: auto; }
}

/* ---- Footer: next project ---- */
.case-foot { margin-top: var(--case-gap); padding: clamp(40px, 7vh, 80px) 0 clamp(28px, 4vh, 48px); }
.case-foot__label {
  margin: 0 0 clamp(20px, 3vh, 34px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* next projects — two cards, same family as the problem/solution cards */
.case-nextgrid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.5vw, 20px); }
.case-projcard { display: flex; flex-direction: column; color: var(--fg); }
.case-projcard__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: var(--line);
  margin-bottom: clamp(18px, 2.2vh, 26px);
  overflow: hidden;
}
.case-projcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.case-projcard:hover .case-projcard__thumb img { transform: scale(1.03); }
.case-projcard__thumb-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-projcard__title {
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.case-projcard__meta { margin-top: 10px; color: var(--muted); font-size: clamp(0.98rem, 1.1vw, 1.1rem); }
.case-projcard__cat {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-projcard__arrow { font-size: 1.4em; line-height: 1; margin-top: 0.1em; transition: transform 0.3s var(--ease); }
.case-projcard:hover .case-projcard__arrow { transform: translate(3px, -3px); }
.case-foot .contact__meta { margin-top: clamp(48px, 9vh, 100px); }

/* ============================================================
   Case study — responsive
   ============================================================ */
@media (max-width: 860px) {
  .case-sec__grid { grid-template-columns: 1fr; gap: clamp(14px, 3vh, 22px); }
  .case-sec__num { padding-top: 0; }
  .case-overview__grid { grid-template-columns: 1fr; }
  .case-roles { grid-template-columns: 1fr; }
  .case-compare { grid-template-columns: 1fr; }
  .case-board__grid { grid-template-columns: 1fr; }
  .case-canvas__grid { grid-template-columns: 1fr; }
  .case-nextgrid { grid-template-columns: 1fr; }
  .case-gallery { grid-template-columns: repeat(2, 1fr); }
  .case-ba { grid-template-columns: 1fr; }
  .case-kv__row { grid-template-columns: 1fr; gap: 4px; }
  .case-ps { grid-template-columns: 1fr; gap: clamp(16px, 3vh, 24px); }
  .case-ps__arrow { align-self: flex-start; transform: rotate(90deg); margin: 6px 0 6px 16px; }
  .case-overview { margin-top: clamp(20px, 4vh, 32px); }
  .case { --case-gap: clamp(116px, 18vh, 150px); }
}
@media (max-width: 680px) {
  .case-gallery { grid-template-columns: 1fr; }
  .case-hero__title { font-size: clamp(2rem, 9vw, 3rem); }
}
