/* ========================
   TOKENS & RESET
   ======================== */
:root {
  --bg: #111318;
  --surface: #1a1d23;
  --surface-2: #222630;
  --border: #2e3340;
  --fg: #e8eaf0;
  --fg-muted: #8a92a6;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========================
   NAV
   ======================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 19, 24, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.nav-logo-accent { color: var(--accent); }

.nav-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

/* ========================
   HERO
   ======================== */
.hero {
  padding: 80px 24px 72px;
}

.hero-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.stat {
  padding: 16px 24px;
  border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ========================
   TRACKER WIDGET
   ======================== */
.tracker-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.tracker-title {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  font-weight: 600;
}

.tracker-live {
  font-size: 0.68rem;
  color: var(--ok);
  letter-spacing: 0.06em;
}

.tracker-rows { padding: 8px 0; }

.tracker-row {
  display: grid;
  grid-template-columns: 70px 1fr 80px 38px;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
}

.tracker-row:hover { background: rgba(255,255,255,0.03); }

.tracker-sku {
  color: var(--fg-muted);
  font-size: 0.68rem;
}

.tracker-name {
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-bar-wrap {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.tracker-bar {
  height: 100%;
  background: var(--fg-muted);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.tracker-bar-warn { background: var(--warn); }
.tracker-bar-ok { background: var(--ok); }
.tracker-bar-danger { background: var(--danger); }

.tracker-qty {
  text-align: right;
  color: var(--fg);
  font-weight: 600;
}

.tracker-qty-warn { color: var(--warn); }
.tracker-qty-danger { color: var(--danger); }

.tracker-max { color: var(--fg-muted); font-weight: 400; }

.tracker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--accent-dim);
}

.tracker-reorder {
  font-size: 0.72rem;
  color: var(--warn);
  font-weight: 600;
}

.tracker-cta {
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  cursor: pointer;
}

/* ========================
   SECTION UTILITIES
   ======================== */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-headline {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 20px;
}

.section-headline.centered { text-align: center; }

.section-body {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.75;
  max-width: 520px;
}

.section-body.centered { margin: 0 auto 48px; text-align: center; }

.feature-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  font-size: 0.9rem;
  color: var(--fg-muted);
  padding-left: 20px;
  position: relative;
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ========================
   MANIFESTO
   ======================== */
.manifesto {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}

.manifesto-inner {
  max-width: 780px;
  margin: 0 auto;
}

.manifesto-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.manifesto-headline {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 24px;
}

.manifesto-body {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.manifesto-divider {
  height: 1px;
  background: var(--border);
  margin: 56px 0;
}

.manifesto-eyebrow-right { text-align: right; }
.manifesto-headline-right { text-align: right; }
.manifesto-body-right { text-align: right; }

/* ========================
   SCANNER
   ======================== */
.scanner { padding: 80px 24px; }

.scanner-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.scan-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scan-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  border-style: solid;
}

.scan-corner-tl { top: 20px; left: 20px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.scan-corner-tr { top: 20px; right: 20px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.scan-corner-bl { bottom: 20px; left: 20px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.scan-corner-br { bottom: 20px; right: 20px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.scan-line {
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  position: absolute;
  top: 50%;
  left: 15%;
  animation: scanline 2s ease-in-out infinite;
}

@keyframes scanline {
  0%, 100% { transform: translateY(-40px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}

.scan-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  z-index: 1;
  margin-top: 8px;
}

.scan-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  z-index: 1;
  margin-top: 4px;
}

.scan-result {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(34, 197, 94, 0.12);
  border-top: 1px solid var(--ok);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.scan-result-icon {
  width: 28px;
  height: 28px;
  background: var(--ok);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.scan-result-name { display: block; font-weight: 600; font-size: 0.85rem; color: var(--fg); }
.scan-result-meta { display: block; font-size: 0.7rem; color: var(--fg-muted); margin-top: 2px; }

/* ========================
   THRESHOLDS
   ======================== */
.thresholds { padding: 80px 24px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.thresholds-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.threshold-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
}

.threshold-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.threshold-sku {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

.threshold-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: rgba(34, 197, 94, 0.15);
  color: var(--ok);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.threshold-tag-warn { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.threshold-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--fg); }

.threshold-meta-row {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-muted);
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.threshold-graph {
  position: relative;
  height: 48px;
  margin-bottom: 8px;
}

.threshold-line {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.threshold-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.threshold-dot {
  position: absolute;
  top: 16px;
  width: 10px;
  height: 10px;
  background: var(--fg-muted);
  border-radius: 50%;
  transform: translateX(-50%);
}

.threshold-dot-red { background: var(--danger); }

.threshold-floor {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--accent) 0, var(--accent) 4px, transparent 4px, transparent 12px);
  opacity: 0.5;
}

.threshold-timeline {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--fg-muted);
}

.threshold-qty {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 14px;
}

.threshold-qty-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--danger);
}

.threshold-qty-max {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--fg-muted);
}

.threshold-btn {
  width: 100%;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.threshold-btn:hover { opacity: 0.85; }

/* ========================
   OPERATIONS
   ======================== */
.operations { padding: 80px 24px; }

.operations-header {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}

.ops-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.ops-card {
  background: var(--surface);
  padding: 28px 24px;
  transition: background 0.2s;
}

.ops-card:hover { background: var(--surface-2); }

.ops-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

.ops-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.ops-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ========================
   CLOSING
   ======================== */
.closing {
  padding: 96px 24px 80px;
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.closing-headline {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 24px;
}

.closing-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.closing-promise {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
  text-align: left;
  margin-bottom: 48px;
}

.promise-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--fg);
}

.promise-check {
  color: var(--ok);
  font-size: 1rem;
  font-weight: 700;
}

.closing-tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ========================
   FOOTER
   ======================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
}

.footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 900px) {
  .hero-grid,
  .scanner-grid,
  .thresholds-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-headline { font-size: 2.4rem; }

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

  .closing-promise { grid-template-columns: 1fr; }

  .hero-right { order: -1; }

  .scan-frame { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 16px 48px; }
  .manifesto, .scanner, .thresholds, .operations, .closing { padding: 56px 16px; }
  .ops-grid { grid-template-columns: 1fr; }

  .hero-stats { flex-direction: column; width: 100%; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
}
