/* Tao Digital — Case Study template (2026)
   Loads after nav-editorial.css and alongside fonts.css.
   Markup: resources/views/template-case-study.blade.php + partials/cs/*
   Fields:  app/case-study.php   Data: app/View/Composers/CaseStudy.php
   Only loads on pages using template-case-study.blade.php (see app/setup.php).
   ============================================================ */

.td-cs {
  /* Dark canvas */
  --tdcs-navy:     #212235;
  --tdcs-surface:  #2A2B40;
  --tdcs-line:     #3A3B52;
  --tdcs-chrome:   #1B1C2B;
  --tdcs-well:     #0E0F1A;

  /* Brand */
  --tdcs-teal:     #17B7C8;
  --tdcs-green:    #48D734;
  --tdcs-teal-20:  #D1F1F4;
  --tdcs-green-20: #DAF7D6;
  --tdcs-teal-ink: #0B6B75;
  --tdcs-green-ink:#1F7A12;

  /* Light surfaces */
  --tdcs-paper:     #FFFFFF;
  --tdcs-paper-alt: #F5F6F8;
  --tdcs-ink:       #333333;
  --tdcs-ink-soft:  #666666;
  --tdcs-line-lt:   #E4E6EB;

  --tdcs-on-dark:      rgba(255,255,255,0.78);
  --tdcs-on-dark-soft: rgba(255,255,255,0.55);

  --tdcs-r:      20px;
  --tdcs-r-md:   16px;
  --tdcs-r-pill: 999px;
  --tdcs-shadow-md: 0 6px 20px rgba(33,34,53,0.08);
  --tdcs-shadow-lg: 0 18px 48px rgba(33,34,53,0.12);
  --tdcs-shadow-green: 0 10px 28px rgba(72,215,52,0.30);
  --tdcs-shadow-well: 0 34px 90px -34px rgba(0,0,0,0.70);

  --tdcs-font: 'Montserrat', system-ui, -apple-system, sans-serif;
  --tdcs-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --tdcs-pad: 28px;   /* container gutter */
  --tdcs-sec: 92px;   /* section rhythm */

  font-family: var(--tdcs-font);
  background: var(--tdcs-navy);
  color: #fff;

  /* nav-editorial.css sets body{padding-top:88px} to clear the fixed floating
     nav pill. Without cancelling it here the dark hero would start 88px down
     with a white band above it. Pull back up, then re-pad, so navy runs
     underneath the pill. */
  margin-top: -88px;
  padding-top: 88px;

  /* clip, not hidden — hidden would make this a scroll container and break
     any position:sticky descendant (same trade-off documented in pricing.css) */
  overflow-x: clip;
}

.td-cs *,
.td-cs *::before,
.td-cs *::after { box-sizing: border-box; }

.td-cs__container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--tdcs-pad);
  /* z-index, not just position: the swirls are positioned with z-index 0, which
     would otherwise paint them over static content like the hero copy */
  position: relative;
  z-index: 1;
}

.td-cs [id] { scroll-margin-top: 110px; }

/* Brand swirl wash — the dark sections' background texture.
   A pseudo-element rather than an <img> so the artwork and its sizing can
   change per breakpoint: the wide "cloud" curve suits a landscape section, but
   a stacked mobile hero is ~1400px tall and portrait, where the same image
   would only ever be a thin band across the middle. As a CSS background the
   unused variant is never even downloaded.
   Sits under all content (which is z-index 1 via .td-cs__container /
   .td-cs__cta-inner) and well under the nav pill at z-index 400.
   Scaling this artwork up thickens its strokes, hence the low opacity — it
   should read as texture, not as a graphic competing with the copy. */
.td-cs__hero::before,
.td-cs__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image: url('../images/swirl-cloud.png');
  background-position: center 42%;
  background-size: max(1500px, 130%) auto;
  opacity: 0.22;
}

/* ---------- Shared type ---------- */
.td-cs__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tdcs-teal);
  margin: 0;
}
.td-cs__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  flex: none;
}
.td-cs__eyebrow--green { color: var(--tdcs-green); }

.td-cs__h1 {
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 20px 0 0;
  text-wrap: balance;
}
.td-cs__hl--teal  { color: var(--tdcs-teal); }
.td-cs__hl--green { color: var(--tdcs-green); }

.td-cs__h2 {
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
  text-wrap: balance;
}
.td-cs__h3 {
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 14px 0 12px;
}
.td-cs__lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--tdcs-on-dark);
  margin: 22px 0 0;
  max-width: 52ch;
}

