/* =========================================================================
   work.css — portfolio / case-study stylesheet (2026-09-16 portfolio redesign)
   -------------------------------------------------------------------------
   Loaded AFTER css/home.css by index.html (for the Selected Work section)
   and by every work/*.html case study. It never touches home.css tokens —
   it only reads them (--ink, --paper, --line, --ease, --font, --nav-h…).

   Contents
     1. Homepage work index      .wk-*     (rendered by renderHomeWork())
     2. Device frames            .frame-*  (CSS-only browser / phone mockups)
     3. Case-study pages         .cs-*     (shared skeleton + per-page themes)
     4. Responsive + motion

   Design intent: Apple-product-page restraint. Large type, generous space,
   subtle borders, no accent color at the studio level — each project's own
   palette shows up only inside its case study (via [data-theme] tokens).
   ========================================================================= */

/* =========================================================================
   1. Homepage work index
   ========================================================================= */
.work .section-note { max-width: 520px; }

.wk-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 56px 28px; align-items: start;
}
.wk-item { grid-column: span 6; min-width: 0; }
.wk-item[data-layout="feature"], .wk-item[data-layout="wide"] { grid-column: 1 / -1; }

.wk-card { display: block; color: inherit; }
.wk-title:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.wk-card:focus-visible { outline: none; }
.wk-card:focus-visible .wk-visual { outline: 2px solid var(--ink); outline-offset: 4px; }

/* The visual "stage" every preview sits on: a soft, neutral plate that lets
   the project's own colors read as the content. */
.wk-visual {
  position: relative; display: block; overflow: hidden;
  background: #ebebe8; border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.wk-item[data-layout="feature"] .wk-visual { aspect-ratio: 16 / 8.6; padding: 6.5% 9% 0; }
.wk-item[data-layout="half"] .wk-visual { aspect-ratio: 4 / 3; padding: 9% 10% 0; }
.wk-item[data-layout="half"] .wk-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.wk-item[data-layout="half"] .wk-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
.wk-item[data-layout="wide"] .wk-visual { aspect-ratio: 16 / 9.5; padding: 7% 9% 0; }
/* The frame shows the screenshot at full width and bleeds off the bottom of
   the plate (overflow hidden) — like a monitor sitting on a desk. */
.wk-visual .frame-browser { border-radius: 10px 10px 0 0; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05); transition: transform 0.9s var(--ease); }
.wk-visual .frame-browser img { width: 100%; height: auto; }
.wk-card:hover .wk-visual .frame-browser { transform: translateY(-8px); }

/* Concept covers (mobile / app) are pre-composed images — no browser frame. */
.wk-visual.is-cover { padding: 0; }
.wk-visual.is-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.9s var(--ease);
}
.wk-card:hover .wk-visual.is-cover img { transform: scale(1.025); }

