/* ============================================================
   WarehouseOS — reset, typography, background FX, utilities
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

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

::selection {
  background: var(--amber);
  color: #0a0e14;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-strong);
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

pre,
code {
  font-family: var(--font-mono);
}

/* ---------- layout helpers ---------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mono {
  font-family: var(--font-mono);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.sec-head {
  text-align: center;
  margin-bottom: 56px;
}

.sec-head h2 {
  max-width: 780px;
  margin: 0 auto 16px;
}

.sec-head p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel-2);
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--steel-soft);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.sec-eyebrow.amber {
  color: var(--amber-2);
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.28);
}
.sec-eyebrow.green {
  color: var(--green-2);
  background: var(--green-soft);
  border-color: rgba(16, 185, 129, 0.28);
}
.sec-eyebrow.cyan {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(6, 182, 212, 0.28);
}
.sec-eyebrow.purple {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: rgba(168, 85, 247, 0.28);
}

.hazard-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 4px;
  background: var(--amber-soft);
  border: 1px solid var(--border-hazard);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-2);
}

.hazard-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ---------- background fx ---------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px;
}

.scan-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--steel), transparent);
  z-index: 999;
  opacity: 0.15;
  animation: scan 8s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* ---------- scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scan-line {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* anchor targets clear the fixed navbar */
html {
  scroll-padding-top: 96px;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 84px;
  }
}
