/* Speed-to-Lead case study — scoped to .case-stl so nothing leaks into other pages. */
.case-stl {
  color-scheme: dark;
  /* Site palette reused where a token already exists; dark-only surface tones have no
     site equivalent and are defined locally. */
  --ink: var(--black);
  --coral: var(--orange);
  --paper: var(--grey-light);
  --mute: var(--grey-label);
  --panel: #171513;
  --panel-2: #1F1C19;
  --line: #2E2A26;
  --soft: #C9C0B8;
  --coral-dim: rgba(232, 80, 26, .14);
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --wrap: 1120px;

  background: var(--ink);
  color: var(--soft);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-inline: 20px;
  display: block;
}
.case-stl .wrap { max-width: var(--wrap); margin-inline: auto; }
.case-stl h1, .case-stl h2, .case-stl h3 { font-family: var(--display); color: var(--paper); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
.case-stl p { margin: 0; }
.case-stl a { color: inherit; }
.case-stl :focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
.case-stl .eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--coral); }
.case-stl .mono { font-family: var(--mono); }
.case-stl .stl-section { position: relative; padding-block: clamp(64px, 9vw, 112px); }
.case-stl .stl-section::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }

/* Full-bleed inverted band: light surface, dark type. Sits as a direct child of
   .case-stl (outside .wrap) so its background spans the full page width; the
   section's own .wrap child re-centers the content to the normal column. */
.case-stl .stl-invert {
  --ink: var(--grey-light);
  --paper: var(--black);
  --soft: var(--black);
  --mute: var(--grey-text);
  --line: var(--grey-mid);
  --panel: var(--white);
  --panel-2: var(--grey-mid);
  background: var(--ink);
  color: var(--soft);
}
.case-stl .stl-invert > .wrap { position: relative; z-index: 1; }
/* Stack flows straight into the CTA band with no color change between them, so the
   two sections share one gap instead of stacking a full padding-block on each side. */
.case-stl .stl-stack-section { padding-bottom: clamp(32px, 4vw, 48px); }
.case-stl .stl-cta-section { padding-top: clamp(32px, 4vw, 48px); }
.case-stl .stl-stack-section::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 160% at 12% 0%, var(--coral-dim), transparent 62%);
  pointer-events: none;
}
.case-stl .sec-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 44px; }
.case-stl .sec-head h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; font-weight: 700; }
.case-stl .sec-head p { color: var(--mute); max-width: 56ch; }

/* ---------- Hero ---------- */
.case-stl .crumb { display: flex; gap: 10px; align-items: center; font: 400 13px/1 var(--mono); color: var(--mute); padding-block: 28px 0; }
.case-stl .crumb a { text-decoration: none; }
.case-stl .crumb a:hover { color: var(--paper); }
.case-stl .stl-hero { padding-block: clamp(40px, 7vw, 80px) 36px; display: grid; gap: 22px; }
.case-stl .stl-hero h1 { font-size: clamp(46px, 8.4vw, 104px); line-height: .94; font-weight: 800; letter-spacing: -.035em; }
.case-stl .stl-hero h1 em { font-style: normal; color: var(--coral); }
.case-stl .stl-hero .lede { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--soft); max-width: 34ch; }
.case-stl .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.case-stl .tag { font: 400 12.5px/1 var(--mono); color: var(--mute); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }

/* ---------- Video ---------- */
.case-stl .video { position: relative; aspect-ratio: 16/9; max-width: 100%; border-radius: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); isolation: isolate; }
.case-stl .video::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 78% 30%, rgba(255, 107, 87, .18), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/48px 48px;
  opacity: .55;
}
.case-stl .video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-stl .play { position: absolute; inset: 0; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--paper); }
.case-stl .play-btn { width: clamp(64px, 9vw, 92px); aspect-ratio: 1; border-radius: 50%; background: var(--coral); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(255, 107, 87, .5); animation: stl-ping 2.6s ease-out infinite; transition: transform .25s; }
.case-stl .play:hover .play-btn { transform: scale(1.06); }
.case-stl .play-btn svg { width: 34%; margin-left: 6%; fill: var(--ink); }
.case-stl .video-meta { position: absolute; left: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 26px); right: clamp(16px, 3vw, 28px); display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; pointer-events: none; }
.case-stl .video-meta strong { display: block; font: 700 clamp(17px, 2.2vw, 24px)/1.2 var(--display); color: var(--paper); }
.case-stl .video-meta span { font: 400 13px/1 var(--mono); color: var(--mute); }
.case-stl .flowline { font: 400 12px/1 var(--mono); color: var(--mute); display: flex; gap: 8px; flex-wrap: wrap; }
.case-stl .flowline b { font-weight: 500; color: var(--paper); }
@keyframes stl-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 87, .45); } 70% { box-shadow: 0 0 0 26px rgba(255, 107, 87, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 87, 0); } }

