/* ============================================================
   INFOXNEX — Base / Reset / Variables
   ============================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette */
  --color-bg: #0a0a0f;
  --color-bg-elevated: #111118;
  --color-bg-card: #16161e;
  --color-bg-card-hover: #1c1c26;
  --color-bg-subtle: #0e0e14;
  --color-surface: rgba(255, 255, 255, 0.03);
  --color-surface-hover: rgba(255, 255, 255, 0.06);

  --color-text: #eeeef0;
  --color-text-secondary: #8a8a9a;
  --color-text-muted: #55556a;
  --color-text-dim: #3a3a4a;

  /* Accent */
  --color-accent: #a855f7;
  --color-accent-bright: #818cf8;
  --color-accent-dim: rgba(99, 102, 241, 0.15);
  --color-accent-glow: rgba(99, 102, 241, 0.25);

  /* Secondary accents */
  --color-cyan: #22d3ee;
  --color-emerald: #34d399;
  --color-amber: #fbbf24;
  --color-rose: #fb7185;

  /* Pillar colors */
  --pillar-identity: #a855f7;
  --pillar-cloud: #22d3ee;
  --pillar-network: #a78bfa;
  --pillar-endpoint: #f59e0b;

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-accent: rgba(99, 102, 241, 0.3);

  /* Glass */
  --glass-bg: rgba(10, 10, 15, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 140px;
  --container-width: 1200px;
  --container-padding: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.2s var(--ease-smooth);
  --transition-medium: 0.4s var(--ease-out);
  --transition-slow: 0.7s var(--ease-out);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 980px;

  /* Theme transition */
  --theme-transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ---- LIGHT MODE ---- */
[data-theme="light"] {
  --color-bg: #f5f5f7;
  --color-bg-elevated: #ffffff;
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f0f0f5;
  --color-bg-subtle: #eeeef2;
  --color-surface: rgba(0, 0, 0, 0.03);
  --color-surface-hover: rgba(0, 0, 0, 0.06);

  --color-text: #1a1a2e;
  --color-text-secondary: #4a4a6a;
  --color-text-muted: #7a7a9a;
  --color-text-dim: #a0a0b8;

  --color-accent: #a855f7;
  --color-accent-bright: #a855f7;
  --color-accent-dim: rgba(79, 70, 229, 0.1);
  --color-accent-glow: rgba(79, 70, 229, 0.2);

  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-accent: rgba(79, 70, 229, 0.25);

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.06);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--theme-transition);
}

img, svg { display: block; max-width: 100%; }

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul { list-style: none; }

::selection {
  background: var(--color-accent-dim);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---- CONTAINER ---- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  font-family: var(--font-family);
  position: relative;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn--primary:hover {
  background: var(--color-accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent-bright);
  padding: 14px 8px;
}
.btn--ghost:hover {
  color: var(--color-text);
}

.btn--large {
  padding: 18px 36px;
  font-size: 1rem;
}

/* ---- SCROLL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1; transform: none; }
}
