/* =========================================================
   Flower2U case study
   Loaded AFTER style.css. Everything is scoped to .cs so the
   site header, nav and footer from style.css are untouched.
   Colours come from the site's own :root variables.
   ========================================================= */

.cs {
  /* Design tokens built on style.css (teal + yellow on dark) */
  --accent: var(--primary-color, #2a9d8f);
  --accent-soft: rgba(42, 157, 143, .16);
  --highlight: var(--secondary-color, #e9c46a);
  --warn: #e76f51;                          /* same coral as the old problem card */
  --warn-soft: rgba(231, 111, 81, .16);

  --text: #ffffff;
  --text-2: rgba(255, 255, 255, .74);
  --text-3: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .1);
  --panel: rgba(12, 12, 12, .55);           /* keeps text readable where the body gradient turns grey */
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .07);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.22, 1, .36, 1);

  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  font-size: 16px;                          /* body uses a larger clamp() size; keep the case study consistent */
  line-height: 1.6;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 16px clamp(48px, 8vw, 96px);
}

.cs *, .cs *::before, .cs *::after { box-sizing: border-box; }
.cs img { max-width: 100%; }
.cs p { margin: 0; color: var(--text-2); font-size: 16px; }
.cs ul, .cs ol { margin: 0; padding: 0; }

/* Neutralise the global h4 / h1 rules in style.css inside the case study */
.cs h1, .cs h2, .cs h3, .cs h4 {
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
}

/* ---------- Hero ---------- */
.cs-hero { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 6vw, 64px); }
.cs .cs-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.cs .cs-title { font-size: clamp(36px, 6vw, 60px); font-weight: 700; line-height: 1.05; margin-bottom: 18px; color: var(--accent); }
.cs .cs-lede { font-size: clamp(17px, 2vw, 19px); }

/* ---------- Problem / Solution ---------- */
.cs-ps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.cs-card {
  --tone: var(--accent);
  --tone-soft: var(--accent-soft);
  background: #0f0f0f;                      /* same card colour as the old .ps-card */
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 36px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.cs-card::before {           /* thin coloured top edge, like the old cards */
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 4px;
  background: var(--tone);
}
.cs-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.18); box-shadow: 0 28px 50px -24px rgba(0,0,0,.85); }
.cs-card--problem { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.cs-tag {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--tone);
  background: var(--tone-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Accordion ---------- */
.cs-process {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0 clamp(16px, 3vw, 32px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cs-acc + .cs-acc { border-top: 1px solid var(--line); }
.cs-acc h2 { font-size: inherit; }

.cs-acc-toggle {
  all: unset;                 /* drop the old .accordion-toggle / button styles */
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 4px;
  cursor: pointer;
  font: 600 clamp(20px, 2.6vw, 26px)/1.2 Inter, system-ui, sans-serif;
  letter-spacing: -.02em;
  color: var(--text);
  transition: color .3s var(--ease), padding .4s var(--ease);
}
.cs-acc-toggle:hover { color: var(--accent); padding-left: 12px; }
.cs-acc-toggle:focus-visible { outline: 2px solid var(--highlight); outline-offset: 4px; border-radius: 8px; }
.cs-acc-num { font-size: 13px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 22px; }
.cs-acc.is-open .cs-acc-toggle { color: var(--accent); }

/* plus that turns into a minus */
.cs-acc-icon {
  margin-left: auto;
  position: relative;
  flex: none;
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--text);
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .5s var(--ease);
}
.cs-acc-icon::before, .cs-acc-icon::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 12px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .5s var(--ease);
}
.cs-acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.cs-acc-toggle:hover .cs-acc-icon { border-color: var(--accent); }
.cs-acc.is-open .cs-acc-icon { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.cs-acc.is-open .cs-acc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

/* smooth height animation without measuring in JS */
.cs-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease);
}
.cs-acc-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s var(--ease), transform .55s var(--ease);
}
.cs-acc.is-open .cs-acc-panel { grid-template-rows: 1fr; }
.cs-acc.is-open .cs-acc-inner { opacity: 1; transform: none; transition-delay: .08s; }
.cs-acc-inner > * { margin-bottom: 24px; }
.cs-acc-inner > :first-child { margin-top: 4px; }
.cs-acc-inner > :last-child { margin-bottom: 40px; }
.cs-acc-inner > p { max-width: 68ch; }