/* ---------- Buttons (design-system Button, as CSS) ---------- */
.td-cs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1;
  border-radius: var(--tdcs-r-pill);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .24s var(--tdcs-ease), background .24s var(--tdcs-ease),
              color .24s var(--tdcs-ease), border-color .24s var(--tdcs-ease),
              box-shadow .24s var(--tdcs-ease);
}
.td-cs__btn svg { flex: none; }

.td-cs__btn--primary {
  background: var(--tdcs-green);
  color: var(--tdcs-navy);
  box-shadow: var(--tdcs-shadow-green);
}
.td-cs__btn--primary:hover,
.td-cs__btn--primary:focus-visible {
  background: #6DDF5D;
  color: var(--tdcs-navy);
  transform: translateY(-2px);
}
.td-cs__btn--primary:active { transform: translateY(0); }

.td-cs__btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.td-cs__btn--ghost:hover,
.td-cs__btn--ghost:focus-visible {
  color: var(--tdcs-teal);
  border-color: var(--tdcs-teal);
}

.td-cs__btn--link {
  padding: 4px 2px;
  border-radius: 0;
  background: transparent;
  color: var(--tdcs-teal);
  font-size: 0.95rem;
  gap: 8px;
}
.td-cs__btn--link:hover,
.td-cs__btn--link:focus-visible {
  color: #45C5D3;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.td-cs__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* ---------- Badge / chip ---------- */
.td-cs__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  border-radius: var(--tdcs-r-pill);
  background: var(--tdcs-teal-20);
  color: var(--tdcs-teal-ink);
}
.td-cs__badge--green {
  background: var(--tdcs-green-20);
  color: var(--tdcs-green-ink);
}

.td-cs__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}
.td-cs__chip {
  color: #fff;
  font-size: 0.86rem;
  background: var(--tdcs-surface);
  border: 1px solid var(--tdcs-line);
  border-radius: var(--tdcs-r-pill);
  padding: 6px 13px;
}

/* ---------- Icon tile ---------- */
.td-cs__tile {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--tdcs-teal-20);
  color: var(--tdcs-teal-ink);
}
.td-cs__tile--green {
  background: rgba(72,215,52,0.14);
  color: var(--tdcs-green);
}

/* ============================================================
   1 · HERO
============================================================ */
.td-cs__hero {
  position: relative;
  overflow: hidden;
  background: var(--tdcs-navy);
}


.td-cs__hero-inner { padding: 70px 0 90px; }

.td-cs__breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--tdcs-on-dark-soft);
}
.td-cs__breadcrumb a { color: var(--tdcs-on-dark-soft); text-decoration: none; }
.td-cs__breadcrumb a:hover { color: var(--tdcs-teal); }
.td-cs__breadcrumb-current { color: rgba(255,255,255,0.82); }

.td-cs__hero-copy { animation: td-cs-fade .6s var(--tdcs-ease) both; }
.td-cs__hero-media { animation: td-cs-fade .7s var(--tdcs-ease) .1s both; }

@keyframes td-cs-fade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* --- split --- */
.td-cs__hero--split .td-cs__hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.td-cs__hero--split .td-cs__hero-media { max-width: 640px; }

/* --- centered --- */
.td-cs__hero--centered .td-cs__hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 0 84px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.td-cs__hero--centered .td-cs__h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
.td-cs__hero--centered .td-cs__lede { max-width: 60ch; }
.td-cs__hero--centered .td-cs__breadcrumb { justify-content: center; }
.td-cs__hero--centered .td-cs__actions { justify-content: center; }
.td-cs__hero--centered .td-cs__hero-media {
  width: 100%;
  max-width: 820px;
  margin: 52px auto 0;
}

/* --- editorial --- */
.td-cs__hero--editorial .td-cs__hero-inner { padding: 64px 0 0; }
.td-cs__hero--editorial .td-cs__h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin: 18px 0 0;
}
.td-cs__hero--editorial .td-cs__hero-tail {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  margin: 28px 0 40px;
}
.td-cs__hero--editorial .td-cs__lede { margin: 0; max-width: 50ch; }
.td-cs__hero--editorial .td-cs__actions { margin-top: 0; }
.td-cs__hero--editorial .td-cs__hero-media { width: 100%; }
.td-cs__hero--editorial .td-cs__frame {
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  box-shadow: 0 -10px 90px -34px rgba(23,183,200,0.40);
}

