/* ============================================================
   Deborah Garfen — Portfolio
   Design tokens
   ============================================================ */
:root{
  --paper: #ffffff;
  --paper-dim: #f3f5f6;
  --ink: #2e2b28;
  --ink-soft: #55504a;
  --ink-faint: #8a8377;
  --accent: #2e2b28;
  --accent-dark: #1c1a17;
  --accent-tint: #f3f5f6;
  --rose: #2e2b28;
  --line: #e6dcd2;
  --line-strong: #cabfae;
  --max: 1280px;
  --gutter: clamp(20px, 3.2vw, 40px);
  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --label: "Montserrat", "Work Sans", sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
[id]{ scroll-margin-top: 96px; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type scale ---------- */
h1, h2, h3, h4{
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1{ font-size: clamp(2.4rem, 6vw, 70px); line-height: 1.2; font-weight: 480; }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; }
h3{ font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; }
h4{ font-size: 1.05rem; font-weight: 600; font-family: var(--sans); text-transform: none; }

p{ margin: 0 0 1.1em; max-width: 66ch; color: var(--ink-soft); }
strong, b{ font-weight: 600; }
p.lede{ font-size: 1.15rem; color: var(--ink); max-width: 58ch; }
.measure{ max-width: 62ch; }

ul.plain{ margin: 0 0 1.2em; padding: 0 0 0 1.15em; color: var(--ink-soft); max-width: 62ch; }
ul.plain li{ margin-bottom: .35em; }

.eyebrow{
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
  font-size: .8rem;
  color: var(--ink-faint);
  margin: 0 0 .6em;
}
.section-label{
  display: block;
  width: 100%;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 500;
  font-size: clamp(.8rem, 1.5vw, 1.03rem);
  color: var(--ink);
  text-align: left;
  margin: 0 0 3rem;
}

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
}
.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 78px;
}
.brand{
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
nav.primary-nav{ display: flex; align-items: center; gap: 2.1rem; }
nav.primary-nav a{
  text-decoration: none;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
nav.primary-nav a:hover, nav.primary-nav a.active{ color: var(--ink); }
nav.primary-nav a.active::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: var(--accent);
}
.nav-cta{
  border: 1px solid var(--ink);
  padding: 8px 18px !important;
  border-radius: 0;
}
.nav-cta:hover{ background: var(--ink); color: var(--paper) !important; }

.menu-toggle{
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 34px; height: 34px; padding: 0;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span{ width: 22px; height: 1px; background: var(--ink); display: block; }

@media (max-width: 780px){
  nav.primary-nav{
    position: fixed; inset: 78px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    gap: 1.6rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  nav.primary-nav a{ font-size: 1.25rem; }
  nav.primary-nav.open{ opacity: 1; transform: translateY(0); pointer-events: auto; }
  .menu-toggle{ display: flex; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-block;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
  font-size: .82rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 18px 30px;
  border-radius: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover{ background: var(--ink); color: var(--paper); }
.btn-solid{ background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-solid:hover{ background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-invert{ background: transparent; border-color: var(--paper); color: var(--paper); }
.btn-invert:hover{ background: var(--paper); color: var(--ink); }

/* ---------- Hero ---------- */
.hero{ padding: 4rem 0 .5rem; }
.hero h1{ max-width: none; }
.hero-actions{ margin-top: 2rem; }

/* ---------- Services ---------- */
.services{ background: var(--paper-dim); padding: 3.5rem 0; }
.services-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.6rem;
}
@media (max-width: 980px){ .services-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .services-grid{ grid-template-columns: 1fr; } }
.service{ background: transparent; padding: 0; }
.service img{ width: 100%; height: auto; aspect-ratio: 7 / 4; object-fit: cover; margin-bottom: 1.4rem; }
.service h3{ margin-bottom: .5rem; }
.service p{ margin-bottom: .9em; }
.service ul{ font-size: .95rem; }

/* ---------- Trusted by ---------- */
.trusted{ padding: 2rem 0 3.5rem; }
.logo-carousel-wrap{}
.logo-row{
  display: flex; flex-wrap: nowrap; align-items: center;
  gap: 3.2rem;
  width: 100%;
  overflow: hidden;
}
.logo-row img{ height: 38px; width: auto; max-width: 270px; object-fit: contain; flex-shrink: 0; transition: opacity .3s ease; }
.logo-row img.is-clipped{ opacity: 0; }
.logo-carousel-wrap .testi-carousel-controls{ margin-top: 1.6rem; }
@media (max-width: 760px){
  .logo-carousel-wrap .logo-nav{ display: flex; }
}
.logo-row img.logo-invert{ filter: brightness(0); }
@media (max-width: 900px){
  .logo-row{ gap: 2.2rem; }
  .logo-row img{ height: 30px; max-width: 210px; }
}

/* ---------- Selected work (home preview) ---------- */
.section{ padding: 3.5rem 0; }
.section-head{ width: 100%; text-align: left; margin: 0 0 2.8rem; }
.section-head .section-label{ width: 100%; display: block; margin: 0; text-align: left; }

.project-cards{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
@media (max-width: 900px){ .project-cards{ grid-template-columns: 1fr; } }
.project-card{ text-decoration: none; color: inherit; display: block; }
.project-card .thumb{ aspect-ratio: 4/3; overflow: hidden; background: var(--paper-dim); margin-bottom: 1rem; }
.project-card .thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover .thumb img{ transform: scale(1.035); }
.project-card h3{
  font-family: var(--label); text-transform: uppercase; letter-spacing: .1em;
  font-weight: 500; font-size: .85rem; margin-bottom: .5rem; color: var(--ink);
}
.project-card p{ margin: 0; font-size: .95rem; }
.project-cards-footer{ text-align: center; margin-top: 2.8rem; }

/* ---------- Testimonials ---------- */
.testimonials{ background: var(--accent-tint); padding: 4.2rem 0 3rem; }
.testi-carousel-wrap{ display: flex; flex-direction: column; }
.testi-carousel-controls{
  display: flex; justify-content: center; gap: 1rem;
  margin-top: 2rem;
}
.testi-nav{
  position: static;
  transform: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  z-index: 2;
}
.testi-nav:hover{ background: var(--ink); color: var(--paper); border-color: var(--ink); }
.testi-nav[hidden]{ display: none; }
@media (max-width: 760px){
  .testi-nav{ display: none; }
}
.testi-grid{
  display: flex;
  gap: 2.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.testi-grid::-webkit-scrollbar{ display: none; }
.testi{
  flex: 0 0 calc((100% - 2 * 2.6rem) / 3);
  max-width: none;
  scroll-snap-align: start;
}
@media (max-width: 900px){
  .testi{ flex: 0 0 calc((100% - 2.6rem) / 2); }
}
@media (max-width: 600px){
  .testi{ flex: 0 0 100%; }
}
.testi-grid.testi-grid--compact{
  justify-content: flex-start;
  overflow-x: visible;
}
.testi-grid.testi-grid--compact .testi{
  flex: 0 1 340px;
}
.testi blockquote{ margin: 0 0 1rem; font-family: var(--serif); font-size: 1.1rem; line-height: 1.4; color: var(--ink); }
.testi blockquote::before{ content: "“"; color: var(--accent); }
.testi blockquote::after{ content: "”"; color: var(--accent); }
.testi cite{ font-style: normal; font-size: .88rem; color: var(--ink-faint); line-height: 1.35; display: block; }
.testi-logo{ height: 36px; width: auto; max-width: 140px; object-fit: contain; margin-top: .9rem; opacity: .85; }

/* ---------- Contact band ---------- */
.contact-band{ padding: 5.5rem 0; text-align: center; }
.contact-band .wrap{ max-width: 640px; }
.contact-band p{ margin: 0 auto 1.8rem; }

/* ---------- Footer ---------- */
.site-footer{ background: var(--ink); padding: 4.2rem 0 3rem; }
.footer-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-bottom: 3rem; }
@media (max-width: 700px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid h4.eyebrow-title{ font-family: var(--label); font-size: .78rem; letter-spacing: .1em; color: #a9b3b6; margin-bottom: 1rem; text-transform: uppercase; }
.footer-grid p{ color: #ffffff; font-size: .95rem; max-width: 32ch; line-height: 1.35; }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: .55rem; }
.footer-grid a{ text-decoration: none; color: #ffffff; font-size: .96rem; }
.footer-grid a:hover{ color: #a9b3b6; }
.footer-bottom{ display: flex; justify-content: center; gap: 1rem; }
.social-icon{
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #55504a; color: #d9d2c9;
  transition: border-color .15s ease, color .15s ease;
}
.social-icon:hover{ border-color: #d9d2c9; color: #fff; }

/* ============================================================
   Selected work page — filtering
   ============================================================ */
.filter-bar{
  display: flex;
  flex-wrap: nowrap;
  gap: .6rem;
  margin-bottom: 3rem;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.filter-chip{
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  flex-shrink: 0;
  white-space: nowrap;
  padding: 9px 16px;
  border-radius: 0;
  cursor: pointer;
  transition: all .15s ease;
}
.filter-chip:hover{ border-color: var(--ink); color: var(--ink); }
.filter-chip.active{ background: var(--accent); border-color: var(--accent); color: #fff; }

.work-list{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 3.4rem 2.6rem; }
@media (max-width: 760px){ .work-list{ grid-template-columns: 1fr; } }
.work-row{
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity .25s ease, transform .25s ease;
}
.work-row.is-hidden{ display: none; }
.work-row .thumb{ aspect-ratio: 3/2; overflow: hidden; background: var(--paper-dim); margin-bottom: 1.3rem; }
.work-row .thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.work-row:hover .thumb img{ transform: scale(1.03); }
.work-row .meta .kicker{
  font-family: var(--label); font-size: .74rem; letter-spacing: .1em;
  color: var(--ink-faint); margin-bottom: .6rem; text-transform: uppercase;
}
.work-row h3{
  font-family: var(--label); font-size: 1.05rem; font-weight: 600; letter-spacing: .12em;
  color: var(--ink); margin-bottom: .8rem; text-transform: uppercase;
}
.work-row .tags{ display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.work-row .tags span{
  font-size: .78rem; color: var(--ink-soft);
  font-family: var(--sans);
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 0;
}
.no-results{ display:none; padding: 3rem 0; color: var(--ink-faint); font-family: var(--serif); font-size: 1.3rem; }
.no-results.show{ display: block; }

/* ============================================================
   Case study pages
   ============================================================ */
.cs-hero{ padding: 4rem 0 0; }
.cs-hero .kicker{ font-size: .95rem; color: var(--ink-faint); margin-bottom: 1.2rem; }
.cs-hero h1{ max-width: 20ch; margin-bottom: 1.4rem; }
.cs-meta{ font-size: .95rem; color: var(--ink-soft); margin-bottom: 2.6rem; }
.cs-meta strong{ color: var(--ink); font-weight: 600; }

.cs-meta-grid{ display: flex; flex-wrap: wrap; gap: 2.4rem 3.2rem; margin-bottom: 2.2rem; }
.cs-meta-item{ min-width: 140px; }
.cs-meta-label{
  font-family: var(--label); text-transform: uppercase; letter-spacing: .1em;
  font-size: .72rem; color: var(--ink-faint); margin: 0 0 .35em;
}
.cs-meta-value{ font-family: var(--sans); font-size: .95rem; color: var(--ink); font-weight: 500; margin: 0; }

.cs-quicknav{
  display: flex; flex-wrap: wrap; gap: .5rem 1.7rem;
  padding: .8rem 0 0;
  margin-bottom: 3rem;
}
.cs-quicknav a{
  font-family: var(--sans); font-size: .87rem; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
}
.cs-quicknav a:hover{ color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cs-cover{ margin: 0 0 .6rem; aspect-ratio: 16/9; overflow: hidden; background: var(--paper-dim); }
.cs-cover img{ width: 100%; height: 100%; object-fit: cover; }
.cs-caption{ font-size: .82rem; color: var(--ink-faint); margin-bottom: 3.5rem; }
.cs-caption a{ color: var(--ink-faint); }

.cs-body{ padding: 0 0 4rem; }
.cs-body > p,
.cs-body > ul,
.cs-body > ol,
.cs-body > blockquote,
.cs-body .persona-card,
.cs-body > figure:not(.cs-wide),
.cs-body > .img-grid-2:not(.cs-wide),
.cs-body > .img-grid-3:not(.cs-wide){
  max-width: 700px;
}
.cs-body h2{ margin-top: 3.4rem; }
.cs-body h2:first-of-type{ margin-top: 0; }
.cs-body h2:not([id]){
  font-family: var(--label);
  font-size: .95rem;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  margin-top: 1.4rem;
}
/* More breathing room between subsections (Logos / Colour palette / Typography …).
   Persona cards keep their tighter internal spacing; a subsection directly under its section title stays snug. */
.cs-body > h2:not([id]){ margin-top: 2.6rem; }
.cs-body > h2[id] + h2:not([id]){ margin-top: 1.2rem; }
.cs-body h3{ margin-top: 2.2rem; }
.cs-body h4{ margin-top: 1.6rem; font-family: var(--serif); font-size: 1.1rem; font-weight: 500; }
.cs-body figure{ margin: 1.2rem 0; }
.img-placeholder{
  aspect-ratio: 16/9;
  background: var(--paper-dim);
  border: 1px dashed var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
}
.cs-body figure img{ width: 100%; height: auto; background: var(--paper-dim); }
.cs-body .img-grid-2 img, .cs-body .img-grid-3 img{ height: auto; }
.cs-body figure figcaption{ font-size: .85rem; color: var(--ink-faint); margin-top: .6rem; }
.cs-body blockquote{
  margin: 1.8rem 0; padding: 0 0 0 1.3rem; border-left: 2px solid var(--accent);
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.45; color: var(--ink); max-width: 56ch;
}
.cs-body blockquote cite{ display:block; font-family: var(--sans); font-style: normal; font-size: .85rem; color: var(--ink-faint); line-height: 1.35; margin-top: .6rem; }
.img-grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.2rem 0; }
.img-grid-3{ display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; margin: 1.2rem 0; }
@media (max-width: 720px){ .img-grid-2, .img-grid-3{ grid-template-columns: 1fr; } }
.persona-card{ background: var(--paper-dim); border: none; padding: 1.8rem; margin: 1.6rem 0; }
/* Even padding: the last text block in a card adds no extra space at the bottom */
.persona-card > :last-child,
.persona-card > :last-child > :last-child,
.persona-card > :last-child > :last-child > li:last-child{ margin-bottom: 0; }
.persona-header-row{ display: flex; align-items: center; gap: 1.6rem; margin-bottom: 1.6rem; }
.persona-image-col{ flex-shrink: 0; width: 140px; }
.persona-header-row .persona-facts-quote{ flex: 1; text-align: left; }
.persona-header-row .persona-facts-quote ul.facts{ display: inline-block; text-align: left; }
.persona-card .persona-title{
  grid-column: 1 / -1;
  font-family: var(--label); text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; font-size: .95rem; color: var(--ink); margin: 0 0 1.4rem;
}
.persona-card p, .persona-card li{ font-size: .95rem; }
.persona-card img{ width: 140px; height: 140px; object-fit: cover; border-radius: 0; flex-shrink: 0; }
@media (max-width: 620px){ .persona-header-row{ flex-direction: column; } .persona-card img{ width: 100px; height: 100px; } }
.persona-card ul.facts{ list-style:none; padding:0; margin: 0; font-size: .88rem; color: var(--ink-soft); }
.persona-card ul.facts li{ margin-bottom: .2rem; }
.cs-tags{ display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.cs-tags a, .cs-tags span{
  font-size: .78rem; font-family: var(--sans); color: var(--ink-soft);
  border: 1px solid var(--line-strong); padding: 4px 10px; border-radius: 0;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cs-tags span{ cursor: default; }
.cs-tags a:hover{ background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cs-back{ margin-top: 3rem; }

/* small helper */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Pages that opt in with .cs-body--media-wide show images larger than the 700px text column.
   Default is the full content width; use --cs-media-w: 80% (etc.) to change. Text and persona cards stay at 700px. */
.cs-body--media-wide > figure:not(.cs-wide),
.cs-body--media-wide > .img-grid-2:not(.cs-wide),
.cs-body--media-wide > .img-grid-3:not(.cs-wide){
  max-width: var(--cs-media-w, none);
}

/* Keep one image at the text width on a "media-wide" page */
.cs-body--media-wide > figure.cs-textwidth,
.cs-body--media-wide > .img-grid-2.cs-textwidth,
.cs-body--media-wide > .img-grid-3.cs-textwidth{ max-width: 700px; }

/* A single row of small square thumbnails (e.g. concept inspiration) */
.cs-body > .img-grid-6{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0; max-width: 700px; }
.cs-body > .img-grid-6 img{ width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; box-shadow: 0 1px 4px rgba(46, 43, 40, .08); }
.cs-body > .img-grid-6 .img-placeholder{ aspect-ratio: 1 / 1; font-size: .68rem; text-align: center; padding: .5rem; }
@media (max-width: 720px){ .cs-body > .img-grid-6{ grid-template-columns: repeat(3, 1fr); } }

/* Click-to-enlarge images: <figure data-zoom> */
figure[data-zoom]{ position: relative; cursor: zoom-in; }
figure[data-zoom]::after{
  content: ""; position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232e2b28' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cline x1='15' y1='15' x2='21' y2='21'/%3E%3Cline x1='10' y1='7.5' x2='10' y2='12.5'/%3E%3Cline x1='7.5' y1='10' x2='12.5' y2='10'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 2px 10px rgba(0,0,0,.22); pointer-events: none; transition: transform .2s ease;
}
figure[data-zoom]:hover::after{ transform: scale(1.08); }
figure[data-zoom]:focus-visible{ outline: 2px solid var(--ink); outline-offset: 4px; }

.lightbox{ position: fixed; inset: 0; z-index: 1000; display: flex; padding: 2.5rem 1.5rem; overflow: auto; background: rgba(28, 25, 22, .93); }
.lightbox[hidden]{ display: none; }
.lightbox-stage{ margin: auto; }   /* centres when small, scrolls from the top-left when larger than the screen */
.lightbox img{ display: block; max-width: calc(100vw - 3rem); max-height: calc(100vh - 5.25rem); width: auto; height: auto; background: #fff; cursor: zoom-in; }
.lightbox.is-full img{ max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-close{
  position: fixed; top: 14px; right: 18px; z-index: 1001; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible{ background: rgba(255,255,255,.28); outline: none; }
html.lightbox-open{ overflow: hidden; }

/* Soft fade-in for images that are still loading (see main.js) */
img.img-pending{ opacity: 0; }
img.img-fade{ transition: opacity .5s ease; }
.cs-body figure:has(> img.img-pending),
.img-grid-2 > img.img-pending, .img-grid-3 > img.img-pending{ background: var(--paper-dim); }

/* Same soft shadow as the concept inspiration images, for single images on a white background */
.cs-body figure.img-shadow img{ box-shadow: 0 1px 4px rgba(46, 43, 40, .08); }

/* Animated logo on the YBA gradient (work/yba.html) */
.cs-body > figure.logo-anim{ position: relative; aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 52% 54% at 50% 52%, #ddf8cf 0%, #d7eee0 30%, #d2e6ea 60%, #cedcf9 100%); }
.logo-anim svg{ width: 46.6%; height: auto; overflow: visible; }
.logo-anim-replay{ position: absolute; right: 14px; bottom: 14px; font: 500 .72rem/1 var(--label); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.15); padding: 7px 10px; cursor: pointer; }
.logo-anim-replay:hover{ background: #fff; }
.work-row .thumb .logo-anim--thumb{ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 52% 54% at 50% 52%, #ddf8cf 0%, #d7eee0 30%, #d2e6ea 60%, #cedcf9 100%); transition: transform .45s ease; }
.work-row .thumb .logo-anim--thumb svg{ width: 50%; height: auto; overflow: visible; }
.work-row:hover .thumb .logo-anim--thumb{ transform: scale(1.03); }
.project-card .thumb .logo-anim--thumb{ width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 52% 54% at 50% 52%, #ddf8cf 0%, #d7eee0 30%, #d2e6ea 60%, #cedcf9 100%); transition: transform .4s ease; }
.project-card .thumb .logo-anim--thumb svg{ width: 57%; height: auto; overflow: visible; }
.project-card:hover .thumb .logo-anim--thumb{ transform: scale(1.035); }

/* Inuvi thumbnail: looping lava animation behind the headline (selected-work.html) */
.work-row .thumb .inuvi-anim{ position: relative; width: 100%; height: 100%; overflow: hidden; background: #404040; container-type: inline-size; transition: transform .45s ease; }
.inuvi-anim video{ position: absolute; width: 92%; aspect-ratio: 1 / 1; height: auto; left: -20%; top: -30%; object-fit: cover; mix-blend-mode: lighten; }
.inuvi-anim-text{ position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0;
  font-family: var(--label); font-weight: 600; color: #fff; font-size: 10.6cqw; line-height: 1.12; letter-spacing: -.005em; }
.work-row:hover .thumb .inuvi-anim{ transform: scale(1.03); }

/* Inuvi animated logo on case study page */
.inuvi-logo-anim .inuvi-anim{ position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #404040; container-type: inline-size; }
.cs-body figure video.anim-video{ display: block; width: 100%; height: auto; }

/* Five-up square photo grid (Anthony Nolan baby photos) */
.img-grid-5{ display: grid; grid-template-columns: repeat(5,1fr); gap: .35rem; }
.img-grid-5 img{ width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: var(--paper-dim); }
@media (max-width: 720px){ .img-grid-5{ grid-template-columns: repeat(2,1fr); gap: .5rem; } }
.an-gallery figcaption{ line-height: 1.7; }

/* Third heading level inside a grouped section (e.g. Research > Pain points > A disappearing basket) */
.cs-body h3.cs-minor{ font-family: var(--label); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); line-height: 1.35; margin: 1.6rem 0 .4rem; }
