/* InsightJunkies — Glassy Futurist Design System
   Deep navy + iridescent gradients, glow, blur, particle fields
   Grotesk display + mono accents
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* —— Color: deep navy substrate —— */
  --ink-900: #050816;          /* deepest, page bg */
  --ink-850: #08081a;
  --ink-800: #0c0d24;          /* card bg */
  --ink-700: #14152e;
  --ink-600: #1c1d3a;          /* borders */
  --ink-500: #2a2b50;
  --ink-400: #4a4d7a;
  --ink-300: #7c80b3;          /* muted text */
  --ink-200: #b4b8e0;          /* secondary text */
  --ink-100: #e8eaff;          /* primary text */
  --ink-050: #f8f9ff;          /* highest contrast */

  /* —— Iridescent accents —— */
  --accent-orange: #FF5C28;
  --accent-violet: #7C5CFF;
  --accent-cyan: #00E0FF;
  --accent-pink: #FF3D9A;
  --accent-lime: #B8FF5C;

  /* gradient: signature orange → violet */
  --grad-signature: linear-gradient(135deg, #FF5C28 0%, #FF3D9A 38%, #7C5CFF 72%, #00E0FF 100%);
  --grad-signature-soft: linear-gradient(135deg, rgba(255,92,40,0.15), rgba(124,92,255,0.15));
  --grad-aurora: radial-gradient(ellipse at 30% 20%, rgba(255,92,40,0.18), transparent 50%),
                 radial-gradient(ellipse at 70% 60%, rgba(124,92,255,0.20), transparent 55%),
                 radial-gradient(ellipse at 40% 100%, rgba(0,224,255,0.15), transparent 50%);

  /* —— Glass surfaces —— */
  --glass-bg: rgba(20, 21, 46, 0.45);
  --glass-bg-strong: rgba(20, 21, 46, 0.75);
  --glass-border: rgba(180, 184, 224, 0.12);
  --glass-border-strong: rgba(180, 184, 224, 0.22);
  --glass-blur: blur(24px) saturate(140%);

  /* —— Type —— */
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* —— Scale —— */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
  --text-5xl: 64px;
  --text-6xl: 88px;
  --text-7xl: 120px;

  /* —— Space —— */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  /* —— Radius —— */
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 28px; --r-2xl: 40px;

  /* —— Shadows / glows —— */
  --glow-orange: 0 0 60px rgba(255, 92, 40, 0.35), 0 0 120px rgba(255, 92, 40, 0.15);
  --glow-violet: 0 0 60px rgba(124, 92, 255, 0.35), 0 0 120px rgba(124, 92, 255, 0.15);
  --glow-cyan: 0 0 60px rgba(0, 224, 255, 0.35);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 60px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--ink-900);
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* —— Page ambient background: aurora + grain —— */
.ij-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--ink-900);
}
.ij-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-aurora);
  opacity: 0.85;
  animation: auroraDrift 30s ease-in-out infinite alternate;
}
.ij-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-40px, 30px, 0) scale(1.15); }
}

/* —— Grid overlay —— */
.ij-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(180,184,224,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,184,224,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* —— Type utilities —— */
.ij-mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.ij-serif { font-family: var(--font-serif); font-style: italic; }
.ij-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.96;
}
.ij-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-300);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ij-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-orange);
  box-shadow: 0 0 12px var(--accent-orange);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}
.ij-grad-text {
  background: var(--grad-signature);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradShift 8s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* —— Glass card —— */
.ij-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--r-lg);
  position: relative;
}
.ij-glass-strong {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-strong);
}

/* —— Button —— */
.ij-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--glass-border-strong);
  background: var(--glass-bg);
  color: var(--ink-100);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 300ms ease, border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.ij-btn:hover { transform: translateY(-1px); border-color: var(--ink-300); }
.ij-btn-primary {
  background: var(--grad-signature);
  background-size: 200% 200%;
  border: none;
  color: white;
  box-shadow: var(--glow-orange);
  animation: gradShift 6s ease infinite;
}
.ij-btn-primary:hover { box-shadow: var(--glow-orange), 0 8px 24px rgba(0,0,0,0.3); }

