/* Case study layout — shared by every case page.
 * Built on editorial.css tokens; mirrors the portfolio-review deck:
 * eyebrow + serif headline with a coral italic keyword, a five-cell meta row,
 * framed screens with soft shadows, ruled cards, and dark outcome bands.
 */

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 56px; }

/* Breadcrumbs */
.crumbs {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
  padding-top: 40px;
}
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: 0.5; }
.crumbs .here { color: var(--tomato-2); }

/* Hero */
.case-hero { padding-bottom: 64px; }
.case-hero .grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px; align-items: center; margin-top: 56px;
}
.case-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 6.6vw, 112px); line-height: 0.95; letter-spacing: -0.022em;
  margin: 24px 0 28px;
}
.case-hero .dek { font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 540px; margin: 0; }
.case-hero .visual { position: relative; }

/* Meta row */
.meta-row {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.meta-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.meta-row > div { padding: 22px 28px 26px; border-right: 1px solid var(--ink); }
.meta-row > div:last-child { border-right: 0; }
.meta-row .lab { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.meta-row .val { font-size: 16px; line-height: 1.5; color: var(--ink); }

/* Chapters */
.chapter { padding: 104px 0; border-bottom: 1px solid var(--line); }
.chapter.alt { background: var(--paper-2); }
.chapter h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 4.6vw, 72px); line-height: 1.02; letter-spacing: -0.015em;
  margin: 22px 0 0; max-width: 1080px;
}
.chapter h2 i, .case-hero h1 i, .outcome h2 i { color: var(--tomato); }
.lede-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 72px; margin-top: 48px; align-items: start; }
.body { font-size: 18px; line-height: 1.65; color: var(--ink); }
.body p { margin: 0 0 18px; max-width: 580px; }
.body p.soft { color: var(--ink-soft); }
.body ul { margin: 0 0 18px; padding-left: 1.1em; display: flex; flex-direction: column; gap: 10px; max-width: 580px; }
.body strong { font-weight: 500; }
.lede-row > .body:only-child { grid-column: 1 / -1; }
.lede-row > .body:only-child p { max-width: none; }

/* Figures */
.figs { display: grid; gap: 40px 32px; margin-top: 56px; align-items: start; }
.figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figs.two-one { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.figs.one-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.figs .span { grid-column: 1 / -1; }
figure { margin: 0; }
figcaption { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin-top: 16px; max-width: 640px; }
figcaption b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 18px; color: var(--ink); margin-right: 4px; }

/* A framed screen: rounded, soft shadow, holds an image slot */
.shot { position: relative; border-radius: 0; overflow: hidden; background: transparent; box-shadow: none; }
.shot.flat { box-shadow: none; background: transparent; }
.shot image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-16x9 { aspect-ratio: 16 / 9; } .r-16x10 { aspect-ratio: 16 / 10; } .r-3x2 { aspect-ratio: 3 / 2; }
.r-4x3 { aspect-ratio: 4 / 3; } .r-1x1 { aspect-ratio: 1 / 1; } .r-3x4 { aspect-ratio: 3 / 4; }
.r-21x9 { aspect-ratio: 21 / 9; } .r-2x1 { aspect-ratio: 2 / 1; } .r-9x16 { aspect-ratio: 9 / 16; }

