/* ==========================================================================
   CORE SYSTEM & TYPOGRAPHY STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Technical Drafting Grid Overlay */
.grid-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Monospace Utility */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Links & Selections */
a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background-color: var(--accent-amber);
  color: #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* Layout Wrappers */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
  position: relative;
  border-bottom: 1px solid var(--border-line);
}

section.alt-bg {
  background-color: var(--bg-secondary);
}

/* Section Header Structure */
.section-header {
  margin-bottom: 56px;
  max-width: 720px;
}

.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.section-header .eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--accent-amber);
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  section {
    padding: 56px 0;
  }

  .section-header {
    max-width: 100%;
    margin-bottom: 32px;
  }

  .section-header h1,
  .section-header h2 {
    overflow-wrap: anywhere;
  }

  .section-header p {
    font-size: 0.98rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-amber);
}
