/* =====================================================
   SMART GATES — Base & Reset
   ===================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--c-text-primary);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-text-primary);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }

p {
  max-width: 68ch;
}

/* --- Utility: Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 768px) {
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* --- Utility: Section spacing --- */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

/* --- Utility: Section header --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-3);
}

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

.section-desc {
  font-size: var(--text-lg);
  color: var(--c-text-secondary);
  max-width: 56ch;
  margin-bottom: var(--space-10);
}

/* --- Utility: Dark section --- */
.section--dark {
  background-color: var(--c-graphite-900);
  color: var(--c-text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--c-text-on-dark);
}

.section--dark .section-desc {
  color: var(--c-graphite-300);
}

.section--mid {
  background-color: var(--c-graphite-800);
  color: var(--c-text-on-dark);
}

.section--mid h2,
.section--mid h3 {
  color: var(--c-text-on-dark);
}

.section--light {
  background-color: var(--c-surface);
}

.section--gray {
  background-color: var(--c-graphite-50);
}

/* --- Accessibility: Focus --- */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* --- Divider line --- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--c-accent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}
