/* ─────────────────────────────────────────────────────────────
   Case study pages — shares tokens, nav, footer, buttons with style.css
   ───────────────────────────────────────────────────────────── */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9001; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--cobalt); transform: scaleX(0); transform-origin: left; }

.h3 {
  font-family: var(--font-display); font-variation-settings: "wdth" 76, "wght" 800;
  text-transform: uppercase; letter-spacing: -.02em; line-height: .95;
  font-size: clamp(24px, 2.6vw, 38px);
  margin-bottom: 14px;
}
.h3--rule { border-top: 1px solid var(--line); padding-top: 24px; margin-top: clamp(48px, 7vh, 88px); margin-bottom: 24px; }
.prose p, .two-col p:not(.lede) { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; letter-spacing: -.005em; max-width: 58ch; font-variation-settings: "wdth" 96, "wght" 420; }
.prose p + p { margin-top: 14px; }
.lede {
  font-size: clamp(22px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -.02em;
  font-variation-settings: "wdth" 92, "wght" 500; max-width: 24ch;
}

/* ── Hero ── */
.chero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: clamp(48px, 8vh, 96px); }
.chero__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(32px, 6vh, 72px); }
.chero__back { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 0; display: inline-flex; gap: 8px; align-items: center; }
.chero__back span { transition: transform .5s var(--ease-io); }
.chero__back:hover span { transform: translateX(-4px); }
.chero__tags { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.chero__title {
  font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900;
  text-transform: uppercase; letter-spacing: -.035em; line-height: .82;
  font-size: clamp(72px, 16vw, 300px);
  margin-bottom: clamp(32px, 6vh, 72px);
}
.chero__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-bottom: clamp(40px, 7vh, 88px); }
.chero__deck { font-size: clamp(20px, 2.1vw, 32px); line-height: 1.2; letter-spacing: -.015em; font-variation-settings: "wdth" 94, "wght" 480; max-width: 32ch; }
.chero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; border-top: 1px solid var(--line); }
.chero__meta > div { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.chero__meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chero__meta dd { font-size: 15px; }

/* ── Stages (white panels for artifacts that carry their own white ground) ── */
.stage {
  margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(16px, 3vw, 48px); overflow: hidden;
}
.stage img { width: 100%; height: auto; }
.stage figcaption { margin-top: 16px; }
.stage--hero { padding: clamp(8px, 2vw, 32px) clamp(8px, 4vw, 64px); }
.stage + .two-col { margin-top: clamp(48px, 8vh, 96px); }

/* ── Sections ── */
.csec { padding: clamp(80px, 12vh, 160px) var(--gutter); }
.csec__head {
  display: flex; flex-direction: column; gap: 18px;
  border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: clamp(32px, 6vh, 64px);
  transition: border-color .9s var(--ease-io);
}
.csec__title {
  font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900;
  text-transform: uppercase; letter-spacing: -.03em; line-height: .84;
  font-size: clamp(48px, 8vw, 132px);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); margin-bottom: clamp(40px, 7vh, 88px); align-items: start; }
.two-col--wide { grid-template-columns: 1fr 1.4fr; }

.pull {
  margin: clamp(56px, 10vh, 120px) 0;
  font-family: var(--font-display); font-variation-settings: "wdth" 80, "wght" 600;
  font-size: clamp(28px, 4.2vw, 64px); line-height: 1.12; letter-spacing: -.025em;
  max-width: 24ch;
}
.pull .line { padding-bottom: .08em; margin-bottom: -.08em; }
.pull em { color: var(--cobalt); font-size: 1.05em; }

