/* =========================================================
   Case study system, shared by every project page.
   Layout follows Kamilė's Figma case studies (cards side by side,
   Before | After, titled screen groups); the look is the portfolio's:
   calm white space, numbered sections, soft stages, captions.
   Each page sets its product tokens on <body class="cs">:
   --pf (product font), --acc, --ink, --ink2, --body, --muted,
   --line, --soft, --stage, and per chapter --c / --t.
   ========================================================= */
body.cs{font-family:var(--pf);color:var(--ink);background:#fff;-webkit-font-smoothing:antialiased}
.cs .nav,.cs footer.site{font-family:"Inter Tight",system-ui,sans-serif}
.cs .wrap{max-width:1240px}
.cs #prog{background:var(--acc)}
.cs ::selection{background:var(--acc);color:#fff}
.cs .links a::after{background:var(--acc)}
.cs .logo i{color:var(--acc)}
.cs .btn:hover{background:var(--acc);border-color:var(--acc)}
/* low-specificity reset, so component classes (.cs-title, .cs-h2 ...) can set their own spacing */
:where(.cs) :is(h1,h2,h3,h4){font-family:var(--pf);margin:0;max-width:none}
/* style.css has an old ".ph" text-highlight class; the iPhone wrapper must not inherit it */
.cs .ph{background:none;color:inherit;padding:0;border-radius:0;font-weight:inherit}

/* icons (Material Symbols; each product picks its style) */
.ms{font-family:var(--icons,"Material Symbols Rounded");font-weight:400;font-style:normal;font-size:20px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;font-feature-settings:"liga";flex:none;user-select:none}

/* ---------- cover + hero ---------- */
.cs-cover{padding-top:28px}
.cs-hero{padding-top:72px}
/* the cover sits under the title and the Role / Client / ... row */
.cs-hero + .cs-cover{padding-top:64px}
.cs-eyebrow{display:flex;align-items:center;gap:10px;font-size:12.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.cs-eyebrow i{width:8px;height:8px;border-radius:50%;background:var(--acc)}
.cs-title{font-size:clamp(60px,9.4vw,128px);font-weight:700;letter-spacing:-.045em;line-height:1;margin:22px 0 26px;color:var(--ink)}
.cs-title em{font-style:normal;color:var(--acc)}
/* a project with a live link: the call to action sits to the right of the project name, on its baseline;
   on a narrow screen it drops under the name */
.cs-headrow{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:18px 32px;margin:22px 0 26px}
.cs-headrow .cs-title{margin:0}
.cs-headrow > .cs-cta{flex:none;margin:0 0 clamp(8px,1.35vw,19px)}
.cs-lead{font-size:clamp(19px,1.9vw,23px);line-height:1.45;color:var(--ink2);max-width:760px}
.cs-meta{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin-top:48px;padding-top:22px;border-top:1px solid var(--line)}
.cs-meta dt{display:flex;align-items:center;gap:8px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:8px}
.cs-meta dt .ms{font-size:18px;color:var(--acc)}
.cs-meta dd{font-size:16.5px;color:var(--ink);padding-left:26px}

/* ---------- stages: the calm surfaces visuals sit on ---------- */
.cs-stage{position:relative;border-radius:28px;background:var(--stage);padding:clamp(24px,3.4vw,40px) clamp(16px,2.8vw,32px)}
.cs-stage.t{background:var(--t,var(--stage))}
.cs-stage.n{background:#f1f2f5}
/* "before" screens (.cs-stage.n.old) sit back: a little greyer and darker than the new design next to them.
   A plain .n stage is only a neutral surface and may hold final designs. */
.cs-stage.n.old{background:#e9ebef}
.cs-stage.n.old :is(.ph-s,.bw-s,.lp-s) img,.cs-stage.n.old img.cs-comp,.cs-before img{filter:grayscale(.55) brightness(.84) contrast(.96)}
.cs-stage.n.old .ph-pin{filter:grayscale(.55) brightness(.84) contrast(.96)}

/* ---------- sections ---------- */
.cs-sec{padding-top:140px}
.cs-kicker{display:flex;align-items:center;gap:12px;font-size:12.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:24px}
.cs-kicker b{color:var(--c,var(--acc));font-weight:700}
.cs-kicker .ms{font-size:20px;color:var(--c,var(--acc))}
.cs-kicker::after{content:"";flex:1;height:1px;background:var(--line);margin-left:6px;transform-origin:left}
/* the rule draws itself across once the section label is in view */
.cs-kicker.rv::after{transform:scaleX(0);transition:transform 1.4s cubic-bezier(.2,.7,.2,1) .25s}
.cs-kicker.rv.in::after{transform:none}
@media (prefers-reduced-motion:reduce){.cs-kicker.rv::after{transform:none;transition:none}}
.cs-h2{font-size:clamp(34px,4.2vw,54px);font-weight:700;letter-spacing:-.035em;line-height:1.06;color:var(--ink);max-width:17ch;text-wrap:balance}
.cs-intro{display:grid;grid-template-columns:7fr 5fr;gap:64px;align-items:end}
.cs-intro p,.cs-p{font-size:17.5px;line-height:1.7;color:var(--body)}
/* the words that carry the point of a longer paragraph */
.cs-intro p b,.cs-p b{font-weight:600;color:var(--ink)}
.cs-p{max-width:68ch}
.cs-sub{margin-top:100px}
.cs-sub > h3{font-size:clamp(24px,2.4vw,30px);font-weight:700;letter-spacing:-.025em;line-height:1.15;color:var(--ink)}
.cs-sub > h3 + .cs-p{margin-top:12px}

/* ---------- cards, laid out side by side ---------- */
.cs-grid{display:grid;gap:20px;margin-top:44px}
.cs-grid > *{min-width:0}
.cs-card{background:var(--soft);border-radius:24px;padding:28px 30px 30px}
.cs-stage .cs-card{background:#fff}
.cs-card > h3{display:flex;align-items:center;gap:10px;font-size:12.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink);margin-bottom:14px}
.cs-card > h3::before{content:"";width:18px;height:2px;border-radius:2px;background:var(--c,var(--acc))}
.cs-card p,.cs-card li{font-size:16.5px;line-height:1.65;color:var(--body)}
.cs-card ul,.cs-card ol{list-style:none;display:grid;gap:6px}
.cs-card ul li{position:relative;padding-left:20px}
.cs-card ul li::before{content:"";position:absolute;left:0;top:.8em;width:9px;height:2px;border-radius:2px;background:var(--c,var(--acc))}
.cs-card ol{counter-reset:q;gap:0}
.cs-card ol li{counter-increment:q;position:relative;padding:12px 0 12px 38px;border-top:1px solid var(--line)}
.cs-card ol li:first-child{border-top:0;padding-top:2px}
.cs-card ol li::before{content:counter(q,decimal-leading-zero);position:absolute;left:0;top:13px;font-size:13px;font-weight:700;color:var(--c,var(--acc))}
.cs-card ol li:first-child::before{top:3px}

/* numbered process cards */
.cs-steps{grid-template-columns:repeat(3,1fr)}
.cs-step b{display:block;font-size:13px;font-weight:700;color:var(--acc);font-feature-settings:"tnum";padding-top:16px;border-top:2px solid var(--acc);width:36px}
.cs-step h4{font-size:18px;font-weight:700;letter-spacing:-.01em;line-height:1.25;color:var(--ink);margin:16px 0 8px}
.cs-step p{font-size:15.5px}

/* ---------- titled screen groups (Figma: groups side by side) ---------- */
.cs-panels{display:grid;gap:24px;align-items:start}
.cs-panels > *{min-width:0}
.cs-panel > h3{font-size:19px;font-weight:700;letter-spacing:-.015em;line-height:1.25;color:var(--ink);min-height:1.25em}
.cs-panel > p{font-size:15px;line-height:1.5;color:var(--muted);margin-top:6px}
.cs-panel > .cs-stage{margin-top:18px}
.cs-tag{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:26px}
.cs-tag::before{content:"";width:8px;height:8px;border-radius:50%;background:#aeb3bf}
.cs-tag.a{color:var(--c,var(--acc))}
.cs-tag.a::before{background:var(--c,var(--acc))}

/* ---------- phones: equal widths, aligned tops, captions ---------- */
.cs-row{display:flex;justify-content:center;align-items:flex-start;gap:var(--g,24px)}
.cs-row.l{justify-content:flex-start}
.cs-row > figure{width:var(--pw,190px);flex:none;margin:0;position:relative}
.cs-row figure > .ph{width:100%}
.cs figcaption{margin-top:14px;text-align:center;font-size:13px;line-height:1.45;color:var(--muted)}
.cs figcaption b{display:block;font-size:14px;font-weight:700;color:var(--ink);margin-bottom:1px}
.cs-comp{display:block;border-radius:16px;box-shadow:0 0 0 1px rgba(20,24,40,.05),0 18px 40px -26px rgba(20,24,40,.4);background:#fff}

/* ---------- web screens in the approved browser frame (common.css .bw) ---------- */
.cs-web{display:grid;gap:24px;align-items:start}
.cs-web > *{min-width:0}
.cs-web figure,.cs-col figure{margin:0}
.cs-col{display:grid;gap:24px;align-content:start;min-width:0}
.cs .bw{border-radius:12px;box-shadow:0 0 0 1px rgba(20,24,40,.06),0 24px 50px -32px rgba(20,24,40,.35)}
.cs .bw-s{max-height:var(--bh,none)}
.cs .bw + figcaption,.cs-web figcaption{text-align:left}
.cs-web .cs-row figcaption{text-align:center}

/* laptop and phones side by side, bottoms aligned */
.cs-devices{display:flex;justify-content:center;align-items:flex-end;gap:var(--g,28px)}
.cs-devices > .lpw{width:var(--lw,560px);flex:none}
.cs-devices > figure{width:var(--pw,150px);flex:none;margin:0}
.cs-devices .ph{width:100%}

/* ---------- next case study ---------- */
.cs-next{display:flex;justify-content:space-between;align-items:center;padding:52px 0;margin-top:160px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.cs-next small{color:var(--muted);font-weight:700;letter-spacing:.12em;text-transform:uppercase;font-size:12px}
.cs-next h3{font-size:clamp(36px,4.6vw,58px);margin:6px 0 0;letter-spacing:-.045em;font-weight:700;color:var(--ink)}
.cs-next h3 em{font-style:normal;color:var(--acc)}
.cs-next .arr{width:72px;height:72px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;transition:all .3s}
.cs-next .arr .ms{font-size:26px}
.cs-next:hover .arr{background:var(--ink);border-color:var(--ink);color:#fff;transform:translateX(6px)}

@media (max-width:1100px){
  .cs-panels{grid-template-columns:1fr!important}
}
@media (max-width:980px){
  .cs-sec{padding-top:100px}.cs-sub{margin-top:72px}
  .cs-meta{grid-template-columns:1fr 1fr}
  .cs-intro{grid-template-columns:1fr;gap:20px}
  .cs-grid{grid-template-columns:1fr!important}
  .cs-stage{border-radius:22px}
  .cs-row{justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:16px;margin:0 -16px;padding:0 16px 6px;scrollbar-width:none}
  .cs-row:has(> figure:only-child){justify-content:center}
  .cs-row::-webkit-scrollbar{display:none}
  .cs-row > figure{width:min(52vw,var(--pw,190px));scroll-snap-align:start}
  .cs-web{grid-template-columns:1fr!important}
  .cs-devices{flex-wrap:wrap;gap:16px}
  .cs-devices > .lpw{width:100%}
  .cs-devices > figure{width:calc(33.3% - 11px)}
}

/* ---------- link to the live site or the working prototype: a call to action with the site itself as the picture
   (colours come from the page: --live-bg, --live-k, --live-btn, --live-btn-ink, --live-r, --live-btn-r) ---------- */
.cs-live{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,4vw,56px);align-items:center;margin-top:var(--live-mt,28px);padding:clamp(28px,3.6vw,48px) 0 0 clamp(24px,3.6vw,48px);border-radius:var(--live-r,28px);overflow:hidden;color:#fff;background:var(--live-bg,var(--ink))}
.cs-live .t{padding-bottom:clamp(28px,3.6vw,48px)}
.cs-live .k{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--live-k,rgba(255,255,255,.7))}
.cs-live .k .ms{font-size:20px}
.cs-live b{display:block;font-size:clamp(26px,2.9vw,40px);font-weight:700;letter-spacing:-.035em;line-height:1.08;margin:14px 0 12px;text-wrap:balance}
.cs-live p{color:rgba(255,255,255,.76);font-size:16.5px;line-height:1.55;max-width:34ch;margin:0 0 28px}
.cs-live .go{display:inline-flex;align-items:center;gap:10px;height:54px;padding:0 26px;border-radius:var(--live-btn-r,999px);background:var(--live-btn,#fff);color:var(--live-btn-ink,#111);font-weight:700;font-size:15.5px;transition:transform .25s cubic-bezier(.2,.7,.2,1),filter .2s}
.cs-live .go .ms{font-size:20px}
.cs-live:hover .go{transform:translateY(-2px);filter:brightness(1.08)}
.cs-live .pic{align-self:end;border-radius:16px 0 0 0;overflow:hidden;box-shadow:0 0 0 1px rgba(255,255,255,.16),0 -20px 60px -30px rgba(0,0,0,.8);transition:transform .5s cubic-bezier(.2,.7,.2,1)}
.cs-live:hover .pic{transform:translateY(-8px)}
.cs-live .pic .url{display:flex;align-items:center;height:34px;padding-left:74px;font:600 12px/1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:0;text-transform:none;color:#6b7a82;
  background:radial-gradient(circle at 20px 17px,#ff5f57 5px,transparent 5.6px),radial-gradient(circle at 38px 17px,#febc2e 5px,transparent 5.6px),radial-gradient(circle at 56px 17px,#28c840 5px,transparent 5.6px),#eef1f3}
.cs-live .pic img{display:block;width:100%;height:auto;aspect-ratio:var(--live-ar,1.56);object-fit:cover;object-position:top}
@media (max-width:980px){
  .cs-live{grid-template-columns:1fr;padding-right:clamp(24px,3.6vw,48px)}
  .cs-live .t{padding-bottom:0}
  .cs-live .pic{border-radius:14px 14px 0 0}
}
@media (prefers-reduced-motion:reduce){.cs-live .go,.cs-live .pic{transition:none}.cs-live:hover .go,.cs-live:hover .pic{transform:none}}