/* ---------- Persona ---------- */
.cs-persona {
  display: grid;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
}
.cs-persona-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.cs-avatar {
  width: 112px; height: 112px;
  object-fit: cover;
  border-radius: 999px;
  box-shadow: 0 0 0 4px #0f0f0f, 0 0 0 6px var(--accent);
}
.cs-persona-head > div { flex: 1 1 280px; }
.cs .cs-persona h3 { font-size: 24px; margin-bottom: 8px; color: var(--highlight); }
.cs .cs-quote { font-size: 18px; font-style: italic; color: var(--text); }

.cs-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
}
.cs-demo div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.cs-demo dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 2px; }
.cs-demo dd { margin: 0; font-weight: 500; }

.cs-gf { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.cs-gf-col {
  --tone: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}
.cs-gf-col--frus { --tone: var(--warn); }
.cs .cs-gf-col h4 { font-size: 15px; color: var(--tone); margin-bottom: 12px; }
.cs-gf-col ul { list-style: none; display: grid; gap: 10px; }
.cs-gf-col li { position: relative; padding-left: 18px; color: var(--text-2); }
.cs-gf-col li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 999px; background: var(--tone);
}

/* ---------- User journey ---------- */
.cs-journey {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 4px 0 0;
}
.cs-stage {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.cs-stage:hover { border-color: rgba(42,157,143,.5); background: var(--surface-2); }
.cs-stage-step { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--highlight); }
.cs .cs-stage h4 { font-size: 16px; line-height: 1.35; }
.cs-tasks { list-style: none; display: grid; gap: 8px; flex: 1; }
.cs-tasks li { font-size: 14px; color: var(--text-2); padding-left: 14px; position: relative; }
.cs-tasks li::before { content: "–"; position: absolute; left: 0; color: var(--text-3); }
.cs-emotions { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-emotions span { font-size: 12px; font-weight: 500; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.cs .cs-improve {
  font-size: 14px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.cs-improve::before { content: "Opportunity · "; font-weight: 400; color: var(--text-3); }

/* ---------- Image galleries ---------- */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.cs-gallery--wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cs-gallery img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;                         /* wireframes are drawn on white */
  cursor: zoom-in;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.cs-gallery img:hover, .cs-gallery img:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent), 0 18px 32px -18px rgba(0,0,0,.8);
  outline: none;
}

/* ---------- Usability rounds ---------- */
.cs-rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cs-round {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.cs-round-num {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 15px;
  margin-bottom: 14px;
}
.cs .cs-round h4 { font-size: 17px; margin-bottom: 12px; }
.cs-round ol { padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.cs-round li::marker { color: var(--highlight); font-weight: 600; }

/* ---------- Mockups (former Claude snippet, now on the shared tokens) ---------- */
.cs-screens {
  display: grid; gap: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 36px);
}
.cs-flow { display: grid; gap: 14px; }
.cs .cs-flow h4 { font-size: 15px; color: var(--highlight); }
.cs-flow-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 132px));
  gap: 20px 16px;
  padding: 6px 2px 10px;
}
.cs-shot {
  all: unset;
  min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  cursor: zoom-in;
  scroll-snap-align: start;
}
.cs-shot img {
  display: block; width: 100%; height: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 12px 24px -16px rgba(0,0,0,.8);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.cs-shot:hover img, .cs-shot:focus-visible img {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent), 0 18px 32px -16px rgba(0,0,0,.9);
}
.cs-shot span { font-size: 13px; color: var(--text-2); }
@media (max-width: 480px) {
  .cs-flow-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
  .cs-shot img { border-radius: 14px; }
}

/* ---------- Refined design ---------- */
.cs-refined { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 5vw, 64px); align-items: center; }
.cs-phone {
  width: 280px;
  padding: 10px;
  border-radius: 40px;
  background: #050505;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 60px -20px rgba(42,157,143,.45);
}
.cs-phone video { display: block; width: 100%; height: auto; border-radius: 30px; }
.cs-refined > video { display: block; width: min(320px, 100%); height: auto; }
@media (max-width: 720px) {
  .cs-refined { grid-template-columns: 1fr; justify-items: center; }
  .cs-phone { width: min(280px, 100%); }
}

/* ---------- Design system ---------- */
.cs-ds-block {
  display: grid; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 36px);
}
.cs .cs-ds-block h3 { font-size: 20px; line-height: 1.3; color: var(--highlight); }
.cs-ds-block > p { max-width: 68ch; }
.cs .cs-ds-note { font-size: 14px; color: var(--text-3); max-width: 68ch; }

