/* ==============================================
   SMARTSCALE SOLUTION — Global Styles
   ============================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--charcoal);
  background-color: var(--ivory);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.75rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--sage);
  line-height: 1.75;
}

p.lead {
  font-size: var(--text-md);
  color: var(--sage);
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul { list-style: none; }

/* ── Layout Utilities ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

section {
  padding: var(--space-24) 0;
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-terracotta { color: var(--terracotta); }
.text-charcoal   { color: var(--charcoal); }
.text-sage       { color: var(--sage); }
.text-stone      { color: var(--stone); }
.text-mono       { font-family: var(--font-mono); }

.bg-ivory    { background-color: var(--ivory); }
.bg-charcoal { background-color: var(--charcoal); }
.bg-sand     { background-color: var(--sand); }
.bg-sand-light { background-color: var(--sand-light); }

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: block;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: var(--space-5);
}

.section-desc {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--sage);
  line-height: 1.75;
  max-width: 600px;
}

.section-header {
  margin-bottom: var(--space-16);
}

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

.section-header--center .section-desc {
  margin: 0 auto;
}

/* ── Dividers ── */
.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-6) 0;
}

/* ── Scroll-reveal animation target ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  section {
    padding: var(--space-16) 0;
  }
  .container, .container--narrow, .container--wide {
    padding: 0 var(--space-5);
  }
  .section-header {
    margin-bottom: var(--space-10);
  }
}