/* ============================================================
   2 · FACTS STRIP
============================================================ */
.td-cs__facts {
  display: grid;
  /* 170px so the usual five facts fill the row exactly; 150px leaves a sixth
     empty track and bunches them to the left */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 24px;
  padding: 34px 0 8px;
  margin-top: 40px;
  border-top: 1px solid var(--tdcs-line);
  position: relative;
}
.td-cs__fact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tdcs-teal);
  margin-bottom: 8px;
}
.td-cs__fact-value {
  color: rgba(255,255,255,0.85);
  font-size: 0.98rem;
  line-height: 1.4;
}
.td-cs__facts > :first-child .td-cs__fact-value {
  color: #fff;
  font-weight: 600;
}
/* Linked fact value — a quiet underline so it reads as a link without turning
   the strip into a row of buttons */
.td-cs__fact-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: color .2s var(--tdcs-ease), border-color .2s var(--tdcs-ease);
}
.td-cs__fact-link:hover,
.td-cs__fact-link:focus-visible {
  color: var(--tdcs-teal);
  border-color: var(--tdcs-teal);
}

.td-cs__divider {
  max-width: 1400px;
  margin: 24px auto 0;
  padding: 0;
  /* Sibling of the swirl wash, which is positioned — needs its own layer or the
     wash would paint over it */
  position: relative;
  z-index: 1;
}
.td-cs__divider img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.7;
}

/* ============================================================
   Sections
============================================================ */
.td-cs__section { padding: var(--tdcs-sec) 0; }
.td-cs__section--paper     { background: var(--tdcs-paper); color: var(--tdcs-ink); }
.td-cs__section--paper-alt { background: var(--tdcs-paper-alt); color: var(--tdcs-ink); }
.td-cs__section--navy      { background: var(--tdcs-navy); color: #fff; position: relative; overflow: hidden; }

.td-cs__section--paper .td-cs__h2,
.td-cs__section--paper-alt .td-cs__h2,
.td-cs__section--paper .td-cs__h3,
.td-cs__section--paper-alt .td-cs__h3 { color: var(--tdcs-navy); }

.td-cs__section-head { max-width: 640px; margin-bottom: 46px; }
.td-cs__section-head .td-cs__h2 { margin-bottom: 12px; }
.td-cs__section-intro {
  color: var(--tdcs-ink);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}
.td-cs__section--navy .td-cs__section-intro { color: var(--tdcs-on-dark); }

/* ============================================================
   3 · CLIENT & BRIEF
============================================================ */
.td-cs__brief {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: start;
}
.td-cs__brief-body { margin-top: 18px; }
.td-cs__brief-body p {
  color: var(--tdcs-ink);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 16px;
}
.td-cs__brief-body p:last-child { margin-bottom: 0; }
.td-cs__brief-body a { color: var(--tdcs-teal-ink); }

.td-cs__needs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.td-cs__need {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--tdcs-ink);
  font-size: 1rem;
  line-height: 1.5;
}
.td-cs__need-tick {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--tdcs-r-pill);
  background: var(--tdcs-green-20);
  color: var(--tdcs-green-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.td-cs__need strong { color: var(--tdcs-navy); }

/* ============================================================
   4 · OUR APPROACH
============================================================ */
.td-cs__steps {
  display: grid;
  /* 300px rather than 250px so six steps land as a tidy 3x2 at desktop
     instead of 4 + 2 */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: td-cs-step;
}
.td-cs__step {
  background: var(--tdcs-paper);
  border: 1px solid var(--tdcs-line-lt);
  border-radius: var(--tdcs-r);
  padding: 26px;
  box-shadow: var(--tdcs-shadow-md);
}
.td-cs__step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.td-cs__step-num {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--tdcs-green);
  line-height: 1;
}
.td-cs__step-title {
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--tdcs-navy);
  margin: 0 0 8px;
}
.td-cs__step-body {
  margin: 0;
  color: var(--tdcs-ink);
  line-height: 1.55;
  font-size: 0.92rem;
}

/* ============================================================
   5 · DESIGN HIGHLIGHTS
============================================================ */
.td-cs__section--navy .td-cs__section-head { margin-bottom: 52px; }

.td-cs__hlrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  align-items: center;
  margin-bottom: 64px;
}
.td-cs__hlrow-copy   { min-width: 0; }
.td-cs__hlrow-media  { min-width: 0; }
/* Mockup on the left: swap the visual order, keep the DOM in reading order */
.td-cs__hlrow--left .td-cs__hlrow-media { order: 1; }
.td-cs__hlrow--left .td-cs__hlrow-copy  { order: 2; }

