/* ============================================================
   AURORA — Layout System
   Reset, containers, sections with mesh gradients,
   grid, flex, dividers
   ============================================================ */

/* ---- RESET ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ---- CONTAINERS ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

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

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

/* ---- PAGE SHELL ---- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page__main { flex: 1 0 auto; }

/* ---- SECTION RHYTHM with mesh gradient depth ---- */
.section {
  padding-block: var(--space-section-lg);
  position: relative;
}

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

/* Mesh gradient background for visual depth */
.section--mesh {
  background: var(--section-mesh);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-section-sm);
}

.section__title {
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: var(--text-subtitle);
  color: var(--text-secondary);
  max-width: 36ch;
  margin-inline: auto;
  line-height: var(--leading-subtitle);
}

/* ---- GRID SYSTEM ---- */
.grid { display: grid; gap: var(--space-xl); }
.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--auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--auto-lg { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

/* ---- FLEX ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-xxl { gap: var(--space-xxl); }

/* ---- TEXT ALIGNMENT ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ---- MAX WIDTH ---- */
.maxw-sm { max-width: 38ch; }
.maxw-md { max-width: 48ch; }
.maxw-lg { max-width: 64ch; }
.maxw-xl { max-width: 80ch; }
.mx-auto { margin-inline: auto; }

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  background: var(--border-hairline);
  border: none;
  max-width: var(--container-max);
  margin-inline: auto;
}

.divider--gradient {
  background: linear-gradient(90deg, transparent, var(--border-hairline-strong), transparent);
}
