/* For:Human — case page (built by scripts/build-work-pages.py from content/cases.json).
   Layout of the reference case pages, measured at 1440px: a full-width banner (video or image),
   a two-column info band in a 1280px container (client / project / tags on the left, context on
   the right, 112px above and below), then the case sections: image grids of 1–6 columns and
   video groups on a 20px gap, and text blocks centred at up to 1200px with 86px of air.
   Type is the For:Human scale (Inter). Class names match what src/forhuman-app.ts
   animates (.case-banner-section, .case-info-container, .case-section-list-wrapper). */
.fh-case {
  --fhc-gutter: clamp(16px, 5.56vw, 80px);
  --fhc-gap: 20px;
  --fhc-ink: #0a0a0a;
  --fhc-muted: #8a8a96;
  display: block;
  background: var(--fh-page);
  color: var(--fhc-ink);
  font-family: var(--font-ui);
}

/* ---------------------------------------------------------------- banner */
.fh-case .case-banner-section { position: relative; background: #0a0a0a; }
/* a fixed 16:9 frame (up to the viewport height), so the page keeps its shape while the media loads */
.fh-case .case-banner-wrapper { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 100vh; overflow: hidden; }
.fh-case .case-banner-media { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.fh-case .case-banner-wrapper.is-vimeo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------------------------------------------------------- info band */
.fh-case .case-info-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 112px var(--fhc-gutter);
  box-sizing: content-box;
}
.fh-case .case-info-wrapper { display: flex; flex-direction: column; gap: 36px; }
.fh-case .case-info-title { margin: 0 0 8px; color: var(--fhc-muted); font-size: 17px; line-height: 1.2; font-weight: 400; }
.fh-case .case-info-text { font-size: clamp(32px, 3.33vw, 48px); line-height: 1.07; font-weight: 600; letter-spacing: -0.02em; }
.fh-case .case-tag-list { display: flex; flex-wrap: wrap; gap: 12px 24px; max-width: 80%; margin: 0; padding: 6px 0 0; list-style: none; }
.fh-case .case-tag { color: var(--fhc-muted); font-size: 13px; line-height: 1.25; }
.fh-case .case-description-wrapper { display: flex; flex-direction: column; }
.fh-case .case-context-text { font-size: 16px; line-height: 30px; }
.fh-case .case-context-text p { margin: 0 0 10px; }

/* ---------------------------------------------------------------- sections */
.fh-case .case-section { padding: 0 var(--fhc-gutter); }
.fh-case .case-section-container { display: flex; flex-direction: column; max-width: 1280px; margin: 0 auto; }
.fh-case .case-block { padding: 10px 0; }
.fh-case .case-images-list,
.fh-case .case-video-group { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: var(--fhc-gap); }
.fh-case .case-image { display: block; width: 100%; height: auto; }
/* in multi-column grids the images share the row's height */
.fh-case .case-images-list:not([data-cols="1"]) .case-image { height: 100%; object-fit: cover; }
.fh-case .case-video-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #0a0a0a; }
.fh-case .case-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fh-case .case-video-self { display: block; width: 100%; height: auto; }
.fh-case .case-text-block { max-width: 1200px; margin: 0 auto; padding: 86px 0; font-size: 16px; line-height: 30px; }
.fh-case .case-text-block p { margin: 0 0 10px; }
.fh-case .case-text-block h2,
.fh-case .case-text-block h3 { margin: 0 0 16px; font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }

/* text blocks with a label and a title (eyebrow + h2) */
.fh-case .case-eyebrow { margin: 0 0 14px !important; color: var(--fh-blue, #0082ff); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.fh-case .case-text-block .case-eyebrow + h2 { max-width: 26ch; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.fh-case .case-text-block > p { max-width: 76ch; }

/* the roadmap: a section that holds one becomes a full-width dark band (it is the decision the
   case is about), the waves as cards with the first one lit, the gates as diamonds between them */
.fh-case .case-section:has(.case-roadmap) { margin: 72px 0; padding-top: 96px; padding-bottom: 72px; background: radial-gradient(80% 60% at 30% 0%, #10204a 0%, #070b18 60%, #05070d 100%); color: #eef1f7; }
.fh-case .case-section:has(.case-roadmap) .case-eyebrow { color: #7fb0ff; }
.fh-case .case-section:has(.case-roadmap) .case-text-block > p { color: rgba(238, 241, 247, 0.72); }
.fh-case .case-section:has(.case-roadmap) .case-image { border-radius: 16px; }
.fh-case .case-roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 48px 0 0; padding: 0; list-style: none; }
.fh-case .case-wave { display: flex; flex-direction: column; padding: 26px 24px 18px; border: 1px solid rgba(238, 241, 247, 0.14); border-radius: 20px; background: rgba(255, 255, 255, 0.03); }
.fh-case .case-wave.is-first { border-color: transparent; background: #1f63f4; }
.fh-case .case-wave-num { color: rgba(238, 241, 247, 0.6); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.fh-case .case-wave strong { margin-top: 10px; font-size: clamp(24px, 2.2vw, 32px); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; }
.fh-case .case-wave small { margin-top: 6px; color: rgba(238, 241, 247, 0.6); font-family: var(--font-mono); font-size: 12px; }
.fh-case .case-wave ul { margin: 22px 0 0; padding: 0; list-style: none; }
.fh-case .case-wave ul li { padding: 11px 0; border-top: 1px solid rgba(238, 241, 247, 0.14); font-size: 15px; line-height: 1.35; }
.fh-case .case-wave.is-first ul li { border-color: rgba(255, 255, 255, 0.28); }
.fh-case .case-gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 28px 0 0; padding: 0 12.5%; list-style: none; text-align: center; }
.fh-case .case-gates li { display: grid; justify-items: center; gap: 12px; color: rgba(238, 241, 247, 0.7); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.fh-case .case-gates i { width: 12px; height: 12px; background: #eef1f7; transform: rotate(45deg); }

/* credits at the end of a case */
.fh-case .case-credits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--fhh-line, rgba(10, 10, 10, 0.12)); }
.fh-case .case-credits dt { color: var(--fhc-muted); font-size: 14px; line-height: 1.4; }
.fh-case .case-credits dd { margin: 6px 0 0; font-size: 16px; font-weight: 500; line-height: 1.5; }

/* ---------------------------------------------------------------- back to Work */
.fh-case .case-back-arrow-wrapper { display: flex; justify-content: center; padding: 96px var(--fhc-gutter) 160px; }
.fh-case .case-back-link { display: inline-flex; align-items: center; gap: 10px; color: var(--fhc-ink); font-size: 18px; text-decoration: none; }
.fh-case .case-back-link svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.fh-case .case-back-link:hover svg { transform: translateX(-4px); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 991px) {
  .fh-case .case-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-case .case-gates { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0; }
  .fh-case .case-credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-case .case-info-container { grid-template-columns: minmax(0, 1fr); padding-top: 72px; padding-bottom: 72px; }
  .fh-case .case-images-list:not([data-cols="1"]),
  .fh-case .case-video-group:not([data-cols="1"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .fh-case { --fhc-gap: 12px; }
  .fh-case .case-images-list,
  .fh-case .case-video-group { grid-template-columns: minmax(0, 1fr); }
  .fh-case .case-text-block { padding: 48px 0; }
  .fh-case .case-tag-list { max-width: none; }
  .fh-case .case-roadmap { grid-template-columns: minmax(0, 1fr); }
  .fh-case .case-section:has(.case-roadmap) { margin: 40px 0; padding-top: 56px; padding-bottom: 40px; }
}

/* a headline result inside a text block */
.fh-case .case-stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 36px; padding: 32px 0; border-top: 1px solid var(--fhh-line, rgba(10, 10, 10, 0.12)); border-bottom: 1px solid var(--fhh-line, rgba(10, 10, 10, 0.12)); }
.fh-case .case-stat strong { color: #1f63f4; font-size: clamp(64px, 9vw, 140px); font-weight: 400; line-height: 0.9; letter-spacing: -0.05em; }
.fh-case .case-stat span { max-width: 340px; color: var(--fhc-muted); font-size: 18px; line-height: 1.45; }
