/* ── CASE STUDY PAGE STYLES ── */

/* Orb cursor: use normal blend on case study pages so it stays visible on dark backgrounds */
body.page-case-study #orb,
body.page-case-study #orb.on-light {
  mix-blend-mode: normal;
  opacity: 0.9;
}
body.page-case-study #orb.on-element {
  filter: invert(1);
  mix-blend-mode: difference;
  opacity: 1;
}

/* ── FIXED NAV on case studies (body overflow breaks sticky) ── */
body.page-case-study .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
}
/* Nav text + accents use the page's accent color */
body.page-case-study .nav .nl:hover,
body.page-case-study .nav .nl.on      { color: var(--rose); }
body.page-case-study .nav .nc         { color: var(--rose); background: transparent; border-color: var(--rose); }
body.page-case-study .nav .nc:hover   { background: var(--rose); color: #fff; border-color: var(--rose); }
body.page-case-study .nav .nav-back   { color: var(--rose); }
body.page-case-study .nav .back-line  { background: var(--rose); }
body.page-case-study {
  padding-top: 41px;
}
/* Dark mode prose text */
body.page-case-study:not(.theme-light) .section-quirk { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .section-name  { color: rgba(255,255,255,0.28); }
body.page-case-study:not(.theme-light) .section-name::before { background: rgba(255,255,255,0.28); }
body.page-case-study:not(.theme-light) .prose         { color: rgba(255,255,255,0.85); }
body.page-case-study:not(.theme-light) .prose strong  { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .pullquote p   { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .section-head  { border-bottom-color: rgba(255,255,255,0.08); }
body.page-case-study:not(.theme-light) .divider       { background: rgba(255,255,255,0.08); }
body.page-case-study:not(.theme-light) .lesson        { background: rgba(255,255,255,0.05); }
body.page-case-study:not(.theme-light) .lesson-label  { color: rgba(255,255,255,0.3); }
body.page-case-study:not(.theme-light) .lesson-text   { color: rgba(255,255,255,0.65); }
body.page-case-study:not(.theme-light) .caption       { color: rgba(255,255,255,0.3); }
body.page-case-study:not(.theme-light) .stat-n        { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .stat-l        { color: rgba(255,255,255,0.3); }
body.page-case-study:not(.theme-light) .stats         { border-color: rgba(255,255,255,0.08); }
body.page-case-study:not(.theme-light) .stat          { border-right-color: rgba(255,255,255,0.08); }
body.page-case-study:not(.theme-light) .meta-col-item  { color: rgba(255,255,255,0.72); }
body.page-case-study:not(.theme-light) .fabric-name    { color: rgba(255,255,255,0.85) !important; }
body.page-case-study:not(.theme-light) .side-nav-label { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .ph            { background: rgba(255,255,255,0.05); }
body.page-case-study:not(.theme-light) .ph-label,
body.page-case-study:not(.theme-light) .ph-desc       { color: rgba(255,255,255,0.25); }
body.page-case-study:not(.theme-light) .hl-key        { color: rgba(255,255,255,0.92); }
body.page-case-study:not(.theme-light) .hl-name       { color: rgba(255,255,255,0.92); }
body.page-case-study:not(.theme-light) .lesson-text strong { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .trend-name    { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .profile-name  { color: rgba(255,255,255,0.88); }
body.page-case-study:not(.theme-light) .fabric-name   { color: rgba(255,255,255,0.88); }

/* JOANNA NI-STYLE HEADER BAND */
.header-band {
  background: #0c0906;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 32vh;
  position: relative;
}
.header-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 56px 40px;
  border-bottom: 0.5px solid rgba(255,255,255,0.12);
  gap: 40px;
}
.header-left { flex: 0 0 auto; max-width: 55%; }
.header-tag {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
}
.header-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 300;
  font-style: normal;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.92);
  margin-bottom: 12px;
}
.header-title strong { font-weight: 700; font-style: normal; }
.header-sub {
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  color: rgba(255,255,255,0.38);
  line-height: 1.65;
  max-width: 420px;
}
.header-right {
  display: flex;
  gap: 48px;
  align-items: flex-end;
  flex-shrink: 0;
}
.meta-col-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--rose);
  margin-bottom: 9px;
  font-family: var(--mono);
}
.meta-col-item {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  font-family: var(--mono);
}

/* Mobile-only logo variant: a small number of source logo files have
   a lot of dead transparent canvas around the visible mark, which
   shrinks to near-invisible at mobile sizes. Those pages carry a
   second <img class="header-logo-mobile"> pointing at a tightly
   cropped version of the same file — hidden here by default, swapped
   in only at the mobile breakpoint below (case-study.css bottom). */
.header-logo-mobile { display: none; }

/* PROJECT LOGO — top-left of header band */
.header-logo {
  position: absolute;
  top: 80px;
  left: 56px;
  height: 72px;
  width: 240px;
  background: rgba(255,255,255,0.85);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: left center;
  mask-position: left center;
  z-index: 2;
}

/* FULL-BLEED HERO IMAGE — windowed with rounded corners */
.hero-image-wrap {
  background: #0c0906;
  padding: 40px 40px 40px;
}
.hero-image {
  width: 100%;
  height: 62vh;
  min-height: 380px;
  overflow: hidden;
  position: relative;
  background: #1a1410;
  border-radius: 0;
}
.hero-image img,
.hero-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #2a2018 0%, #1a1410 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-ph-note {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  border: 0.5px solid rgba(255,255,255,0.1);
  padding: 8px 16px;
  border-radius: 4px;
}

/* FIXED SIDE NAV */
.side-nav {
  position: fixed;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.side-nav.visible { opacity: 1; pointer-events: auto; }
.side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: none;
  text-decoration: none;
  padding: 4px 0;
  opacity: 0.7;
  transition: opacity 0.25s;
}
.side-nav-item:hover, .side-nav-item.active { opacity: 1; }
.side-nav-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.25s ease, opacity 0.25s;
}
.side-nav-item:hover .side-nav-label,
.side-nav-item.active .side-nav-label { max-width: 160px; opacity: 1; }
.side-nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--muted);
  flex-shrink: 0;
  transition: background 0.25s, border-color 0.25s, transform 0.25s, width 0.25s, border-radius 0.25s;
}
.side-nav-item:hover .side-nav-dot {
  background: var(--ink);
  border-color: var(--ink);
}
.side-nav-item.active .side-nav-dot {
  background: var(--rose);
  border-color: var(--rose);
  transform: scale(1.5);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 20%, transparent);
}