/* —— Container —— */
.ij-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* —— Nav —— */
.ij-nav {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 16px auto 0;
  max-width: 1280px;
  padding: 0 32px;
}
.ij-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 22px;
  background: rgba(8, 8, 26, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
}
.ij-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-050);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ij-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad-signature);
  background-size: 200% 200%;
  animation: gradShift 5s ease infinite;
  position: relative;
  display: grid;
  place-items: center;
}
.ij-logo-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 4px;
  background: var(--ink-900);
}
.ij-logo-mark::before {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-signature);
  z-index: 2;
}
.ij-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.ij-nav-links a {
  color: var(--ink-200);
  text-decoration: none;
  transition: color 150ms ease;
}
.ij-nav-links a:hover { color: var(--ink-050); }

/* —— Section —— */
.ij-section {
  padding: 120px 0;
  position: relative;
  z-index: 2;
}
.ij-section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

/* —— Tag / chip —— */
.ij-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  border: 1px solid var(--glass-border-strong);
  background: rgba(255,255,255,0.02);
  color: var(--ink-200);
}
.ij-tag-live {
  border-color: rgba(184, 255, 92, 0.4);
  color: var(--accent-lime);
  background: rgba(184, 255, 92, 0.06);
}
.ij-tag-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
  animation: pulseDot 1.6s ease-in-out infinite;
}
.ij-tag-soon {
  border-color: rgba(180, 184, 224, 0.18);
  color: var(--ink-300);
}

/* —— Divider —— */
.ij-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-600) 20%, var(--ink-600) 80%, transparent);
  margin: 0;
}

/* —— Footer —— */
.ij-footer {
  padding: 80px 0 40px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-700);
}

/* Selection */
::selection { background: var(--accent-orange); color: var(--ink-900); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }

/* —— Responsive —— */
@media (max-width: 1023px) {
  .ij-section { padding: 80px 0; }
  .ij-container { padding: 0 24px; }
  /* hero grid + tools grid + manifesto + pricing + how-it-works + newsletter + comparison
     all use inline styles with explicit gridTemplateColumns. Override via attribute selector. */
  main > section > div > div[style*="grid-template-columns"],
  main > section > div > div > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
}

@media (max-width: 767px) {
  .ij-section { padding: 60px 0; }
  .ij-container { padding: 0 18px; }
  .ij-nav { top: 8px; padding: 0 12px; margin-top: 8px; }
  .ij-nav-inner { padding: 8px 8px 8px 14px; }
  .ij-nav-links { display: none; }
  .ij-nav .ij-btn { padding: 8px 14px !important; font-size: 12px !important; }
  /* Display headlines: clamp already handles, but cap line-height for tighter mobile */
  .ij-display { line-height: 1.02; }
  /* ProofBar 4-col → 2-col */
  main > section[style*="border-top"] > div > div[style*="repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px !important;
  }
  /* Tools grid 6-col → 1-col (large + small all stack) */
  main > section#tools > div > div[style*="repeat(6"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  main > section#tools > div > div[style*="repeat(6"] > a {
    grid-column: span 1 !important;
    min-height: 200px !important;
    padding: 24px !important;
  }
  /* Pricing 3-col → 1-col */
  main > section#pricing > div > div[style*="repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  /* HowItWorks 3-col → 1-col */
  main > section#how > div > div[style*="repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  /* PSEOFeatures 2-col → 1-col */
  main > section#features > div > div[style*="1fr 1fr"],
  main > section > div > div[style*="repeat(3, 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  /* Footer 4-col → 2-col */
  .ij-footer > div > div[style*="1.4fr"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
    margin-bottom: 40px !important;
  }
  /* Footer bottom row stacks */
  .ij-footer > div > div[style*="space-between"] {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: flex-start !important;
  }
  /* Newsletter form: input + submit stack */
  main > section#newsletter form > div[style*="display: flex"] {
    flex-direction: column !important;
  }
  /* DashboardHero: smaller chrome on mobile */
  main > section > div > div > div[style*="aspectRatio: '16 / 11'"] { aspect-ratio: 16 / 14 !important; }
  /* Manifesto headline slightly smaller */
  main > section#manifesto h2 { font-size: clamp(32px, 8vw, 48px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
