/* ═══════════════════════════════════════════════════════════════════════════════
 * Cookie AI — Layout
 * ═══════════════════════════════════════════════════════════════════════════════
 * Work Unit: WU-02 — CSS Design System
 * Acceptance Criteria: REQ-03
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Sticky Footer ────────────────────────────────────────────────────────── */
html {
  background-color: var(--color-bg, #F5F0EB);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

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

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

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

/* ─── Sections ──────────────────────────────────────────────────────────────── */
.section {
  padding: var(--section-pad) 0;
}

.section--large {
  padding: var(--section-pad-large) 0;
}

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

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

/* Mobile section padding reduction */
@media (max-width: 767px) {
  .section {
    padding: calc(var(--section-pad) * 0.6) 0;
  }

  .section--large {
    padding: calc(var(--section-pad-large) * 0.6) 0;
  }
}

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

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

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

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

@media (max-width: 767px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ─── Two Column Layout (About teaser) ──────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 767px) {
  .two-col {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

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

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

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

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

/* ─── 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); }

/* ─── Position Utilities ────────────────────────────────────────────────────── */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

/* ─── Overflow ──────────────────────────────────────────────────────────────── */
.overflow-hidden {
  overflow: hidden;
}

/* ─── Color Utilities ──────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-muted-light { color: var(--text-muted-light); }
