/**
 * ZeroSOC.org - Layout & Global Styles
 * License: Apache-2.0
 */

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

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

body {
  background-color: var(--bg-paper);
  background-image: 
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.07), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(234, 88, 12, 0.05), transparent 45%);
  background-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), 100% 100%, 100% 100%;
  color: var(--ink-body);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Blueprint Registration Frame */
.blueprint-frame {
  position: fixed;
  inset: 12px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  pointer-events: none;
  z-index: 99;
}

.blueprint-frame::before,
.blueprint-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue-primary);
}

.blueprint-frame::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.blueprint-frame::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.dwg-stamp {
  position: fixed;
  bottom: 18px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 100;
  pointer-events: none;
  opacity: 0.8;
  background: rgba(242, 245, 250, 0.85);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(203, 213, 225, 0.6);
}

/* Container & Sections */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

section {
  padding: 5rem 0;
  position: relative;
}

section.hero {
  padding-top: calc(var(--header-height) + 3.5rem);
  padding-bottom: 4rem;
}

.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 3.5rem;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--ink-body);
  font-size: 1.05rem;
}

p.lead {
  font-size: 1.2rem;
  color: var(--ink-body);
  line-height: 1.6;
}

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

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

/* Kicker Badge */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blue-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  background: var(--blue-soft);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--blue-border);
}

.kicker.orange {
  color: var(--orange-primary);
  background: var(--orange-soft);
  border-color: var(--orange-border);
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

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

@media (max-width: 768px) {
  .blueprint-frame,
  .dwg-stamp {
    display: none;
  }
  
  .container {
    padding: 0 1.25rem;
  }
  
  section {
    padding: 3.5rem 0;
  }
  
  section.hero {
    padding-top: calc(var(--header-height) + 2rem);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