.cs-ds-swatches {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 16px;
}
.cs-ds-swatches li { display: flex; flex-direction: column; gap: 2px; }
.cs-ds-swatch {
  display: block; height: 88px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transition: transform .45s var(--ease);
}
.cs-ds-swatches li:hover .cs-ds-swatch { transform: translateY(-4px); }
.cs-ds-name { font-size: 15px; font-weight: 600; color: var(--text); }
.cs-ds-hex { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cs-ds-role { font-size: 13px; line-height: 1.4; color: var(--text-2); }

/* type specimens sit on the app's own off-white so sizes read true */
.cs-ds-type {
  list-style: none;
  background: #FAFCF9;
  color: #1A1F1A;
  border-radius: var(--radius-md);
  padding: 4px 20px;
}
.cs-ds-type li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(26,31,26,.10);
}
.cs-ds-type li:last-child { border-bottom: 0; }
.cs-ds-meta { font-size: 13px; color: rgba(26,31,26,.64); white-space: nowrap; }

.cs-ds-specs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.cs-ds-specs div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.cs-ds-specs dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 2px; }
.cs-ds-specs dd { margin: 0; font-weight: 500; color: var(--text); }

/* component samples in the app's real colours, on the app background */
.cs-ds-demo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  background: #FAFCF9;
  border-radius: var(--radius-md);
  padding: 20px;
}
.cs-ds-btn { display: inline-flex; align-items: center; height: 52px; padding: 0 24px; border-radius: 999px; background: #2E8B3E; color: #fff; font-size: 16px; font-weight: 600; }
.cs-ds-btn--outline { background: transparent; color: #2E8B3E; box-shadow: inset 0 0 0 1.5px #2E8B3E; }
.cs-ds-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; color: #1A1F1A; box-shadow: inset 0 0 0 1px rgba(26,31,26,.16); font-size: 14px; font-weight: 500; }
.cs-ds-chip--on { background: #CDEBCB; box-shadow: inset 0 0 0 1px #2E8B3E; }

/* ---------- Lightbox ---------- */
.cs-view {
  border: 0; padding: 0;
  background: transparent;
  max-width: none; max-height: none;
  overflow: visible;
}
.cs-view::backdrop { background: rgba(5, 5, 5, .8); backdrop-filter: blur(6px); }
.cs-view[open] { animation: csZoomIn .45s var(--ease); }
.cs-view[open]::backdrop { animation: csFade .35s ease; }
.cs-view img {
  display: block;
  max-width: min(92vw, 1100px); max-height: 86vh;
  width: auto; height: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.cs-view.is-tall img { height: min(86vh, 812px); border-radius: 32px; }
.cs-view-close, .cs-view-btn {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 999px; border: 0;
  background: #fff; color: #111;
  font: 400 24px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.6);
  transition: transform .3s var(--ease), background .3s;
}
.cs-view-close:hover, .cs-view-btn:hover { transform: scale(1.08); background: var(--highlight); }
.cs-view-close { top: -14px; right: -14px; }
.cs-view-btn { top: 50%; translate: 0 -50%; }
.cs-view-prev { left: -56px; }
.cs-view-next { right: -56px; }
.cs-view.is-single .cs-view-btn { display: none; }
@media (max-width: 720px) {
  .cs-view-prev { left: 8px; }
  .cs-view-next { right: 8px; }
  .cs-view-close { top: 8px; right: 8px; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes csZoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes csFade { from { opacity: 0; } to { opacity: 1; } }

/* Respect people who turn animations off */
@media (prefers-reduced-motion: reduce) {
  .cs *, .cs *::before, .cs *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Shared extras (used by MyJob, safe for Flower2U) ---------- */
.cs .cs-acc-inner > h3 { font-size: 18px; line-height: 1.35; color: var(--text); margin-bottom: 10px; }
.cs .cs-acc-inner > h3:not(:first-child) { margin-top: 16px; }
.cs-acc-inner > ul { padding-left: 20px; list-style: disc; display: grid; gap: 6px; color: var(--text-2); max-width: 68ch; }
.cs-acc-inner > ul li::marker { color: var(--highlight); }
.cs-round p + p { margin-top: 10px; }
.cs-round strong { color: var(--text); font-weight: 600; }
.cs-refined > div { display: grid; gap: 16px; }

/* ---------- Prototype call to action ---------- */
.cs-refined > div { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cs-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 0; }
.cs .cs-btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: auto; height: 52px; margin: 0; padding: 0 22px 0 24px;
  border: 0; border-radius: 12px;
  background: var(--highlight); color: #14161B;
  font-size: 16px; line-height: 1; font-weight: 600; letter-spacing: 0;
  white-space: nowrap; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease);
}
.cs .cs-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -12px rgba(0,0,0,.5); text-decoration: none; color: #14161B; }
.cs .cs-btn:active { transform: scale(.97); }
.cs .cs-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
.cs .cs-btn svg { display: block; flex: none; width: 18px; height: 18px; margin: 0; transition: transform .2s var(--ease); }
.cs .cs-btn:hover svg { transform: translate(2px, -2px); }
.cs .cs-cta-note { display: block; margin: 0; padding-left: 2px; font-size: 13px; line-height: 18px; color: var(--text-3); }
@media (max-width: 720px) {
  .cs-refined > div, .cs-cta { align-items: center; text-align: center; }
}

/* ---------- Refined design layout (final) ---------- */
.cs .cs-acc-inner > .cs-refined { max-width: none; width: 100%; }
.cs-refined {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 320px);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.cs-refined > div { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cs-refined > div p { max-width: none; }
.cs-refined > video, .cs-refined > .cs-phone {
  justify-self: end; width: 100%; max-width: 320px; height: auto; display: block; border-radius: 28px;
}
@media (max-width: 860px) {
  .cs-refined { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .cs-refined > div { align-items: center; text-align: center; max-width: 560px; }
  .cs-refined > video, .cs-refined > .cs-phone { justify-self: center; width: min(300px, 80vw); }
  .cs-cta { align-items: center; }
}

/* ---------- Wide (desktop) screenshots ---------- */
.cs-flow-row.cs-flow-row--wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; overflow: visible; }
.cs-flow-row--wide .cs-shot { width: auto; max-width: none; flex: none; }
.cs-flow-row--wide .cs-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 12px; }
.cs-refined > img.cs-phone { box-shadow: 0 0 0 10px #14161B, 0 32px 64px -32px rgba(20, 22, 27, 0.5); border-radius: 30px; }

/* ---------- Refined design with a wide desktop recording ---------- */
.cs-refined.cs-refined--wide { grid-template-columns: 1fr; gap: 32px; justify-items: stretch; }
.cs-refined--wide > div { align-items: flex-start; text-align: left; max-width: none; }
.cs-refined--wide > video.cs-video-wide {
  justify-self: stretch; width: 100%; max-width: none; height: auto; display: block;
  border-radius: 16px; background: #F1F6F7;
  box-shadow: 0 0 0 1px rgba(30, 31, 61, 0.08), 0 32px 64px -32px rgba(30, 31, 61, 0.35);
}
@media (max-width: 860px) {
  .cs-refined--wide > div { align-items: center; text-align: center; }
  .cs-refined--wide > video.cs-video-wide { border-radius: 12px; }
}

/* ---------- Design system spacing (final) ---------- */
#p-ds .cs-acc-inner > p { margin-bottom: clamp(24px, 3vw, 32px); }
.cs .cs-ds-block { gap: 20px; margin: 0; }
.cs .cs-ds-block + .cs-ds-block { margin-top: clamp(24px, 3vw, 40px); }
.cs .cs-ds-block h3 { margin: 0; }
.cs .cs-ds-block > p, .cs .cs-ds-note { margin: 0; }
.cs .cs-ds-swatches, .cs .cs-ds-type, .cs .cs-ds-specs, .cs .cs-ds-demo { margin: 4px 0 0; }
.cs .cs-ds-swatches { padding: 0; }
.cs .cs-ds-type { padding: 8px clamp(16px, 3vw, 28px); }
.cs .cs-ds-type li { padding: 18px 0; }
.cs .cs-ds-type li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cs .cs-ds-demo { padding: clamp(16px, 3vw, 28px); gap: 12px 16px; }
@media (max-width: 600px) {
  .cs .cs-ds-type li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cs .cs-ds-meta { white-space: normal; }
}

/* ---------- Per-project brand accents ----------
   Same layout for every case study; only the accent changes.
   Tints of each app's brand colour, lightened so they stay readable on the dark site. */
.cs[data-brand="flower2u"] { --accent: #6CC27A; --accent-soft: rgba(46, 139, 62, .22); --highlight: #CDEBCB; }
.cs[data-brand="myjob"]    { --accent: #6FA6F0; --accent-soft: rgba(10, 95, 208, .24); --highlight: #8DB9F4; }
.cs[data-brand="diyer"]    { --accent: #A3A6EC; --accent-soft: rgba(60, 62, 137, .40); --highlight: #B9BBF2; }
.cs[data-brand] a:not(.cs-btn) { color: var(--accent); }
.cs[data-brand] .cs-acc-num, .cs[data-brand] .cs-eyebrow, .cs[data-brand] .cs-round-num, .cs[data-brand] .cs-stage-step { color: var(--accent); }
.cs[data-brand] .cs-btn:focus-visible { outline-color: var(--accent); }

/* ---------- Hero stage (sticky, scroll-driven) ---------- */
.cs-hstage { --p: 0; position: relative; height: 140vh; margin: clamp(8px, 2vw, 24px) 0 clamp(24px, 4vw, 48px); }
.cs-hstage-sticky { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cs-hstage-media {
  position: relative; width: min(100%, 1100px); height: min(78vh, 720px);
  display: flex; align-items: center; justify-content: center;
  border-radius: calc(40px - var(--p) * 16px);
  background: radial-gradient(120% 90% at 50% 100%, var(--accent-soft), transparent 70%);
  transform: scale(calc(.9 + var(--p) * .1));
}
.cs .cs-hstage .cs-dev {
  position: absolute; display: block; height: auto; max-width: none;
  border-radius: 28px; background: #fff;
  box-shadow: 0 0 0 8px #14161B, 0 40px 80px -40px rgba(0, 0, 0, .8);
  opacity: 0; translate: 0 40px;
  transition: opacity .9s var(--ease), translate 1.1s var(--ease);
}
.cs-hstage.is-in .cs-dev { opacity: 1; translate: 0 0; }
.cs-hstage.is-in .cs-dev--l, .cs-hstage.is-in .cs-dev--desk { transition-delay: .1s; }
.cs-hstage.is-in .cs-dev--c { transition-delay: .2s; }
.cs-hstage.is-in .cs-dev--r, .cs-hstage.is-in .cs-dev--phone { transition-delay: .32s; }

/* Flower2U: three phones fan open as you scroll */
.cs .cs-hstage--fan .cs-dev { width: clamp(150px, 22vw, 270px); }
.cs .cs-hstage--fan .cs-dev--c { z-index: 2; transform: translateY(calc(var(--p) * -14px)) scale(calc(1 + var(--p) * .04)); }
.cs .cs-hstage--fan .cs-dev--l { transform: translateX(calc(-28% - var(--p) * 62%)) rotate(calc(-3deg - var(--p) * 7deg)) scale(.9); }
.cs .cs-hstage--fan .cs-dev--r { transform: translateX(calc(28% + var(--p) * 62%)) rotate(calc(3deg + var(--p) * 7deg)) scale(.9); }

/* MyJob: phones cascade diagonally, like cards in a feed */
.cs .cs-hstage--cascade .cs-dev { width: clamp(150px, 21vw, 260px); }
.cs .cs-hstage--cascade .cs-dev--l { z-index: 1; transform: translate(calc(-55% - var(--p) * 45%), calc(10% - var(--p) * 18%)); }
.cs .cs-hstage--cascade .cs-dev--c { z-index: 2; transform: translate(0, calc(var(--p) * -4%)); }
.cs .cs-hstage--cascade .cs-dev--r { z-index: 3; transform: translate(calc(55% + var(--p) * 45%), calc(-10% + var(--p) * 18%)); }

/* DIYer: desktop settles in, phone slides over its corner */
.cs .cs-hstage--web .cs-dev--desk { width: min(86%, 900px); border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -40px rgba(0,0,0,.8); transform: translateX(calc(-4% * var(--p))) scale(calc(.94 + var(--p) * .06)); }
.cs .cs-hstage--web .cs-dev--phone { z-index: 2; width: clamp(110px, 16vw, 210px); right: 4%; bottom: 2%; transform: translate(calc(30% - var(--p) * 30%), calc(18% - var(--p) * 18%)) rotate(calc(6deg - var(--p) * 6deg)); }

@media (max-width: 720px) {
  .cs-hstage { height: 130vh; }
  .cs-hstage-media { height: 70vh; }
  .cs .cs-hstage--fan .cs-dev, .cs .cs-hstage--cascade .cs-dev { width: 40vw; }
  .cs .cs-hstage .cs-dev { border-radius: 20px; box-shadow: 0 0 0 5px #14161B, 0 30px 60px -30px rgba(0,0,0,.8); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-hstage { height: auto; }
  .cs-hstage-sticky { position: static; height: auto; padding: 24px 0; }
  .cs-hstage-media { transform: none; height: min(70vh, 620px); }
  .cs .cs-hstage .cs-dev { transition: opacity .3s ease; translate: 0 0; }
}

/* ---------- More motion on the page ---------- */
.cs-hero .cs-title { background: linear-gradient(90deg, var(--text) 0%, var(--text) 40%, var(--highlight) 50%, var(--text) 60%, var(--text) 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: csShine 2.4s var(--ease) .6s 1 both; }
@keyframes csShine { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.cs-acc-toggle .cs-acc-num { transition: transform .4s var(--ease), color .3s; }
.cs-acc-toggle:hover .cs-acc-num { transform: translateX(4px); }
.cs-shot img { transition: transform .5s var(--ease); }
.cs-shot:hover img { transform: translateY(-6px); }
.cs-ds-swatches li { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.cs-acc.is-open .cs-ds-swatches li { opacity: 1; transform: none; }
.cs-acc.is-open .cs-ds-swatches li:nth-child(2) { transition-delay: .05s; } .cs-acc.is-open .cs-ds-swatches li:nth-child(3) { transition-delay: .1s; }
.cs-acc.is-open .cs-ds-swatches li:nth-child(4) { transition-delay: .15s; } .cs-acc.is-open .cs-ds-swatches li:nth-child(5) { transition-delay: .2s; }
.cs-acc.is-open .cs-ds-swatches li:nth-child(6) { transition-delay: .25s; } .cs-acc.is-open .cs-ds-swatches li:nth-child(n+7) { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .cs-hero .cs-title { animation: none; color: var(--text); background: none; }
  .cs-ds-swatches li { opacity: 1; transform: none; transition: none; }
  .cs-shot:hover img, .cs-acc-toggle:hover .cs-acc-num { transform: none; }
}

/* ---------- Media spacing + size caps (final) ---------- */
/* Space between text and any picture, video or grid that follows it */
.cs .cs-acc-inner > :is(p, ul, ol, h3, h4) + :is(.cs-gallery, .cs-screens, .cs-rounds, .cs-persona, .cs-journey, .cs-ds-block, video, img, figure),
.cs .cs-acc-inner > :is(.cs-rounds, .cs-journey) + :is(.cs-gallery, video, img) { margin-top: clamp(20px, 3vw, 32px); }
.cs .cs-acc-inner > :is(.cs-gallery, .cs-screens) + :is(p, h3, h4) { margin-top: clamp(24px, 3.5vw, 40px); }
.cs .cs-acc-inner > h3 { margin-top: clamp(24px, 3.5vw, 40px); margin-bottom: 8px; }
.cs .cs-acc-inner > h3:first-child { margin-top: 0; }
.cs .cs-acc-inner > p + p { margin-top: 12px; }

/* Keep pictures at a readable size instead of filling the whole column */
.cs .cs-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 220px)); justify-content: start; gap: 16px; }
.cs .cs-gallery img { max-height: 340px; object-fit: contain; background: rgba(255,255,255,.04); }
.cs .cs-gallery--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 560px)); justify-content: center; }
.cs .cs-gallery--wide img { max-height: 380px; width: 100%; }
.cs .cs-gallery--wide:has(> img:only-child) { grid-template-columns: minmax(0, 720px); }
.cs .cs-gallery--wide > img:only-child { max-height: 460px; }
@media (max-width: 600px) {
  .cs .cs-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs .cs-gallery--wide { grid-template-columns: 1fr; }
  .cs .cs-gallery img, .cs .cs-gallery--wide img { max-height: 280px; }
}

/* Live prototype button in the hero */
.cs .cs-hero-cta { margin-top: clamp(20px, 3vw, 32px); display: flex; justify-content: center; }
.cs .cs-refined > video { background: #14161B; object-fit: cover; }