.td-cs__hlrow .td-cs__h3 { color: #fff; }
.td-cs__hlrow-body {
  color: var(--tdcs-on-dark);
  line-height: 1.65;
  font-size: 1.02rem;
  margin: 0;
}

.td-cs__hlcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.td-cs__hlcard {
  background: var(--tdcs-surface);
  border: 1px solid var(--tdcs-line);
  border-radius: var(--tdcs-r);
  padding: 26px;
}
.td-cs__hlcard .td-cs__tile { margin-bottom: 16px; }
.td-cs__hlcard-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin: 0 0 8px;
}
.td-cs__hlcard-body {
  margin: 0;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  font-size: 0.92rem;
}

/* ============================================================
   6 · TESTIMONIAL
============================================================ */
.td-cs__quote-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--tdcs-pad);
  text-align: center;
}
.td-cs__stars {
  display: flex;
  justify-content: center;
  gap: 5px;
  color: var(--tdcs-green);
  margin-bottom: 22px;
}
.td-cs__quote {
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  line-height: 1.4;
  color: var(--tdcs-navy);
  margin: 0 0 26px;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.td-cs__quote-by {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.td-cs__avatar {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--tdcs-r-pill);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tdcs-teal);
  color: var(--tdcs-navy);
  font-weight: 700;
  font-size: 1.25rem;
}
.td-cs__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td-cs__quote-name { font-weight: 700; color: var(--tdcs-navy); }
.td-cs__quote-role { color: var(--tdcs-ink-soft); font-size: 0.88rem; }

/* ============================================================
   7 · MORE OF OUR WORK
============================================================ */
.td-cs__rel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.td-cs__rel-head .td-cs__h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 0; }

.td-cs__rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.td-cs__rel-card {
  display: block;
  height: 100%;
  background: var(--tdcs-paper);
  border: 1px solid var(--tdcs-line-lt);
  border-radius: var(--tdcs-r);
  padding: 28px;
  box-shadow: var(--tdcs-shadow-md);
  text-decoration: none;
  transition: transform .24s var(--tdcs-ease), box-shadow .24s var(--tdcs-ease);
}
.td-cs__rel-card:hover,
.td-cs__rel-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--tdcs-shadow-lg);
}
.td-cs__rel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.td-cs__rel-client { font-weight: 700; color: var(--tdcs-navy); font-size: 1.1rem; }
/* The card is a single <a>, so its parts are spans — make them block */
.td-cs__rel-stat {
  display: block;
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--tdcs-green);
  line-height: 1;
}
.td-cs__rel-slab {
  display: block;
  color: var(--tdcs-ink-soft);
  font-size: 0.9rem;
  margin: 4px 0 14px;
}
.td-cs__rel-blurb {
  display: block;
  color: var(--tdcs-ink);
  line-height: 1.55;
  font-size: 0.92rem;
  margin: 0;
}

/* ============================================================
   8 · BOTTOM CTA
============================================================ */
.td-cs__cta { padding: 96px 0; }
.td-cs__cta-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--tdcs-pad);
  position: relative;
  z-index: 1;
  text-align: center;
}
.td-cs__cta .td-cs__h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 16px 0 18px;
  color: #fff;
}
.td-cs__cta-body {
  color: var(--tdcs-on-dark);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 auto 32px;
  max-width: 52ch;
}
.td-cs__cta .td-cs__actions { justify-content: center; margin-top: 0; }
/* The CTA is only ~500px tall, so the wide sizing above would show a narrow
   slice straight through the thickest part of the curve. Sizing closer to the
   section width keeps more of the shape intact. */
.td-cs__cta::before {
  background-position: center center;
  background-size: max(1200px, 104%) auto;
}
/* "Show the brand swirl decoration" toggle, off */
.td-cs__cta--plain::before { display: none; }

/* ============================================================
   Website mockup (browser / phone / bare)
============================================================ */
.td-cs__frame {
  width: 100%;
  border-radius: var(--tdcs-r-md);
  overflow: hidden;
  border: 1px solid var(--tdcs-line);
  background: var(--tdcs-well);
  box-shadow: var(--tdcs-shadow-well);
}
.td-cs__frame--phone {
  width: 250px;
  margin: 0 auto;
  border: 8px solid var(--tdcs-chrome);
  border-radius: 38px;
  box-shadow: 0 30px 80px -34px rgba(0,0,0,0.80);
}
.td-cs__frame--bare { border-radius: var(--tdcs-r-md); box-shadow: none; }

