/* =========================================================
   Case study template styles — shared by every work-*.html page.
   Change things here and every case study updates together.
   Fonts (load in each page's <head>):
     Inter, Kalam, Permanent Marker, Poppins 600/700
   ========================================================= */

:root {
  --cream: #F8F4EC;
  --ink: #1B1B22;
  --accent: #7C5FC4;
  --highlight-bg: #D0BBFA;
  --plum: #372B52;
  --card-radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--accent);
  text-decoration: none;
  font: 600 0.95rem/1.6 Inter, sans-serif;
}
.back-link:hover { text-decoration: underline; }

.card {
  background: #FFFFFF;
  border-radius: var(--card-radius);
  box-shadow: 0 20px 50px -20px rgba(27, 27, 34, 0.18);
  padding: 56px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .card { padding: 32px 24px; }
}

/* Eyebrow */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

/* H1 */
h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

/* Hook line */
.hook {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 400;
  max-width: 640px;
  margin: 0 0 40px;
  color: var(--ink);
}

.highlight {
  font-family: 'Kalam', cursive;
  font-weight: 700;
  background: var(--highlight-bg);
  padding: 2px 10px 4px;
  display: inline-block;
  transform: rotate(-1deg);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

/* Snapshot bar — one row on desktop, thin dividers between items.
   Add class "snapshot-item--wide" to an item with long text (e.g. Collaborators). */
.snapshot {
  display: flex;
  border-top: 1px solid rgba(27, 27, 34, 0.1);
  border-bottom: 1px solid rgba(27, 27, 34, 0.1);
  margin-bottom: 48px;
}
.snapshot-item {
  flex: 1 1 0;
  min-width: 0;
  padding: 18px 16px;
  border-left: 1px solid rgba(27, 27, 34, 0.1);
}
.snapshot-item:first-child { padding-left: 0; border-left: none; }
.snapshot-item:last-child { padding-right: 0; }
.snapshot-item--wide { flex-grow: 2; }

.snapshot-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(27, 27, 34, 0.5);
  margin-bottom: 4px;
}
.snapshot-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .snapshot { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; padding: 6px 0; }
  .snapshot-item { padding: 12px 0; border-left: none; }
  .snapshot-item--wide { grid-column: 1 / -1; }
}

/* Hero image placeholder */
.hero-placeholder {
  border: 2px dashed rgba(124, 95, 196, 0.35);
  border-radius: 16px;
  background: rgba(124, 95, 196, 0.05);
  padding: 64px 24px;
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 48px;
}
.hero-placeholder span {
  display: block;
  font-weight: 400;
  color: rgba(27, 27, 34, 0.55);
  margin-top: 6px;
  font-size: 0.85rem;
}

/* Hero image */
.hero-image { margin: 0 0 48px; }
.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(27, 27, 34, 0.08);
}

/* Athlete app phone row */
/* Web screens in browser frames (make them with tools/browser-mockup.py).
   One large screen on top, an optional pair underneath. */
.screen-row {
  margin: 0 0 48px;
  background: var(--cream);
  border-radius: 16px;
  padding: 28px 20px 28px;
}
.screen img { display: block; width: 100%; height: auto; }
.screen p {
  margin: 0 auto;
  max-width: 460px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(27, 27, 34, 0.65);
}
.screen p strong { color: var(--ink); }
.screen-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}
.screen-row figcaption {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(27, 27, 34, 0.55);
}
@media (max-width: 640px) {
  .screen-row { padding: 20px 8px; }
  .screen-pair { grid-template-columns: 1fr; gap: 20px; }
}

.phone-row {
  margin: 0 0 48px;
  background: var(--cream);
  border-radius: 16px;
  padding: 36px 28px 28px;
}
.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.phone { text-align: center; min-width: 0; }
.phone img { display: block; width: 100%; height: auto; margin: 0 auto 8px; }
.phone p {
  margin: 0 auto;
  max-width: 200px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(27, 27, 34, 0.65);
}
.phone p strong { color: var(--ink); }
.phone-row figcaption {
  margin-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(27, 27, 34, 0.55);
}
@media (max-width: 640px) {
  .phone-row { padding: 28px 16px 20px; }
  .phones { grid-template-columns: 1fr; gap: 28px; }
  .phone img { max-width: 260px; }
}

