/* ==========================================================================
   BASE STYLES — Typography, Layout, Utilities
   ========================================================================== */

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: var(--weight-semi);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, var(--text-7xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: clamp(2rem, 3.5vw, var(--text-5xl));
  line-height: var(--leading-tight);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, var(--text-3xl));
}

h4 {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
}

h5 {
  font-size: var(--text-lg);
  font-family: var(--font-sans);
  font-weight: var(--weight-semi);
}

h6 {
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: var(--weight-semi);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

p {
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  max-width: 72ch;
}

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-muted);
}

strong, b {
  font-weight: var(--weight-bold);
}

small {
  font-size: var(--text-sm);
}

/* ---------- Links ---------- */
a:not(.btn) {
  transition: var(--transition-fast);
}

a:not(.btn):hover {
  color: var(--color-primary);
}

/* ---------- Layout: Container ---------- */
.container {
  width: min(var(--container-max), calc(100% - var(--container-pad) * 2));
  margin-inline: auto;
}

.container-wide {
  width: min(var(--container-wide), calc(100% - var(--container-pad) * 2));
  margin-inline: auto;
}

/* ---------- Section Spacing ---------- */
.section {
  padding-block: var(--section-py);
}

.section-sm {
  padding-block: var(--space-12);
}

.section-lg {
  padding-block: var(--space-24);
}

/* Section Header */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header.center {
  text-align: center;
}

.section-header.center p {
  margin-inline: auto;
}

.section-header p {
  margin-top: var(--space-4);
  max-width: 60ch;
}

.section-header .section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.section-header-flex .section-header {
  margin-bottom: 0;
}

/* ---------- Grids ---------- */
.grid {
  display: grid;
  gap: var(--space-6);
}

.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-fit, minmax(280px, 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-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

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

.text-primary { color: var(--color-primary); }
.text-gold    { color: var(--color-gold); }
.text-muted   { color: var(--color-text-muted); }
.text-faint   { color: var(--color-text-faint); }
.text-white   { color: #fff; }
.text-success { color: var(--color-success); }

.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }

.font-sans  { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }

.font-medium { font-weight: var(--weight-medium); }
.font-semi   { font-weight: var(--weight-semi); }
.font-bold   { font-weight: var(--weight-bold); }
.font-extra  { font-weight: var(--weight-extra); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ---------- Spacing Utilities ---------- */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

/* ---------- Visibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden { display: none !important; }

/* ---------- Background Utilities ---------- */
.bg-surface {
  background-color: var(--color-surface);
}

.bg-surface-2 {
  background-color: var(--color-surface-2);
}

.bg-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.bg-dark {
  background-color: #1D1711;
  color: #EADFCF;
}

.bg-gradient-warm {
  background: linear-gradient(180deg, transparent, rgba(184, 135, 47, 0.04));
}

.bg-gradient-nature {
  background: linear-gradient(180deg, transparent, rgba(72, 97, 58, 0.05));
}

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

/* ---------- Position ---------- */
.relative {
  position: relative;
}

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

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  margin-block: var(--space-8);
}

/* ---------- Aspect Ratios ---------- */
.aspect-video {
  aspect-ratio: 16 / 9;
}

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

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