.td-cs__frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--tdcs-chrome);
  border-bottom: 1px solid var(--tdcs-line);
}
.td-cs__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.td-cs__dot--r { background: #FF5F57; }
.td-cs__dot--y { background: #FEBC2E; }
.td-cs__dot--g { background: #28C840; }
.td-cs__frame-url {
  margin-left: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  background: var(--tdcs-well);
  border: 1px solid var(--tdcs-line);
  border-radius: var(--tdcs-r-pill);
  padding: 6px 14px;
}

/* The window is a fixed landscape crop, not the whole screenshot — a full-page
   shot is 1400x1750 and shrinking all of it to fit makes the site unreadable.
   object-fit: cover + object-position: top pins it to the top of the page,
   which is the part worth showing.

   aspect-ratio also means the box has its final height before any image or
   embed arrives, so there is no layout shift in either mode.

   Ratios come straight from the mockups: split hero 640x400, centred 820x460,
   editorial 1110x520, feature row 640x320, phone 250x480. Order matters — the
   phone rule has the same specificity as the row rule, so it must come last. */
.td-cs__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #EEF0F3;
}
.td-cs__hero--centered .td-cs__viewport  { aspect-ratio: 41 / 23; }
.td-cs__hero--editorial .td-cs__viewport { aspect-ratio: 37 / 17; }
.td-cs__hlrow .td-cs__viewport           { aspect-ratio: 2 / 1; }
.td-cs__frame--phone .td-cs__viewport {
  aspect-ratio: 25 / 48;
  background: var(--tdcs-well);
}

.td-cs__shot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Sits under the screenshot/embed so a slow or blocked load still reads as
   deliberate rather than broken. */
.td-cs__viewport-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
}
.td-cs__viewport-ph-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--tdcs-navy);
}
.td-cs__viewport-ph-url {
  font-size: 12px;
  font-weight: 500;
  color: #9AA0A6;
}