/* ── LEFT SIDEBAR LAYOUT (opt-in: wrap side-nav + cs-body in .cs-layout) ── */
.cs-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 980px);
  justify-content: center;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(8px, 1.5vw, 20px);
  box-sizing: border-box;
}
.cs-layout > .side-nav {
  position: sticky;
  top: 68px;
  right: unset;
  left: unset;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  align-items: flex-start;
  align-self: start;
  padding: 72px 24px 0 0;
  gap: 3px;
  z-index: 10;
}
.cs-layout > .side-nav.visible { opacity: 1; }
.cs-layout > .side-nav .side-nav-dot { display: none; }
.cs-layout > .side-nav .side-nav-label {
  max-width: none;
  overflow: visible;
  opacity: 0.35;
  white-space: normal;
  font-size: 9.5px;
  letter-spacing: 0.13em;
  transition: opacity 0.2s;
}
.cs-layout > .side-nav .side-nav-item {
  justify-content: flex-start;
  width: 100%;
  padding: 5px 0;
}
.cs-layout > .side-nav .side-nav-item:hover .side-nav-label { opacity: 0.75; }
.cs-layout > .side-nav .side-nav-item.active .side-nav-label {
  max-width: none;
  opacity: 1;
  color: var(--rose);
}
.cs-layout .side-nav-back {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.cs-layout .side-nav-back:hover { opacity: 1; }
.cs-layout > .cs-body {
  grid-column: 2;
  padding: 72px 52px 96px 52px;
  max-width: none;
  min-width: 0;
}
.side-nav-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0.75px solid var(--bord2);
  background: var(--bg);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.side-nav-toggle svg { width: 18px; height: 18px; }
.side-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cs-progress-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--rose);
  z-index: 40;
  box-shadow: 0 0 6px color-mix(in srgb, var(--rose) 60%, transparent);
  opacity: 0;
  transition: width 0.1s linear, top 0.1s linear, opacity 0.2s ease;
}
body:not(:has(.tab-nav-wrap)) .cs-progress-bar {
  height: 7px;
}
@media (max-width: 860px) {
  .cs-layout { grid-template-columns: 1fr; padding: 0 20px; }
  .cs-layout > .cs-body { padding: 40px 0 64px; }
  .side-nav-toggle { display: flex; }
  .cs-progress-bar { display: block; }
  .cs-layout > .side-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    left: unset;
    height: 100vh;
    width: min(78vw, 300px);
    background: var(--bg);
    padding: 88px 28px 32px;
    transform: translateX(100%);
    opacity: 1;
    pointer-events: auto;
    z-index: 25;
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
  }
  .cs-layout > .side-nav.panel-open { transform: translateX(0); }
  .side-nav-overlay.visible { display: block; opacity: 1; pointer-events: auto; }
  .side-nav-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0.75px solid var(--bord2);
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
}
@media (min-width: 861px) {
  .side-nav-panel-close { display: none; }
}