/* ── Research ── */
.goals { counter-reset: goal; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.goals li { counter-increment: goal; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.4; }
.goals li::before { content: counter(goal, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--cobalt); padding-top: .25em; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.stats .stat__num { font-size: clamp(48px, 5.5vw, 88px); }
.stats .stat__num::after { content: ""; }

.findings { counter-reset: none; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.finding {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--soft);
}
.finding__num {
  font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900;
  font-size: 48px; line-height: .8; color: var(--cobalt);
}
.finding p { font-size: 16px; line-height: 1.45; }

.personas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.persona { border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 18px; background: var(--paper); color: var(--ink); }
.persona__head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.persona__avatar {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cobalt); color: var(--paper);
  font-family: var(--font-display); font-variation-settings: "wdth" 70, "wght" 900; font-size: 26px;
}
.persona__name { font-family: var(--font-display); font-variation-settings: "wdth" 76, "wght" 800; font-size: 26px; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.persona__sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.persona__type { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.persona__quote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.25; }
.persona__bio { font-size: 15px; line-height: 1.5; color: var(--muted); }
.persona__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.persona__cols ul { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.persona__cols li { font-size: 14px; line-height: 1.4; padding-left: 14px; position: relative; }
.persona__cols li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt); }

/* ── Features ── */
.features { border-top: 1px solid var(--line); }
.feature {
  display: grid; grid-template-columns: 60px 1.1fr 1.6fr; gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.feature__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.feature__title { font-family: var(--font-display); font-variation-settings: "wdth" 78, "wght" 800; font-size: clamp(20px, 1.9vw, 28px); text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.feature__desc { font-size: 16px; line-height: 1.5; max-width: 52ch; }

/* ── Design ── */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 4vw, 64px); align-items: center; justify-items: center; margin-bottom: clamp(56px, 9vh, 112px); }
.compare__item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.compare__item figcaption { font-size: 14px; display: flex; gap: 10px; align-items: center; }
.compare__arrow { font-size: clamp(28px, 4vw, 56px); color: var(--cobalt); }

.phone {
  width: clamp(200px, 22vw, 300px); padding: 10px; border-radius: 34px;
  background: var(--ink); box-shadow: 0 30px 60px -24px rgba(16, 16, 18, .45);
}
.phone img { width: 100%; height: auto; border-radius: 24px; display: block; }
.phone--wire { background: #cfcac0; }
.phone--lg { width: clamp(220px, 24vw, 320px); }

.brand { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.brand__type, .brand__color { border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 2.6vw, 36px); }
.brand__type { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 3vw, 48px); align-items: start; }
.brand__aa { font-family: 'Inter', var(--font-display); font-weight: 600; font-size: clamp(72px, 9vw, 150px); line-height: .9; letter-spacing: -.04em; }
.brand__font { font-size: 24px; font-weight: 600; margin: 6px 0 14px; }
.brand__font span { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.type-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.type-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--line); }
.type-table td { padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.type-table tr:last-child td { border-bottom: 0; }
.brand__color { display: flex; flex-direction: column; gap: 14px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.swatches li { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.swatches i { display: block; aspect-ratio: 1; border-radius: 12px; background: var(--c); }
.swatches small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.brand__icons { width: 100%; height: auto; border-radius: 10px; }

/* ── Showcase ── */
.showcase { display: flex; flex-direction: column; gap: clamp(56px, 10vh, 128px); margin-bottom: clamp(56px, 9vh, 112px); }
.showcase__row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.showcase__row .phone, .showcase__row .stack { justify-self: center; }
.showcase__row--flip .showcase__copy { order: 2; }
.showcase__copy .label { display: block; margin-bottom: 14px; }
.showcase__copy p { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; max-width: 44ch; }
.stack { width: min(100%, 560px); }
.stack img { width: 100%; height: auto; }

/* ── Reflection ── */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: clamp(32px, 5vh, 56px) 0 clamp(56px, 9vh, 112px); }
.csec--dark .btn { background: var(--paper); color: var(--ink); }
.csec--dark .btn--ghost { background: transparent; color: var(--paper); border-color: rgba(241, 237, 228, .3); }
.csec--dark .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.next {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(28px, 4vh, 48px) 0 0; border-top: 1px solid var(--line);
}
.next__title {
  font-family: var(--font-display); font-variation-settings: "wdth" 66, "wght" 900;
  text-transform: uppercase; letter-spacing: -.03em; line-height: .85;
  font-size: clamp(48px, 9vw, 150px);
  transition: transform .7s var(--ease-io);
}
.next:hover .next__title { transform: translateX(16px); }
.next__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .chero__grid, .two-col, .two-col--wide, .findings, .personas, .brand, .showcase__row { grid-template-columns: 1fr; }
  .showcase__row--flip .showcase__copy { order: 0; }
  .feature { grid-template-columns: 44px 1fr; }
  .feature__desc { grid-column: 2; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
  .stats .stat__num { font-size: clamp(36px, 8vw, 56px); }
}
@media (max-width: 640px) {
  .chero__title { font-size: min(21vw, 120px); }
  .chero__meta { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare__arrow { transform: rotate(90deg); }
  .persona__head { grid-template-columns: auto 1fr; }
  .persona__type { grid-column: 1 / -1; justify-self: start; }
  .persona__cols { grid-template-columns: 1fr; }
  .brand__type { grid-template-columns: 1fr; }
  .stage { padding: 12px; border-radius: 14px; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
}

/* ── Screen explorer (Mindful Finance) ── */
.explorer { border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--ink); color: var(--paper); }
.explorer__tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid rgba(241, 237, 228, .14); }
.explorer__tabs .seg__btn { border: 1px solid rgba(241, 237, 228, .2); }
.explorer__tabs .seg__btn.is-on { border-color: var(--paper); }
.explorer__body { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.explorer__shot { display: grid; place-items: center; padding: clamp(24px, 4vw, 56px); background: rgba(241, 237, 228, .03); border-right: 1px solid rgba(241, 237, 228, .14); }
.explorer__shot .phone { background: rgba(241, 237, 228, .12); }
.explorer__shot .stack { width: min(100%, 520px); }
.explorer__notes { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; gap: 16px; }
.explorer__title { font-family: var(--font-display); font-variation-settings: "wdth" 76, "wght" 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .95; font-size: clamp(26px, 2.8vw, 40px); }
.explorer__list { counter-reset: n; display: flex; flex-direction: column; border-top: 1px solid rgba(241, 237, 228, .14); }
.explorer__list li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(241, 237, 228, .14); font-size: 15px; line-height: 1.45; }
.explorer__list li::before { content: counter(n, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--cobalt); padding-top: .2em; }
.explorer__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.explorer__persona { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(241, 237, 228, .6); }
.explorer + .stage { margin-top: clamp(40px, 6vh, 72px); }
.csec--dark .stage { background: #0a0a0c; border-color: rgba(241, 237, 228, .14); }
.csec--dark .stage img { opacity: .96; }
@media (max-width: 960px) {
  .explorer__body { grid-template-columns: 1fr; }
  .explorer__shot { border-right: 0; border-bottom: 1px solid rgba(241, 237, 228, .14); }
}

/* ── Site map (Mindful Finance) ── */
.sitemap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 2.6vw, 36px); }
.sitemap__col { display: flex; flex-direction: column; gap: 24px; }
.branch__head {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
}
.branch__head small { font-size: 10px; letter-spacing: .1em; opacity: .6; text-transform: none; }
.branch ul { margin-left: 12px; padding-left: 16px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.branch li { position: relative; font-size: 14px; line-height: 1.35; padding: 7px 0; }
.branch li::before { content: ""; position: absolute; left: -16px; top: 1.05em; width: 10px; height: 1px; background: var(--line); }
.branch__sub { font-family: var(--font-mono); font-size: 11px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 12px !important; }
.branch__sub ul { margin-top: 6px; font-family: var(--font-display); text-transform: none; letter-spacing: 0; color: var(--fg); }
.branch__sub ul li { font-size: 14px; }
.branch--muted .branch__head { background: transparent; color: var(--fg); border: 1px dashed var(--line); }
.branch--muted li { color: var(--muted); }
.sitemap + .two-col { margin-top: clamp(48px, 8vh, 96px); }
.flow__decide { stroke: var(--cobalt) !important; }
.flow__legend rect, .flow__legend path { fill: var(--bg); stroke: var(--fg); stroke-width: 1.5; }
.flow__legend text { fill: var(--muted); }
@media (max-width: 960px) { .sitemap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .sitemap { grid-template-columns: 1fr; } }

/* ── Device compositions (transparent phone cut-outs) ── */
.devices {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: end;
  gap: clamp(6px, 2vw, 32px);
  padding: clamp(24px, 6vh, 72px) clamp(4px, 5vw, 96px) 0;
}
.devices::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: 22%; bottom: 4%;
  border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, rgba(35, 56, 255, .38), rgba(35, 56, 255, .12) 55%, transparent 78%);
  filter: blur(44px);
}
.devices--dark::before { background: radial-gradient(closest-side, rgba(35, 56, 255, .5), rgba(35, 56, 255, .16) 55%, transparent 78%); }
.devices__phone { position: relative; z-index: 1; width: 100%; height: auto; will-change: transform; }
.devices__phone--lead { z-index: 2; width: 108%; margin-left: -4%; margin-bottom: 7%; }
.devices__cap { grid-column: 1 / -1; position: relative; z-index: 1; margin-top: 20px; }
@media (max-width: 640px) { .devices { padding-left: 0; padding-right: 0; } .devices__phone--lead { width: 112%; margin-left: -6%; } }
