/* ═══════════════════════════════════════════════════
   CATALYSTAGILE.COM — COMPLETE SITE STYLESHEET
   Heavy Blue Metallic + Luxury Gold
   Light Mode: Warm Parchment
   ═══════════════════════════════════════════════════ */

:root {
  --bg-deep: #070b14;
  --bg-panel: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.72);
  --bg-glass-hover: rgba(30, 41, 59, 0.85);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gold: #c9a227;
  --gold-bright: #f0d878;
  --gold-dim: #8a7020;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --border: rgba(201, 162, 39, 0.15);
  --border-strong: rgba(201, 162, 39, 0.35);
  --shadow-gold: 0 0 40px rgba(201, 162, 39, 0.12);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-deep: #faf8f5;
  --bg-panel: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-hover: rgba(250, 248, 245, 0.95);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --gold: #b48a1a;
  --gold-bright: #d4a832;
  --gold-dim: #7a5e10;
  --accent-blue: #2563eb;
  --accent-cyan: #0891b2;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --shadow-gold: 0 0 30px rgba(180, 138, 26, 0.08);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.aurora {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35;
  animation: float 20s infinite ease-in-out;
}
.aurora-blob:nth-child(1) {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, transparent 70%);
  top: -10%; left: -10%; animation-delay: 0s;
}
.aurora-blob:nth-child(2) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,162,39,0.25) 0%, transparent 70%);
  top: 40%; right: -15%; animation-delay: -5s;
}
.aurora-blob:nth-child(3) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, transparent 70%);
  bottom: -10%; left: 30%; animation-delay: -10s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.noise {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── NAVIGATION ─── */
nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(16px); background: rgba(7, 11, 20, 0.7);
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
[data-theme="light"] nav { background: rgba(250, 248, 245, 0.8); }
nav.scrolled { padding: 0.75rem 2rem; box-shadow: 0 4px 30px rgba(0,0,0,0.15); }
.nav-logo {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
  color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo .c-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--bg-deep); border-radius: 8px; font-weight: 900; font-size: 1.1rem;
}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.875rem;
  font-weight: 500; letter-spacing: 0.02em; transition: var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gold); transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }
.theme-toggle {
  background: var(--bg-panel); border: 1px solid var(--border-strong); color: var(--gold);
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: 1.1rem;
}
.theme-toggle:hover { background: var(--gold); color: var(--bg-deep); transform: rotate(180deg); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  nav { padding: 1rem 1.25rem; }
}

/* ─── SECTIONS ─── */
section {
  position: relative; z-index: 2; padding: 6rem 2rem;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 768px) { section { padding: 4rem 1.25rem; } }

.section-label {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--gold); font-weight: 600; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.section-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--gold); }
.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem); color: var(--text-primary);
  margin-bottom: 1.5rem; letter-spacing: -0.03em; line-height: 1.1; font-weight: 700;
}
.section-subtitle {
  font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; line-height: 1.7;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  cursor: pointer; transition: var(--transition); border: none; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--bg-deep); box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4); }
.btn-secondary {
  background: var(--bg-glass); color: var(--text-primary);
  border: 1px solid var(--border-strong); backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: var(--bg-glass-hover); border-color: var(--gold); color: var(--gold); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); padding: 0.6rem 1.25rem; font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ─── CARDS ─── */
.card {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: var(--transition); backdrop-filter: blur(10px);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow-gold); }