/* Standalone placeholder (no screenshot at all) — dark, not a grey hole */
.td-cs__viewport--ph { background: var(--tdcs-surface); }
.td-cs__viewport--ph .td-cs__viewport-ph-name { color: #fff; }
.td-cs__viewport--ph .td-cs__viewport-ph-url { color: var(--tdcs-on-dark-soft); }
.td-cs__ph-initial {
  width: 64px;
  height: 64px;
  border-radius: var(--tdcs-r-pill);
  background: var(--tdcs-teal);
  color: var(--tdcs-navy);
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.td-cs__ph-link {
  color: var(--tdcs-teal);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.td-cs__ph-link:hover { color: var(--tdcs-green); }

/* Live embed. --cs-scale is set by public/scripts/case-study.js; the fallback
   is the desktop container width ÷ design width, so it is already right at
   desktop before the observer fires. */
.td-cs__embed {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transform-origin: top left;
  transform: scale(var(--cs-scale, 1));
  pointer-events: none;
}
.td-cs__embed iframe {
  display: block;
  border: 0;
  pointer-events: none;
}
.td-cs__viewport--fade {
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

/* ============================================================
   Responsive — desktop-first, matching nav-editorial's breakpoints
============================================================ */
@media (max-width: 1100px) {
  .td-cs { --tdcs-sec: 72px; }
  .td-cs__hero--split .td-cs__hero-inner { gap: 40px; }
  .td-cs__hlrow { gap: 32px; margin-bottom: 48px; }
  .td-cs__brief { gap: 40px; }
}

@media (max-width: 980px) {
  /* Below this the two-column hero and feature rows stop earning their keep */
  .td-cs__hero--split .td-cs__hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .td-cs__hero--split .td-cs__hero-media { max-width: none; }
  .td-cs__hlrow { grid-template-columns: minmax(0, 1fr); }
  /* Copy always leads once stacked, whichever side the mockup was on */
  .td-cs__hlrow--left .td-cs__hlrow-media,
  .td-cs__hlrow--right .td-cs__hlrow-media { order: 2; }
  .td-cs__hlrow--left .td-cs__hlrow-copy,
  .td-cs__hlrow--right .td-cs__hlrow-copy { order: 1; }
  .td-cs__brief { grid-template-columns: minmax(0, 1fr); }
  .td-cs__hero--editorial .td-cs__h1 { max-width: none; }
}

@media (max-width: 900px) {
  /* nav-editorial drops body padding to 80px here — stay in step */
  .td-cs { margin-top: -80px; padding-top: 80px; }
}

@media (max-width: 760px) {
  .td-cs {
    --tdcs-pad: 18px;
    --tdcs-sec: 44px;
  }
  .td-cs__hero-inner,
  .td-cs__hero--centered .td-cs__hero-inner,
  .td-cs__hero--editorial .td-cs__hero-inner { padding: 30px 0 34px; }

  .td-cs__h1,
  .td-cs__hero--centered .td-cs__h1,
  .td-cs__hero--editorial .td-cs__h1 {
    font-size: 2.35rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-top: 16px;
  }
  .td-cs__h2 { font-size: 1.7rem; line-height: 1.12; }
  .td-cs__h3 { font-size: 1.25rem; }
  .td-cs__lede { font-size: 1.05rem; margin-top: 18px; }

  /* Full-width stacked buttons — the design's mobile treatment */
  .td-cs__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
    align-items: stretch;
  }
  .td-cs__btn { width: 100%; }
  .td-cs__btn--link { width: auto; align-self: flex-start; }

  /* Clear of the eyebrow and headline at this width */
  /* Narrow viewport: the hero is tall and portrait here, so swap to the
     near-square "cluster" knot — the landscape cloud curve could only ever be
     a thin band across the middle of it. */
  .td-cs__hero::before {
    background-image: url('../images/swirl-cluster.png');
    background-size: max(700px, 185%) auto;
    background-position: center 26%;
    opacity: 0.2;
  }
  .td-cs__cta::before {
    background-size: max(620px, 180%) auto;
    opacity: 0.2;
  }

  /* Two-up facts grid reads better than five cramped columns */
  .td-cs__facts {
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px;
    margin-top: 26px;
    padding: 24px 0 0;
  }
  .td-cs__fact-label { font-size: 0.68rem; margin-bottom: 6px; }
  .td-cs__fact-value { font-size: 0.92rem; }

  .td-cs__section-head { margin-bottom: 24px; }
  .td-cs__section--navy .td-cs__section-head { margin-bottom: 24px; }

  /* Numbered steps become a compact list: number inline, no icon tile */
  .td-cs__steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .td-cs__step {
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }
  .td-cs__step-top {
    order: -1;
    flex: none;
    margin-bottom: 0;
    display: block;
  }
  .td-cs__step-top .td-cs__tile { display: none; }
  .td-cs__step-num { font-size: 1.3rem; }

  .td-cs__hlcards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .td-cs__hlcard { padding: 20px; }
  .td-cs__hlcard .td-cs__tile { width: 42px; height: 42px; border-radius: 11px; margin-bottom: 13px; }

  .td-cs__rel-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .td-cs__rel-card { padding: 22px; }
  .td-cs__rel-stat { font-size: 2rem; }
  .td-cs__rel-head { margin-bottom: 22px; }

  .td-cs__quote { font-size: 1.25rem; }
  .td-cs__avatar { width: 46px; height: 46px; font-size: 1.1rem; }

  .td-cs__cta { padding: 48px 0; }
  .td-cs__cta .td-cs__h2 { font-size: 1.85rem; }
  .td-cs__cta-body { font-size: 1.02rem; }

  .td-cs__frame--phone { width: 210px; border-width: 7px; border-radius: 34px; }
  .td-cs__frame-bar { padding: 10px 14px; gap: 7px; }
  .td-cs__dot { width: 9px; height: 9px; }
  .td-cs__frame-url { margin-left: 8px; font-size: 11px; padding: 5px 12px; }

  .td-cs__hero--editorial .td-cs__hero-tail { margin: 20px 0 24px; }
  .td-cs__hero--editorial .td-cs__frame { border-radius: var(--tdcs-r-md); border-bottom: 1px solid var(--tdcs-line); }

  /* Taller windows on a narrow screen — the mockups use a near-square hero
     card at 390px. Phone rule last, same as above. */
  .td-cs__hero .td-cs__viewport,
  .td-cs__hero--centered .td-cs__viewport,
  .td-cs__hero--editorial .td-cs__viewport { aspect-ratio: 6 / 7; }
  .td-cs__hlrow .td-cs__viewport { aspect-ratio: 3 / 2; }
  .td-cs__frame--phone .td-cs__viewport { aspect-ratio: 25 / 48; }
}

@media (prefers-reduced-motion: reduce) {
  .td-cs *,
  .td-cs *::before,
  .td-cs *::after {
    animation: none !important;
    transition: none !important;
  }
}