/* BODY PROSE */
/* Horizontal padding: keeps content ~768px wide, collapses gracefully below ~816px */
.cs-body { max-width: 100%; padding: 72px clamp(24px, calc(50% - 384px), 336px) 96px; overflow-x: visible; }

/* BREAKOUT: image escapes the prose column — bleed matches cs-body padding */
.wide {
  --bleed: 0px;
  width: calc(100% + var(--bleed) * 2);
  margin-left: calc(var(--bleed) * -1);
  margin-right: calc(var(--bleed) * -1);
}
/* Restore bleed on elements whose own margin shorthand overrides .wide */
.fabric-row.wide,
.stats.wide {
  margin-left: calc(var(--bleed) * -1);
}
/* Prevent horizontal scroll caused by breakout images */
/* clip (not hidden) — hidden creates a scroll container which breaks position:sticky */
body.page-case-study { overflow-x: clip; }
.section-head { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 0.5px solid var(--border); scroll-margin-top: 140px; }
.section-quirk {
  font-family: var(--serif);
  font-style: normal;
  font-size: clamp(25px, 3.4vw, 34px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.section-quirk .wv-word,
.header-title .wv-word {
  display: inline-block;
}
.section-quirk .wv-letter,
.header-title .wv-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  will-change: transform, opacity;
}
.section-quirk.wv-in .wv-letter,
.header-title.wv-in .wv-letter {
  animation: wv-wave 0.55s cubic-bezier(.2,.8,.3,1) forwards;
}
@keyframes wv-wave {
  0%   { opacity: 0; transform: translateY(0.35em); }
  60%  { opacity: 1; transform: translateY(-0.06em); }
  100% { opacity: 1; transform: translateY(0); }
}
.side-nav-item {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.side-nav.sn-in .side-nav-item {
  opacity: 0.7;
  transform: translateY(0);
}
.side-nav.sn-in .side-nav-item:hover,
.side-nav.sn-in .side-nav-item.active {
  opacity: 1;
}
.section-name {
  font-size: 7.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-name::before { content: ''; width: 16px; height: 1px; background: var(--muted); opacity: 0.5; }

.prose {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink2);
  margin-bottom: 36px;
}
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }

.pullquote {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 6px 0;
  margin: 32px 0 40px;
}
.pullquote-flower {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--rose);
  opacity: 0.72;
  overflow: visible;
}
.pullquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.divider { height: 0.5px; background: var(--border); margin: 80px 0; }

/* IMAGE PLACEHOLDERS */
.ph {
  width: 100%;
  background: var(--bg3);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}
