/* ══════════════════════════════════════════════════════
   ARLO OS — Design System v3.0
   Electric Spectrum + Command Card
   ══════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Electric Spectrum Palette ── */
:root {
  /* Core brand */
  --coral: #FF3366;
  --blue: #3366FF;
  --mint: #33FF99;
  --gold: #FFD23F;
  --violet: #B833FF;
  --flame: #FF8547;
  --cyan: #00D4FF;

  /* Functional */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-muted: #F1F5F9;
  --bg-dark: #0F172A;
  --bg-dark-mid: #1E293B;
  --bg-dark-rich: #334155;

  /* Text */
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-on-dark: #F1F5F9;
  --text-on-dark-muted: #CBD5E1;

  /* Borders */
  --border: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-accent: rgba(51, 102, 255, 0.2);

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  --grad-accent: linear-gradient(135deg, #3366FF 0%, #00D4FF 100%);
  --grad-warm: linear-gradient(135deg, #FF3366 0%, #FF8547 100%);
  --grad-spectrum: linear-gradient(135deg, #FF3366, #3366FF, #00D4FF, #33FF99);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-glow-blue: 0 0 20px rgba(51, 102, 255, 0.15);
  --shadow-glow-coral: 0 0 20px rgba(255, 51, 102, 0.15);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

/* ── Typography ── */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
p { max-width: 65ch; }
a { color: var(--blue); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--coral); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-4xl) 0; }
.section-alt { background: var(--bg-subtle); }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg);
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em;
  text-decoration: none; color: #fff; display: flex; align-items: center; gap: 8px;
}
.nav-logo .logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: #fff;
}
.nav-links {
  display: flex; align-items: center; gap: var(--space-xl); list-style: none;
}
.nav-links a {
  color: var(--text-on-dark-muted); font-size: var(--text-sm); font-weight: 500;
  transition: color var(--duration) var(--ease);
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--grad-accent); color: #fff !important;
  padding: 8px 20px; border-radius: var(--radius-full);
  font-weight: 600; font-size: var(--text-sm);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-blue);
  color: #fff !important;
}
.nav-version {
  font-size: 0.65rem; font-weight: 600;
  background: rgba(255,255,255,0.08); color: var(--cyan);
  padding: 2px 8px; border-radius: var(--radius-full);
  border: 1px solid rgba(0,212,255,0.2);
}
/* Mobile nav */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; transition: all 0.3s; border-radius: 1px; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(15,23,42,0.98); flex-direction: column;
    padding: var(--space-lg); gap: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-accent); color: #fff;
  box-shadow: 0 2px 8px rgba(51,102,255,0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(51,102,255,0.35);
  color: #fff;
}
.btn-secondary {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--border-accent);
}
.btn-secondary:hover {
  background: rgba(51,102,255,0.05);
  border-color: var(--blue);
  color: var(--blue);
}
.btn-dark {
  background: var(--bg-dark); color: #fff;
}
.btn-dark:hover {
  background: var(--bg-dark-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.btn-sm { padding: 8px 18px; font-size: var(--text-xs); }
.btn-lg { padding: 16px 36px; font-size: var(--text-base); }

/* ── Cards ── */
.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-xl);
  transition: all var(--duration) var(--ease);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}
.card-accent {
  border-left: 3px solid var(--blue);
}
.card-dark {
  background: var(--bg-dark); border-color: rgba(255,255,255,0.06);
  color: var(--text-on-dark);
}

/* ── Stat cards ── */
.stat-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-lg);
  text-align: center;
}
.stat-value {
  font-size: var(--text-3xl); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1;
  margin-bottom: var(--space-xs);
}
.stat-label {
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Tags / Badges ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  background: var(--bg-muted); color: var(--text-secondary);
}
.tag-blue { background: rgba(51,102,255,0.1); color: var(--blue); }
.tag-coral { background: rgba(255,51,102,0.1); color: var(--coral); }
.tag-mint { background: rgba(51,255,153,0.1); color: #059669; }
.tag-gold { background: rgba(255,210,63,0.1); color: #B45309; }
.tag-violet { background: rgba(184,51,255,0.1); color: var(--violet); }

/* ── Grid utilities ── */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Flex utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ── Text utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-blue { color: var(--blue); }
.text-coral { color: var(--coral); }
.text-gradient {
  background: var(--grad-accent);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Footer ── */
.footer {
  background: var(--bg-dark); color: var(--text-on-dark-muted);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer a { color: var(--text-on-dark-muted); }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl); margin-bottom: var(--space-2xl);
}
.footer-col h4 {
  font-size: var(--text-sm); font-weight: 600; color: #fff;
  margin-bottom: var(--space-md); letter-spacing: 0;
}
.footer-col p, .footer-col a {
  font-size: var(--text-sm); display: block; margin-bottom: var(--space-sm);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-lg);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--text-xs);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-up { animation: fadeUp 0.6s var(--ease) both; }
.animate-in { animation: fadeIn 0.4s var(--ease) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Spectrum accent bar (used on hero sections) ── */
.spectrum-bar {
  height: 3px; width: 60px; border-radius: 2px;
  background: var(--grad-spectrum);
  background-size: 200% 100%;
  animation: spectrumShift 3s ease infinite;
}
@keyframes spectrumShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