/* ─── GRIDS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── FORMS ─── */
input, textarea {
  width: 100%; padding: 0.875rem 1rem;
  background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 0.9rem; transition: var(--transition); font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1); }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border); padding: 3rem 2rem;
  text-align: center; color: var(--text-muted); font-size: 0.8rem;
  position: relative; z-index: 2;
}
footer a { color: var(--gold); text-decoration: none; }
.footer-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  max-width: 1200px; margin: 0 auto 2rem; text-align: left;
}
.footer-col h5 { color: var(--text-primary); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-col a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; margin-bottom: 0.5rem; transition: var(--transition);
}
.footer-col a:hover { color: var(--gold); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── INTERCOM FAB ─── */
.intercom-fab {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  border: none; border-radius: 50%; color: var(--bg-deep);
  font-size: 1.5rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 162, 39, 0.4);
  z-index: 99; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.intercom-fab:hover { transform: scale(1.1) rotate(10deg); box-shadow: 0 6px 30px rgba(201, 162, 39, 0.5); }

/* ─── UTILITIES ─── */
.accent {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.full-width { max-width: 100%; padding-left: 0; padding-right: 0; }
.full-width > * { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 2rem; padding-right: 2rem; }

/* ─── PAGE HEADER ─── */
.page-header {
  min-height: 50vh; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding-top: 100px;
}
.page-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
.page-header p { font-size: 1.15rem; color: var(--text-secondary); max-width: 700px; }

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex; gap: 0.5rem; align-items: center;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { color: var(--gold-dim); }

/* ─── TOOL CARDS (Arsenal) ─── */
.tool-search-wrap {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1.5rem;
}
.tool-search { position: relative; width: 100%; max-width: 400px; }
.tool-search input { padding-left: 2.75rem; }
.tool-search svg {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); width: 18px; height: 18px;
}
.tool-categories { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.cat-btn {
  padding: 0.5rem 1rem; background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text-secondary); font-size: 0.8rem;
  font-weight: 500; cursor: pointer; transition: var(--transition); backdrop-filter: blur(10px);
}
.cat-btn:hover, .cat-btn.active { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.tool-card {
  background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; cursor: pointer; transition: var(--transition); backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity 0.3s ease;
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-gold); }
.tool-card.hidden { display: none; }
.tool-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-dim) 0%, var(--gold) 100%);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 1rem; color: var(--bg-deep);
}
.tool-card h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.tool-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 1rem; }
.tool-tag {
  display: inline-block; padding: 0.25rem 0.625rem;
  background: rgba(201, 162, 39, 0.1); color: var(--gold);
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; border-radius: 4px;
}

/* ─── CASE STUDIES ─── */
.case-status {
  padding: 0.35rem 0.75rem; border-radius: 100px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.case-status.shipped { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.case-status.killed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.case-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.case-meta span { font-size: 0.8rem; color: var(--text-muted); }

/* ─── PROCESS STEPS ─── */
.process-steps { display: flex; flex-direction: column; gap: 0; position: relative; margin-top: 3rem; }
.process-steps::before {
  content: ''; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--accent-cyan)); opacity: 0.3;
}
.process-step { display: flex; gap: 1.5rem; padding: 1.5rem 0; position: relative; }
.step-number {
  width: 50px; height: 50px; min-width: 50px; background: var(--bg-panel);
  border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--gold); font-size: 1.1rem; position: relative; z-index: 2;
}
.step-content h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step-content p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; max-width: 600px; }

/* ─── STACK ─── */
.stack-item {
  background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  transition: var(--transition); backdrop-filter: blur(10px);
}
.stack-item:hover { border-color: var(--gold); transform: translateX(4px); }
.stack-icon {
  width: 44px; height: 44px; background: var(--bg-panel); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; border: 1px solid var(--border);
}
.stack-info h5 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.stack-info span { font-size: 0.8rem; color: var(--text-muted); }

/* ─── PHILOSOPHY ─── */
.philosophy-quote {
  background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 3rem; text-align: center; position: relative;
}
.philosophy-quote::before {
  content: '"'; font-size: 6rem; color: var(--gold); opacity: 0.2;
  position: absolute; top: 1rem; left: 2rem; line-height: 1; font-family: Georgia, serif;
}
.philosophy-quote p {
  font-size: clamp(1.25rem, 3vw, 1.75rem); font-style: italic;
  color: var(--text-primary); line-height: 1.5; position: relative; z-index: 2;
}
.philosophy-quote .attribution { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); font-style: normal; }

/* ─── NEWSLETTER ─── */
.newsletter-form {
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem; backdrop-filter: blur(10px);
}
.newsletter-form h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.newsletter-form p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeInUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ─── DIVIDER ─── */
.section-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0 auto; max-width: 200px;
}

/* ─── CONTACT PAGE ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.75rem; transition: var(--transition);
}
.contact-links a:hover { color: var(--gold); transform: translateX(4px); }

/* ─── 404 PAGE ─── */
.error-page { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.error-code { font-size: 8rem; font-weight: 800; color: var(--gold); opacity: 0.3; line-height: 1; }