/* Browser chrome */
.browser { border-radius: 10px; overflow: hidden; background: #24282E; box-shadow: 0 24px 48px rgba(18, 22, 28, 0.2); }
.browser .chrome { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.browser .chrome span { width: 10px; height: 10px; border-radius: 50%; }
.browser .chrome span:nth-child(1) { background: #FF5F57; }
.browser .chrome span:nth-child(2) { background: #FEBC2E; }
.browser .chrome span:nth-child(3) { background: #28C840; }
.browser .screen { position: relative; background: var(--paper); }
.browser .screen image-slot { position: absolute; inset: 0; width: 100%; height: 100%; --slot-radius: 0; }

/* Phone */
.phone {
  position: relative; width: 248px; aspect-ratio: 248 / 510;
  border: 2px solid #3A424D; border-radius: 42px; background: #1A1E24; padding: 9px;
  box-shadow: 0 24px 48px rgba(18, 22, 28, 0.28);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #000; }
.phone .screen image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone .notch { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); width: 62px; height: 18px; border-radius: 10px; background: #000; z-index: 2; pointer-events: none; }

/* Drip hero composition: browser with a phone overlapping */
.combo { position: relative; padding-right: 120px; padding-bottom: 72px; }
.combo .phone { position: absolute; right: 0; bottom: 0; width: 200px; }

/* Ruled cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 56px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { border-top: 1px solid var(--ink); padding-top: 24px; }
.card .num { font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tomato-2); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; margin: 14px 0 12px; }
.card p, .card li { font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.card p { margin: 10px 0 0; }
.card p.ink { color: var(--ink); }
.card ul { margin: 12px 0 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 10px; }

/* Outcome band (dark, like the deck's closing slides) */
.outcome { background: var(--night); color: var(--night-text); padding: 112px 0; }
.outcome .eyebrow { color: var(--night-soft); }
.outcome .eyebrow .c { color: var(--tomato); }
.outcome .eyebrow::after { background: var(--night-soft); }
.outcome .grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 88px; margin-top: 40px; align-items: start; }
.outcome .pre { font-size: 18px; color: var(--night-soft); margin: 0 0 8px; }
.outcome h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 8.4vw, 144px); line-height: 0.92; letter-spacing: -0.025em; margin: 0; }
.outcome .card { border-top-color: var(--night-line); }
.outcome .card .num { color: var(--tomato); }
.outcome .card p, .outcome .card li { color: var(--night-soft); }
.outcome .shot { margin-top: 40px; background: var(--night-2); }

/* Next case */
.nextcase { display: block; background: var(--paper-2); border-top: 1px solid var(--ink); }
.nextcase .wrap { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.nextcase .label { font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
.nextcase h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 8vw, 120px); line-height: 0.95; letter-spacing: -0.022em; margin: 0; transition: color 0.22s; }
.nextcase .sub { font-size: 17px; color: var(--ink-soft); margin-top: 16px; }
.nextcase .arr { font-family: var(--serif); font-size: 120px; color: var(--tomato); line-height: 1; transition: transform 0.22s; }
.nextcase:hover h2 { color: var(--tomato-2); }
.nextcase:hover .arr { transform: translate(8px, -8px); }

/* Responsive */
@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .case-hero .grid, .lede-row, .outcome .grid { grid-template-columns: 1fr; gap: 40px; }
  .figs.two, .figs.three, .figs.two-one, .figs.one-two, .cards, .cards.two { grid-template-columns: 1fr; }
  .meta-row, .meta-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-row, .meta-row.four { border-bottom: 0; }
  .meta-row > div { padding: 20px 20px 22px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .meta-row > div:nth-child(2n) { border-right: 0; }
  .meta-row > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .chapter { padding: 72px 0; }
  .nextcase .wrap { gap: 16px; padding-top: 56px; padding-bottom: 56px; }
  .nextcase h2 { font-size: clamp(44px, 13vw, 72px); }
  .nextcase .arr { font-size: 56px; }
  .combo { padding-right: 72px; }
  .combo .phone { width: 150px; }
}

@media (max-width: 480px) {
  .meta-row, .meta-row.four { grid-template-columns: 1fr; }
  .meta-row > div, .meta-row > div:nth-child(2n) { border-right: 0; }
}

/* static export: images that were <image-slot> components */
.slot-img{display:block;width:100%;height:100%;object-fit:contain;border-radius:12px}
.shot .slot-img,.browser .screen .slot-img,.phone .screen .slot-img{position:absolute;inset:0}
.browser .screen .slot-img{border-radius:0}