/* ---------- Stats ---------- */
.case-stl .stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-block: 36px 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.case-stl .stat { padding: 26px 24px; display: grid; gap: 8px; align-content: start; border-left: 1px solid var(--line); }
.case-stl .stat:first-child { border-left: 0; }
.case-stl .stat .num { font: 800 clamp(38px, 4.6vw, 56px)/1 var(--display); color: var(--paper); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.case-stl .stat .num small { font-size: .5em; color: var(--coral); margin-left: 2px; }
.case-stl .stat .lbl { font-size: 14.5px; line-height: 1.4; color: var(--soft); }
.case-stl .stat .src { font: 400 11.5px/1.4 var(--mono); color: var(--mute); }

/* ---------- Challenge ---------- */
.case-stl .challenge { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.case-stl .challenge h2 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.02; font-weight: 700; }
.case-stl .challenge .copy { display: grid; gap: 18px; font-size: 18px; max-width: 52ch; }
.case-stl .challenge .copy p:last-child { color: var(--paper); }
.case-stl .manual { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font: 400 13px/1 var(--mono); color: var(--mute); }
.case-stl .manual span { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.case-stl .manual i { font-style: normal; opacity: .6; }

/* ---------- Stages ---------- */
.case-stl .track { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; counter-reset: st; }
.case-stl .track::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--line); }
.case-stl .track::after { content: ""; position: absolute; top: 21px; left: 0; width: 90px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--coral)); animation: stl-pulse 4.8s linear infinite; }
@keyframes stl-pulse { from { transform: translateX(-90px); } to { transform: translateX(calc(var(--wrap))); } }
.case-stl .stage { position: relative; display: grid; gap: 10px; align-content: start; }
.case-stl .dot { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line); display: grid; place-items: center; font: 500 13px/1 var(--mono); color: var(--paper); position: relative; z-index: 1; }
.case-stl .stage:first-child .dot { border-color: var(--coral); color: var(--coral); }
.case-stl .stage h3 { font-size: 20px; font-weight: 700; margin-top: 8px; }
.case-stl .stage p { font-size: 14.5px; line-height: 1.5; color: var(--mute); }
.case-stl .chip { justify-self: start; font: 400 11.5px/1.35 var(--mono); color: var(--soft); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }

/* AI output panel */
.case-stl .ai { margin-top: 56px; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.case-stl .ai h3 { font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; line-height: 1.1; }
.case-stl .ai .txt { display: grid; gap: 14px; }
.case-stl .ai .txt p { color: var(--mute); max-width: 44ch; }
.case-stl .routes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.case-stl .route { font: 500 12.5px/1 var(--mono); padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--soft); }
.case-stl .route.on { background: var(--coral); border-color: var(--coral); color: var(--black); }
.case-stl .code { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.case-stl .code-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--mute); }
.case-stl .code pre { margin: 0; padding: 18px 18px 20px; overflow-x: auto; font: 400 13.5px/1.7 var(--mono); color: var(--soft); }
.case-stl .k { color: var(--mute); }
.case-stl .s { color: var(--paper); }
.case-stl .n { color: var(--coral); }

