/* Case study panel, laid out after itsjay.us:
   light page > top info bar + CTA > dark card with big title > meta card (year / services / summary) > stitched images */
.cs-root{position:fixed;inset:0;z-index:2147483000;visibility:hidden;pointer-events:none;
  background:#f4f4f4;transform-origin:50% 50%;will-change:transform,clip-path;
  --cs-ease:cubic-bezier(.16,1,.3,1);font-family:"SF Pro Text Medium","Inter",-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif}
.cs-root.is-open,.cs-root.is-closing{visibility:visible}
.cs-root.is-open{pointer-events:auto}

.cs-scroll{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

/* iOS-style opening (V2): the case study grows out of the card you tapped while the page sinks back.
   Motion is driven from case-panel.js; content is simply visible inside the growing window. */
.cs-rise,.cs-top,.cs-card{opacity:1;transform:none}

/* the page behind recedes like the home screen behind an app */
html.cs-recede{background:#0d0d0d!important}
html.cs-recede body{background:transparent!important}
#main.cs-page{transition:transform .6s cubic-bezier(.32,.72,0,1),filter .6s cubic-bezier(.32,.72,0,1);will-change:transform}
html.cs-recede #main.cs-page{transform:scale(.93);filter:brightness(.7)}

/* top bar */
.cs-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 24px 0 24px;min-height:84px}
.cs-info{display:flex;gap:clamp(24px,8vw,120px)}
.cs-info div{display:flex;flex-direction:column;gap:2px;font-size:15px;line-height:1.35;letter-spacing:-.01em}
.cs-info b{font-weight:500;color:#111}
.cs-info span{color:#8d8d8d}
.cs-actions{display:flex;align-items:center;gap:8px;padding-right:56px}
.cs-cta{display:inline-flex;align-items:center;height:48px;padding:0 22px;border-radius:999px;background:#151515;color:#fff;
  text-decoration:none;font-size:15px;font-weight:500;letter-spacing:-.01em;transition:transform .25s var(--cs-ease),background .2s ease}
.cs-cta{gap:10px}
.cs-cta:hover{background:rgb(240,56,0);box-shadow:0 10px 30px -6px rgba(240,56,0,.45)}
.cs-ico{position:relative;width:18px;height:18px;flex:none;transition:translate .35s cubic-bezier(.16,1,.3,1)}
.cs-ico svg{position:absolute;inset:0;width:100%;height:100%;fill:currentColor;transition:opacity .2s ease}
.cs-cta:hover .cs-ico{translate:2px -2px}
.cs-close{position:fixed;top:22px;right:24px;z-index:3;appearance:none;border:0;cursor:pointer;width:48px;height:48px;border-radius:999px;
  background:#151515;color:#fff;display:grid;place-items:center;box-shadow:0 6px 24px rgba(0,0,0,.18);
  transition:transform .3s var(--cs-ease),background .2s ease}
.cs-close:hover{background:#000;transform:rotate(90deg)}
.cs-close svg{width:16px;height:16px}

/* dark card */
.cs-card{margin:44px 12px 12px;background:#161616;border-radius:28px;padding:0 20px 20px;color:#f4f4f4}
.cs-title{margin:0;padding:clamp(72px,12vw,150px) 0 clamp(64px,10vw,130px);text-align:center;color:#f4f4f4;
  font-family:"Helvetica Neue","SF Pro Display","Inter",-apple-system,BlinkMacSystemFont,sans-serif;font-weight:700;
  text-transform:uppercase;letter-spacing:-.045em;line-height:.9;font-size:clamp(40px,10.5vw,176px);white-space:nowrap}

/* meta card */
.cs-meta{background:#262626;border-radius:18px;padding:32px;display:grid;grid-template-columns:minmax(140px,.7fr) 1.6fr 1.5fr;gap:32px 40px}
.cs-lbl{display:block;margin-bottom:12px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:#9a9a9a}
.cs-year{font-size:clamp(44px,5vw,68px);line-height:1;font-weight:600;letter-spacing:-.05em;color:#fafafa}
.cs-role{margin-top:22px;font-size:16px;color:#e9e9e9}
.cs-chips{display:flex;flex-wrap:wrap;gap:8px}
.cs-chips span{display:inline-block;padding:9px 12px;border-radius:7px;background:#363636;color:#f0f0f0;font-size:13px;line-height:1;
  letter-spacing:.09em;text-transform:uppercase;white-space:nowrap}
.cs-sum{margin:0;font-size:17px;line-height:1.45;color:#ededed;letter-spacing:-.01em}

/* images */
.cs-stack{margin-top:20px;border-radius:16px;overflow:hidden;background:#1d1d1d}
.cs-stack img{display:block;width:100%;height:auto;margin:0;border:0}
.cs-stack img.is-loading{min-height:50vh;background:#1d1d1d}

.cs-foot{display:flex;justify-content:center;padding:36px 0 20px}
.cs-behance{display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 22px;border-radius:999px;background:#f4f4f4;color:#111;
  text-decoration:none;font-size:15px;font-weight:500}
.cs-behance:hover{background:#fff}

html.cs-lock,html.cs-lock body{overflow:hidden!important}

@media (max-width:999.98px){
  .cs-meta{grid-template-columns:1fr;gap:30px}
}
@media (max-width:809.98px){
  .cs-top{padding:16px 16px 0;min-height:72px;flex-direction:column;gap:14px}
  .cs-info{gap:28px}
  .cs-info div{font-size:14px}
  .cs-actions{padding-right:0}
  .cs-cta{height:42px;padding:0 18px;font-size:14px}
  .cs-close{top:14px;right:14px;width:42px;height:42px}
  .cs-card{margin:24px 6px 6px;border-radius:20px;padding:0 10px 10px}
  .cs-meta{padding:22px;border-radius:14px}
  .cs-stack{border-radius:10px;margin-top:10px}
  .cs-rise{transform:translateY(70px)}
}
@media (prefers-reduced-motion:reduce){#main.cs-page{transition:none!important}}
