/**
 * Reset, container, and section rhythm. Mobile-first: base rules target
 * mobile, breakpoints add complexity going up.
 */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html, body {
  height: 100%;
}

body {
  background: var(--color-bg);
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
}

/* Content container — max-width per spec, fluid gutters below it */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container-narrow {
  width: 100%;
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 768px) {
  .container, .container-narrow {
    padding-inline: var(--space-8);
  }
}

/* Section rhythm — consistent vertical spacing between every section on every page */
.section {
  padding-block: var(--space-16);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-24);
  }
}

.section-tight {
  padding-block: var(--space-10);
}

@media (min-width: 768px) {
  .section-tight {
    padding-block: var(--space-16);
  }
}

.section-bg {
  background: var(--color-bg-secondary);
}

.section-dark {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
}

/* typography.css sets color directly on h1-h6 (not just via inheritance), so it
   always wins over .section-dark's inherited color unless overridden explicitly
   here too — this is what was making dark-band headings nearly invisible. */
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: var(--color-dark-text);
}

.section-dark .text-body,
.section-dark .text-small,
.section-dark .text-lead {
  color: var(--color-dark-text-secondary);
}

.section-dark .text-eyebrow {
  color: #93c5fd;
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* Two-column alternating layout (image + text), used across feature sections */
.split {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
  /* Gives the visual side more room — used sparingly, for the sections
   * meant to feel like the flagship/widest compositions on the page. */
  .split-wide {
    grid-template-columns: 0.85fr 1.15fr;
  }
  .split-reverse {
    direction: rtl;
  }
  .split-reverse > * {
    direction: ltr;
  }
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-inline: auto;
}
