/* ==========================================================================
   MULTEE PROTACT - GLOBAL STYLES & FOUNDATION
   High-Contrast Typography & Ayurvedic Natural Styling
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base); /* 16px baseline */
  font-weight: var(--weight-regular);
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-forest-dark);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
  line-height: var(--leading-tight);
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw + 0.25rem, 1.875rem);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

p {
  color: var(--color-slate);
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
}

p:last-child {
  margin-bottom: 0;
}

p.lead {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.35rem);
  color: var(--color-forest);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
}

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

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

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

/* Section Spacing & Themes */
.section {
  padding-top: clamp(var(--space-12), 6vw, var(--space-24));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-24));
  position: relative;
}

.section-sm {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.section-lg {
  padding-top: clamp(var(--space-16), 8vw, var(--space-32));
  padding-bottom: clamp(var(--space-16), 8vw, var(--space-32));
}

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

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

.section-forest {
  background-color: var(--color-forest-dark);
  color: #E2ECE7;
}

.section-forest h1,
.section-forest h2,
.section-forest h3,
.section-forest h4 {
  color: var(--color-gold-light);
}

.section-forest p {
  color: #D1E0D9;
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-14));
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-forest);
  background-color: var(--color-forest-surface);
  border: 1px solid rgba(13, 59, 46, 0.18);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-3);
}

.section-forest .section-tag {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-gold-light);
  border-color: rgba(212, 175, 55, 0.35);
}

.section-title {
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-slate);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

.section-forest .section-subtitle {
  color: #C9D8D1;
}

/* Flex & Grid 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;
}

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

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

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

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

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

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

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

/* Accessibility Utilities */
.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;
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-modal);
  background-color: var(--color-forest);
  color: var(--color-gold);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: var(--space-4);
}

/* Gold Accent Line */
.gold-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-muted));
  margin: var(--space-4) auto;
  border-radius: var(--radius-pill);
}

.gold-divider.left {
  margin-left: 0;
}
