/* ---------- AI-Assisted Workflow (Figma 342:1417) ----------
   Three mini case studies. Each opens with a Display/M header (divider to the
   page edge), an eyebrow label + Body/M brief, then image
   blocks across the page margins: 48px below the brief, 24px apart. Projects are
   128px apart. Image labels are eyebrows, 8px above each image. Prompts are
   Body/L with a Signal Orange rule. */

/* Projects run logo edge to About edge (the page margins), like the intro
   copy, and shrink with the screen */
.cs-section.ai-project { max-width: none; }
.cs-intro + .cs-section.ai-project { margin-top: 48px; }
.cs-section.ai-project + .cs-section.ai-project { margin-top: var(--space-3xl); }

.ai-head { margin-right: calc(50% - 50vw); } /* divider runs to the page edge */
.ai-head::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 4px;
  background: var(--signal-orange);
}
.ai-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 48px;
  text-transform: uppercase;
  color: var(--neutral-surface);
}

.ai-label {
  margin: 0 0 var(--space-xs);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.08px;
  text-transform: uppercase;
  color: var(--neutral-hairline);
}

.ai-brief { margin-top: 36px; }
.ai-brief p { margin: 0; font-size: 16px; line-height: 26px; color: var(--neutral-surface); }

.ai-blocks { display: flex; flex-direction: column; gap: var(--space-md); margin-top: 48px; }
.ai-blocks figure { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; margin: 0; }
.cs-section .ai-blocks img { object-fit: cover; }

.ai-prompt p {
  margin: 0;
  padding-left: var(--space-sm);
  border-left: 1px solid var(--signal-orange);
  font-size: 20px;
  line-height: 30px;
  color: var(--neutral-surface);
}

/* Justified row: photos grow by their shape (--ar = w/h) and share a height */
.ai-row { display: flex; gap: var(--space-md); }
.ai-row > figure { flex: var(--ar) 1 0; }
.cs-section .ai-row img { aspect-ratio: var(--ar); }

/* Tall image beside a stack: it fills the stack's height */
.ai-split { display: grid; gap: var(--space-md); }
.ai-split--athlete { grid-template-columns: 504fr 668fr; }
.ai-split--refs { grid-template-columns: 321fr 851fr; }
.ai-stack { display: flex; flex-direction: column; gap: var(--space-md); }
.ai-stack > figure { flex: 1 1 0; }
.ai-fill { position: relative; flex: 1 1 auto; min-height: 0; }
.cs-section .ai-fill > img { position: absolute; inset: 0; width: 100%; height: 100%; }

.ai-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.cs-section .ai-pair img { aspect-ratio: var(--ar); }
.ai-half { width: calc((100% - var(--space-md)) / 2); }
.cs-section .ai-half img { aspect-ratio: 4 / 5; }

@media (max-width: 640px) {
  .cs-section.ai-project + .cs-section.ai-project { margin-top: var(--space-2xl); }
  .ai-title { font-size: 32px; line-height: 36px; }
  .ai-brief { margin-top: var(--space-md); }
  .ai-blocks { gap: var(--space-sm); margin-top: var(--space-lg); }
  .ai-prompt p { font-size: 18px; line-height: 26px; }
  .ai-row, .ai-split, .ai-stack, .ai-pair { gap: var(--space-sm); }
  /* Stacks go full width; filled images take their own shape back */
  .ai-split--athlete, .ai-split--refs, .ai-pair { grid-template-columns: 1fr; }
  .ai-fill { aspect-ratio: var(--ar); }
  .ai-split--refs .ai-stack { flex-direction: row; } /* the two references sit side by side */
  .ai-half { width: 100%; }
}

.cs-section .ai-split > figure > img { aspect-ratio: var(--ar); } /* the generated sunglasses square */