/* Meta row under each preview: minimal, one line each. */
.wk-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 20px 4px 0; }
.wk-title { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.wk-sub { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.wk-badge { color: var(--muted-2); }
.wk-badge::before { content: "·"; margin: 0 6px; }
.wk-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; flex: none; }
.wk-link {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; padding-top: 3px;
}
.wk-link svg { transition: transform 0.3s var(--ease); }
.wk-link:hover svg, .wk-card:hover + .wk-meta .wk-link:first-child svg { transform: translateX(4px); }
.wk-link-demo { color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.wk-link-demo:hover { opacity: 0.7; }

/* Feature + wide layouts carry a short description (the halves stay terse). */
.wk-desc { display: none; }
.wk-item[data-layout="feature"] .wk-meta { display: grid; grid-template-columns: 5fr 5fr 2fr; align-items: start; }
.wk-item[data-layout="feature"] .wk-desc,
.wk-item[data-layout="wide"] .wk-desc { display: block; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 44ch; margin: 0; }
.wk-item[data-layout="feature"] .wk-actions { justify-self: end; flex-direction: column; align-items: flex-end; gap: 8px; }
.wk-item[data-layout="feature"] .wk-title { font-size: 24px; }

/* Wide: asymmetric editorial row — preview on the left (8/12), copy column
   on the right, aligned to the bottom edge of the preview. */
.wk-item[data-layout="wide"] .wk-card { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: end; }
.wk-item[data-layout="wide"] .wk-visual { aspect-ratio: 4 / 2.9; padding: 7% 8% 0; }
.wk-item[data-layout="wide"] .wk-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 0 0 8px; }
.wk-item[data-layout="wide"] .wk-actions { justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 10px; }
.wk-item[data-layout="wide"] .wk-title { font-size: 26px; }
.wk-item[data-layout="wide"] .wk-desc { max-width: 34ch; }

/* Section-level "what we design" line, rendered once under the grid. */
.wk-disciplines {
  display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 72px; padding-top: 28px;
  border-top: 1px solid var(--line); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
}

/* =========================================================================
   2. Device frames (CSS only — no image dependencies)
   ========================================================================= */
.frame-browser {
  display: block; overflow: hidden; background: #fff;
  border-radius: 12px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 60px -24px rgba(0, 0, 0, 0.25);
}
.frame-browser-bar {
  height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 14px;
  background: #f1f1ef; border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.frame-browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d3d3cf; }
.frame-browser img { display: block; width: 100%; height: auto; }

/* iPhone-style frame. Width is set by --phone-w on the element or parent. */
.frame-phone {
  --phone-w: 300px;
  position: relative; width: var(--phone-w); max-width: 100%; flex: none;
  aspect-ratio: 390 / 844; border-radius: calc(var(--phone-w) * 0.16);
  background: #0f0f10; padding: calc(var(--phone-w) * 0.03);
  box-shadow: 0 0 0 1.5px #2b2b2d, 0 40px 80px -30px rgba(0, 0, 0, 0.45), 0 12px 30px -16px rgba(0, 0, 0, 0.3);
}
.frame-phone::before {
  /* Dynamic-island style cutout */
  content: ""; position: absolute; z-index: 2; left: 50%; transform: translateX(-50%);
  top: calc(var(--phone-w) * 0.055); width: calc(var(--phone-w) * 0.28); height: calc(var(--phone-w) * 0.078);
  background: #0f0f10; border-radius: 999px;
}
.frame-phone-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.13); background: #fff;
}
.frame-phone-screen img, .frame-phone-screen > * { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Website screenshots start at the site's own header, so the frame draws a
   simple status bar above them (the concept screens already include one).
   --bar sets the bar color per project. */
.frame-phone-screen.has-bar { padding-top: calc(var(--phone-w) * 0.115); background: var(--bar, #111); }
.frame-phone-screen.has-bar::before {
  content: "9:41"; position: absolute; z-index: 1; top: calc(var(--phone-w) * 0.038); left: calc(var(--phone-w) * 0.095);
  font-size: calc(var(--phone-w) * 0.042); font-weight: 600; letter-spacing: -0.01em; color: #fff; line-height: 1;
}
.frame-phone-screen.has-bar::after {
  content: ""; position: absolute; z-index: 1; top: calc(var(--phone-w) * 0.045); right: calc(var(--phone-w) * 0.085);
  width: calc(var(--phone-w) * 0.065); height: calc(var(--phone-w) * 0.03); border-radius: 3px; background: #fff; opacity: 0.95;
}

/* Open-ended phone-width column for long mobile screenshots ("scroll strip"). */
.frame-strip {
  width: var(--phone-w, 300px); max-width: 100%; flex: none; overflow: hidden;
  border-radius: 28px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
}
.frame-strip img { display: block; width: 100%; height: auto; }

/* =========================================================================
   3. Case-study pages
   ========================================================================= */
.cs {
  /* Per-page theme tokens — defaults are the studio's own palette. */
  --cs-bg: var(--paper);
  --cs-bg-2: var(--paper-2);
  --cs-fg: var(--ink);
  --cs-fg-soft: #454545;
  --cs-muted: var(--muted);
  --cs-line: var(--line);
  --cs-accent: var(--ink);
  --cs-plate: #ebebe8;        /* stage color behind device frames */
  --cs-display: var(--font);  /* display typeface for the h1 + big statements */
  background: var(--cs-bg); color: var(--cs-fg);
}
.cs-container { width: min(calc(100% - 64px), var(--max)); margin: 0 auto; }
.cs-narrow { width: min(calc(100% - 64px), 960px); margin: 0 auto; }

/* --- Project header ------------------------------------------------- */
.cs-head { padding: 88px 0 56px; }
.cs-crumb {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 40px;
  font-size: 13px; font-weight: 600; color: var(--cs-muted); letter-spacing: 0.02em;
}
.cs-crumb svg { transform: rotate(180deg); transition: transform 0.25s var(--ease); }
.cs-crumb:hover { color: var(--cs-fg); }
.cs-crumb:hover svg { transform: rotate(180deg) translateX(3px); }
.cs-eyebrow {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700;
  color: var(--cs-muted); margin: 0 0 22px;
}
.cs-eyebrow span + span::before { content: "·"; margin: 0 10px; color: var(--cs-line); }
.cs-title {
  font-family: var(--cs-display); font-size: clamp(52px, 8.2vw, 112px); line-height: 0.94;
  letter-spacing: -0.045em; font-weight: 600; max-width: 12ch;
}
.cs-lead {
  font-size: clamp(18px, 1.55vw, 22px); line-height: 1.5; color: var(--cs-fg-soft);
  max-width: 44ch; margin: 30px 0 0;
}
.cs-facts { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: 40px; font-size: 13px; color: var(--cs-muted); }
.cs-facts b { display: block; font-weight: 600; color: var(--cs-fg); margin-bottom: 3px; }

.cs-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.cs-demo-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 999px;
  background: var(--cs-fg); color: var(--cs-bg); font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.cs-demo-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.4); }
.cs-demo-btn svg { transition: transform 0.25s var(--ease); }
.cs-demo-btn:hover svg { transform: translateX(3px); }
.cs-demo-note { font-size: 13px; color: var(--cs-muted); max-width: 40ch; line-height: 1.5; }
.cs-cta .cs-demo { margin-top: 0; }
.cs-cta .cs-demo-btn { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.cs-cta .cs-demo-btn:hover { box-shadow: inset 0 0 0 1.5px var(--white); }
.cs[data-theme="barber"] .cs-cta .cs-demo-btn { color: #0c0b0a; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.3); }
.cs[data-theme="barber"] .cs-cta .cs-demo-btn:hover { box-shadow: inset 0 0 0 1.5px #0c0b0a; }
.cs-cta .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Massive hero visual -------------------------------------------- */
.cs-hero { padding: 0 0 120px; }
.cs-stage {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--cs-plate); padding: clamp(28px, 6vw, 96px) clamp(20px, 7vw, 120px) 0;
}
.cs-stage.is-flush { padding-bottom: clamp(28px, 6vw, 96px); }
.cs-stage .frame-browser { border-radius: 12px 12px 0 0; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06); }
.cs-stage .frame-browser img { max-height: 70vh; object-fit: cover; object-position: top; }
.cs-stage.is-tall .frame-browser img { max-height: none; }

/* --- Short project statement (two columns) -------------------------- */
.cs-statement { padding: 0 0 120px; }
.cs-statement-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 80px; align-items: start; }
.cs-statement h2, .cs-h2 {
  font-family: var(--cs-display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08;
  letter-spacing: -0.035em; font-weight: 600; max-width: 20ch;
}
.cs-points { display: grid; gap: 0; border-top: 1px solid var(--cs-line); }
.cs-points > div { padding: 22px 0; border-bottom: 1px solid var(--cs-line); display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.cs-points h3 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--cs-muted); padding-top: 4px; }
.cs-points p { font-size: 15.5px; line-height: 1.6; color: var(--cs-fg-soft); }

/* --- Visual storytelling blocks ------------------------------------- */
.cs-block { padding: 0 0 120px; }
.cs-caption {
  display: flex; justify-content: space-between; gap: 24px; margin-top: 22px;
  font-size: 13px; color: var(--cs-muted); line-height: 1.5;
}
.cs-caption b { color: var(--cs-fg); font-weight: 600; }
.cs-caption span + span { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Full-width image, plain or in a frame. */
.cs-full .frame-browser { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 40px 80px -40px rgba(0, 0, 0, 0.25); }
.cs-full img.cs-plain { display: block; width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }

/* Two images side by side (unequal by default: 7 / 5). */
.cs-pair { display: grid; grid-template-columns: 7fr 5fr; gap: 28px; align-items: start; }
.cs-pair.is-even { grid-template-columns: 1fr 1fr; }
.cs-pair.is-reverse { grid-template-columns: 5fr 7fr; }
.cs-pair figure { margin: 0; min-width: 0; }
.cs-pair .cs-plate { display: flex; align-items: flex-end; justify-content: center; }

/* A stage plate for device compositions inside story blocks. */
.cs-plate {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--cs-plate);
  padding: clamp(24px, 5vw, 64px);
}
.cs-plate.is-phones { display: flex; justify-content: center; align-items: flex-end; gap: clamp(16px, 4vw, 48px); padding-bottom: 0; }
.cs-plate.is-phones .frame-phone { --phone-w: clamp(120px, 14vw, 300px); margin-bottom: -18%; }
/* two phones on a plate → each may take more room */
.cs-plate.is-phones .frame-phone:first-child:nth-last-child(2),
.cs-plate.is-phones .frame-phone:first-child:nth-last-child(2) ~ .frame-phone { --phone-w: clamp(130px, 17vw, 300px); }
.cs-plate.is-phones .frame-phone:nth-child(2) { margin-bottom: -8%; }
.cs-plate.is-phones .frame-phone:nth-child(3) { margin-bottom: -18%; }

/* Device + text, alternating. */
.cs-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.cs-split.is-reverse > :first-child { order: 2; }
.cs-split-copy { max-width: 440px; }
.cs-split-copy .cs-eyebrow { margin-bottom: 18px; }
.cs-split-copy h2 { font-family: var(--cs-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; margin-bottom: 18px; }
.cs-split-copy p { font-size: 16.5px; line-height: 1.65; color: var(--cs-fg-soft); }
.cs-split-copy p + p { margin-top: 14px; }
.cs-split .cs-plate { display: flex; justify-content: center; }

/* Large cropped detail: a fixed-height window onto a bigger screenshot. */
.cs-detail { overflow: hidden; border-radius: var(--radius-lg); background: var(--cs-plate); }
.cs-detail img { display: block; width: 100%; height: auto; }
.cs-detail.is-crop { aspect-ratio: 16 / 7; }
.cs-detail.is-crop img { width: 100%; height: 100%; object-fit: cover; object-position: var(--crop, center top); }

/* Big typographic statement, used sparingly for editorial pages. */
.cs-quote {
  font-family: var(--cs-display); font-size: clamp(34px, 5vw, 72px); line-height: 1.02;
  letter-spacing: -0.04em; font-weight: 600; max-width: 18ch;
}
.cs-quote em { font-style: normal; color: var(--cs-muted); }

/* --- Design system / details ---------------------------------------- */
.cs-system { padding: 0 0 120px; }
.cs-system-head { margin-bottom: 40px; }
.cs-system-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.cs-tile {
  grid-column: span 4; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-start;
  border-radius: var(--radius-md); padding: 26px; background: var(--cs-bg-2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.cs-tile.is-wide { grid-column: span 8; }
.cs-tile.is-half { grid-column: span 6; }
.cs-tile-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--cs-muted); }
.cs-tile-note { font-size: 13.5px; line-height: 1.5; color: var(--cs-muted); margin-top: 14px; }

/* Type specimen */
.cs-type { font-size: clamp(40px, 5.2vw, 72px); line-height: 0.98; letter-spacing: -0.03em; font-weight: 600; margin: 36px 0 0; }
.cs-type small { display: block; font-size: 14px; letter-spacing: 0; font-weight: 400; text-transform: none; color: var(--cs-muted); margin-top: 12px; }

/* Color swatches */
.cs-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 12px; margin-top: 28px; }
.cs-swatch { display: grid; gap: 8px; font-size: 11px; color: var(--cs-muted); font-variant-numeric: tabular-nums; }
.cs-swatch i { display: block; height: 64px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }

/* Component sample (rendered in the project's own colors) */
.cs-components { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.cs-comp-btn { display: inline-flex; align-items: center; padding: 12px 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; border-radius: 6px; }
.cs-comp-chip { display: inline-flex; align-items: center; padding: 7px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 4px; }
.cs-comp-line { flex-basis: 100%; height: 1px; }

/* Responsive pair: desktop frame + phone side by side on one plate */
.cs-responsive { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding-bottom: 0 !important; overflow: hidden; }
.cs-responsive .frame-browser { border-radius: 12px 12px 0 0; }
.cs-responsive .frame-phone { margin-bottom: -22%; --phone-w: 220px; }

/* --- Honesty note ---------------------------------------------------- */
.cs-note { padding: 0 0 120px; }
.cs-note p {
  font-size: 14px; line-height: 1.65; color: var(--cs-muted); max-width: 70ch;
  padding-top: 24px; border-top: 1px solid var(--cs-line);
}
.cs-note b { color: var(--cs-fg); font-weight: 600; }

/* --- Closing CTA + next project -------------------------------------- */
.cs-cta { padding: 120px 0; background: var(--dark); color: var(--white); }
.cs-cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.cs-cta h2 { font-size: clamp(38px, 5.5vw, 76px); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; max-width: 12ch; }
.cs-cta p { font-size: 16px; line-height: 1.6; color: #a9a9a9; max-width: 42ch; margin: 22px 0 32px; }
.cs-cta .button-white:hover { background: #ededed; }
.cs-next { display: block; text-align: right; }
.cs-next span { display: block; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; color: #7f7f7f; margin-bottom: 10px; }
.cs-next strong { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.cs-next svg { transition: transform 0.3s var(--ease); }
.cs-next:hover svg { transform: translateX(4px); }

/* =========================================================================
   3b. Per-project themes — each case study gets its own palette, applied
       only inside <main class="cs" data-theme="…">. The studio chrome
       (header/footer) stays neutral.
   ========================================================================= */

/* Doug Snyder Painting — warm, trustworthy, craftsmanship. */
.cs[data-theme="painting"] {
  --cs-bg: #f7f4ee; --cs-bg-2: #efeade; --cs-fg: #1c2230; --cs-fg-soft: #46505f;
  --cs-muted: #7a7f8a; --cs-line: #e0dbcf; --cs-accent: #c47a35; --cs-plate: #e7e1d3;
  --cs-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
.cs[data-theme="painting"] .cs-title { letter-spacing: -0.03em; font-weight: 500; }
.cs[data-theme="painting"] .cs-statement h2, .cs[data-theme="painting"] .cs-split-copy h2, .cs[data-theme="painting"] .cs-h2 { font-weight: 500; letter-spacing: -0.02em; }

/* Cutman Barbershop — dark, editorial, high contrast, gold accent. */
.cs[data-theme="barber"] {
  --cs-bg: #0c0b0a; --cs-bg-2: #171512; --cs-fg: #f4f1ea; --cs-fg-soft: #b8b3a8;
  --cs-muted: #8a857a; --cs-line: #2a2724; --cs-accent: #c9a24d; --cs-plate: #1a1815;
}
.cs[data-theme="barber"] .cs-title, .cs[data-theme="barber"] .cs-quote,
.cs[data-theme="barber"] .cs-statement h2, .cs[data-theme="barber"] .cs-split-copy h2, .cs[data-theme="barber"] .cs-h2 {
  text-transform: uppercase; letter-spacing: -0.02em; font-weight: 700;
}
.cs[data-theme="barber"] .cs-title { font-size: clamp(48px, 8vw, 116px); line-height: 0.9; }
.cs[data-theme="barber"] .cs-eyebrow { color: var(--cs-accent); }
.cs[data-theme="barber"] .cs-stage .frame-browser,
.cs[data-theme="barber"] .cs-full .frame-browser,
.cs[data-theme="barber"] .frame-browser { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 100px -40px rgba(0, 0, 0, 0.8); }
.cs[data-theme="barber"] .frame-browser-bar { background: #1f1d1a; border-bottom-color: rgba(255, 255, 255, 0.06); }
.cs[data-theme="barber"] .frame-browser-bar i { background: #3a3733; }
.cs[data-theme="barber"] .cs-tile { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.cs[data-theme="barber"] .cs-swatch i { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.cs[data-theme="barber"] .cs-detail, .cs[data-theme="barber"] .cs-full img.cs-plain { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.cs[data-theme="barber"] .frame-phone { box-shadow: 0 0 0 1.5px #3a3835, 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.cs[data-theme="barber"] .cs-cta { background: #f4f1ea; color: #0c0b0a; }
.cs[data-theme="barber"] .cs-cta p { color: #5d5a54; }
.cs[data-theme="barber"] .cs-cta .button-white { background: #0c0b0a; color: #f4f1ea; border-color: #0c0b0a; }
.cs[data-theme="barber"] .cs-cta .button-white:hover { background: #262421; }
.cs[data-theme="barber"] .cs-next span { color: #8a857a; }

/* Blacklist Boardshop — contemporary retail, black + red, controlled energy. */
.cs[data-theme="retail"] {
  --cs-bg: #ffffff; --cs-bg-2: #f3f3f3; --cs-fg: #0b0b0b; --cs-fg-soft: #3f3f3f;
  --cs-muted: #737373; --cs-line: #e4e4e4; --cs-accent: #e5322d; --cs-plate: #0f0f0f;
}
.cs[data-theme="retail"] .cs-title, .cs[data-theme="retail"] .cs-quote,
.cs[data-theme="retail"] .cs-statement h2, .cs[data-theme="retail"] .cs-split-copy h2, .cs[data-theme="retail"] .cs-h2 {
  text-transform: uppercase; font-weight: 800; letter-spacing: -0.03em;
}
.cs[data-theme="retail"] .cs-title { line-height: 0.88; }
.cs[data-theme="retail"] .cs-head { position: relative; }
.cs[data-theme="retail"] .cs-eyebrow::before { content: ""; display: inline-block; width: 28px; height: 3px; background: var(--cs-accent); margin-right: 14px; vertical-align: middle; }
.cs[data-theme="retail"] .cs-stage { border-radius: 0; margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); }
.cs[data-theme="retail"] .cs-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cs-accent); }
.cs[data-theme="retail"] .cs-stage .frame-browser { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 100px -40px rgba(0, 0, 0, 0.8); }
.cs[data-theme="retail"] .cs-plate .frame-browser, .cs[data-theme="retail"] .cs-plate .frame-strip { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.cs[data-theme="retail"] .cs-plate .frame-phone { box-shadow: 0 0 0 1.5px #3a3a3a, 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.cs[data-theme="retail"] .frame-browser-bar { background: #1c1c1c; border-bottom-color: rgba(255, 255, 255, 0.06); }
.cs[data-theme="retail"] .frame-browser-bar i { background: #3b3b3b; }
.cs[data-theme="retail"] .cs-detail { background: #0f0f0f; }

/* Unheardof Brand — fashion / streetwear editorial: cream, black, orange-red. */
.cs[data-theme="fashion"] {
  --cs-bg: #f4f0e6; --cs-bg-2: #ebe6da; --cs-fg: #111111; --cs-fg-soft: #3b3a37;
  --cs-muted: #7b776d; --cs-line: #dcd6c7; --cs-accent: #f04e23; --cs-plate: #141414;
}
.cs[data-theme="fashion"] .cs-title {
  font-size: clamp(56px, 11vw, 156px); line-height: 0.86; letter-spacing: -0.06em; font-weight: 800;
  text-transform: uppercase; max-width: none;
}
.cs[data-theme="fashion"] .cs-title em { font-style: normal; color: var(--cs-accent); }
.cs[data-theme="fashion"] .cs-head { padding-bottom: 40px; }
.cs[data-theme="fashion"] .cs-head-grid { display: grid; grid-template-columns: 1fr 360px; gap: 48px; align-items: end; }
.cs[data-theme="fashion"] .cs-head-grid .cs-lead { margin-top: 0; }
.cs[data-theme="fashion"] .cs-quote, .cs[data-theme="fashion"] .cs-statement h2, .cs[data-theme="fashion"] .cs-split-copy h2, .cs[data-theme="fashion"] .cs-h2 { text-transform: uppercase; font-weight: 800; letter-spacing: -0.04em; }
.cs[data-theme="fashion"] .cs-stage { border-radius: 0; margin-inline: calc(-1 * clamp(16px, 4vw, 32px)); padding-inline: 0; padding-top: 0; }
.cs[data-theme="fashion"] .cs-stage .frame-browser { border-radius: 0; box-shadow: none; }
.cs[data-theme="fashion"] .cs-stage .frame-browser-bar { display: none; }
.cs[data-theme="fashion"] .cs-stage .frame-browser img { max-height: 82vh; }
.cs[data-theme="fashion"] .cs-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--cs-accent); }
.cs[data-theme="fashion"] .cs-hero { padding-bottom: clamp(140px, 16vw, 230px); } /* room for the overlapping phone */
.cs[data-theme="fashion"] .cs-overlap { position: relative; }
.cs[data-theme="fashion"] .cs-overlap .frame-phone { position: absolute; right: clamp(8px, 5vw, 64px); bottom: -12%; --phone-w: clamp(160px, 22vw, 290px); z-index: 2; }
.cs[data-theme="fashion"] .cs-overlap .frame-phone { box-shadow: 0 0 0 1.5px #3a3a3a, 0 50px 100px -30px rgba(0, 0, 0, 0.7); }
.cs[data-theme="fashion"] .cs-vertical {
  writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; font-weight: 700; color: var(--cs-muted); align-self: start; justify-self: end;
}
.cs[data-theme="fashion"] .cs-plate .frame-browser { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.cs[data-theme="fashion"] .frame-browser-bar { background: #1c1c1c; border-bottom-color: rgba(255, 255, 255, 0.06); }
.cs[data-theme="fashion"] .frame-browser-bar i { background: #3b3b3b; }
.cs[data-theme="fashion"] .cs-plate .frame-phone { box-shadow: 0 0 0 1.5px #3a3a3a, 0 40px 80px -30px rgba(0, 0, 0, 0.9); }

/* Mobile Experience (concept) — light, airy, phone-first. */
.cs[data-theme="mobile"] {
  --cs-bg: #ffffff; --cs-bg-2: #f5f5f7; --cs-fg: #111111; --cs-fg-soft: #444444;
  --cs-muted: #6e6e73; --cs-line: #e5e5e7; --cs-accent: #2f5d50; --cs-plate: #f0efec;
}
.cs[data-theme="mobile"] .cs-title { max-width: 11ch; }
.cs[data-theme="mobile"] .cs-stage { padding: clamp(32px, 6vw, 88px) clamp(20px, 6vw, 96px) 0; }
.cs-phones {
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(20px, 4vw, 56px);
}
.cs-phones .frame-phone { --phone-w: clamp(200px, 22vw, 300px); margin-bottom: -16%; }
.cs-phones .frame-phone:nth-child(2) { margin-bottom: -4%; }
.cs-phones .frame-phone:nth-child(3) { margin-bottom: -16%; }
.cs-screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: start; }
.cs-screens figure { margin: 0; }
.cs-screens .frame-phone { --phone-w: clamp(140px, 19.5vw, 300px); margin: 0 auto; }
.cs-screens figcaption { margin-top: 18px; font-size: 13.5px; line-height: 1.5; color: var(--cs-muted); }
.cs-screens figcaption b { display: block; color: var(--cs-fg); font-weight: 600; margin-bottom: 4px; }
.cs-screens.is-five { grid-template-columns: repeat(5, 1fr); }
.cs-screens.is-five .frame-phone { --phone-w: clamp(120px, 15.4vw, 236px); }

/* Principles list (mobile + app pages) */
.cs-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; border-top: 1px solid var(--cs-line); padding-top: 40px; }
.cs-principles h3 { font-size: 17px; letter-spacing: -0.015em; margin-bottom: 8px; }
.cs-principles p { font-size: 14.5px; line-height: 1.6; color: var(--cs-muted); }
.cs-principles small { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--cs-muted); margin-bottom: 14px; }

/* App / Product Design (concept) — white with a dark device, single accent. */
.cs[data-theme="app"] {
  --cs-bg: #ffffff; --cs-bg-2: #f5f5f7; --cs-fg: #0b0b0c; --cs-fg-soft: #444444;
  --cs-muted: #6e6e73; --cs-line: #e5e5e7; --cs-accent: #ff5a1f; --cs-plate: #0b0b0c;
}
.cs[data-theme="app"] .cs-stage { background: #0b0b0c; }
.cs[data-theme="app"] .cs-stage.is-hero-app { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 0; padding-bottom: 0; }
.cs[data-theme="app"] .cs-stage.is-hero-app .frame-phone { --phone-w: clamp(230px, 26vw, 360px); margin-bottom: -10%; box-shadow: 0 0 0 1.5px #3a3a3c, 0 60px 120px -30px rgba(0, 0, 0, 0.9); }
.cs[data-theme="app"] .cs-stage.is-hero-app .cs-stage-side { color: #8e8e93; font-size: 13px; line-height: 1.6; max-width: 220px; padding-bottom: clamp(24px, 6vw, 96px); }
.cs[data-theme="app"] .cs-stage.is-hero-app .cs-stage-side b { display: block; color: #fff; font-weight: 600; margin-bottom: 4px; }
.cs[data-theme="app"] .cs-stage.is-hero-app .cs-stage-side:last-child { text-align: right; justify-self: end; }
.cs[data-theme="app"] .cs-plate.is-dark { background: #0b0b0c; }
.cs[data-theme="app"] .cs-plate.is-dark .frame-phone { box-shadow: 0 0 0 1.5px #3a3a3c, 0 40px 80px -30px rgba(0, 0, 0, 0.9); }
.cs[data-theme="app"] .cs-screens .frame-phone { box-shadow: 0 0 0 1.5px #2b2b2d, 0 30px 60px -30px rgba(0, 0, 0, 0.35); }

/* =========================================================================
   4. Responsive + motion
   ========================================================================= */
@media (max-width: 1050px) {
  .cs-container, .cs-narrow { width: min(calc(100% - 40px), var(--max)); }
  .wk-grid { gap: 48px 24px; }
  .wk-item[data-layout="feature"] .wk-meta { grid-template-columns: 1fr 1fr; }
  .wk-item[data-layout="feature"] .wk-actions { grid-column: 1 / -1; justify-self: start; flex-direction: row; align-items: center; }
  .wk-item[data-layout="wide"] .wk-card { grid-template-columns: 1fr; gap: 0; }
  .wk-item[data-layout="wide"] .wk-visual { aspect-ratio: 16 / 9.5; }
  .wk-item[data-layout="wide"] .wk-meta { padding-top: 20px; gap: 10px; }
  .wk-item[data-layout="wide"] .wk-title { font-size: 22px; }
  .cs-statement-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-tile { grid-column: span 6; }
  .cs-tile.is-wide { grid-column: 1 / -1; }
  .cs-screens { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .cs-screens.is-five { grid-template-columns: repeat(2, 1fr); }
  .cs-screens .frame-phone, .cs-screens.is-five .frame-phone { --phone-w: clamp(140px, 40vw, 300px); }
  .cs-principles { grid-template-columns: 1fr 1fr; }
  .cs[data-theme="fashion"] .cs-head-grid { grid-template-columns: 1fr; }
  .cs[data-theme="app"] .cs-stage.is-hero-app { grid-template-columns: 1fr; justify-items: center; }
  .cs[data-theme="app"] .cs-stage.is-hero-app .cs-stage-side { display: none; }
}

@media (max-width: 760px) {
  .cs-container, .cs-narrow { width: min(calc(100% - 32px), var(--max)); }
  .wk-grid { grid-template-columns: 1fr; gap: 44px; }
  .wk-item, .wk-item[data-layout="feature"], .wk-item[data-layout="wide"] { grid-column: 1 / -1; }
  .wk-item[data-layout="feature"] .wk-visual, .wk-item[data-layout="half"] .wk-visual, .wk-item[data-layout="wide"] .wk-visual { aspect-ratio: 4 / 3.2; padding: 8% 7% 0; }
  .wk-item .wk-meta, .wk-item[data-layout="feature"] .wk-meta, .wk-item[data-layout="half"] .wk-meta { display: grid; grid-template-columns: 1fr; gap: 12px; padding-top: 16px; }
  .wk-item[data-layout="wide"] .wk-meta { gap: 12px; padding-top: 16px; }
  .wk-item[data-layout="feature"] .wk-title, .wk-item[data-layout="wide"] .wk-title, .wk-title { font-size: 20px; }
  .wk-desc, .wk-item[data-layout="feature"] .wk-desc, .wk-item[data-layout="wide"] .wk-desc { display: block; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
  .wk-actions, .wk-item[data-layout="feature"] .wk-actions, .wk-item[data-layout="wide"] .wk-actions { justify-self: start; justify-content: flex-start; flex-direction: column; align-items: flex-start; gap: 4px; }
  .wk-link { padding-top: 0; min-height: 44px; align-items: center; }
  .wk-disciplines { gap: 10px 24px; margin-top: 48px; font-size: 11px; }

  .cs-head { padding: 48px 0 36px; }
  .cs-crumb { margin-bottom: 28px; min-height: 44px; }
  .cs-title { font-size: clamp(44px, 13vw, 64px); }
  .cs[data-theme="barber"] .cs-title { font-size: clamp(42px, 12.5vw, 60px); }
  .cs[data-theme="fashion"] .cs-title { font-size: clamp(48px, 15vw, 72px); }
  .cs-lead { font-size: 17px; margin-top: 20px; }
  .cs-facts { gap: 12px 24px; margin-top: 28px; }
  .cs-hero, .cs-statement, .cs-block, .cs-system, .cs-note { padding-bottom: 64px; }
  .cs-stage { border-radius: var(--radius-md); padding: 20px 14px 0; }
  .cs-stage .frame-browser img { max-height: none; }
  .cs-stage.is-tall .frame-browser img { max-height: 70vh; }
  .cs-points > div { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .cs-pair, .cs-pair.is-even, .cs-pair.is-reverse { grid-template-columns: 1fr; gap: 24px; }
  .cs-split, .cs-split.is-reverse { grid-template-columns: 1fr; gap: 28px; }
  .cs-split.is-reverse > :first-child { order: 0; }
  .cs-split-copy { max-width: none; }
  .cs-plate { padding: 24px 18px; border-radius: var(--radius-md); }
  .cs-plate.is-phones { gap: 14px; padding-inline: 12px; }
  .cs-plate.is-phones .frame-phone,
  .cs-plate.is-phones .frame-phone:first-child:nth-last-child(2),
  .cs-plate.is-phones .frame-phone:first-child:nth-last-child(2) ~ .frame-phone { --phone-w: clamp(110px, 38vw, 300px); }
  .cs-plate.is-phones .frame-phone:nth-child(3) { display: none; }
  .cs-detail.is-crop { aspect-ratio: auto; }  /* show the whole detail on phones instead of a zoomed crop */
  .cs-detail.is-strip { aspect-ratio: 4 / 3; }  /* …but a very wide strip gets a taller window on phones */
  .cs-detail.is-strip img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .cs-detail.is-crop img { height: auto; object-fit: fill; }
  .cs-caption { flex-direction: column; gap: 4px; margin-top: 14px; }
  .cs-system-grid { gap: 14px; }
  .cs-tile, .cs-tile.is-half, .cs-tile.is-wide { grid-column: 1 / -1; min-height: 0; padding: 22px; }
  .cs-type { font-size: 40px; margin-top: 24px; }
  .cs-responsive { grid-template-columns: 1fr; gap: 20px; }
  .cs-responsive .frame-phone { display: none; }
  .cs-quote { font-size: clamp(30px, 8.6vw, 40px); }
  .cs-cta { padding: 72px 0; }
  .cs-cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-cta h2 { font-size: clamp(34px, 10vw, 44px); }
  .cs-cta .button, .cs-cta .cs-demo-btn { width: 100%; justify-content: center; }
  .cs-demo { margin-top: 24px; }
  .cs-demo-btn { width: 100%; justify-content: center; }
  .cs-next { text-align: left; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .cs[data-theme="barber"] .cs-next { border-top-color: rgba(0, 0, 0, 0.12); }
  .cs-phones { gap: 12px; }
  .cs-phones .frame-phone { --phone-w: clamp(110px, 38vw, 300px); margin-bottom: -14%; }
  .cs-phones .frame-phone:nth-child(3) { display: none; }
  .cs-screens, .cs-screens.is-five { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
  .cs-screens .frame-phone, .cs-screens.is-five .frame-phone { --phone-w: clamp(120px, 41vw, 300px); }
  .cs-screens figcaption { font-size: 12.5px; margin-top: 12px; }
  .cs-principles { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .cs[data-theme="retail"] .cs-stage, .cs[data-theme="fashion"] .cs-stage { margin-inline: -16px; }
  .cs[data-theme="fashion"] .cs-overlap .frame-phone { --phone-w: clamp(100px, 32vw, 290px); right: 10px; bottom: -10%; }
  .cs[data-theme="fashion"] .cs-vertical { display: none; }
  .cs[data-theme="app"] .cs-stage.is-hero-app .frame-phone { --phone-w: min(68vw, 280px); margin-bottom: -12%; }
}

@media (prefers-reduced-motion: reduce) {
  .wk-visual .frame-browser, .wk-visual.is-cover img, .wk-link svg, .cs-crumb svg, .cs-next svg, .cs-demo-btn { transition: none; }
  .wk-card:hover .wk-visual .frame-browser, .wk-card:hover .wk-visual.is-cover img { transform: none; }
}
