/* ============================================================
   Layout — Container, grid, section spacing
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  .section {
    padding: 60px 0;
  }
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

@media (max-width: 767px) {
  .section__header {
    margin-bottom: 40px;
  }
}

.section__header .accent-text {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-concrete);
  text-transform: uppercase;
  font-family: var(--font-body);
}

/* ——— Grid helpers ——— */

.grid {
  display: grid;
  gap: 32px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1023px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ——— Flex utilities ——— */

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

/* ——— Section background patterns ——— */

.section--dark {
  background-color: var(--color-black);
}

.section--darker {
  background-color: var(--color-darker);
}

.section--darkest {
  background-color: var(--color-dark);
}

/* ——— Grain texture overlay ——— */

.grain-overlay {
  position: relative;
}

.grain-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
}

/* ——— Content z-index stacking ——— */

.section > .container {
  position: relative;
  z-index: var(--z-content);
}
