/*
 * Apex — case-study subpages (/work/{slug}/).
 * Geometry measured pixel-for-pixel from the exported Figma frame
 * "Wireframe - Work - Blizzard" (1999px): hero ~43.5vw tall with a background
 * video, a blend-mode display title left-aligned at the gutter and a three-up
 * meta row (year / category / client) low in the frame; copy blocks whose text
 * column starts at ~27% with a ~52rem measure; a full-bleed 16:9-labelled video
 * placeholder (#151515); then contact + footer (shared home sections).
 */

/* --------------------------------------------------------------- Hero */

.apex-cs-hero {
  position: relative;
  isolation: isolate; /* keeps the title blend inside the hero */
  min-height: max(34rem, 43.5vw); /* 870px at the 1999px design width */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: 6rem clamp(2.5rem, 4.5vw, 5.5rem); /* ~90px bottom, measured */
  padding-inline: clamp(1.5rem, 5.5vw, 7rem); /* title left ~110px, measured */
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.apex-cs-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
}

.apex-cs-hero__media img,
.apex-cs-hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apex-cs-hero__inner {
  display: grid;
  gap: clamp(1rem, 1.4vw, 1.5rem);
}

.apex-cs-hero__title {
  /* Centred over the video (pixel-measured: title centre ≈ frame centre). Fits
     "BLIZZARD, WORLD OF WARCRAFT" on one line; the frame's display type is
     tracked in tightly (~-0.035em), which lets the full title span the width. */
  text-align: center;
  font-size: clamp(2.5rem, 5.3vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  background: var(--apex-metallic);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  mix-blend-mode: exclusion; /* video shows through, hue shifts with footage */
}

.apex-cs-hero__meta {
  /* Year : Category : Client split 1 : 3 : 1; the whole row is capped to the
     overview copy measure and centred, with each cell's label+value centred. */
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.apex-cs-hero__meta-label {
  font-size: 0.75rem;
  line-height: 1.3333;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.apex-cs-hero__meta-value {
  font-size: 0.9375rem;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

/* -------------------------------------------------------- Copy blocks */

.apex-cs-info {
  /* Wider rail than the home sections: copy column starts at ~29%. */
  grid-template-columns: minmax(11rem, 29%) minmax(0, 1fr);
  padding-block: clamp(1.4rem, 1.9vw, 2rem); /* ~40px → roomier gaps between blocks */
}

/* Generous breathing room between the hero video and the first copy block,
   matching the frame (~150px at the design width). */
.apex-cs-hero + .apex-cs-info {
  padding-top: clamp(4rem, 7vw, 9rem);
}

/* Large gap below the last copy block (Outcomes) before the contact section —
   ~266px to "Get in touch" in the frame. */
.apex-cs-info:last-of-type {
  padding-bottom: clamp(5rem, 10vw, 13rem);
}

.apex-cs-info__title {
  font-size: clamp(1.375rem, 1.45vw, 1.6875rem); /* ~27px, measured in Figma */
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: clamp(0.4rem, 0.5vw, 0.6rem);
}

.apex-cs-info__text {
  max-width: 52rem; /* ~828px measure, measured in the frame */
  font-size: 0.875rem; /* ~14px, measured in Figma */
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #c2c2c2; /* measured in Figma */
}

/* --------------------------------------------------- Video placeholder */

.apex-cs-video {
  /* Full-bleed band of two placeholders: a 1:1 square (722px) and a ~16:9 box
     (1266px), split with an ~11px gutter — pixel-measured in the frame. Equal
     column ratios keep both boxes the same height. */
  display: grid;
  grid-template-columns: 1fr 1.753fr;
  gap: clamp(0.5rem, 0.55vw, 0.75rem);
  margin-block: clamp(1.5rem, 2.4vw, 3rem); /* ~48px, keeps ~71px to next heading */
}

.apex-cs-video__box {
  display: grid;
  place-items: center;
  background: #151515; /* measured in Figma */
}

.apex-cs-video__box--square { aspect-ratio: 1 / 1; }
.apex-cs-video__box--wide { aspect-ratio: 1753 / 1000; }

.apex-cs-video__label {
  font-size: clamp(0.75rem, 1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  padding-inline: 1rem;
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 960px) {
  .apex-cs-info {
    grid-template-columns: 1fr;
  }

  .apex-cs-hero__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 3rem;
    width: auto;
    margin-inline: 0;
  }

  .apex-cs-hero__meta-value {
    white-space: normal; /* let the long category value wrap on narrow screens */
  }

  .apex-cs-video {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
