/* ============================================================
   THE FUNNEL UP — Layout System
   Containers, grids, section spacing, responsive breakpoints.
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container--narrow { max-width: var(--container-md); }
.container--wide { max-width: var(--container-2xl); }

/* ── Sections ── */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}
.section--sm { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.section--flush { padding: 0; }

.section--cream { background-color: var(--background); }
.section--white { background-color: var(--surface-white); }

.section--dark { background-color: var(--surface-dark); color: var(--text-inverse); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4, .section--dark p { color: var(--text-inverse); }
.section--dark .text-muted { color: rgba(254, 252, 232, 0.6); }

.section--darker { background-color: var(--surface-darker); color: var(--text-inverse); }
.section--darker h1, .section--darker h2, .section--darker h3, .section--darker h4, .section--darker p { color: var(--text-inverse); }

.section--gradient { background: linear-gradient(135deg, var(--primary), var(--cta)); color: var(--text-inverse); }
.section--gradient h1, .section--gradient h2, .section--gradient h3, .section--gradient h4, .section--gradient p { color: var(--text-inverse); }

.section--accent-strip { background-color: var(--surface-dark); color: var(--text-inverse); padding-top: var(--space-10); padding-bottom: var(--space-10); }

/* ── Grids ── */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(3, 1fr); }

/* ── Flex ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }

/* ── Section Header ── */
.section-header { margin-bottom: var(--space-10); }

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.section--dark .section-label,
.section--gradient .section-label { color: var(--accent-light); }

.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { font-size: var(--fs-md); color: var(--text-light); max-width: 60ch; }
.section-header.text-center p { margin-left: auto; margin-right: auto; }

/* ── Split Layouts ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10); align-items: center; }
.split--60-40 { grid-template-columns: 3fr 2fr; }
.split--40-60 { grid-template-columns: 2fr 3fr; }

/* ── Max Width ── */
.max-w-prose { max-width: 68ch; }
.max-w-narrow { max-width: 48ch; }
/* ── Utilities ── */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.z-10 { z-index: 10; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4, .grid-3, .grid-12 { grid-template-columns: repeat(2, 1fr); }
  .split, .split--60-40, .split--40-60 { grid-template-columns: 1fr; gap: var(--space-8); }
}

@media (max-width: 768px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .grid-4, .grid-3, .grid-2, .grid-12 { grid-template-columns: 1fr; }
  .section-header { margin-bottom: var(--space-8); }
}

@media (max-width: 480px) {
  .container { padding-left: var(--space-3); padding-right: var(--space-3); }
}

/* ── Particle Backgrounds ── */
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.z-10 { position: relative; z-index: 10; }

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
}
