/* ============================================================
   Case study page — HOLO variant, builds on styles.css tokens
   Type scale (4px grid) comes from :root in styles.css.
   ============================================================ */

.casepage { padding-top: 80px; }

/* section heading / kicker (holo) — one step above body */
.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-weight: 700; font-size: var(--fs-h4); line-height: 1.25;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kicker::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--grad); }

.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: var(--fs-caption); color: var(--muted);
  margin: 40px 0 8px; transition: color .25s var(--ease);
}
.back:hover { color: var(--pink); }

/* ---------- case hero ---------- */
.chero { padding: 24px 0 48px; border-bottom: 1px solid var(--line-soft); }
.chero__tags { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.chero__title {
  font-family: var(--f-disp); font-variation-settings: var(--wonk);
  font-weight: 600; font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.01em;
  max-width: 20ch; color: var(--white);
}
.chero__lede { color: rgba(255,255,255,.8); font-size: clamp(1.25rem, 1.7vw, 1.5rem); line-height: 1.6; max-width: 60ch; margin-top: 24px; }

.chero__metrics { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.cmetric {
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 20px 24px; min-width: 160px;
  background: var(--card);
}
.cmetric b { display: block; font-family: var(--f-disp); font-variation-settings: var(--wonk); font-weight: 600; font-size: var(--fs-h2); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmetric span { display: block; color: var(--muted); font-size: var(--fs-caption); margin-top: 8px; line-height: 1.5; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line-soft);
}
.facts dt { color: var(--pink); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5; }
.facts dd { margin-top: 8px; font-size: var(--fs-body); line-height: 1.5; color: rgba(255,255,255,.9); }

/* ---------- body ---------- */
.cbody { padding-block: clamp(44px, 6vw, 80px); }
.csec { padding-block: 28px; max-width: 760px; margin-inline: auto; }

/* ---------- full-width feature visuals (woven through the narrative) ---------- */
.feature { width: 100%; margin: clamp(36px, 5vw, 68px) auto; display: flex; flex-direction: column; gap: 16px; }
.feature__img {
  width: 100%; height: auto; display: block; border-radius: 24px; cursor: zoom-in;
  border: 1px solid rgba(121,106,229,.32); box-shadow: 0 44px 88px -44px rgba(0,0,0,.72);
  transition: transform .35s var(--ease);
}
.feature__img:hover { transform: translateY(-3px); }

/* ---------- image lightbox (zoomable) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; opacity: 0; visibility: hidden;
  background: rgba(12, 3, 26, .9); backdrop-filter: blur(12px);
  transition: opacity .25s var(--ease), visibility .25s var(--ease); overscroll-behavior: contain;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { position: absolute; user-select: none; -webkit-user-drag: none;
  max-width: none; max-height: none;   /* override global img{max-width:100%} so zoom can exceed viewport */
  border-radius: 12px; box-shadow: 0 50px 120px -30px rgba(0,0,0,.85); cursor: zoom-in; will-change: left, top, width; }
.lightbox__close {
  position: fixed; top: 20px; right: 24px; z-index: 1002; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background .25s, border-color .25s;
}
.lightbox__close:hover { background: rgba(255,255,255,.18); border-color: var(--pink); }
.lightbox__hint { position: fixed; left: 0; right: 0; bottom: 22px; z-index: 1001; text-align: center;
  color: rgba(255,255,255,.72); font-size: var(--fs-caption); letter-spacing: .02em; pointer-events: none; }
.feature__cap { color: var(--muted); font-size: var(--fs-caption); line-height: 1.6; text-align: center; }
.feature__ph {
  width: 100%; aspect-ratio: 1680 / 1000; border-radius: 24px;
  border: 1.5px dashed rgba(237,158,229,.45); display: grid; place-items: center;
  background:
    linear-gradient(140deg, rgba(110,91,230,.12), rgba(232,108,176,.12)),
    repeating-linear-gradient(-45deg, transparent, transparent 14px, rgba(255,255,255,.03) 14px, rgba(255,255,255,.03) 28px);
}
.feature__ph span { font-family: var(--f-disp); font-variation-settings: var(--wonk); color: rgba(237,158,229,.7); font-size: var(--fs-h3); }
.csec .kicker { margin-bottom: 20px; }
/* :not(.kicker) so body rules never override the section heading (.csec p outranks .kicker) */
.csec p:not(.kicker) { color: rgba(255,255,255,.82); font-size: var(--fs-body); line-height: 1.75; margin-top: 16px; }
.csec .kicker + p { margin-top: 0; }
.csec strong { color: var(--white); font-weight: 500; }

/* subtitle inside a section — sits between kicker and body */
.csec .csub {
  font-family: var(--f-body); font-weight: 600; font-size: var(--fs-lead); line-height: 1.4;
  color: var(--white); letter-spacing: -0.01em; margin: 32px 0 4px;
}
.csec .kicker + .csub { margin-top: 0; }

/* bullet list */
.csec .clist { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.csec .clist li {
  position: relative; padding-left: 24px;
  color: rgba(255,255,255,.82); font-size: var(--fs-body); line-height: 1.6;
}
.csec .clist li::before {
  content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px;
  border-radius: 50%; background: var(--grad);
}

/* pulled quote */
.csec .cquote {
  margin: 20px 0 0; padding: 16px 24px; border-left: 4px solid var(--pink);
  background: var(--card); border-radius: 0 16px 16px 0;
  color: var(--white); font-size: var(--fs-lead); line-height: 1.6; font-style: italic;
}

/* ---------- visuals ---------- */
.cvisuals { padding-block: clamp(24px, 4vw, 48px); }
.cvisuals .kicker { margin-bottom: 24px; }
.cvisuals__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.vfig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.vframe {
  position: relative; aspect-ratio: 4/3; border: 1.5px dashed rgba(237,158,229,.45); border-radius: 20px;
  background:
    linear-gradient(140deg, rgba(110,91,230,.12), rgba(232,108,176,.12)),
    repeating-linear-gradient(-45deg, transparent, transparent 12px, rgba(255,255,255,.03) 12px, rgba(255,255,255,.03) 24px);
  display: flex; align-items: flex-end; padding: 16px;
}
.vframe.is-filled {
  border: 1px solid rgba(121,106,229,.32); border-radius: 20px; padding: 0; overflow: hidden;
  background: var(--bg); box-shadow: 0 22px 44px -26px rgba(0,0,0,.65);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.vframe.is-filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vframe.is-filled:hover { transform: translateY(-4px); border-color: var(--pink); box-shadow: 0 30px 56px -26px rgba(0,0,0,.75); }
.vframe__tag { position: absolute; top: 16px; left: 16px; font-family: var(--f-disp); font-variation-settings: var(--wonk); color: rgba(237,158,229,.75); font-size: var(--fs-body); }
.vfig figcaption { color: var(--muted); font-size: var(--fs-caption); line-height: 1.5; }
.cvisuals__note { color: var(--muted); font-size: var(--fs-caption); line-height: 1.5; margin-top: 16px; text-align: center; }

/* ---------- footer nav ---------- */
.cfoot { border-top: 1px solid var(--line-soft); margin-top: clamp(32px, 5vw, 60px); padding-top: 44px; padding-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cfoot > div { display: flex; gap: 16px; flex-wrap: wrap; flex: 1; min-width: 260px; }
.pn { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px; border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; background: var(--card); flex: 1; min-width: 200px; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.pn:hover { border-color: var(--pink); transform: translateY(-3px); }
.pn--next { text-align: right; }
.pn__k { color: var(--pink); font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.5; }
.pn__t { font-family: var(--f-disp); font-variation-settings: var(--wonk); font-weight: 600; font-size: var(--fs-lead); line-height: 1.25; color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .cvisuals__grid { grid-template-columns: 1fr; }
  .cfoot { flex-direction: column; align-items: stretch; }
  .pn--next { text-align: left; }
}
