/* =========================================================================
   GIDEON PARTNERS — shared case-study styles (work/[slug]/index.html)
   Reuses the design tokens from /studio.css. Each case study links:
     ../../studio.css   (tokens, fonts base, ::selection)
     ../case.css        (this file — case layout)
   and may override --accent / --accent-2 in a <style> block to adopt the
   featured project's brand color.
   ========================================================================= */

/* The case pages don't load the homepage's custom-cursor JS, so restore the
   normal pointer (studio.css sets cursor:none for the homepage). */
body { cursor: auto; }
a, button { cursor: pointer; }

/* ---------- top bar ---------- */
.case-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: rgba(10,10,11,0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.case-nav .brand {
  font-family: var(--display); font-weight: 800; font-size: 15px;
  letter-spacing: 0.02em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.case-nav .brand .reg-dot { color: var(--accent); }
.case-nav .back {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bone-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
.case-nav .back:hover { color: var(--bone); }

/* ---------- hero ---------- */
.case-hero { padding: clamp(48px,9vh,120px) 0 clamp(30px,5vh,60px); }
.case-hero .kicker { margin-bottom: clamp(20px,4vh,40px); }
.case-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.8rem, 11vw, 9rem); line-height: 0.9; letter-spacing: -0.03em;
}
.case-sub {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2.4rem); line-height: 1.12; letter-spacing: -0.01em;
  max-width: 22ch; margin-top: clamp(18px,3vh,30px); color: var(--bone);
}
.case-sub .accent { color: var(--accent); }

/* meta row + primary action */
.case-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: clamp(26px,4vh,44px); }
.visit {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.06em;
  border: 1px solid var(--accent); color: var(--ink); background: var(--accent);
  padding: 14px 24px; border-radius: 100px; display: inline-flex; align-items: center; gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s;
}
.visit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.visit .arr { transition: transform .3s var(--ease); }
.visit:hover .arr { transform: translate(3px,-3px); }

.case-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: clamp(34px,6vh,64px);
  background: var(--line); border: 1px solid var(--line);
}
.case-meta .cell { background: var(--ink); padding: 20px clamp(16px,2vw,24px); }
.case-meta .cell .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone-dim); }
.case-meta .cell .v { font-family: var(--body); font-weight: 500; font-size: 15px; margin-top: 8px; line-height: 1.4; }
@media (max-width: 820px){ .case-meta { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .case-meta { grid-template-columns: 1fr; } }

/* ---------- live preview embed ---------- */
.preview { padding: clamp(20px,4vh,40px) 0 clamp(40px,8vh,90px); }
.browser {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); box-shadow: 0 40px 120px -40px rgba(0,0,0,0.8);
}
.browser .bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--ink-2);
}
.browser .dots { display: flex; gap: 7px; }
.browser .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bone-faint); }
.browser .url {
  font-family: var(--mono); font-size: 12px; color: var(--bone-dim);
  background: var(--ink); border: 1px solid var(--line); border-radius: 100px;
  padding: 6px 14px; flex: 1; text-align: center;
}
.browser .frame { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--ink); }
/* The inline frame is a LIVE POSTER: it renders/animates but ignores the pointer,
   so the wheel scrolls the page straight through it (no scroll-trap). */
.browser .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
@media (max-width: 720px){ .browser .frame { aspect-ratio: 4 / 5; } }