.ph-inner {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.ph-label {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  opacity: 0.7;
}
.ph-desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 340px;
  font-family: var(--mono);
}
.img-two  { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.img-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.caption {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  margin-bottom: 44px;
  line-height: 1.6;
  font-family: var(--mono);
  padding-left: 2px;
  border-left: 2px solid var(--bg3);
  padding-left: 10px;
}

/* STATS ROW */
.stats {
  display: flex;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 44px;
}
.stat { flex: 1; padding: 20px 14px; text-align: center; border-right: 0.5px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-n {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.stat-l { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.5; }
.stat {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stats.wv-in .stat {
  opacity: 1;
  transform: translateY(0);
}

/* REFLECTION GRID */
.reflect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin-bottom: 40px;
}
.reflect-item {
  padding: 24px 0;
  border-bottom: 0.5px solid var(--rule, rgba(0,0,0,0.08));
}
.reflect-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--rose) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.reflect-icon svg { width: 17px; height: 17px; stroke: var(--rose); }
.reflect-title { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.reflect-text { font-size: 13px; line-height: 1.65; color: var(--ink2); }
body.page-case-study:not(.theme-light) .reflect-item { border-bottom-color: rgba(255,255,255,0.08); }
body.page-case-study:not(.theme-light) .reflect-title { color: rgba(255,255,255,0.92); }
body.page-case-study:not(.theme-light) .reflect-text { color: rgba(255,255,255,0.62); }
@media (max-width: 720px) {
  .reflect-grid { grid-template-columns: 1fr; }
}

/* LESSON BOX */
.lesson { background: var(--bg2); border-radius: 8px; padding: 26px 28px; margin: 0 0 40px; }
.lesson-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.lesson-text { font-family: var(--serif); font-size: 16px; line-height: 1.72; color: var(--ink2); }
.lesson-text strong { color: var(--ink); }

/* TREND PILLS */
.trend-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 0; }
.trend-pill {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg2); border: 0.5px solid var(--bg3);
  border-radius: 8px; padding: 10px 16px;
}
.trend-src { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.trend-name { font-size: 13px; font-weight: 600; color: var(--ink); }

/* PROFILE CARDS */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 0; }
.profile-card { background: var(--bg2); border-radius: 10px; padding: 22px 24px; border: 0.5px solid var(--bg3); }
.profile-name { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.profile-tag { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); margin-bottom: 14px; }
.profile-bio { font-size: 13.5px; line-height: 1.7; color: var(--ink2); font-family: var(--serif); }

/* SECTION SUB-HEAD */
.section-sub-head {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono);
  margin: 68px 0 0; padding-bottom: 10px;
  border-bottom: 0.5px solid var(--bg3);
}

/* FABRIC ROW */
.fabric-row { display: flex; gap: 0; margin: 20px 0 0; border: 0.5px solid var(--bg3); border-radius: 8px; overflow: hidden; }
.fabric-item {
  flex: 1; padding: 14px 16px; border-right: 0.5px solid var(--bg3);
  background: var(--bg2);
}
.fabric-item:last-child { border-right: none; }
.fabric-name { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.4; margin-bottom: 4px; }
.fabric-gsm { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); font-family: var(--mono); }

/* NEXT PROJECT CARD */
.cs-nav-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 68px;
}
.nav-card {
  position: relative;
  height: 170px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.3s;
  cursor: none;
  background: var(--ink) center/cover no-repeat;
}
.nav-card:hover { transform: translateY(-3px); }
.nav-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(12,9,6,0.92) 0%, rgba(12,9,6,0.25) 100%);
}
.nav-card--prev .nav-card-overlay {
  background: linear-gradient(to left, rgba(12,9,6,0.92) 0%, rgba(12,9,6,0.25) 100%);
}
.nav-card-content {
  position: absolute; inset: 0;
  padding: 28px 32px;
  display: flex; flex-direction: column; justify-content: center;
}
.nav-card--prev .nav-card-content { align-items: flex-end; text-align: right; }
.nav-card-label { font-size: 7.5px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 7px; font-family: var(--mono); }
.nav-card-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: white; }
.nav-card-title em { font-weight: 700; font-style: normal; }
.nav-card-arr { position: absolute; top: 50%; transform: translateY(-50%); font-size: 18px; color: rgba(255,255,255,0.35); }
.nav-card--next .nav-card-arr { right: 28px; }
.nav-card--prev .nav-card-arr { left: 28px; }

