/* CSS Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 700;
}

h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
}

p {
  color: var(--color-slate);
  margin-bottom: var(--space-4);
}

p.lead {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
}

a {
  color: var(--color-apex-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-ink);
}

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

svg {
  overflow: visible;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

svg use {
  pointer-events: none;
}

ul, ol {
  list-style: none;
}

/* Mono Eyebrow Tag */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-apex-blue);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.eyebrow--coral { color: var(--color-ignite-coral); }
.eyebrow--teal { color: var(--color-signal-teal); }
.eyebrow--violet { color: var(--color-violet-ascent); }
.eyebrow--ink { color: var(--color-ink); }
.eyebrow--paper { color: var(--color-paper); }

/* Containers & Section Layouts */
.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container-narrow {
  max-width: var(--max-width-text);
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
  position: relative;
}

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

.section-dark {
  background-color: var(--color-ink);
  color: var(--color-paper);
}

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

.section-dark p {
  color: #A0A6C0;
}

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

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

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

@media (max-width: 640px) {
  .grid-12, .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.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-muted { color: var(--color-slate); }
.text-paper { color: var(--color-paper); }

/* Accessibility & Focus */
:focus-visible {
  outline: 2px solid var(--color-apex-blue);
  outline-offset: 3px;
}

.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;
}

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