/* ---------- Results ---------- */
.case-stl .compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-stl .lane { border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 18px; align-content: start; }
.case-stl .lane.after { background: var(--panel); border-color: rgba(255, 107, 87, .4); }
.case-stl .lane-h { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.case-stl .lane.after .lane-h { color: var(--coral); }
.case-stl .steps { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font: 400 14px/1 var(--mono); }
.case-stl .steps span { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); color: var(--mute); }
.case-stl .steps i { font-style: normal; color: var(--line); }
.case-stl .lane.after .steps span { color: var(--paper); }
.case-stl .lane.after .steps span.hl { background: var(--coral); border-color: var(--coral); color: var(--black); font-weight: 500; }
.case-stl .lane p { font-size: 15px; color: var(--mute); }
.case-stl .bench { margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); }
.case-stl .bench > div { padding: 24px; border-left: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.case-stl .bench > div:first-child { border-left: 0; }
.case-stl .bench .bh { font: 700 20px/1.2 var(--display); color: var(--paper); }
.case-stl .bench .bs { font: 400 12.5px/1.5 var(--mono); color: var(--mute); }
.case-stl .bench .bn { font: 800 34px/1 var(--display); color: var(--paper); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.case-stl .bench .bl { font-size: 13.5px; color: var(--mute); }

/* ---------- Config ---------- */
.case-stl .config { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.case-stl .cfg { padding: 22px 18px 0 0; display: grid; gap: 12px; align-content: start; }
.case-stl .cfg h3 { font-size: 18px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.case-stl .cfg h3 span { font: 400 11px/1 var(--mono); color: var(--coral); }
.case-stl .cfg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14.5px; color: var(--mute); }

/* ---------- Stack ---------- */
.case-stl .stack { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: baseline; }
.case-stl .stack dt { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: 10px; }
.case-stl .stack dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-stl .pill { font: 500 14px/1 var(--body); padding: 10px 14px; border-radius: 10px; background: linear-gradient(135deg, var(--panel-2), rgba(232, 80, 26, .1)); color: var(--paper); border: 1px solid var(--line); }
.case-stl .pill.alt { background: none; color: var(--soft); border: 1px solid var(--line); }

/* ---------- CTA ---------- */
/* Colors here are hard-coded rather than token-based: this card is always dark-orange
   with dark text, regardless of whether its parent section is inverted. */
.case-stl .cta { border-radius: 24px; background: var(--coral); color: var(--black); padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; }
.case-stl .cta h2 { color: var(--black); font-size: clamp(32px, 5vw, 58px); line-height: 1; font-weight: 800; max-width: 14ch; }
.case-stl .cta p { margin-top: 14px; max-width: 44ch; font-size: 17px; color: rgba(14, 13, 12, .78); }
.case-stl .stl-btn { display: inline-flex; gap: 10px; align-items: center; background: var(--black); color: var(--grey-light); text-decoration: none; font: 600 16px/1 var(--body); padding: 18px 24px; border-radius: 12px; white-space: nowrap; transition: transform .2s; }
.case-stl .stl-btn:hover { transform: translateY(-2px); }
.case-stl .stl-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .case-stl .stats { grid-template-columns: repeat(2, 1fr); }
  .case-stl .stat:nth-child(3) { border-left: 0; }
  .case-stl .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case-stl .track { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .case-stl .track::before, .case-stl .track::after { display: none; }
  .case-stl .bench { grid-template-columns: repeat(2, 1fr); }
  .case-stl .bench > div:first-child { grid-column: 1/-1; border-bottom: 1px solid var(--line); }
  .case-stl .bench > div:nth-child(2), .case-stl .bench > div:nth-child(4) { border-left: 0; }
  .case-stl .bench > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .case-stl .config { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}
@media (max-width: 720px) {
  .case-stl { font-size: 16px; padding-inline: 16px; }
  .case-stl .challenge, .case-stl .ai, .case-stl .compare, .case-stl .cta { grid-template-columns: 1fr; }
  .case-stl .track { grid-template-columns: 1fr 1fr; }
  .case-stl .config { grid-template-columns: 1fr 1fr; }
  .case-stl .stack { grid-template-columns: 1fr; gap: 10px; }
  .case-stl .stack dd { margin-bottom: 14px; }
  .case-stl .video-meta .flowline { display: none; }
}
@media (max-width: 420px) {
  .case-stl .stats { grid-template-columns: 1fr; }
  .case-stl .stat { border-left: 0 !important; border-top: 1px solid var(--line); }
  .case-stl .stat:first-child { border-top: 0; }
  .case-stl .track { grid-template-columns: 1fr; }
  .case-stl .bench { grid-template-columns: 1fr; }
  .case-stl .bench > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .case-stl .bench > div:first-child { border-top: 0; }
  .case-stl .stl-btn { white-space: normal; text-align: center; justify-content: center; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .case-stl, .case-stl * { animation: none !important; transition: none !important; }
}
