/* ============================================
   R.L. SIMMONS BUILDER — Layout System
   ============================================ */

/* --- Containers --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* --- Section Spacing --- */
.section {
  padding: var(--space-xl) 0;
}

.section--lg {
  padding: var(--space-2xl) 0;
}

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

.section--moss {
  background-color: var(--deep-moss);
  color: white;
}

.section--moss h2,
.section--moss h3,
.section--moss h4 {
  color: white;
}

.section--moss .eyebrow {
  color: var(--copper-light);
}

.section--charcoal {
  background-color: var(--charcoal);
  color: rgba(255, 255, 255, 0.85);
}

.section--charcoal h2,
.section--charcoal h3 {
  color: white;
}

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

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--4 {
  grid-template-columns: 1fr;
}

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

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

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

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

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

/* --- Flex Utilities --- */
.flex {
  display: flex;
}

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

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

.flex--gap-sm {
  gap: var(--space-sm);
}

.flex--gap-md {
  gap: var(--space-md);
}

@media (max-width: 767px) {
  .flex {
    flex-wrap: wrap;
  }
}

/* --- Two-Column Layout (alternating content) --- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--reverse .split__media {
    order: 2;
  }

  .split--reverse .split__content {
    order: 1;
  }

  .split--55-45 {
    grid-template-columns: 55% 1fr;
  }

  .split--45-55 {
    grid-template-columns: 1fr 55%;
  }
}

.split__media {
  position: relative;
  overflow: hidden;
}

.split__content {
  padding: var(--space-md) 0;
}

/* --- Hero Sections --- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: var(--space-2xl) 0 var(--space-xl);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero--short {
  min-height: 60vh;
}

.hero--shorter {
  min-height: 50vh;
}

.hero--shortest {
  min-height: 40vh;
  align-items: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(var(--charcoal-rgb), 0.1) 0%,
    rgba(var(--charcoal-rgb), 0.3) 40%,
    rgba(var(--charcoal-rgb), 0.7) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero__content h1,
.hero__content h2 {
  color: white;
}

.hero__content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-xl);
  font-weight: 300;
}

.hero__content .eyebrow {
  color: var(--copper-light);
  margin-bottom: var(--space-sm);
}

/* Parallax on desktop only */
@media (min-width: 768px) {
  .hero--parallax {
    background-attachment: fixed;
  }
}

/* Video hero */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero__overlay--video {
  background: linear-gradient(
    to bottom,
    rgba(var(--charcoal-rgb), 0.25) 0%,
    rgba(var(--charcoal-rgb), 0.45) 40%,
    rgba(var(--charcoal-rgb), 0.75) 100%
  );
}

/* --- Decorative Divider --- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--creek-stone);
  opacity: 0.3;
}

.divider__diamond {
  width: 8px;
  height: 8px;
  background: var(--copper);
  transform: rotate(45deg);
  margin: 0 var(--space-sm);
  flex-shrink: 0;
}

/* --- Text Alignment --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }

/* --- Max Width Utilities --- */
.max-w-narrow { max-width: 600px; }
.max-w-medium { max-width: 800px; }
.mx-auto      { margin-left: auto; margin-right: auto; }

/* --- Spacing Utilities --- */
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }

/* --- Placeholder Image --- */
.placeholder-img {
  background-color: var(--limestone);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--creek-stone);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 100%;
}

.placeholder-img--portrait {
  aspect-ratio: 3 / 4;
}

.placeholder-img--landscape {
  aspect-ratio: 16 / 9;
}

.placeholder-img--square {
  aspect-ratio: 1 / 1;
}

.placeholder-img--hero {
  aspect-ratio: 21 / 9;
}
