/* ==========================================================================
   intelligence.fm — Design System & Stylesheet
   Inspired by Composio.dev: Modern, Dev-Forward, Sleek Dark Data Aesthetic
   ========================================================================== */

:root {
  /* Canvas & Neutral Tones */
  --bg-dark: #080B10;
  --bg-dark-alt: #0D1219;
  --bg-card: rgba(18, 24, 36, 0.7);
  --bg-card-hover: rgba(26, 34, 51, 0.85);
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 46, 214, 0.5);
  --border-light: rgba(255, 255, 255, 0.16);

  /* Brand Gradient & Accents */
  --brand-magenta: #FF2ED6;
  --brand-purple: #8B00FF;
  --brand-blue: #0000FF;
  --brand-gradient: linear-gradient(135deg, #FF2ED6 0%, #8B00FF 50%, #0000FF 100%);
  --brand-glow: rgba(255, 46, 214, 0.25);

  /* Platform Identity Colors */
  --color-spotify: #1ED760;
  --color-apple: #B150E2;
  --color-youtube: #FF3B30;
  --color-amazon: #0DBFF5;
  --color-rss: #F97316;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base defaults. NOTE: no global `* { margin:0; padding:0 }` reset here — this file is
   unlayered, and an unlayered reset beats every Tailwind spacing utility (which live in
   @layer utilities). Tailwind's preflight already does the reset. */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: #F1F5F9;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Monospace metrics and tabular data */
code, pre, .font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Ambient Glow Background Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.ambient-glow-1 {
  width: 600px;
  height: 600px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, var(--brand-magenta), var(--brand-blue));
}

.ambient-glow-2 {
  width: 500px;
  height: 500px;
  top: 45%;
  left: -150px;
  background: radial-gradient(circle, #8B00FF, #0DBFF5);
  opacity: 0.12;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Top Announcement Banner */
.top-banner {
  background: linear-gradient(90deg, rgba(255, 46, 214, 0.12) 0%, rgba(0, 0, 255, 0.12) 100%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 50;
}

/* Header & Navigation */
.site-header {
  height: 72px;
}

.brand-logo-link img {
  display: block;
}

.nav-link {
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-gradient);
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Typography & Gradient Text */
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-brand {
  background: linear-gradient(90deg, rgba(255, 46, 214, 0.15), rgba(139, 0, 255, 0.2));
  color: #FFA6F0;
  border: 1px solid rgba(255, 46, 214, 0.3);
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.05);
  color: #CBD5E1;
  border: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  padding: 8px 18px;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 20px var(--brand-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(255, 46, 214, 0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: #E2E8F0;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.shadow-glow {
  box-shadow: 0 0 25px rgba(255, 46, 214, 0.2);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-light);
}

/* Card icon wrapper */
.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Platform Chips in Hero */
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.platform-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-spotify, .chip-spotify:hover { border-color: rgba(30, 215, 96, 0.4); }
.dot-spotify { background-color: var(--color-spotify); box-shadow: 0 0 6px var(--color-spotify); }

.dot-apple, .chip-apple:hover { border-color: rgba(177, 80, 226, 0.4); }
.dot-apple { background-color: var(--color-apple); box-shadow: 0 0 6px var(--color-apple); }

.dot-youtube, .chip-youtube:hover { border-color: rgba(255, 59, 48, 0.4); }
.dot-youtube { background-color: var(--color-youtube); box-shadow: 0 0 6px var(--color-youtube); }

.dot-amazon, .chip-amazon:hover { border-color: rgba(13, 191, 245, 0.4); }
.dot-amazon { background-color: var(--color-amazon); box-shadow: 0 0 6px var(--color-amazon); }

.dot-rss, .chip-rss:hover { border-color: rgba(249, 115, 22, 0.4); }
.dot-rss { background-color: var(--color-rss); box-shadow: 0 0 6px var(--color-rss); }

.text-brand-spotify { color: var(--color-spotify); }
.text-brand-apple { color: var(--color-apple); }
.text-brand-youtube { color: var(--color-youtube); }
.text-brand-amazon { color: var(--color-amazon); }
.text-brand-magenta { color: var(--brand-magenta); }
.text-brand-purple { color: #C084FC; }

/* MCP Playground & Terminal Simulation */
.mcp-chip {
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s;
}

.mcp-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
}

.mcp-chip.active {
  background: rgba(255, 46, 214, 0.15);
  border-color: rgba(255, 46, 214, 0.4);
  color: #FFA6F0;
}

.terminal-body {
  border-radius: 0 0 16px 16px;
  min-height: 260px;
}

.terminal-card-metric {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

/* Methodology Matrix Table */
.methodology-matrix table {
  width: 100%;
}

.methodology-matrix th {
  font-weight: 600;
  color: #94A3B8;
}

/* Forms & Inputs */
.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(10, 15, 24, 0.9);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-magenta);
  box-shadow: 0 0 0 3px rgba(255, 46, 214, 0.15);
  background-color: rgba(15, 22, 34, 0.95);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.platform-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s;
  color: #CBD5E1;
}

.platform-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-checkbox {
  accent-color: var(--brand-magenta);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* FAQ Accordion */
.faq-toggle svg {
  transition: transform 0.25s ease;
}

.faq-item.active .faq-toggle svg {
  transform: rotate(180deg);
}

.faq-item.active .faq-content {
  display: block;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .site-header {
    height: 64px;
  }
}

/* Standalone Fallback Utility Classes */
.bg-dark { background-color: var(--bg-dark); }
.bg-dark-alt { background-color: var(--bg-dark-alt); }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.10); }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.20); }

/* Skip link (visible only on keyboard focus) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Keyboard focus ring for every interactive control (Tailwind's focus:outline-none was removed) */
button, a, input, select, textarea, [tabindex] {
  outline-color: var(--brand-magenta);
}
:focus-visible {
  outline: 2px solid var(--brand-magenta);
  outline-offset: 3px;
  border-radius: 6px;
}
.form-input:focus-visible, .form-select:focus-visible {
  outline: none; /* these carry their own focus treatment above */
}
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.7; }

/* Form feedback */
.form-error {
  margin-top: 6px;
  font-size: 12px;
  color: #FCA5A5;
}
.form-input[aria-invalid="true"], .form-select[aria-invalid="true"] {
  border-color: rgba(248, 113, 113, 0.7);
}
.form-banner {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.form-banner-error {
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #FECACA;
}
.honeypot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Respect reduced-motion preferences */
@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;
  }
  .btn-primary:hover, .btn-secondary:hover { transform: none; }
}
