/* ============================================================
   CASE STUDY · the published look, in one file
   ============================================================
   This used to live as scoped <style> inside
   src/pages/case-studies/[...slug].astro, which meant the class names were
   hashed at build time and nothing else could reach them. The admin panel
   needs the exact same CSS to show a writer what their case study will look
   like BEFORE they publish it, and a preview that merely approximates the
   site is worse than none: people trust it and then get surprised.

   So it lives here, served at /case-study.css, and is loaded by two things:
     · the live page, via a <link> in its head
     · the panel's Preview, inside an iframe

   One file, so the two can never drift. Every selector is .cs-prefixed,
   which is what makes it safe as a global stylesheet.
   ============================================================ */
/* Tokens match src/pages/blogs/[...slug].astro so a case study and a blog
     post are visibly the same species. */
  .cs {
    --navy:#0D1B2A; --cream:#F8F6F0; --blue:#4F7CFF; --gold:#D4A853;
    --text:#0D1B2A; --text-sec:#4B5B70; --border:rgba(13,27,42,.08);
    --col:780px; --wide:1060px;
    background: var(--cream); color: var(--text);
  }

  /* ---------------- hero ---------------- */
  .cs-head { background: linear-gradient(180deg,#0D1B2A 0%,#142236 100%); color:#fff; padding:96px 0 46px }
  .cs-col { max-width:var(--col); margin:0 auto; padding:0 20px }
  .cs-crumb { font-size:12px; color:rgba(255,255,255,.55); margin-bottom:18px; display:flex; gap:8px }
  .cs-crumb a { color:rgba(255,255,255,.72); text-decoration:none }
  .cs-crumb a:hover { color:var(--gold) }
  .cs-kick { display:inline-block; font-size:11px; font-weight:600; letter-spacing:.14em;
    text-transform:uppercase; color:var(--gold); background:rgba(212,168,83,.08);
    border:1px solid rgba(212,168,83,.3); border-radius:999px; padding:5px 12px; margin-bottom:16px }
  .cs-title { font-family:'Clash Display',sans-serif; font-size:clamp(30px,5vw,52px);
    font-weight:600; line-height:1.08; letter-spacing:-.02em; margin:0 0 16px }
  .cs-stand { font-size:17px; line-height:1.5; color:rgba(255,255,255,.72); max-width:620px; margin:0 }
  .cs-meta { display:flex; flex-wrap:wrap; gap:8px 22px; margin-top:26px; padding-top:20px;
    border-top:1px solid rgba(255,255,255,.12); font-size:13px; color:rgba(255,255,255,.5) }
  .cs-meta b { color:rgba(255,255,255,.82); font-weight:500 }

  /* ---------------- the body ---------------- */
  .cs-body { padding:44px 0 20px }
  .cs-blk { margin:36px auto }
  .cs-wide { max-width:var(--wide); padding:0 20px }
  .cs-cap { font-size:13.5px; color:var(--text-sec); margin:10px 0 0; line-height:1.45 }

  .cs-prose h2 { font-family:'Clash Display',sans-serif; font-size:clamp(26px,3vw,32px);
    font-weight:600; line-height:1.2; letter-spacing:-.018em; margin:44px 0 14px }
  .cs-prose h3 { font-family:'Clash Display',sans-serif; font-size:clamp(20px,2.4vw,24px);
    font-weight:600; line-height:1.25; margin:32px 0 10px }
  .cs-prose p { font-size:17px; line-height:1.7; margin:0 0 20px }
  .cs-prose a { color:var(--blue); text-decoration:none; border-bottom:1px solid transparent }
  .cs-prose a:hover { border-bottom-color:var(--blue) }
  .cs-prose ul, .cs-prose ol { margin:0 0 20px 22px; font-size:17px; line-height:1.7 }
  .cs-prose img { max-width:100%; border-radius:12px }

  /* big numbers */
  .cs-nums { display:grid; grid-template-columns:repeat(12,1fr); gap:1px; background:var(--border);
    border:1px solid var(--border); border-radius:16px; overflow:hidden }
  .cs-nums > div { background:#fff; padding:22px 16px; text-align:center; grid-column:span 6 }
  .cs-nums b { display:block; font-family:'Clash Display',sans-serif; font-size:clamp(30px,7vw,44px);
    font-weight:600; line-height:1; color:var(--navy) }
  .cs-nums b small { font-size:.46em; color:var(--gold); margin-left:2px; font-weight:500 }
  .cs-nums span { display:block; font-size:12.5px; color:var(--text-sec); margin-top:7px; line-height:1.35 }

  /* quote */
  .cs-quote { border-left:3px solid var(--gold); background:rgba(212,168,83,.08);
    border-radius:0 14px 14px 0; padding:24px; margin:0 }
  .cs-quote p { font-family:'Clash Display',sans-serif; font-size:clamp(20px,3.4vw,27px);
    font-weight:500; line-height:1.3; letter-spacing:-.015em; margin:0 0 12px }
  .cs-quote cite { font-style:normal; font-size:13.5px; color:var(--text-sec); font-weight:500 }

  /* video */
  .cs-vid { position:relative; aspect-ratio:16/9; border-radius:16px; overflow:hidden; background:#000;
    box-shadow:0 24px 60px rgba(13,27,42,.22) }
  .cs-vid iframe { width:100%; height:100%; border:0; display:block }

  /* collage */
  .cs-coll { display:grid; gap:10px }
  .cs-coll img { width:100%; border-radius:12px; display:block }
  .cs-coll.n1 { grid-template-columns:1fr }
  .cs-coll.n1 img { height:auto }                       /* keeps its own shape */
  .cs-coll:not(.n1) img { aspect-ratio:4/3; object-fit:cover; height:100% }
  .cs-coll.n2, .cs-coll.n3, .cs-coll.n4, .cs-coll.n5, .cs-coll.n6 { grid-template-columns:1fr 1fr }
  .cs-coll.n3 > :first-child, .cs-coll.n5 > :first-child { grid-column:1 / -1 }
  .cs-coll.n3 > :first-child, .cs-coll.n5 > :first-child { aspect-ratio:16/9 }

  /* before and after */
  .cs-cmp { display:grid; grid-template-columns:1fr 1fr; gap:10px }
  .cs-cmp figure { margin:0 }
  .cs-cmp img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; display:block }
  .cs-cmp figcaption { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
    color:var(--text-sec); margin-top:8px }

  /* steps */
  .cs-steps { display:grid; gap:10px; counter-reset:s }
  .cs-step { background:#fff; border:1px solid var(--border); border-radius:14px;
    padding:18px 18px 18px 60px; position:relative }
  .cs-step::before { counter-increment:s; content:counter(s); position:absolute; left:18px; top:17px;
    width:28px; height:28px; border-radius:50%; background:rgba(212,168,83,.14);
    border:1px solid rgba(212,168,83,.4); color:#8A5A08;
    font-family:'Clash Display',sans-serif; font-size:13px; display:grid; place-items:center }
  .cs-step b { display:block; font-family:'Clash Display',sans-serif; font-size:17px;
    font-weight:600; margin-bottom:4px }
  .cs-step p { font-size:15px; line-height:1.55; margin:0; color:var(--text-sec) }

  /* credits */
  .cs-cred { background:#fff; border:1px solid var(--border); border-radius:16px; overflow:hidden }
  .cs-cred-h { padding:16px 20px; border-bottom:1px solid var(--border) }
  .cs-cred-h b { font-family:'Clash Display',sans-serif; font-size:17px; font-weight:600 }
  .cs-cred dl { display:grid; gap:1px; background:var(--border); margin:0 }
  .cs-cred-r { background:#fff; padding:14px 20px; display:grid; gap:3px }
  .cs-cred dt { font-size:10.5px; font-weight:700; letter-spacing:.11em; text-transform:uppercase;
    color:var(--text-sec) }
  .cs-cred dd { font-size:15.5px; color:var(--text); line-height:1.5; margin:0 }

  /* testimonial */
  .cs-tst { display:grid; gap:18px }
  .cs-tst-h { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px }
  .cs-tst-h i { font-style:normal; color:var(--gold); font-size:17px; letter-spacing:2px; line-height:1 }
  .cs-tst-h b { font-family:'Clash Display',sans-serif; font-size:24px; line-height:1 }
  .cs-tst-h .nm { font-size:15px; font-weight:600; color:var(--text) }
  .cs-tst-h .src { font-size:12.5px; color:var(--text-sec) }
  .cs-tst-w { font-family:'Clash Display',sans-serif; font-size:clamp(19px,3.2vw,25px);
    font-weight:500; line-height:1.34; letter-spacing:-.012em; color:var(--text);
    border-left:3px solid var(--gold); padding-left:20px; margin:0 }
  .cs-proof { display:grid; gap:12px }
  .cs-shot { margin:0; background:#fff; border-radius:14px; overflow:hidden;
    box-shadow:0 14px 40px rgba(13,27,42,.14) }
  .cs-shot img { width:100%; height:auto; display:block }   /* portrait stays portrait */
  .cs-play { position:relative; aspect-ratio:16/9; border-radius:14px; overflow:hidden; background:#000 }
  .cs-play iframe { width:100%; height:100%; border:0; display:block }

  /* ---------------- tail ---------------- */
  .cs-tail { padding:12px 0 0 }
  .cs-tailwrap { max-width:var(--wide); margin:0 auto; padding:0 20px }
  .cs-cta { background:linear-gradient(160deg,#16293F,#0D1B2A); border-radius:20px;
    padding:clamp(28px,6vw,52px); text-align:center; color:#fff }
  .cs-cta h2 { font-family:'Clash Display',sans-serif; font-size:clamp(25px,4.4vw,38px);
    font-weight:600; letter-spacing:-.02em; line-height:1.1; margin:0 0 12px }
  .cs-cta p { font-size:16px; color:rgba(255,255,255,.66); max-width:46ch; margin:0 auto 24px }
  .cs-btn { display:inline-flex; align-items:center; justify-content:center; background:var(--blue);
    color:#fff; border:0; border-radius:999px; padding:15px 30px; font-size:16px; font-weight:600;
    text-decoration:none; min-height:54px; transition:background .15s }
  .cs-btn:hover { background:#3A66F0 }
  .cs-btn.ghost { background:transparent; border:1px solid var(--border); color:var(--text);
    padding:11px 20px; min-height:46px; font-size:14.5px }
  .cs-btn.ghost:hover { background:rgba(13,27,42,.05) }

  .cs-more { padding:clamp(40px,7vw,72px) 0 clamp(20px,4vw,40px) }
  .cs-more-h { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
    gap:12px; margin-bottom:22px }
  .cs-more-h h2 { font-family:'Clash Display',sans-serif; font-size:clamp(23px,3.4vw,32px);
    font-weight:600; letter-spacing:-.018em; margin:0 }
  .cs-cards { display:grid; grid-template-columns:1fr 1fr; gap:14px }
  .cs-card { text-decoration:none; color:inherit; display:block }
  .cs-card .cover { aspect-ratio:16/9; border-radius:13px; overflow:hidden; margin-bottom:10px;
    background:#EFEAE0; transform:translateZ(0); will-change:transform;
    backface-visibility:hidden; -webkit-backface-visibility:hidden;
    transition:transform .3s cubic-bezier(.2,.85,.25,1), box-shadow .3s }
  .cs-card:hover .cover { transform:translate3d(0,-4px,0); box-shadow:0 16px 36px rgba(13,27,42,.16) }
  .cs-card .cover img { width:100%; height:100%; object-fit:cover; display:block }
  .cs-card .k { display:block; font-size:10.5px; font-weight:700; letter-spacing:.11em;
    text-transform:uppercase; color:#8A5A08; margin-bottom:4px }
  .cs-card b { display:block; font-family:'Clash Display',sans-serif; font-size:17px;
    font-weight:600; line-height:1.2 }
  .cs-card .c { display:block; font-size:13px; color:var(--text-sec); margin-top:2px }

  @media (min-width:760px) {
    .cs-head { padding:118px 0 54px }
    /* the count picks the columns */
    .cs-nums.n2 > div { grid-column:span 6 }
    .cs-nums.n3 > div { grid-column:span 4 }
    .cs-nums.n4 > div { grid-column:span 3 }
    .cs-nums.n5 > div { grid-column:span 4 }
    .cs-nums.n5 > div:nth-child(n+4) { grid-column:span 6 }
    .cs-nums.n6 > div { grid-column:span 4 }
    .cs-coll.n4 { grid-template-columns:1fr 1fr }
    .cs-coll.n6 { grid-template-columns:repeat(3,1fr) }
    /* side by side only while the order stays unambiguous */
    .cs-steps.n2 { grid-template-columns:repeat(2,1fr) }
    .cs-steps.n3 { grid-template-columns:repeat(3,1fr) }
    .cs-proof.p2 { grid-template-columns:1fr 1fr; align-items:start }
    .cs-cards { grid-template-columns:repeat(4,1fr); gap:18px }
  }