/* click-through overlay that opens the full-screen live demo */
.live-cta {
  position: absolute; inset: 0; z-index: 2; cursor: pointer; border: 0;
  display: flex; align-items: flex-end; justify-content: center; padding: 0 0 clamp(18px,3vw,26px);
  background: linear-gradient(to top, rgba(6,9,18,0.5), transparent 42%);
  transition: background .35s var(--ease);
}
.live-cta:hover { background: linear-gradient(to top, rgba(6,9,18,0.72), rgba(6,9,18,0.08) 64%, transparent); }
.live-cta .badge {
  position: absolute; top: 14px; left: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bone); display: inline-flex; align-items: center; gap: 9px;
}
.live-cta .badge .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-cta .badge .dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--accent); animation: cta-ring 2.2s var(--ease) infinite; }
@keyframes cta-ring { 0%{ transform: scale(.6); opacity: .8; } 100%{ transform: scale(2.4); opacity: 0; } }
.live-cta .go {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  background: var(--accent); color: var(--ink); padding: 12px 22px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 9px;
  transform: translateY(6px); opacity: .94;
  transition: transform .35s var(--ease), opacity .35s, box-shadow .35s var(--ease);
}
.live-cta:hover .go { transform: translateY(0); opacity: 1; box-shadow: 0 12px 32px -10px var(--accent); }
.live-cta .go .arr { transition: transform .3s var(--ease); }
.live-cta:hover .go .arr { transform: translate(3px,-3px); }
@media (prefers-reduced-motion: reduce){ .live-cta .badge .dot::after { animation: none; } .live-cta .go { transform: none; } }

/* =========================================================================
   FULL-SCREEN LIVE DEMO MODAL (built + wired by work/work.js)
   ========================================================================= */
.demo-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.demo-modal.open { display: block; }
.demo-backdrop { position: absolute; inset: 0; background: rgba(5,6,10,0.82); backdrop-filter: blur(6px); }
.demo-panel {
  position: absolute; inset: clamp(10px,2.5vw,40px);
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); box-shadow: 0 40px 120px -30px #000;
}
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--ink-2); }
.demo-url { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.demo-open { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--bone-dim); }
.demo-open:hover { color: var(--accent); }
.demo-close { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--bone); border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.demo-close:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.demo-frame { position: relative; flex: 1; background: var(--ink); }
.demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- prose sections ---------- */
.case-section { padding: clamp(40px,7vh,90px) 0; border-top: 1px solid var(--line); }
.case-section .kicker { margin-bottom: clamp(20px,3vh,32px); }
.case-lead {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.18; letter-spacing: -0.01em;
  max-width: 28ch;
}
.case-body { font-size: clamp(1rem,1.4vw,1.15rem); color: var(--bone-dim); line-height: 1.7; max-width: 60ch; margin-top: 22px; }
.case-body b { color: var(--bone); font-weight: 700; }

/* scope list */
.scope { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin-top: clamp(26px,4vh,44px); background: var(--line); border: 1px solid var(--line); }
.scope .item { background: var(--ink); padding: clamp(20px,2.4vw,30px); }
.scope .item .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.scope .item h4 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.15rem; letter-spacing: 0.01em; margin: 10px 0 8px; }
.scope .item p { font-family: var(--mono); font-size: 12.5px; color: var(--bone-dim); line-height: 1.6; }
@media (max-width: 640px){ .scope { grid-template-columns: 1fr; } }

/* pillars (client offering) */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(18px,2.5vw,30px); margin-top: clamp(26px,4vh,44px); }
.pillars .p { border-top: 2px solid var(--accent); padding-top: 18px; }
.pillars .p h4 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 1.2rem; }
.pillars .p p { font-family: var(--mono); font-size: 12.5px; color: var(--bone-dim); line-height: 1.6; margin-top: 10px; }
@media (max-width: 720px){ .pillars { grid-template-columns: 1fr; } }

/* ---------- foot ---------- */
.case-foot {
  border-top: 1px solid var(--line); margin-top: clamp(30px,6vh,70px);
  padding: clamp(40px,7vh,80px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.case-foot .next { font-family: var(--mono); font-size: 12px; color: var(--bone-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.case-foot .next a { color: var(--bone); }
.case-foot .next a:hover { color: var(--accent); }
.case-foot .home {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.4rem,4vw,2.4rem); letter-spacing: -0.02em;
}
.case-foot .home:hover { color: var(--accent); }
