/* ==========================================================================
   ARTIVORALABS — Design tokens & base
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Ink & paper — graphite engineering-console dark mode */
  --ink: #e7ede7;
  --ink-70: rgba(231,237,231,0.84);
  --ink-50: rgba(231,237,231,0.72);
  --ink-30: rgba(231,237,231,0.60);
  --paper: #0a0c0b;
  --paper-soft: #141815;
  --paper-alt: #07090a;
  --line: rgba(var(--sg,232,163,61),0.13);
  --line-strong: rgba(var(--sg,232,163,61),0.28);

  /* Signal (amber, brand) & Beacon (deeper amber, warnings) — vibrant on dark */
  --signal: #e8a33d;
  --signal-bright: #f0c06a;
  --signal-10: rgba(var(--sg,232,163,61),0.10);
  --signal-20: rgba(var(--sg,232,163,61),0.18);
  --beacon: #d98f27;
  --beacon-10: rgba(217,143,39,0.12);
  --danger: #e5654f;
  --danger-10: rgba(229,101,79,0.10);

  /* Dark surfaces — graphite layers for the sidebar chrome */
  --navy-deep: #07090a;
  --navy: #0a0d0b;
  --navy-raised: #0f1310;
  --navy-line: rgba(var(--sg,232,163,61),0.10);
  --navy-line-bright: rgba(var(--sg,232,163,61),0.20);
  --paper-on-navy: #e7ede7;
  --paper-on-navy-60: rgba(231,237,231,0.80);
  --paper-on-navy-40: rgba(231,237,231,0.65);

  /* Type */
  --f-display: 'Manrope', 'Inter', sans-serif;
  --f-body: 'Inter', -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  /* Scale — enterprise / large-canvas */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.375rem;
  --fs-3xl: 3.125rem;
  --fs-4xl: 4.25rem;
  --fs-5xl: 5.5rem;

  /* Space — 8pt grid, roomier at desktop */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;
  --sp-20: 80px; --sp-24: 112px; --sp-32: 144px;

  --layout-max: 1440px;
  --layout-gutter: clamp(20px, 4vw, 56px);
  --nav-h: 80px;
  --sidebar-w: 260px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;

  /* Shadow — deeper and richer on dark backgrounds */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.28);
  --shadow-md: 0 8px 28px -8px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 60px -16px rgba(0,0,0,0.58);
  --shadow-xl: 0 32px 80px -20px rgba(0,0,0,0.68), 0 2px 8px rgba(0,0,0,0.30);
  --shadow-signal: 0 24px 64px -16px rgba(var(--sg,232,163,61),0.32);
  --shadow-card-hover: 0 20px 48px -16px rgba(var(--sg,232,163,61),0.24);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.15s var(--ease);
  --t-base: 0.25s var(--ease);
}

/* Faint dot-grid texture — reused behind the hero and the CTA band so the
   flat paper surface reads as engineered rather than empty. Pure CSS,
   no images. */
.dot-grid {
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}
.container-narrow {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; color: var(--ink); text-wrap: balance; }

/* ── Eyebrow: mono, tracked-out — technical label device used throughout ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--signal-bright); box-shadow: 0 0 0 3px var(--signal-10); flex-shrink: 0; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 14px 24px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600;
  transition: all var(--t-fast); white-space: nowrap; border: 1px solid transparent;
  min-height: 44px;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--signal); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-signal { background: var(--signal); color: #191008; }
.btn-signal:hover { background: var(--beacon); transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(var(--sg,232,163,61),0.50); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--paper-soft); }
.btn-ghost { background: transparent; color: var(--ink-70); }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 16px 32px; font-size: var(--fs-base); min-height: 52px; }
.btn-sm { padding: 8px 16px; font-size: var(--fs-xs); min-height: 36px; }
.btn-block { width: 100%; }

/* ── Signal trace — signature motif: animated pulse line used as hero
   backdrop and section divider. One bold device, reused quietly. ── */
.signal-trace { width: 100%; height: auto; overflow: visible; }
.signal-trace path {
  fill: none; stroke: var(--signal); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 6 7;
  animation: trace-flow 3.6s linear infinite;
}
@keyframes trace-flow { to { stroke-dashoffset: -130; } }
.signal-trace .beat { stroke: var(--beacon); opacity: 0.55; animation-duration: 5.2s; animation-direction: reverse; }

.divider-trace { padding: var(--sp-2) 0; opacity: 0.5; }

/* ── Reveal-on-scroll ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── Focus ─────────────────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ── Tag / pill ────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--r-full); font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  background: var(--paper-soft); border: 1px solid var(--line); color: var(--ink-70);
}

.section { padding: var(--sp-24) 0; }
.section-head { max-width: 760px; margin-bottom: var(--sp-16); }
.section-head h2 { font-size: var(--fs-3xl); margin: var(--sp-4) 0 var(--sp-5); }
.section-head p { font-size: var(--fs-md); color: var(--ink-50); line-height: 1.7; max-width: 40rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1100px) {
  :root { --nav-h: 72px; --sidebar-w: 232px; }
}
@media (max-width: 720px) {
  :root { --layout-gutter: 20px; --sp-24: 80px; }
  .section { padding: var(--sp-16) 0; }
  .section-head h2 { font-size: var(--fs-2xl); }
}
