/* ============================================================
   built by alish_ — BLUEPRINT case study
   Cinematic, scroll-controlled case pages. Reuses app.css tokens
   & chrome; adds the pinned arc "reel" + story sections.
   ============================================================ */

/* ---------- case hero ---------- */
.chero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 132px 0 90px; position: relative; }
.chero__back { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.chero__back:hover { color: var(--blue-ink); }
.chero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(3.6rem, 15vw, 11rem); line-height: .9; letter-spacing: -.02em; margin: 0 0 6px; }
.chero__title em { color: var(--blue-ink); }
.chero__sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--ink-2); margin: 0 0 34px; }
.chero__lead { max-width: 62ch; color: var(--ink-2); font-size: clamp(1.05rem, 2.5vw, 1.28rem); margin: 0 0 30px; }
.chero__lead b { color: var(--ink); font-weight: 600; }
.cspecs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-width: 760px; }
.cspecs > div { background: var(--panel); padding: 14px 16px; }
.cspecs dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 5px; }
.cspecs dd { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--ink); }

/* ---------- section shell ---------- */
.cs { position: relative; padding: clamp(80px, 12vh, 150px) 0; }
.cs__k { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-ink); display: inline-block; margin-bottom: 18px; }
.cs__h { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5.4vw, 4rem); line-height: 1.02; margin: 0 0 22px; }
.cs__h em { color: var(--blue-ink); }
.cs__p { color: var(--ink-2); font-size: clamp(1rem, 2.3vw, 1.16rem); max-width: 64ch; margin: 0 0 16px; }

/* ============================================================
   THE REEL — pinned cinematic arc carousel (desktop)
   ============================================================ */
.reel { position: relative; }
/* the stage is held by native position:sticky (rock-solid with Lenis — no JS pin) */
.reel__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.reel__grade { position: absolute; inset: 0; pointer-events: none; z-index: 60;
  background: radial-gradient(120% 80% at 38% 55%, transparent 45%, color-mix(in srgb, var(--paper) 70%, transparent) 100%); }

/* each chapter is a full-stage layer; JS transforms the shot & fades the text */
.reel__chapter { position: absolute; inset: 0; }
.reel__shot { position: absolute; left: 38%; top: 50%; will-change: transform, opacity; transform-origin: center center; }
.reel__shot figure { margin: 0; position: relative; }
.reel__shot img { display: block; border-radius: 26px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 40px 90px -40px rgba(10,16,40,.7); }
.reel--phone .reel__shot img { height: 66svh; width: auto; }
.reel--browser .reel__shot img { width: 46vw; height: auto; border-radius: 14px; }
.reel__cap { position: absolute; left: 12px; bottom: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: #fff; background: rgba(10,16,40,.72); padding: 3px 9px; border-radius: 100px; backdrop-filter: blur(4px); }

/* text panel (right) — one shows at a time */
.reel__text { position: absolute; right: max(var(--mx), 6%); top: 50%; width: min(380px, 38%); z-index: 55; will-change: transform, opacity; }
.reel__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-ink); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.reel__tag i { width: 7px; height: 7px; border-radius: 2px; background: var(--blue); }
.reel__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.04; margin: 0 0 16px; letter-spacing: -.01em; }
.reel__desc { color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.6; margin: 0; }
.reel__desc b { color: var(--ink); font-weight: 600; }

/* HUD */
.reel__hud { position: absolute; left: var(--mx); bottom: 34px; z-index: 55; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.reel__idx { color: var(--blue-ink); font-weight: 600; font-size: 15px; }
.reel__tot { color: var(--ink-3); }
.reel__pbar { width: clamp(120px, 22vw, 280px); height: 2px; background: var(--line); position: relative; overflow: hidden; }
.reel__pbar i { position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.reel__chap { text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; color: var(--ink-3); }
.reel__hint { position: absolute; right: var(--mx); bottom: 34px; z-index: 55; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }

/* ---------- outro / results ---------- */
.feat { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.feat li { background: var(--panel); padding: 26px; }
.feat h4 { font-size: 1.15rem; margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; }
.feat h4 span { font-family: var(--mono); font-size: 12px; color: var(--blue-ink); }
.feat p { margin: 0; color: var(--ink-2); font-size: .98rem; }

.cstats { display: flex; flex-wrap: wrap; gap: clamp(24px, 6vw, 72px); margin-top: 30px; }
.cstat b { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1; color: var(--blue-ink); }
.cstat span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; }

/* ---------- next project ---------- */
.next { border-top: 1px solid var(--line); }
.next a { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(40px, 8vh, 90px) 0; }
.next__k { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.next__t { font-family: var(--serif); font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1; letter-spacing: -.01em; transition: color .3s, transform .4s cubic-bezier(.2,.8,.2,1); }
.next a:hover .next__t { color: var(--blue-ink); transform: translateX(12px); }
.next__x { font-family: var(--mono); font-size: 24px; color: var(--blue-ink); }

/* ============================================================
   MOBILE — no pin; stacked scroll-scrubbed cinematic sequence
   ============================================================ */
@media (max-width: 860px) {
  .reel__stage { position: static; height: auto; overflow: visible; }
  .reel__grade { display: none; }
  .reel__chapter { position: relative; inset: auto; min-height: 92svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 60px 0; }
  .reel__shot { position: relative; left: auto; top: auto; transform: none !important; opacity: 1 !important; }
  .reel--phone .reel__shot img { height: 56svh; }
  .reel--browser .reel__shot img { width: 88vw; }
  .reel__text { position: relative; right: auto; top: auto; width: min(440px, 88vw); transform: none !important; opacity: 1 !important; text-align: center; }
  .reel__tag { justify-content: center; }
  .reel__hud, .reel__hint { display: none; }
  .cspecs { grid-template-columns: 1fr 1fr; }
  .feat { grid-template-columns: 1fr; }
  .next a { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.reel--static .reel__stage { position: static; height: auto; overflow: visible; }
.reel--static .reel__chapter { position: relative; inset: auto; min-height: 80svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.reel--static .reel__shot { position: relative; left: auto; top: auto; transform: none; opacity: 1; }
.reel--static .reel__text { position: relative; right: auto; top: auto; width: min(460px, 88vw); transform: none; opacity: 1; text-align: center; }
.reel--static .reel__grade, .reel--static .reel__hud, .reel--static .reel__hint { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reel__stage { position: static !important; height: auto !important; overflow: visible !important; }
  .reel__chapter { position: relative !important; inset: auto !important; min-height: 80svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
  .reel__shot { position: relative !important; left: auto !important; top: auto !important; transform: none !important; opacity: 1 !important; }
  .reel__text { position: relative !important; right: auto !important; top: auto !important; width: min(460px, 88vw); transform: none !important; opacity: 1 !important; }
  .reel__grade, .reel__hud, .reel__hint { display: none; }
}
