/* =========================================================
   iFinesse Shared Theme
   Loaded on every page via <link rel="stylesheet" href="/assets/theme.css">
   Designed to coexist with Tailwind CDN (class names are namespaced).
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=VT323&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a12;
  --bg-2: #14141f;
  --bg-3: #1a0a2e;
  --fg: #e4e4e7;
  --fg-muted: #a1a1aa;
  --fg-dim: #71717a;
  --fg-faint: #52525b;

  --purple: #9333ea;
  --purple-2: #8b5cf6;
  --purple-light: #a78bfa;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --pink: #ec4899;
  --gold: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(139, 92, 246, 0.3);
  --glass: rgba(20, 20, 40, 0.7);
  --glass-strong: rgba(15, 15, 30, 0.9);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.25);
  --shadow-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.25);
  --shadow-glow-pink: 0 0 20px rgba(236, 72, 153, 0.25);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-crt: 'VT323', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: linear-gradient(-45deg, #0a0a12, #1a0a2e, #0a1a2e, #0a0a12);
  background-size: 400% 400%;
  animation: ifinesse-bg 20s ease infinite;
  color: var(--fg);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes ifinesse-bg {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

a { color: inherit; text-decoration: none; }

/* ---------- Typography Helpers ---------- */
.font-display { font-family: var(--font-display); }
.font-crt { font-family: var(--font-crt); }
.font-body { font-family: var(--font-body); }

.glow-purple { text-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.2); }
.glow-cyan   { text-shadow: 0 0 10px rgba(34, 211, 238, 0.5), 0 0 20px rgba(34, 211, 238, 0.2); }
.glow-pink   { text-shadow: 0 0 10px rgba(236, 72, 153, 0.5), 0 0 20px rgba(236, 72, 153, 0.2); }
.glow-gold   { text-shadow: 0 0 10px rgba(245, 158, 11, 0.5), 0 0 20px rgba(245, 158, 11, 0.2); }

/* ---------- Glass / Cards ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.glass-card:hover { border-color: rgba(139, 92, 246, 0.4); }

/* ---------- Buttons ---------- */
.ifi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-crt);
  font-size: 13px;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.ifi-btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}
.ifi-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}
.ifi-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--fg-muted);
}
.ifi-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ifi-btn-cyan {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  color: #000;
  font-weight: 600;
}

/* ---------- Standard Nav (.ifinav) ---------- */
.ifinav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 16px 0;
  padding: 10px 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 8px;
  z-index: 50;
}
.ifinav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.ifinav-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  image-rendering: -webkit-optimize-contrast;
}
.ifinav-brand .i { color: #fff; }
.ifinav-brand .finesse { color: var(--purple-2); text-shadow: 0 0 10px rgba(139, 92, 246, 0.5); }
/* Brand name + tagline */
.ifinav-brand .brand-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.ifinav-brand .brand-name { display: flex; align-items: center; gap: 0; }
.ifinav-brand .brand-music { color: #fff; font-size: inherit; font-weight: 700; letter-spacing: 0.02em; }
.ifinav-brand .brand-tagline { font-size: 8px; color: rgba(255,255,255,0.35); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 1px; font-family: var(--font-mono, 'Share Tech Mono', monospace); }


.ifinav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-crt);
  font-size: 14px;
}
.ifinav-links a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.ifinav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.ifinav-links a.active { color: #fff; border-bottom: 1px solid var(--purple-2); border-radius: 0; padding-bottom: 4px; }

.ifinav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ifinav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.ifinav-hamburger span {
  width: 20px;
  height: 2px;
  background: var(--fg-muted);
  border-radius: 1px;
  transition: background 0.2s ease;
}
.ifinav-hamburger:hover span { background: #fff; }

/* AI Tools dropdown */
.ifinav-dropdown { position: relative; }
.ifinav-dropdown-btn {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-dim);
  font-family: var(--font-crt);
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ifinav-dropdown-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.ifinav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  background: var(--glass-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 100;
}
.ifinav-dropdown-menu.open { display: block; }
.ifinav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-crt);
  font-size: 13px;
  transition: background 0.15s ease;
}
.ifinav-dropdown-menu a:hover { background: rgba(139, 92, 246, 0.12); color: #fff; }
.ifinav-dropdown-menu .sub { color: var(--fg-faint); font-size: 10px; display: block; font-family: var(--font-body); }

/* Mobile overlay */
.ifinav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}
.ifinav-mobile.open { display: flex; }
.ifinav-mobile a {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-crt);
  font-size: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.ifinav-mobile a:hover, .ifinav-mobile a.active { color: #fff; background: rgba(139, 92, 246, 0.15); }
.ifinav-mobile-close {
  align-self: flex-end;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  padding: 6px 12px;
  font-family: var(--font-crt);
  cursor: pointer;
  margin-bottom: 12px;
}

/* ---------- Footer ---------- */
.ifi-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px 24px;
  margin-top: 48px;
}
.ifi-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.ifi-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ifi-footer-brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.ifi-footer-tagline {
  font-family: var(--font-crt);
  color: var(--fg-faint);
  font-size: 12px;
}
.ifi-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--font-crt);
  font-size: 12px;
  color: var(--fg-faint);
}
.ifi-footer-links a { color: var(--fg-faint); transition: color 0.2s ease; }
.ifi-footer-links a:hover { color: #fff; }

@media (min-width: 768px) {
  .ifi-footer-inner { flex-direction: row; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .ifinav-links, .ifinav-cta-desktop { display: none; }
  .ifinav-hamburger { display: flex; }
}

/* Mobile menu sections */
.ifinav-mobile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}
.ifinav-mobile-section {
  margin-bottom: 20px;
}
.ifinav-mobile-section-label {
  font-family: var(--font-crt);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-2, #a855f7);
  padding: 6px 16px 8px;
  opacity: 0.8;
}
.ifinav-mobile a {
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-crt);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ifinav-mobile a:hover, .ifinav-mobile a.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
}
.ifinav-mobile .ifi-btn {
  flex-shrink: 0;
  text-align: center;
  justify-content: center;
}
test

/* Mobile menu sections */
.ifinav-mobile-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}
.ifinav-mobile-section {
  margin-bottom: 20px;
}
.ifinav-mobile-section-label {
  font-family: var(--font-crt);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-2, #a855f7);
  padding: 6px 16px 8px;
  opacity: 0.8;
}
.ifinav-mobile a {
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-crt);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ifinav-mobile a:hover, .ifinav-mobile a.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
}
.ifinav-mobile .ifi-btn {
  flex-shrink: 0;
  text-align: center;
  justify-content: center;
}

/* Social icons in nav */
.ifinav-social { color: rgba(255,255,255,0.35); transition: color 0.2s; display: flex; align-items: center; padding: 0 6px; }
.ifinav-social:hover { color: #fff; }
.ifinav-social svg { display: block; }
