/* ============================================================================
   craft/p-case.css · a Toolbox case study (toolbox/<tool>.html, /toolbox/<tool>/)
   Loaded after the kit (scrollcraft.css, d-current.css, inner.css). One page
   per tool, all on one skeleton: the hero (the tool, its line, who it is for,
   three facts), the film playing in place, the problem (cream), how it works
   (three steps, the kit's .steps), what makes it different (notes), the close.
   Only what the kit does not cover: the way back to the Toolbox, the facts
   row, the film in its frame, the notes. Colours, type and motion timings are
   D's tokens. Script: craft/p-case.js (the play mark on the film's poster).
   ========================================================================== */

/* read aloud, never shown */
.cs-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* a mono text link over a hairline, a 44px target (the Work page's .w-link) */
.cs-link{display:inline-flex;align-items:center;min-height:44px;color:var(--ash);
  border-bottom:1px solid var(--line-dim);transition:color .16s var(--e-io),border-color .16s var(--e-io)}
.cs-link:hover{color:var(--lime);border-color:var(--lime)}
.paper .cs-link{color:var(--moss-ink);border-color:var(--line-paper)}
.paper .cs-link:hover{color:var(--ink);border-color:var(--ink)}
.phero .cta-row .cs-link{margin-left:.6rem}

/* ============ THE HERO ============ */
/* the way back: The Toolbox / Case study, as the eyebrow */
.cs-hero .eyebrow a{color:inherit;border-bottom:1px solid var(--line-lime);transition:border-color .16s var(--e-io)}
.cs-hero .eyebrow a:hover{border-color:var(--lime)}
.cs-hero .kanji{font-size:min(30vw,380px);right:-2vw;top:-2%}
.cs-hero h1{max-width:14ch}
/* the tool's own line, under its name: the display face at a reading size */
.cs-line{max-width:24ch;margin-top:1.3rem;font-family:var(--font-display);font-weight:700;font-size:clamp(1.35rem,2.6vw,2.1rem);
  line-height:1.12;letter-spacing:-.01em;color:#F4F4F0;text-wrap:balance}
/* three facts, outline cells: kind, status, the way in */
.cs-facts{display:grid;grid-template-columns:repeat(3,minmax(0,max-content));gap:1px;margin:2.2rem 0 0}
.cs-facts>div{position:relative;outline:1px solid var(--hl);padding:.95rem 1.3rem 1rem 1.15rem;min-width:9.5rem}
.cs-facts>div::before{content:"";position:absolute;top:6px;left:6px;width:7px;height:7px;border-top:1px solid var(--lime);border-left:1px solid var(--lime)}
.cs-facts dt{font-family:var(--font-mono);font-size:.6rem;letter-spacing:.2em;text-transform:uppercase;color:var(--lime)}
.cs-facts dd{margin:.45rem 0 0;font-family:var(--font-display);font-weight:700;font-size:1.02rem;line-height:1.2;color:#F4F4F0}
@media(max-width:640px){.cs-facts{grid-template-columns:minmax(0,1fr)}}

/* ============ THE FILM, PLAYING IN PLACE ============ */
.cs-watch{border-top:1px solid var(--line-dim)}
.cs-watch .sec-head{max-width:16ch}
.cs-watch__top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.82fr);gap:clamp(1.6rem,4vw,3.4rem);align-items:end}
.cs-watch__top .lede{margin:0 0 1.5rem;max-width:46ch}
@media(max-width:900px){.cs-watch__top{grid-template-columns:minmax(0,1fr)}}
/* the frame: a thin lime line with registration ticks, sized before the film loads (no shift) */
.cs-film{position:relative;margin:clamp(1.2rem,3vw,2rem) 0 0;aspect-ratio:16/9;background:#0b0b0f;border:1px solid var(--line-lime);border-bottom:0}
.cs-film video,.cs-film img{display:block;width:100%;height:100%;object-fit:cover;background:#0b0b0f}
.cs-film video{object-fit:contain}
.cs-film .tick{z-index:2;pointer-events:none}
/* the play mark on the poster: the brand's skewed tile, set by craft/p-case.js and gone at the first play.
   The whole poster is its target. Without scripts the film's own controls play it. */
.cs-film__play{position:absolute;inset:0;z-index:1;display:grid;place-items:center;margin:0;padding:0;border:0;background:rgba(11,11,15,.18);
  cursor:pointer;transition:background-color .2s var(--e-io)}
.cs-film__play svg{width:clamp(56px,7vw,92px);height:clamp(56px,7vw,92px);overflow:visible;transition:transform .2s var(--e-out)}
.cs-film__play rect{fill:var(--lime)}
.cs-film__play path{fill:var(--ink)}
@media(hover:hover){
  .cs-film__play:hover{background:rgba(11,11,15,0)}
  .cs-film__play:hover svg{transform:scale(1.06)}
}
.cs-film__play:focus-visible{outline:2px solid var(--lime);outline-offset:-6px}
/* the foot bar under the frame: what it is, and how long */
.cs-film__bar{display:flex;align-items:center;gap:.6rem;min-height:2.6rem;margin:0;padding:.5rem .95rem;background:#0b0b0f;border:1px solid var(--line-lime);
  font-size:.66rem;letter-spacing:.18em;line-height:1.5;color:#F4F4F0}
.cs-film__bar b{margin-left:auto;padding-left:.8rem;font-weight:400;color:var(--lime);white-space:nowrap;font-variant-numeric:tabular-nums}
/* a tool whose film is still being made: its site in the same frame (no control), and a bar that says so */
/* the site picture is a card's 960px shot, so it holds a smaller frame than a film */
.cs-film--still,.cs-film--still+.cs-film__bar{max-width:46rem}
.cs-film--still img{object-position:50% 0}
.cs-film__bar--soon{color:var(--ash)}

/* ============ THE PROBLEM (cream) ============ */
.cs-problem .sec-head{max-width:17ch}
.cs-problem__grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(1.6rem,5vw,4.4rem);align-items:start}
.cs-problem .prose p{color:var(--ash-paper)}
.cs-problem .prose p.lede{color:var(--ink)}
/* what it takes off your desk, as its Toolbox card says it */
.cs-desk{margin-top:1.8rem;padding-left:1rem;border-left:2px solid var(--moss-deep);color:var(--ink);font-size:1rem;line-height:1.5;max-width:52ch}
.cs-desk .k{display:block;margin-bottom:.3rem;font-family:var(--font-mono);font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;color:var(--moss-ink)}
@media(max-width:900px){.cs-problem__grid{grid-template-columns:minmax(0,1fr)}}

/* ============ HOW IT WORKS ============ */
.cs-how .sec-head{max-width:18ch}
.cs-how .steps{margin-top:2.4rem}
.cs-how .step p{font-size:1rem;line-height:1.58}

/* ============ WHAT MAKES IT DIFFERENT: the notes ============ */
.cs-diff{border-top:1px solid var(--line-dim)}
.cs-diff .sec-head{max-width:18ch}
.cs-notes{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:2.4rem 0 0;padding:0}
.cs-notes li{position:relative;outline:1px solid var(--hl);padding:clamp(1.3rem,2.4vw,1.9rem)}
.cs-notes li::before{content:"";position:absolute;top:8px;left:8px;width:9px;height:9px;border-top:1px solid var(--lime);border-left:1px solid var(--lime);pointer-events:none}
.cs-notes .n{display:block;margin-top:.35rem;font-family:var(--font-mono);font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;color:var(--lime)}
.cs-notes h3{margin:.7rem 0 0;font-family:var(--font-display);font-weight:900;text-transform:uppercase;font-size:clamp(1.15rem,1.7vw,1.4rem);
  line-height:1.05;letter-spacing:-.01em;color:#F4F4F0;text-wrap:balance}
.cs-notes p{margin:.7rem 0 0;font-size:1rem;line-height:1.58;color:var(--ash);max-width:48ch}
.cs-fine{margin-top:1.6rem;max-width:72ch;color:var(--ash);font-size:.78rem;line-height:1.5}
@media(max-width:820px){.cs-notes{grid-template-columns:minmax(0,1fr)}}

/* ============ THE CLOSE ============ */
.cta-band .reg{color:var(--ash)}
.cs-close p a:not(.cs-link){color:#F4F4F0;border-bottom:1px solid var(--line-lime);transition:border-color .16s var(--e-io)}
.cs-close p a:not(.cs-link):hover{border-color:var(--lime)}
.cs-close__links{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem 1.6rem;margin-top:1.2rem}

@media(max-width:640px){
  .phero .cta-row .cs-link{margin-left:0;justify-content:center}
  .cs-film__bar{font-size:.6rem;letter-spacing:.14em}
}
@media(prefers-reduced-motion:reduce){
  .cs-link,.cs-hero .eyebrow a,.cs-film__play,.cs-film__play svg{transition:none!important}
  .cs-film__play:hover svg{transform:none}
}