/* ── CUTE SCROLL GALLERIES: horizontally-scrolling image strips ── */
.cs-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--rose) transparent;
}
.cs-scroll::-webkit-scrollbar { height: 8px; }
.cs-scroll::-webkit-scrollbar-track { background: transparent; }
.cs-scroll::-webkit-scrollbar-thumb {
  background: var(--rose);
  border-radius: 100px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.cs-scroll::-webkit-scrollbar-thumb:hover { background: var(--rose); opacity: 0.8; }

/* keep legacy .next working */
.next {
  background: var(--ink);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 68px;
  position: relative;
  height: 170px;
  cursor: none;
  transition: transform 0.3s;
  display: block;
  text-decoration: none;
}
.next:hover { transform: translateY(-3px); }
.next-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(20,16,10,0.92) 0%, rgba(20,16,10,0.3) 100%);
}
.next-content {
  position: absolute; inset: 0;
  padding: 28px 32px;
  display: flex; flex-direction: column; justify-content: center;
}
.next-label { font-size: 7.5px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 7px; }
.next-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: white; }
.next-title em { font-weight: 400; font-style: italic; }
.next-arr { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); font-size: 18px; color: rgba(255,255,255,0.35); }

/* ══════════════════════════════════════════════════════════
   LAYOUT FORMATS
   Mix and match inside .cs-body. Each format handles its
   own width — copy the HTML block to any case study.

   Base trick: margin-left: calc(50% - 50vw) escapes the
   740px column and snaps the left edge to the viewport.
   ════════════════════════════════════════════════════════ */

/* ── l-split: two-column, full viewport width ────────────
   Default: 50/50. Modifiers: l-split--60 (60/40), l-split--40 (40/60)
   Usage:
     <div class="l-split [l-split--60]">
       <div>text / prose</div>
       <div>image / video / callout</div>
     </div>
   ──────────────────────────────────────────────────────── */
.l-split {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 0 clamp(28px, 6vw, 88px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  margin-bottom: 52px;
}
.l-split--60 { grid-template-columns: 3fr 2fr; }
.l-split--40 { grid-template-columns: 2fr 3fr; }
.l-split .prose  { margin-bottom: 20px; }
.l-split .section-head { margin-top: 0; }

/* ── l-sidebar: sticky label left, content right ─────────
   Usage:
     <div class="l-sidebar">
       <div class="l-sidebar__label">Chapter 01<br>Intro</div>
       <div>prose / components</div>
     </div>
   ──────────────────────────────────────────────────────── */
.l-sidebar {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 0 clamp(28px, 6vw, 88px);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(32px, 4vw, 60px);
  align-items: start;
  margin-bottom: 52px;
}
.l-sidebar__label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.8;
  position: sticky;
  top: 130px;      /* below fixed nav + tab bar */
  padding-top: 4px;
}
.l-sidebar__label em {
  display: block;
  font-style: italic;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink2);
  margin-bottom: 6px;
  line-height: 1.4;
}
.l-sidebar .prose { margin-bottom: 24px; }
.l-sidebar .section-head { margin-top: 0; border-bottom: none; padding-bottom: 0; margin-bottom: 20px; }

/* ── l-band: full-bleed tinted section ───────────────────
   Usage:
     <div class="l-band [l-band--rose]">
       pullquote / key insight / stats
     </div>
   ──────────────────────────────────────────────────────── */
