/* ==========================================================================
   PRISM — Layout primitives
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

/* Sections that host a decorative .bg-mesh must clip it and lift their
   real content into its own stacking context above it. */
.section--glow { overflow: clip; }
.section--glow > .container { position: relative; z-index: 1; }

.section__head {
  max-width: 640px;
  margin-bottom: var(--space-8);
}
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.section__eyebrow { margin-bottom: var(--space-4); }
.section__title { margin-bottom: var(--space-4); }
.section__lead {
  font-size: var(--fs-lead);
  color: var(--ink-500);
  max-width: 52ch;
}

main { display: block; overflow-x: clip; }

/* Generic responsive grids */
.grid { display: grid; gap: var(--space-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .grid--3, .grid--4, .grid--6 { grid-template-columns: 1fr; }
  .section__head--split { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------- */
/* Decorative background blobs (shared canvas behind glass sections)       */
/* ---------------------------------------------------------------------- */
.bg-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-mesh__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
  animation: blobDrift 22s var(--ease-smooth) infinite alternate;
}
[data-theme="dark"] .bg-mesh__blob { opacity: 0.35; }

/* Quieter, static variant used to lightly tint content sections beyond the
   hero — cheaper than the animated hero blobs (no continuous repaint) so
   sprinkling several through the page has no real performance cost. */
.bg-mesh__blob--static { animation: none; opacity: 0.35; }
[data-theme="dark"] .bg-mesh__blob--static { opacity: 0.22; }

/* Reusable size / position / color modifiers for section-level accent blobs */
.bg-mesh__blob--sm { width: 260px; height: 260px; }
.bg-mesh__blob--md { width: 380px; height: 380px; }
.bg-mesh__blob--lg { width: 480px; height: 480px; }
.bg-mesh__blob--tl { top: -10%; left: -8%; }
.bg-mesh__blob--tr { top: -10%; right: -8%; }
.bg-mesh__blob--bl { bottom: -10%; left: -8%; }
.bg-mesh__blob--br { bottom: -10%; right: -8%; }
.bg-mesh__blob--center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.bg-mesh__blob--indigo { background: var(--brand-indigo); }
.bg-mesh__blob--violet { background: var(--brand-violet); }
.bg-mesh__blob--aqua { background: var(--brand-aqua); }
.bg-mesh__blob--pink { background: var(--brand-pink); }

@media (prefers-reduced-motion: reduce) {
  .bg-mesh__blob { animation: none; }
}
