/**
 * CSTL Corporate Design System — Base & Reset
 */

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

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

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

body {
  font-family: var(--cstl-font-body);
  background-color: var(--cstl-bg-page);
  color: var(--cstl-text-primary);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Subtle background industrial grid mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

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

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 700;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  color: var(--cstl-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

p.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: #CBD5E1;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-normal), opacity var(--trans-normal);
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
}

/* Custom Selection */
::selection {
  background-color: var(--cstl-amber);
  color: #000000;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  position: relative;
  z-index: 1;
}

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

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

/* Section Spacing */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  position: relative;
  z-index: 1;
}

.section-lg {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

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

.section-dark {
  background-color: var(--cstl-dark-900);
}

.section-surface {
  background-color: var(--cstl-dark-800);
  border-top: 1px solid var(--cstl-steel-border-subtle);
  border-bottom: 1px solid var(--cstl-steel-border-subtle);
}

.section-alt {
  background: linear-gradient(180deg, var(--cstl-dark-900) 0%, #0c1822 50%, var(--cstl-dark-900) 100%);
}

/* Section Header Structure */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header.text-center {
  text-align: center;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--cstl-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cstl-amber);
  background: rgba(228, 161, 27, 0.1);
  border: 1px solid rgba(228, 161, 27, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--cstl-amber);
  box-shadow: 0 0 8px var(--cstl-amber);
}

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

.section-subtitle {
  color: var(--cstl-text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Utility Helpers */
.text-amber { color: var(--cstl-amber) !important; }
.text-white { color: var(--cstl-text-white) !important; }
.text-muted { color: var(--cstl-text-secondary) !important; }
.font-mono { font-family: var(--cstl-font-mono) !important; }
.bold { font-weight: 700; }
.semibold { font-weight: 600; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

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

@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .section-lg { padding-top: var(--space-16); padding-bottom: var(--space-16); }
}