.l-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  padding: 56px clamp(28px, 6vw, 88px);
  background: var(--bg2);
  margin-bottom: 52px;
}
.l-band--rose {
  background: color-mix(in srgb, var(--rose, #c43060) 6%, var(--bg));
}
.l-band .pullquote { margin: 0; }
.l-band .stats { margin-bottom: 0; }

/* INLINE HIGHLIGHTS (case study body) */
.hl-key { color: var(--ink); font-weight: 700; border-bottom: 1.5px solid var(--rose); padding-bottom: 1px; }
.hl-name { color: var(--ink); font-weight: 700; }

/* ── CASE STUDY NAV RIGHT SLOT ── */
.nav-r-cs {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}
.cs-theme-toggle {
  background: none;
  border: 0.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.5);
  height: 32px;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  padding: 0 12px;
}
.cs-theme-toggle svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
  display: block;
}
.cs-theme-toggle:hover {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.5);
}
.cs-theme-toggle:hover svg { transform: rotate(20deg) scale(1.15); }
@keyframes spin-in {
  from { transform: rotate(-90deg) scale(0.6); opacity: 0; }
  to   { transform: rotate(0deg)  scale(1);   opacity: 1; }
}
.cs-theme-toggle.spin svg { animation: spin-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* ── LIGHT MODE ── */
.theme-light.page-case-study .nav {
  background: var(--bg, #fefefe) !important;
  border-bottom-color: rgba(30,28,24,0.1) !important;
}
.theme-light.page-case-study .nl { color: rgba(30,28,24,0.45) !important; }
.theme-light.page-case-study .nl:hover,
.theme-light.page-case-study .nl.on { color: var(--rose) !important; }
.theme-light.page-case-study .nc { color: var(--rose) !important; border-color: var(--rose) !important; background: transparent !important; }
.theme-light.page-case-study .nc:hover { background: var(--rose) !important; color: #fff !important; border-color: var(--rose) !important; }
.theme-light.page-case-study .nav-back { color: rgba(30,28,24,0.4) !important; }
.theme-light.page-case-study .nav-back:hover { color: rgba(30,28,24,0.85) !important; }
.theme-light.page-case-study .back-line { background: rgba(30,28,24,0.3) !important; }
.theme-light .cs-theme-toggle { color: rgba(30,28,24,0.5) !important; border-color: rgba(30,28,24,0.22) !important; }
.theme-light .cs-theme-toggle:hover { color: rgba(30,28,24,0.9) !important; border-color: rgba(30,28,24,0.5) !important; }

.theme-light .header-band {
  background: var(--bg, #f5f2ec);
}
.theme-light .header-bottom {
  border-bottom-color: rgba(30,28,24,0.1);
}
.theme-light .header-tag   { color: rgba(30,28,24,0.85); }
.theme-light .header-title { color: rgba(30,28,24,0.92); }
.theme-light .header-sub   { color: rgba(30,28,24,0.45); }
.theme-light .meta-col-label { color: var(--rose); }
.theme-light .meta-col-item  { color: rgba(30,28,24,0.45); }
.theme-light .header-logo { background: rgba(30,28,24,0.55) !important; }
.header-logo-native,
.theme-light .header-logo-native {
  background: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.theme-light .hero-image-wrap { background: var(--bg, #f5f2ec); }
.theme-light .hero-image { background: rgba(30,28,24,0.06); }

/* ── MISSING MEDIA PLACEHOLDER ── */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 80px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0.03) 10px,
    rgba(255,255,255,0.06) 10px,
    rgba(255,255,255,0.06) 20px
  );
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 6px;
  box-sizing: border-box;
  padding: 10px;
  text-align: center;
}
.theme-light .media-placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.03),
    rgba(0,0,0,0.03) 10px,
    rgba(0,0,0,0.05) 10px,
    rgba(0,0,0,0.05) 20px
  );
  border-color: rgba(0,0,0,0.2);
}
.media-placeholder-text {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
  word-break: break-all;
}
.theme-light .media-placeholder-text { color: rgba(30,28,24,0.55); }
.media-placeholder-kind {
  display: block;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 4px;
}

/* ── IMAGE LIGHTBOX ── */
.cs-lightbox-trigger { cursor: zoom-in; }
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(10, 9, 8, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cs-lightbox--open { opacity: 1; pointer-events: auto; }
.cs-lightbox img {
  max-width: calc(100% - 140px);
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform 0.2s ease;
  z-index: 1;
}
.cs-lightbox--open img { transform: scale(1); }
.cs-lightbox-close {
  z-index: 2;
  position: absolute;
  top: 24px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(20,18,16,0.85);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-lightbox-close:hover { background: rgba(40,38,36,0.9); }
.cs-lightbox-arrow {
  z-index: 2;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(20,18,16,0.85);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.cs-lightbox-arrow:hover { background: rgba(40,38,36,0.9); }
.cs-lightbox-arrow--prev { left: 24px; }
.cs-lightbox-arrow--next { right: 24px; }
.cs-lightbox-count {
  z-index: 2;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
@media (max-width: 640px) {
  .cs-lightbox img { max-width: calc(100% - 96px); }
  .cs-lightbox-arrow { width: 38px; height: 38px; font-size: 18px; }
  .cs-lightbox-arrow--prev { left: 10px; }
  .cs-lightbox-arrow--next { right: 10px; }
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .header-bottom { padding: 0 32px 32px; gap: 24px; }
  .header-logo   { left: 32px; }
  .header-right  { gap: 28px; }
  .hero-image-wrap { padding: 28px 24px 28px; }
  .side-nav      { right: 12px; }
}

@media (max-width: 900px) {
  .header-bottom { gap: 16px; }
  .header-left   { max-width: 48%; }
  .header-right  { gap: 16px; flex-wrap: wrap; }
  .hero-image    { height: 42vh; min-height: 260px; }
}

@media (max-width: 767px) {
  .cs-nav-footer { grid-template-columns: 1fr; }
  .nav-card--prev .nav-card-content { align-items: flex-start; text-align: left; }
  .nav-card--prev .nav-card-overlay { background: linear-gradient(to right, rgba(12,9,6,0.92) 0%, rgba(12,9,6,0.25) 100%); }
  .nav-card--prev .nav-card-arr { left: unset; right: 28px; }
  .cs-body { padding: 40px 20px 64px; }
  .header-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px 28px;
    gap: 20px;
  }
  .header-left  { max-width: 100%; }
  .header-right { flex-wrap: wrap; gap: 20px; }
  /* Every page hardcodes the logo's exact top/left/height/width as an
     inline style (each logo is cropped differently), which otherwise
     beats this class-based rule and leaves the logo unresized on
     mobile — hence !important here. */
  .header-logo {
    left: 20px !important;
    top: 20px !important;
    height: auto !important;
    max-height: 36px !important;
    width: auto !important;
    max-width: 45% !important;
    object-fit: contain !important;
    object-position: left center !important;
  }
  /* Pages with a tightly-cropped mobile-only logo variant: show that
     one instead of the desktop-tuned original, so the sparse-canvas
     files don't shrink to near-nothing while every other page's
     single logo is unaffected. */
  .header-band:has(.header-logo-mobile) .header-logo:not(.header-logo-mobile) { display: none !important; }
  /* No !important here on purpose: pages like AI Proposal Generator
     pair a plain mobile logo with a light/dark clip-path overlay
     duplicate (.difz-logo-invert etc.) whose own more-specific
     theme-scoped rules need to keep winning for that one. */
  .header-logo-mobile { display: block; }
  .hero-image-wrap { padding: 20px 12px 20px; }
  .hero-image   { height: 44vw; min-height: 220px; }
  .side-nav     { display: none; }
  .img-two      { grid-template-columns: 1fr; }
  .img-two--always-side { grid-template-columns: 1fr 1fr; gap: 6px; }
  .img-three    { grid-template-columns: 1fr 1fr; }
  .prose        { font-size: 15px; }
  .pullquote p  { font-size: 17px; }
  .next         { height: 140px; }
  .fabric-row   { flex-direction: column; }
  .fabric-item  { border-right: none !important; border-bottom: 0.5px solid var(--bg3); }
  .fabric-item:last-child { border-bottom: none; }
}

.btn-filled {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 32px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rose);
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-filled:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-filled .btn-flower { width: 14px; height: 14px; flex-shrink: 0; overflow: visible; align-self: center; }
.side-nav .btn-filled {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 28px;
  padding: 9px 12px;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  gap: 7px;
}

.btn-outline {
  display: inline-block;
  margin: 4px 0 28px;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover {
  border-color: #fff;
  color: #fff;
}
body.theme-light .btn-outline {
  color: var(--ink);
  border-color: rgba(0,0,0,0.3);
}
body.theme-light .btn-outline:hover {
  border-color: var(--ink);
  color: var(--ink);
}