/* Section headings */
h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 16px;
}

section.block { margin-bottom: 48px; }
section.block p { margin: 0 0 16px; }
section.block p:last-child { margin-bottom: 0; }

ul.actions {
  margin: 20px 0 0;
  padding-left: 20px;
}
ul.actions li {
  margin-bottom: 10px;
  padding-left: 4px;
}
ul.actions strong { font-weight: 700; }

/* Outcome stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* numbers stay on one line */
  gap: 0;
  margin: 24px 0 20px;
}
.stat { min-width: 0; padding: 0 20px; border-left: 1px solid #EEE9DD; } /* thin divider, matches Certification page */
.stat:first-child { padding-left: 0; border-left: none; }
.stat:last-child { padding-right: 0; }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .stat { padding: 0; border-left: none; }
}
.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.85rem;
  color: rgba(27, 27, 34, 0.65);
  margin-top: 4px;
}
.caveat {
  font-size: 0.95rem;
  color: rgba(27, 27, 34, 0.75);
  border-left: 3px solid var(--highlight-bg);
  padding-left: 16px;
  margin-top: 24px;
}
.held-back {
  font-size: 0.85rem;
  color: rgba(27, 27, 34, 0.5);
  font-style: italic;
  margin-top: 16px;
}

/* Decision block — high contrast */
.decision-block {
  background: var(--plum);
  color: var(--cream);
  border-radius: 16px;
  padding: 40px 40px;
  margin-bottom: 48px;
}
@media (max-width: 640px) {
  .decision-block { padding: 32px 24px; }
}
.decision-block h2 {
  /* small lavender label, so it reads differently from the bold .lead line below it */
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--highlight-bg);
  margin-bottom: 12px;
}
.decision-block p {
  color: rgba(248, 244, 236, 0.92);
  margin: 0 0 16px;
}
.decision-block p:last-child { margin-bottom: 0; }

.decision-block .lead {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--cream);
}

/* Two-up figures (diagrams, journey maps) with captions */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 48px;
}
.figure-grid figure { margin: 0; }
.figure-grid img { display: block; width: 100%; height: auto; border-radius: 16px; }
.figure-grid .placeholder-tile {
  border-radius: 16px;
  background: #F4EFE3;
  padding: 28px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #9C9A8E;
}
.figure-grid figcaption {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(27, 27, 34, 0.65);
}
@media (max-width: 640px) {
  .figure-grid { grid-template-columns: 1fr; }
}

/* What's next */
.whats-next p { margin: 0; }

/* Shared site header + footer (copied from styles.css so it matches every page) */
.site-header { display: flex; justify-content: space-between; align-items: center; padding: 48px 100px 0; }
.name-mark { font: 400 22px 'Permanent Marker', cursive; color: oklch(25% 0.03 260); text-decoration: none; }
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a { font: 600 13px Inter, sans-serif; color: rgba(0,0,0,.5); text-decoration: none; }
.site-nav a.active { color: oklch(25% 0.03 260); border-bottom: 2px solid oklch(75% 0.12 300); padding-bottom: 2px; }
.site-footer { margin-top: 72px; padding: 32px 100px; border-top: 1px solid rgba(0,0,0,.08); display: flex; justify-content: space-between; align-items: center; }
.copyright { font: 400 13.5px Inter, sans-serif; color: rgba(0,0,0,.45); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font: 600 13px Inter, sans-serif; color: oklch(25% 0.03 260); text-decoration: none; }
@media (max-width: 960px) {
  .site-header { padding: 32px 28px 0; flex-wrap: wrap; gap: 16px; }
  .site-footer { padding: 28px 28px; }
}
