/* Case study pages (e.g. /insytical/).
   Tabs change only when clicked: each tab swaps the text (left) and the images (right).
   Desktop: the left panel stays put while the images scroll.
   Phone: tabs and text sit at the top (not sticky), images follow. */

.cs{max-width:1320px;margin:0 auto;padding:110px 24px 120px;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:56px;align-items:start}

/* ---------- left panel ---------- */
.cs-panel{position:sticky;top:100px;align-self:start}
.cs-tabs{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:40px}
.cs-tab{border:0;cursor:pointer;min-height:42px;padding:10px 18px;border-radius:999px;background:#161616;color:var(--muted);
  font-family:var(--sans);font-size:14px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;transition:background .25s,color .25s}
.cs-tab:hover{color:var(--text)}
.cs-tab[aria-selected="true"]{background:var(--text);color:#030303}
.cs-tab:focus-visible{outline:1px solid var(--accent);outline-offset:2px}

.cs-copy .cs-text{display:none}
.cs-copy .cs-text.on{display:block;animation:cs-in .45s ease}
@keyframes cs-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.cs-text h1,.cs-text h2{font-size:36px;line-height:1.1;letter-spacing:-.03em;margin-bottom:24px;text-wrap:balance}
.cs-text p{color:#a3a3a3;font-size:16px;line-height:1.6;max-width:520px;margin-bottom:18px}
.cs-text ul{list-style:none;max-width:520px;margin:6px 0 0}
.cs-text li{position:relative;color:#a3a3a3;font-size:16px;line-height:1.55;padding:12px 0 12px 26px;border-top:1px solid var(--line)}
.cs-text li:last-child{border-bottom:1px solid var(--line)}
.cs-text li::before{content:"";position:absolute;left:2px;top:21px;width:8px;height:8px;border-radius:50%;background:var(--accent)}

.cs-live{display:inline-flex;align-items:center;gap:8px;margin-top:10px;padding:12px 20px;background:#202020;color:#fff;font-size:15px;line-height:1;text-decoration:none;transition:background .3s,color .3s}
.cs-live svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6}
.cs-live:hover,.cs-live:focus-visible{background:#fff;color:#030303}

/* ---------- right column ---------- */
.cs-step .cs-text{display:none}            /* the text is shown in the left panel */
html.js .cs-step{display:none}
html.js .cs-step.on{display:block;animation:cs-in .45s ease}
.cs-media{display:flex;flex-direction:column;gap:28px}
.cs-media img{display:block;width:100%;height:auto;border-radius:6px;position:relative;z-index:101}
.cs-ph{position:relative;z-index:101;aspect-ratio:4/3;border-radius:6px;display:grid;place-items:center;
  background:radial-gradient(120% 90% at 20% 10%,#2a2440 0%,#141218 55%,#0d0d0d 100%)}
.cs-ph span{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.45)}
.cs-ph.tall{aspect-ratio:3/4}

/* without JavaScript, show every section with its text */
html:not(.js) .cs-panel .cs-tabs,html:not(.js) .cs-panel .cs-copy{display:none}
html:not(.js) .cs-steps{display:flex;flex-direction:column;gap:64px}
html:not(.js) .cs-step .cs-text{display:block;margin-bottom:28px}

/* ---------- phones and small tablets ---------- */
@media (max-width:899.98px){
  .cs{grid-template-columns:1fr;gap:36px;padding-top:96px}
  .cs-panel{position:static}
  .cs-tabs{gap:8px;margin-bottom:32px}
  .cs-tab{min-height:40px;padding:9px 15px;font-size:13px}
}
@media (prefers-reduced-motion:reduce){
  .cs-copy .cs-text.on,html.js .cs-step.on{animation:none}
  .cs-tab{transition:none}
}
