/* ═══════════════════════════════════════════════════════════════
   INVISIQ — DESIGN TOKENS
   Refined dark, single teal accent, restrained motion.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Background — neutral near-black, no blue tint */
  --bg: #07070a;
  --bg-elevated: #0e0e13;
  --bg-surface: #14141b;
  --bg-hover: #1c1c25;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.10);
  --border-accent: rgba(46, 229, 197, 0.30);

  /* Text */
  --fg: #f4f4f6;
  --fg-secondary: #a8a8b3;
  --fg-muted: #6b6b78;
  --fg-faint: #3f3f4a;

  /* Accent — single teal, used SPARINGLY */
  --accent: #2ee5c5;
  --accent-dim: #1d9d88;
  --accent-glow: rgba(46, 229, 197, 0.15);

  /* Status */
  --success: #4ade80;
  --warn: #fbbf24;
  --error: #f87171;

  /* Density (driven by Tweaks) */
  --section-y: 110px;
  --container: 1200px;
  --gutter: 24px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --motion-fast: 180ms;
  --motion-base: 320ms;
  --motion-slow: 560ms;
  --reveal-distance: 24px;
}

/* Density presets */
[data-density="compact"]  { --section-y: 80px;  --gutter: 20px; }
[data-density="cozy"]     { --section-y: 110px; --gutter: 24px; }
[data-density="spacious"] { --section-y: 160px; --gutter: 32px; }

/* Motion presets */
[data-motion="off"]     { --motion-base: 0ms; --motion-slow: 0ms; --reveal-distance: 0px; }
[data-motion="subtle"]  { --motion-base: 240ms; --motion-slow: 420ms; --reveal-distance: 16px; }
[data-motion="default"] { --motion-base: 320ms; --motion-slow: 560ms; --reveal-distance: 24px; }

/* ═══════════════════════════════════════════════════════════════
   RESET + BASE
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01';
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--accent-glow); color: var(--fg); }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

.display-mega {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(60px, 10vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.display-xl {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 500;
}
.display-lg {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.display-md {
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 500;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.eyebrow.muted { color: var(--fg-muted); }
.eyebrow.muted::before { background: var(--fg-muted); }

.lede {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--fg-secondary);
  line-height: 1.6;
  max-width: 56ch;
}

.mono { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; }

.tag-mono {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}
.tag-mono .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  position: relative;
  padding: var(--section-y) 0;
}
.section-header {
  margin-bottom: 64px;
  max-width: 720px;
}
.section-header .eyebrow { margin-bottom: 20px; }
.section-header .display-lg + .lede { margin-top: 20px; }

/* hairline divider between sections */
.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: backdrop-filter var(--motion-base) var(--ease-out),
              background-color var(--motion-base) var(--ease-out),
              border-color var(--motion-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 7, 10, 0.75);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav-brand .logo {
  width: 24px; height: 24px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  color: var(--fg-secondary);
  transition: color var(--motion-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] {
  color: var(--fg);
  position: relative;
}
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -22px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color var(--motion-fast) var(--ease-out),
              border-color var(--motion-fast) var(--ease-out),
              color var(--motion-fast) var(--ease-out),
              transform var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-base) var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  color: #0a1410;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset,
              0 6px 24px -8px var(--accent-glow);
}
.btn-primary:hover {
  background: #54ecd1;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset,
              0 8px 32px -6px rgba(46,229,197,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--fg-muted);
}
.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
}
.btn-ghost:hover { color: var(--fg); }

.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }

.btn .icon { width: 16px; height: 16px; }
.btn-lg .icon { width: 18px; height: 18px; }

/* ═══════════════════════════════════════════════════════════════
   BADGES + CHIPS
   ═══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-secondary);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.005em;
}
.badge .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-secondary);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */

.card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  transition: border-color var(--motion-base) var(--ease-out),
              transform var(--motion-base) var(--ease-out),
              background-color var(--motion-base) var(--ease-out);
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent);
}
.card-icon svg { width: 18px; height: 18px; }
.card-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.card-body {
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   REVEAL ANIMATIONS (driven by IntersectionObserver)
   ═══════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--motion-slow) var(--ease-out),
              transform var(--motion-slow) var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 60ms; }
.reveal[data-delay="2"] { transition-delay: 120ms; }
.reveal[data-delay="3"] { transition-delay: 180ms; }
.reveal[data-delay="4"] { transition-delay: 240ms; }
.reveal[data-delay="5"] { transition-delay: 300ms; }
.reveal[data-delay="6"] { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
