/* ==========================================================================
   RAQI — Layout System
   ========================================================================== */

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

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

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

.container--full {
  max-width: 100%;
  padding: 0;
}

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

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

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

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

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

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

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

.section--charcoal h1,
.section--charcoal h2,
.section--charcoal h3,
.section--charcoal h4,
.section--charcoal p {
  color: var(--cream);
}

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

.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--asymmetric {
  grid-template-columns: 1fr 1.2fr;
}

.grid--asymmetric-reverse {
  grid-template-columns: 1.2fr 1fr;
}

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

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

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

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

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

.align-center { align-items: center; }
.align-start  { align-items: flex-start; }
.align-end    { align-items: flex-end; }

/* ---------- Editorial Layouts ---------- */
.editorial-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 70vh;
}

.editorial-split--reverse {
  direction: rtl;
}

.editorial-split--reverse > * {
  direction: ltr;
}

.editorial-split__image {
  position: relative;
  overflow: hidden;
}

.editorial-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-split__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl) clamp(2rem, 5vw, 5rem);
}

/* ---------- Image Containers ---------- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-container {
  position: relative;
  overflow: hidden;
}

.img-container--hero {
  height: 100vh;
  min-height: 600px;
}

.img-container--tall {
  height: 80vh;
  min-height: 500px;
}

.img-container--medium {
  height: 60vh;
  min-height: 400px;
}

.img-container--short {
  height: 40vh;
  min-height: 300px;
}

.img-container--aspect-3-2 {
  aspect-ratio: 3 / 2;
}

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

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

.img-container--aspect-1-1 {
  aspect-ratio: 1 / 1;
}

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

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

.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ---------- Dividers ---------- */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--beige);
  border: none;
}

.divider--champagne {
  background-color: var(--champagne);
  opacity: 0.3;
}

/* ---------- Full Bleed ---------- */
.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
