/* ================= CASE STUDIES ================= */
.cs-hero{padding-top:calc(var(--sec) + 26px)}
.cs-hero-in{max-width:900px}
.cs-crumb{display:flex;align-items:center;gap:8px;font-family:var(--f-mono);font-size:11px;
  letter-spacing:.06em;color:#8A8FA8;margin-bottom:20px}
.cs-crumb a{color:#8A8FA8;transition:.2s}.cs-crumb a:hover{color:var(--gold)}
.cs-crumb i{font-style:normal;opacity:.5}
.cs-h1{font-family:var(--f-display);font-weight:900;letter-spacing:-.025em;line-height:1.04;
  font-size:clamp(2.2rem,5vw,3.9rem);margin-bottom:20px}
.cs-lead{font-size:clamp(1rem,1.2vw,1.14rem);line-height:1.75;color:#B9BCCC;max-width:60ch}
.cs-hstats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:46px;
  padding-top:30px;border-top:1px solid rgba(255,255,255,.10);max-width:760px}
.cs-hstats b{display:block;font-family:var(--f-display);font-weight:800;
  font-size:clamp(1.4rem,2.3vw,1.95rem);line-height:1;color:var(--gold)}
.cs-hstats span{display:block;margin-top:7px;font-family:var(--f-mono);font-size:10px;
  letter-spacing:.09em;text-transform:uppercase;color:#8A8FA8}

/* filters */
.cs-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin-bottom:30px}
.cs-chips{display:flex;flex-wrap:wrap;gap:9px}
.cs-chip{padding:11px 18px;border-radius:100px;border:1.5px solid rgba(21,25,49,.20);background:#fff;
  font-family:var(--f-mono);font-size:11.5px;font-weight:500;letter-spacing:.04em;color:var(--text);
  cursor:pointer;transition:.25s var(--ease);box-shadow:0 2px 0 0 rgba(21,25,49,.04)}
.cs-chip:hover{border-color:var(--gold);background:#FFFDF4;transform:translateY(-2px);
  box-shadow:0 10px 22px -12px rgba(21,25,49,.35)}
.cs-chip.is-on{background:var(--gold);border-color:var(--gold);color:#151931;font-weight:700;
  box-shadow:0 10px 24px -12px rgba(224,174,30,.8)}
.cs-chip em{font-style:normal;margin-left:7px;padding:2px 7px;border-radius:100px;
  background:rgba(21,25,49,.10);font-size:10px;font-weight:600;letter-spacing:0;color:var(--text)}
.cs-chip.is-on em{background:rgba(21,25,49,.20);color:#151931}
.cs-chip.empty{color:var(--mute);border-color:rgba(21,25,49,.14);background:#FAF8F1;box-shadow:none}
.cs-chip.empty em{background:rgba(21,25,49,.06);color:var(--mute)}
.cs-chip.empty:hover{border-color:rgba(245,200,42,.6);color:var(--text);background:#FFFDF4}
.cs-count{font-family:var(--f-mono);font-size:11px;letter-spacing:.05em;color:var(--mute)}

/* grid */
.cs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.cs-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;background:var(--card);transition:transform .4s var(--ease),border-color .4s,box-shadow .4s}
.cs-card:hover{transform:translateY(-6px);border-color:rgba(245,200,42,.5);
  box-shadow:0 34px 70px -44px rgba(21,25,49,.45)}
.cs-card.hide{display:none}
.cs-shot{position:relative;overflow:hidden;background:#fff;aspect-ratio:4/3.4}
.cs-bar-ui{position:absolute;top:0;left:0;right:0;height:22px;z-index:2;display:flex;align-items:center;
  gap:5px;padding:0 9px;background:#EEECE4;border-bottom:1px solid #D7D4C9}
.cs-bar-ui i{width:6px;height:6px;border-radius:50%}
.cs-bar-ui i:nth-child(1){background:#FF5F56}.cs-bar-ui i:nth-child(2){background:#FFBD2E}
.cs-bar-ui i:nth-child(3){background:#27C93F}
.cs-bar-ui b{flex:1;height:9px;margin-left:6px;border-radius:5px;background:#FCFBF7;border:1px solid #DDDAD0}
.cs-scroll{position:absolute;top:22px;left:0;right:0;bottom:0;overflow:hidden}
.cs-scroll img{width:100%;height:auto;display:block;will-change:transform;
  transform:translateY(0);transition:transform 1.1s cubic-bezier(.22,1,.36,1)}
.cs-card:hover .cs-scroll img,.cs-card:focus-within .cs-scroll img{
  transform:translateY(var(--sc,-85%));transition:transform var(--dur,20s) cubic-bezier(.33,0,.4,1)}
.cs-shot::after{content:"Hover to scroll";position:absolute;bottom:10px;right:10px;z-index:3;
  padding:5px 10px;border-radius:100px;background:rgba(21,25,49,.82);backdrop-filter:blur(6px);
  color:#fff;font-family:var(--f-mono);font-size:9px;letter-spacing:.07em;
  opacity:1;transition:opacity .4s var(--ease);pointer-events:none}
.cs-card:hover .cs-shot::after{opacity:0}
@media(hover:none){
  .cs-scroll img{animation:csScroll calc(var(--dur,20s) * 2.2) cubic-bezier(.45,0,.55,1) infinite alternate;transition:none}
  .cs-shot::after{display:none}
}
@keyframes csScroll{0%,5%{transform:translateY(0)}95%,100%{transform:translateY(var(--sc,-85%))}}
@media(prefers-reduced-motion:reduce){
  .cs-scroll img{animation:none;transition:none}
  .cs-card:hover .cs-scroll img{transform:none}
}
.cs-body{display:flex;flex-direction:column;flex:1;padding:22px 22px 24px}
.cs-tag{font-family:var(--f-mono);font-size:9.5px;letter-spacing:.11em;color:var(--gold-deep);margin-bottom:9px}
.cs-body h3{font-family:var(--f-display);font-weight:700;font-size:1.22rem;letter-spacing:-.015em}
.cs-body p{margin-top:10px;font-size:13.8px;line-height:1.65;color:var(--mute)}
.cs-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px;padding-top:15px;border-top:1px solid var(--line)}
.cs-m{padding:5px 10px;border-radius:100px;border:1px solid var(--line);background:#FCFBF7;
  font-family:var(--f-mono);font-size:9.5px;letter-spacing:.04em;color:var(--mute)}
.cs-empty{display:none;padding:50px 0;text-align:center;color:var(--mute);font-family:var(--f-mono);font-size:12px}
.cs-empty.on{display:block}

/* next-project strip */
.cs-more{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:44px}
.cs-soon{padding:24px 22px;border-radius:18px;border:1px dashed rgba(255,255,255,.16);
  background:rgba(255,255,255,.03)}
.cs-soon b{display:block;font-family:var(--f-display);font-weight:700;font-size:1.02rem}
.cs-soon p{margin-top:8px;font-size:13px;line-height:1.6;color:#B9BCCC}

@media(max-width:1000px){
  .cs-grid,.cs-more{grid-template-columns:repeat(2,1fr)}
  .cs-hstats{grid-template-columns:repeat(2,1fr);gap:22px}
}
@media(max-width:680px){
  .cs-grid,.cs-more{grid-template-columns:1fr}
  .cs-bar{flex-direction:column;align-items:flex-start}
}

/* ---- case-studies hero: copy + visual ---- */
.cs-hero-grid{display:grid;grid-template-columns:1fr .76fr;gap:52px;align-items:center}
.cs-hero-in{max-width:none}
.cs-h1{font-size:clamp(2rem,3.9vw,3.2rem)}
.cs-lead{max-width:50ch}
.cs-hero-art{position:relative}
.cs-hero-art img{position:relative;z-index:1;width:100%;height:auto;display:block;border-radius:24px;
  filter:drop-shadow(0 40px 80px rgba(0,0,0,.55))}
.csa-glow{position:absolute;inset:-12%;z-index:0;pointer-events:none;
  background:radial-gradient(circle at 55% 50%,rgba(245,200,42,.20),transparent 62%)}
.cs-hstats{max-width:none;grid-template-columns:repeat(4,1fr)}
@media(max-width:1000px){
  .cs-hero-grid{grid-template-columns:1fr;gap:34px}
  .cs-hero-art{max-width:460px}
  .cs-lead{max-width:60ch}
}


/* ===== app mockups, shared with the homepage ===== */
/* ---- app builds: three Android mockups with sliding screens ---- */
.phw-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(20px,2.4vw,34px);margin-top:clamp(30px,3.4vw,46px)}
.phw{display:flex;flex-direction:column;align-items:center;text-align:center}
.phone{position:relative;height:var(--ph);width:fit-content;padding:8px;border-radius:42px;
  /* height drives the size so three different handsets line up */
  /* the metal rail: light catches the long edges and the corners stay dark */
  background:linear-gradient(142deg,#9ba1b4 0%,#565b70 11%,#2b2f40 26%,#787e92 46%,
    #2b2f40 62%,#5c6176 80%,#a2a8ba 94%,#4e5367 100%);
  box-shadow:0 0 0 .5px rgba(255,255,255,.26),
    0 40px 74px -30px rgba(10,12,26,.8),
    0 12px 24px -14px rgba(10,12,26,.55);
  transition:transform .5s var(--ease),box-shadow .5s var(--ease)}
.phw:hover .phone{transform:translateY(-8px);
  box-shadow:0 0 0 .5px rgba(255,255,255,.3),
    0 56px 86px -32px rgba(10,12,26,.85),
    0 14px 26px -14px rgba(10,12,26,.5)}
/* the black bezel inside the rail */
.phone::before{content:"";position:absolute;inset:3.5px;border-radius:39px;background:#04050c;
  box-shadow:inset 0 0 0 .5px rgba(255,255,255,.07)}
/* one soft highlight across the glass */
.phone::after{content:"";position:absolute;inset:0;border-radius:inherit;z-index:4;
  pointer-events:none;background:linear-gradient(116deg,rgba(255,255,255,.1) 0 12%,
    rgba(255,255,255,.02) 26%,rgba(255,255,255,0) 44%)}
.phone-btn{position:absolute;right:-2.5px;width:3px;border-radius:0 3px 3px 0;z-index:2;
  background:linear-gradient(180deg,#a2a8ba,#4e5367 42%,#2b2f40);
  box-shadow:1px 0 2px rgba(0,0,0,.45)}
.phone-btn.pb-1{top:21%;height:40px}
.phone-btn.pb-2{top:30%;height:72px}
.phone-screen{position:relative;z-index:1;height:100%;width:auto;
  aspect-ratio:var(--par,9/19.5);border-radius:34px;overflow:hidden;background:#0b0e1d}
.phone-cam{position:absolute;top:11px;left:50%;transform:translateX(-50%);z-index:5;
  width:11px;height:11px;border-radius:50%;
  background:radial-gradient(circle at 36% 32%,#2d3554 0 24%,#070a14 56%,#02030a 100%);
  box-shadow:0 0 0 1px rgba(255,255,255,.09),0 0 7px 1px rgba(0,0,0,.55)}
.phs-track{display:flex;height:100%;overflow-x:auto;overflow-y:hidden;
  scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;
  -ms-overflow-style:none;-webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  /* pan-x alone told the browser this element only handles sideways
     gestures, which swallowed vertical swipes and froze the page;
     with both axes the browser picks by gesture direction */
  touch-action:pan-x pan-y;cursor:grab}
.phs-track::-webkit-scrollbar{display:none}
.phs-track.dragging{cursor:grabbing;scroll-behavior:auto;scroll-snap-type:none;user-select:none}
.phs-track img{flex:0 0 100%;width:100%;height:100%;object-fit:cover;scroll-snap-align:start;
  display:block;-webkit-user-drag:none}
.phs-dots{display:flex;justify-content:center;gap:7px;margin:16px 0 0}
.phs-dot{width:6px;height:6px;padding:0;border:0;border-radius:50%;cursor:pointer;
  background:rgba(21,25,49,.2);transition:.3s var(--ease)}
.phs-dot.on{width:20px;border-radius:999px;background:var(--gold)}
[data-theme="dark"] .phs-dot{background:rgba(255,255,255,.22)}
.phw-body{margin-top:auto;padding-top:16px}
.phw-body h3{margin:4px 0 0;font-size:clamp(1.02rem,1.4vw,1.2rem)}
@media(max-width:860px){
  .phw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .phw:last-child{grid-column:1/-1}}
@media(max-width:560px){
  .phw-grid{grid-template-columns:1fr;gap:38px}
  .phw:last-child{grid-column:auto}}
/* a slide is a window on one screen; the two full-page captures pan down
   inside it while they are the one showing */
.phs-slide{flex:0 0 100%;height:100%;overflow:hidden;scroll-snap-align:start;position:relative}
.phs-slide img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block;
  -webkit-user-drag:none}
.phs-slide.tall img{height:auto;object-fit:fill;animation:phsPan var(--pd,8s) ease-in-out infinite alternate;
  animation-play-state:paused}
.phs-slide.tall.on img{animation-play-state:running}
/* the same hint the website cards carry, worded for a phone */
.phone-screen::after{content:"Swipe the Screen";position:absolute;z-index:4;
  bottom:14px;left:50%;transform:translateX(-50%);
  padding:5px 11px;border-radius:100px;background:rgba(21,25,49,.82);backdrop-filter:blur(6px);
  color:#fff;font-family:var(--f-mono);font-size:9px;letter-spacing:.07em;white-space:nowrap;
  opacity:1;transition:opacity .45s var(--ease);pointer-events:none}
/* it has done its job once the visitor moves a screen */
.phw.touched .phone-screen::after{opacity:0}
/* one height for all three phones; each one's width follows from its own
   screen ratio, so nothing is stretched to match */
.phw-grid{--ph:clamp(470px,38vw,560px)}
@media(max-width:560px){.phw-grid{--ph:clamp(440px,118vw,520px)}}
@media(max-width:560px){
  .phw-grid{gap:44px}}

/* ===== app projects: a phone instead of a browser frame ===== */
.cs-app{display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:linear-gradient(180deg,#1b2043,#10132a);padding:9px 0 5px;overflow:hidden}
.cs-app .cs-bar-ui{display:none}
/* the browser hint belongs to the website cards, and the phone carries its own */
.cs-app::after{display:none!important}
/* the phone follows the card height instead of a fixed 300px, which
   overflowed and clipped top and bottom once the card narrowed */
.cs-app .phw{width:auto;height:100%}
.cs-app .phone{height:100%;width:auto}
.cs-app .phone{box-shadow:0 0 0 .5px rgba(255,255,255,.22),0 22px 40px -22px rgba(6,8,18,.9)}
.cs-app .phs-dots{display:none}
.cs-app .phone-screen::after{bottom:8px;font-size:7.5px;padding:3px 8px;letter-spacing:.05em}

/* the frame details are fixed pixel sizes tuned for a 252px phone; at the
   ~145px the card allows they read as a rounded pill, so each one is scaled
   to the same proportion of the phone's width as on the homepage */
.cs-app .phone{border-radius:24px;padding:4.5px}
.cs-app .phone::before{inset:2px;border-radius:21px}
.cs-app .phone-screen{border-radius:19px}
.cs-app .phone-cam{top:6px;width:6.4px;height:6.4px;box-shadow:0 0 0 .6px rgba(255,255,255,.09)}
.cs-app .phone-btn{width:2px;right:-1.5px}
.cs-app .phone-btn.pb-1{height:23px}
.cs-app .phone-btn.pb-2{height:41px}

/* a screenshot that already fits the window has nothing to reveal, so the
   hover hint and the scroll transform are both switched off for it */
.cs-card.is-static .cs-shot::after{display:none}
.cs-card.is-static .cs-scroll img{transform:none !important;animation:none !important}

/* a still screenshot is not as tall as the card window, and the two pages use
   different card shapes, so one image cannot fit both. The leftover strip takes
   the dashboard's own background instead of showing white card underneath. */
.wc.is-static .wc-scroll,
.cs-card.is-static .cs-scroll{background:#F4F6FA}
