/* ==========================================================================
   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: 2.25rem; /* ~36px desktop */
}

@media (max-width: 768px) {
  .section__head {
    margin-bottom: 1.5rem; /* ~24px mobile */
  }
}
.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; }

/* Clean up decorative gradient blobs from content sections */
.bg-mesh__blob--static { display: none !important; }
.section .bg-mesh { display: none !important; }

/* ==========================================================================
   Section Divider — Elegant, minimal, brand-colored divider between major sections
   ========================================================================== */
.section-divider {
  display: block;
  width: min(520px, 75vw);
  height: 2px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent 0%, rgba(63, 141, 254, 0.25) 20%, var(--brand-indigo) 50%, rgba(63, 141, 254, 0.25) 80%, transparent 100%);
  border-radius: var(--radius-full);
  pointer-events: none;
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .section-divider {
  background: linear-gradient(90deg, transparent 0%, rgba(63, 141, 254, 0.35) 20%, var(--brand-indigo) 50%, rgba(63, 141, 254, 0.35) 80%, transparent 100%);
}

/* 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: #3F8DFE; }
.bg-mesh__blob--violet { background: #1D6AE5; }
.bg-mesh__blob--aqua { background: #A1C8F3; }
.bg-mesh__blob--pink { background: #93C5FD; }

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