/* ============================================================
   M-Corp case study — page-specific styles
   Shared reset/tokens/header/footer live in assets/css/style.css.
   This file only adds this page's own accent tokens, spacing
   scale, and layout.
   ============================================================ */

:root {
  --case: #FF9662;
  --case-soft: #FFE3CE;

  /* Spacing scale — used consistently for every vertical rhythm on the page */
  --sp-2: 8px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 40px;
  --sp-7: 48px;
  --sp-8: 64px;
}

p, h1, h2, .dek, .close-quote, .impact-block p {
  text-wrap: pretty;
}

/* This case study runs a narrower column than the home page */
.wrap { max-width: 720px; }
.header-inner { max-width: 720px; }
footer.site { max-width: 720px; }

.back-link { gap: var(--sp-2); }

/* Hero */
.case-hero { padding: var(--sp-8) 0 var(--sp-2); }
.case-eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--case); margin: 0 0 var(--sp-3);
}
.case-hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 6vw, 54px);
  line-height: 1.1; margin: 0 0 var(--sp-3);
}
.case-hero .dek {
  font-family: var(--sans); font-weight: 400; font-size: clamp(17px, 2vw, 19px);
  color: var(--muted); max-width: 42ch; margin: 0 0 var(--sp-7); line-height: 1.5;
}

.meta-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4) var(--sp-5);
  padding: var(--sp-5) 0 var(--sp-6); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-8);
}
.meta-item .label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin: 0 0 6px;
}
.meta-item .value { font-size: 15px; margin: 0; }

/* Photo blocks — every variant shares the same outer rhythm:
   margin-top creates the gap from the content above; the block is always
   the last element in its section, so the section's own padding-bottom
   (not a margin-bottom here) creates the gap to whatever follows. */

.task-photo-pair,
.task-photo-stack,
.task-photo-combo,
.task-photo-single {
  margin-top: var(--sp-6); padding: var(--sp-5) var(--sp-3);
  background: var(--surface); border-radius: 4px;
}

.task-photo-pair {
  display: flex; gap: var(--sp-4); justify-content: center; align-items: flex-start; flex-wrap: wrap;
}
.task-photo-pair img {
  width: 220px; max-width: 100%; display: block; border-radius: 0;
  box-shadow: 0 12px 28px -8px rgba(32, 31, 27, 0.28), 0 0 0 1px rgba(32,31,27,0.05);
}
.task-photo-pair.three img { width: 190px; }

.task-photo-stack {
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.task-photo-stack img {
  width: 100%; max-width: 100%; display: block; border-radius: 0;
  aspect-ratio: 2.8/1; object-fit: cover; object-position: top;
  box-shadow: 0 12px 28px -8px rgba(32, 31, 27, 0.28), 0 0 0 1px rgba(32,31,27,0.05);
}

.task-photo-combo {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-4);
}
.task-photo-combo img {
  display: block; width: 100%; max-width: 100%; border-radius: 0;
  box-shadow: 0 12px 28px -8px rgba(32, 31, 27, 0.28), 0 0 0 1px rgba(32,31,27,0.05);
}
.task-photo-combo img.mobile-shot { width: 260px; max-width: 70%; }

.task-photo-combo.row {
  flex-direction: row; align-items: flex-start; justify-content: center; flex-wrap: wrap;
}
.task-photo-combo.row img { width: auto; }
.task-photo-combo.row img:not(.mobile-shot) { flex: 1 1 300px; max-width: 100%; }
.task-photo-combo.row img.mobile-shot { flex: 0 0 auto; width: 190px; max-width: 40%; }

.task-photo-single {
  display: flex; justify-content: center;
}
.task-photo-single img {
  width: 100%; display: block; border-radius: 0;
  box-shadow: 0 12px 28px -8px rgba(32, 31, 27, 0.28), 0 0 0 1px rgba(32,31,27,0.05);
}

.device-mockup {
  position: relative;
  width: 100%;
  padding: var(--sp-7) var(--sp-4) var(--sp-8);
  margin-bottom: var(--sp-8);
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}
.device-mockup .desktop-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 48px -16px rgba(32, 31, 27, 0.28), 0 0 0 1px rgba(32,31,27,0.06);
  overflow: hidden;
}
.device-mockup .desktop-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: #F5F5F2; border-bottom: 1px solid var(--line);
}
.device-mockup .desktop-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #D7D5CB; }
.device-mockup .desktop-bar .url {
  margin-left: 10px; font-size: 11px; color: var(--muted); background: #fff;
  border-radius: 20px; padding: 3px 12px; border: 1px solid var(--line);
}
.device-mockup .desktop-frame img {
  display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top;
}
.device-mockup .phone-frame {
  position: absolute;
  right: 8%;
  bottom: 16px;
  width: 160px;
  filter: drop-shadow(0 20px 32px rgba(32, 31, 27, 0.32));
}
.device-mockup .phone-frame img {
  display: block; width: 100%; height: auto;
}

/* Prose sections */
section.block { padding-bottom: var(--sp-8); }
section.block h2.section-title {
  font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 var(--sp-4);
}
section.block p { margin: 0 0 var(--sp-3); max-width: 62ch; }
section.block p.muted { color: var(--muted); }

/* Task sections */
.task {
  padding: var(--sp-8) 0; border-top: 1px solid var(--line);
}
.task:first-of-type { border-top: none; padding-top: 0; }
.task-label {
  font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--text); margin: 0 0 var(--sp-5);
}
.task-label span { color: var(--case); font-style: normal; font-weight: 600; font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase; display: block; margin-bottom: var(--sp-2); }

.subhead {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin: 0 0 var(--sp-3); display: flex; align-items: center; gap: 10px;
}
.subhead::before { content: ""; width: 14px; height: 1px; background: var(--case); display: inline-block; }
.task-part { margin-bottom: var(--sp-5); }
.task-part p { max-width: 62ch; margin: 0 0 var(--sp-3); }
.task-part p:last-child { margin-bottom: 0; }
.task-part:last-of-type { margin-bottom: 0; }

.task-part.decision {
  border-left: 2px solid var(--case); padding-left: var(--sp-4);
}

/* Impact + close */
.impact-block {
  background: var(--surface); border-radius: 2px; padding: var(--sp-6);
}
.impact-block p { max-width: 62ch; margin: 0; }

.close-quote {
  font-family: var(--sans); font-size: 18px;
  line-height: 1.75; max-width: 60ch; margin: 0; color: var(--text);
}

/* Nav footer */
.case-nav {
  padding: var(--sp-6) 0; margin-bottom: var(--sp-3); gap: var(--sp-3);
}
.case-nav a { gap: var(--sp-2); }
.case-nav a:hover { color: var(--case); }

footer.site {
  padding: var(--sp-5) 32px calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  gap: var(--sp-3);
}
.footer-links { gap: var(--sp-4); }

@media (max-width: 640px) {
  .case-hero { padding: 40px 0 8px; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 20px 20px; }
  .impact-block { padding: 28px 24px; }
  .task-part.decision { padding-left: 18px; }

  .task-photo-pair { padding: 24px 12px; gap: 16px; }
  .task-photo-pair img { width: 160px; }
  .task-photo-pair.three img { width: 140px; }

  .device-mockup { padding: 32px 16px 48px; }
  .device-mockup .phone-frame { width: 120px; right: 6%; bottom: 8px; }
}
