/*
Theme Name: Aisend Knowledge Catalogue
Theme URI: https://aisend.co.za
Author: Aisend
Description: Light Architectural Enterprise AI Knowledge Infrastructure
Version: 3.2
License: GNU General Public License v3
Text Domain: aisend-catalogue
*/

:root {
  --bg-primary: #0a0f1e;
  --bg-module: #111827;
  --bg-canvas: transparent;

  --border-subtle: rgba(45, 212, 191, 0.07);
  --border-medium: rgba(45, 212, 191, 0.14);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-mono: #64748b;

  --accent: #2dd4bf;
  --accent-glow: rgba(45, 212, 191, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 5rem;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  animation: gridDrift 25s linear infinite;
}
@keyframes gridDrift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

#bg-network-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

#swarm-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }

.text-light { font-weight: 300; }
.text-regular { font-weight: 400; }
.text-medium { font-weight: 500; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }

.text-italic {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.mono, .system-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mono-regular {
  font-weight: 500;
  text-transform: none;
}

/* Explicit case helpers — use instead of relying on .mono */
.mono-lower { text-transform: lowercase; }
.mono-upper { text-transform: uppercase; }

/* Stat labels in cards should be lowercase for the terminal aesthetic */
.stat-label { text-transform: lowercase; }
/* Card badges use uppercase for scannability */
.card-badge { text-transform: uppercase; }


.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu { display: flex; gap: var(--spacing-lg); list-style: none; }
.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--text-primary); }

.hero {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.status-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.hero-title {
  max-width: 900px;
  margin-bottom: var(--spacing-md);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: var(--spacing-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(17, 24, 39, 0.6);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.btn:hover {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #3b82f6);
  border-color: transparent;
  color: #0a0f1e;
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5eead4, #60a5fa);
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.35);
}

.catalogue-section {
  padding: var(--spacing-xl) 0;
}

.section-header { margin-bottom: var(--spacing-lg); }
.section-title { margin-bottom: var(--spacing-xs); }
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.bento-module {
  background: var(--bg-module);
  padding: var(--spacing-lg);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bento-module:hover {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.module-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-subtle);
}

.module-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
}

.module-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.stat-item { display: flex; gap: 0.25rem; }
.stat-label { color: var(--text-muted); }
.stat-value { color: var(--text-primary); font-weight: 500; }

.module-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.module-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.assessment-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-medium);
  border: 1px solid var(--border-medium);
  min-height: calc(100vh - 80px);
  margin-top: 80px;
}

.assessment-chat {
  background: var(--bg-module);
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
}

.assessment-visual {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

#assessment-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.chat-input-area {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--spacing-md);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-field {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-module);
  color: var(--text-primary);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
}

.search-field:focus {
  border-color: var(--accent);
}

.filter-bar {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border-medium);
  background: var(--bg-module);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-module);
  padding: var(--spacing-lg);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.card-accent {
  width: 3px;
  height: 40px;
  position: absolute;
  top: var(--spacing-lg);
  left: 0;
  transition: height 0.25s ease, opacity 0.25s ease;
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.card-meta {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.card-body {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-footer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-subtle);
}

.card-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  padding-top: calc(var(--spacing-xl) + 80px);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text-primary);
}

.detail-layout {
  padding-top: calc(var(--spacing-xl) + 80px);
  padding-bottom: var(--spacing-xl);
}

.detail-header {
  margin-bottom: var(--spacing-lg);
}

.detail-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.detail-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-medium);
  color: var(--text-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.detail-title {
  margin-bottom: var(--spacing-sm);
}

.detail-outcome {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.detail-section {
  margin-bottom: var(--spacing-lg);
}

.detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.detail-section p {
  color: var(--text-secondary);
  max-width: 700px;
  line-height: 1.7;
}

.detail-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-subtle);
}

.empty-state {
  text-align: center;
  padding: var(--spacing-xl) 0;
  color: var(--text-muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: var(--bg-module);
  width: min(540px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border-medium);
  position: relative;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.3s cubic-bezier(.16,1,.3,1), transform 0.3s cubic-bezier(.16,1,.3,1);
}

.modal-overlay.active .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-medium);
  background: var(--bg-module);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.modal-close:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-body p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

.form-field {
  margin-bottom: var(--spacing-md);
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  border-radius: 2px;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

.filter-drawer-toggle {
  display: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border-medium);
  background: var(--bg-module);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  margin-bottom: var(--spacing-md);
}

.filter-drawer-toggle:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.filter-drawer {
  display: none;
}

.filter-drawer.open {
  display: block;
}

@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .assessment-layout { grid-template-columns: 1fr; }
  .assessment-visual { min-height: 400px; }
  .container { padding: 0 var(--spacing-md); }
}

.hamburger {
  display: none; flex-direction: column; gap: 4px; cursor: pointer;
  background: none; border: none; padding: 8px; margin-left: auto;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none; position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: var(--bg-module); border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08); max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-nav.open { display: block; max-height: calc(100vh - 60px); overflow-y: auto; }
.mobile-nav-menu { list-style: none; padding: 0; margin: 0; }
.mobile-nav-menu li { border-bottom: 1px solid var(--border-subtle); }
.mobile-nav-menu a {
  display: block; padding: 14px 24px; font-size: 0.9375rem; font-weight: 500;
  color: var(--text-primary); text-decoration: none;
}
.mobile-nav-menu a:hover { background: var(--bg-primary); }

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }
  .footer-content { flex-direction: column; gap: var(--spacing-sm); align-items: flex-start; }

  .filter-bar { display: none; }
  .filter-drawer-toggle { display: inline-flex; align-items: center; gap: 0.5rem; }
  .filter-drawer { margin-bottom: var(--spacing-md); }
  .filter-drawer.open .filter-bar { display: flex; flex-direction: column; }

  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; justify-content: center; }

  .modal-panel { width: 100%; max-height: 100vh; }
  .modal-overlay { padding: 0; }
}

/* ============================================================
   HOMEPAGE REDESIGN — catalogue layout, graph, colour, images
   All rules below are NEW additions — nothing above is altered
   ============================================================ */

/* --- Additional colour tokens ----------------------------- */
:root {
  --accent-teal:   #2dd4bf;
  --accent-green:  #10b981;
  --accent-violet: #7c3aed;
  --accent-blue:   #3b82f6;
  --accent-warm:   #f59e0b;
}

/* --- Colour utility classes -------------------------------- */
.text-accent-teal   { color: var(--accent-teal); }
.text-accent-green  { color: var(--accent-green); }
.text-accent-violet { color: var(--accent-violet); }
.text-accent-blue   { color: var(--accent-blue); }
.text-accent-warm   { color: var(--accent-warm); }

/* --- Italic accent helper (coloured em tags) --------------- */
em.text-accent-teal   { color: var(--accent-teal);   font-style: italic; font-weight: 300; }
em.text-accent-green  { color: var(--accent-green);  font-style: italic; font-weight: 300; }
em.text-accent-violet { color: var(--accent-violet); font-style: italic; font-weight: 300; }
em.text-accent-blue   { color: var(--accent-blue);   font-style: italic; font-weight: 300; }

/* --- Nav logo image --------------------------------------- */
.nav-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
.site-logo { line-height: 1; padding: 2px 0; }

/* --- Hero tweaks for home ---------------------------------- */
.home-hero { padding-bottom: var(--spacing-lg); }

.hero-em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-teal);
  letter-spacing: -0.02em;
}

/* --- Search bar ------------------------------------------- */
.home-search-form { margin-top: 0; max-width: 720px; }

.home-search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-module);
  border: 1.5px solid var(--border-medium);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-search-bar:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.12);
}

.search-icon {
  flex-shrink: 0;
  margin-left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.home-search-input {
  flex: 1;
  padding: 0.9rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
}
.home-search-input::placeholder { color: var(--text-muted); }

.home-search-btn {
  flex-shrink: 0;
  padding: 0.9rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--text-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.02em;
}
.home-search-btn:hover { background: #1e293b; }

/* --- Section header accents ------------------------------- */
.home-catalogue .section-title {
  position: relative;
  display: inline-block;
  padding-left: 0;
  border-left: none;
}
.home-catalogue .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
  margin-top: 0.4rem;
  border-radius: 2px;
}

.section-subtitle-note {
  display: block;
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

/* --- Product grid ----------------------------------------- */
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 0;
}

/* --- Product card ----------------------------------------- */
.home-product-card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-top: 3px solid var(--card-accent, var(--accent));
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.home-product-card:hover {
  box-shadow: 0 8px 40px rgba(45, 212, 191, 0.12), 0 0 0 1px var(--card-accent, var(--accent));
  transform: translateY(-4px);
  border-color: var(--card-accent, var(--accent));
}

/* graph canvas area */
.home-card-graph {
  position: relative;
  height: 190px;
  background: linear-gradient(160deg, rgba(10,15,30,0.9) 0%, rgba(17,24,39,0.7) 100%);
  border-bottom: 1px solid rgba(45, 212, 191, 0.08);
  overflow: hidden;
}
.home-card-graph canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.graph-label {
  position: absolute;
  bottom: 0.6rem;
  left: 0.75rem;
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(10, 15, 30, 0.75);
  padding: 2px 6px;
  border-radius: 2px;
}

/* logo area */
.home-card-logo {
  padding: 1.25rem 1.5rem 0.5rem;
}
.product-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* stats */
.home-card-stats {
  padding: 0 1.5rem;
  margin-top: 0.5rem;
}

/* body */
.home-card-body {
  padding: 0.75rem 1.5rem 0;
  flex: 1;
}
.home-card-body .module-description {
  font-size: 0.9375rem;
  margin-bottom: 0;
}
.home-card-body em {
  font-style: italic;
  font-weight: 400;
}

/* footer / CTA */
.home-card-footer {
  padding: 1.25rem 1.5rem;
  margin-top: auto;
}
.home-card-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.875rem;
  background: transparent;
}
.home-card-btn:hover {
  background: rgba(255,255,255,0);
  opacity: 0.85;
}

/* --- Zara strip ------------------------------------------- */
.zara-strip {
  margin: var(--spacing-xl) 0 var(--spacing-lg);
  background: linear-gradient(135deg,
    rgba(45,212,191,0.09) 0%,
    rgba(59,130,246,0.09) 50%,
    rgba(124,58,237,0.07) 100%);
  border: 1px solid rgba(45,212,191,0.25);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
}
.zara-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue), var(--accent-violet));
}
.zara-strip-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}
.zara-image-col {
  flex-shrink: 0;
}
.zara-avatar {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(45,212,191,0.08);
  padding: 6px;
  border: 2px solid rgba(45,212,191,0.25);
}
.zara-content-col { flex: 1; }

.zara-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--accent-teal);
  letter-spacing: 0.06em;
}
.zara-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.zara-name-em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-teal);
}
.zara-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: var(--spacing-md);
}
.zara-btn {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  font-size: 0.875rem;
}
.zara-btn:hover {
  background: rgba(45,212,191,0.06);
  border-color: var(--accent-teal);
  transform: translateY(-1px);
}

/* --- Featured strip --------------------------------------- */
.featured-strip {
  border: 1px solid rgba(45, 212, 191, 0.15);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
  backdrop-filter: blur(8px);
  background: rgba(17, 24, 39, 0.6);
}
.featured-strip-header {
  padding: 0.6rem 1.25rem;
  background: rgba(10, 15, 30, 0.5);
  border-bottom: 1px solid rgba(45, 212, 191, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.featured-entries { background: transparent; }

.featured-entry-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.featured-entry-row:last-child { border-bottom: none; }
.featured-entry-row:hover { background: rgba(59,130,246,0.03); }

.featured-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--accent-blue);
  letter-spacing: 0.05em;
  min-width: 160px;
}
.featured-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.featured-title em {
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
}
.featured-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.15s, transform 0.15s;
}
.featured-entry-row:hover .featured-arrow {
  color: var(--accent-blue);
  transform: translateX(3px);
}

/* --- Catalogue section typography accents (inner pages) --- */
.section-title {
  position: relative;
  padding-left: 0.875rem;
  border-left: 3px solid var(--accent);
}

/* Left-border accent on detail sections */
.detail-section h2,
.detail-section-title {
  font-family: var(--font-sans);
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  text-transform: none;
  letter-spacing: -0.01em;
  padding-left: 0.875rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.detail-section p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.625;
  margin-left: 1.125rem;
}

/* Catalogue card hover — coloured accent bar */
.card:hover .card-accent { opacity: 1; height: 60px; }
.card .card-accent { opacity: 0.7; transition: opacity 0.25s ease, height 0.25s ease; }

/* Module description italic key phrases */
.module-description em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Breadcrumbs — subtle italic hierarchy */
.breadcrumbs .breadcrumb-sep { color: var(--text-muted); font-style: italic; }

/* Monospace label colour accents */
.stat-label { color: var(--text-muted); }
.stat-value { font-weight: 600; }

/* --- Responsive: home product grid ----------------------- */
@media (max-width: 1024px) {
  .home-product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .home-card-graph { height: 150px; }
}
@media (max-width: 768px) {
  .zara-strip-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .zara-avatar { width: 64px; height: 64px; }
  .featured-entry-row { flex-wrap: wrap; gap: 0.25rem; }
  .featured-label { min-width: 100%; }
  .home-search-btn { padding: 0.9rem 1rem; font-size: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   CATALOGUE LAYOUT — sidebar + main content
   ═══════════════════════════════════════════════════════════ */

/* Sidebar toggle button — visible only on tablet/mobile */
.sidebar-toggle-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-module);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  margin-bottom: var(--spacing-md);
  transition: border-color 0.2s, color 0.2s;
}
.sidebar-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-toggle-btn svg { flex-shrink: 0; }

/* Two-column catalogue wrapper */
.catalogue-with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  position: relative;
}

/* ── Sidebar ── */
.catalogue-sidebar {
  position: sticky;
  top: calc(var(--header-height, 68px) + 1.5rem);
  max-height: calc(100vh - var(--header-height, 68px) - 3rem);
  overflow-y: auto;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(45, 212, 191, 0.1);
  border-radius: 10px;
  padding: 1.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
  backdrop-filter: blur(12px);
}
.catalogue-sidebar::-webkit-scrollbar { width: 4px; }
.catalogue-sidebar::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }

/* Sidebar sections */
.sidebar-section {
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-heading {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-link {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 0.375rem 0.5rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}
.sidebar-link:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.sidebar-link.active {
  background: rgba(37, 99, 235, 0.07);
  color: var(--accent);
  font-weight: 600;
  position: relative;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
}

.sidebar-filter-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0.375rem 0.5rem;
  cursor: default;
}

.sidebar-active-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.375rem;
  vertical-align: middle;
}

.sidebar-util-link {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.sidebar-util-link:hover { color: var(--text-secondary); background: var(--bg-primary); }

/* Status dots in sidebar */
.sidebar-status-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}
.status-live .sidebar-status-dot    { background: #10b981; }
.status-beta .sidebar-status-dot    { background: #f59e0b; }
.status-coming-soon .sidebar-status-dot { background: #94a3b8; }

/* ── Status badge variants on cards & detail pages ── */
.badge-live    { background: rgba(16, 185, 129, 0.08); color: #059669; border-color: rgba(16, 185, 129, 0.2); font-weight: 700; letter-spacing: 0.08em; }
.badge-beta    { background: rgba(245, 158, 11, 0.08); color: #d97706; border-color: rgba(245, 158, 11, 0.2); font-weight: 700; letter-spacing: 0.08em; }
.badge-coming-soon,
.badge-coming  { background: rgba(148, 163, 184, 0.08); color: #64748b; border-color: rgba(148, 163, 184, 0.2); font-weight: 700; letter-spacing: 0.08em; }

/* ── Header compact search (scroll-dock) ── */
.header-search-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  margin-left: auto;
  margin-right: 1rem;
}
.header-search-compact.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.header-search-compact input {
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}
.header-search-compact input:focus { border-color: var(--accent); }
.header-search-compact button {
  background: var(--accent);
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
}

/* ── Responsive: sidebar behaviour ── */

/* Tablet (1024px and below): sidebar becomes a drawer */
@media (max-width: 1024px) {
  .catalogue-with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar-toggle-btn { display: flex; }

  .catalogue-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    border-right: 1px solid var(--border-medium);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.08);
  }
  .catalogue-sidebar.sidebar-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 199;
  }
  .sidebar-overlay.active { display: block; }
}

/* Mobile (640px and below): bottom sheet */
@media (max-width: 640px) {
  .catalogue-sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 75vh;
    transform: translateY(100%);
    border-radius: 16px 16px 0 0;
    border-right: none;
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -4px 32px rgba(15, 23, 42, 0.1);
  }
  .catalogue-sidebar.sidebar-open {
    transform: translateY(0);
  }
  .header-search-compact { display: none; }
}

/* ── Responsive: small phones (480px and below) ──── */
@media (max-width: 480px) {
  .container { padding: 0 var(--spacing-sm); }
  .nav-container { padding: 0.625rem var(--spacing-sm); }
  .home-main { padding: 0.75rem 0.75rem 1.5rem; }
  .home-pillar-card { padding: 1rem; }
  .home-pillar-card .hpc-desc { font-size: 0.8125rem; }
  .home-pillar-card .hpc-logo { height: 32px; }
  .home-pillar-card .hpc-cta { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
  .home-search-input { font-size: 0.8125rem; padding: 0.6rem 0.75rem !important; }
  .home-search-btn { padding: 0.6rem 0.75rem !important; font-size: 0.6875rem !important; }
  .home-graph-canvas-wrap { min-height: 200px; }
  .home-graph-overlay { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .home-graph-section { min-height: 240px; }
  .hgo-cta { font-size: 0.75rem; padding: 0.375rem 0.75rem; }

  .card-grid { gap: 0.875rem; }
  .card { padding: 1.125rem; min-height: 240px; }
  .card-title { font-size: 1.0625rem; }
  .card-body { font-size: 0.8125rem; }
  .card-accent { top: 1.125rem; }
  .card-header { margin-bottom: 0.625rem; }
  .card-footer { margin-top: 0.625rem; padding-top: 0.625rem; }

  .bento-module { padding: var(--spacing-sm); min-height: auto; }

  .sidebar-link { padding: 0.5rem 0.5rem; font-size: 0.8125rem; }
  .filter-btn { padding: 0.5rem 0.75rem; font-size: 0.75rem; }

  .modal-panel { max-height: 100dvh; }
  .modal-header { padding: var(--spacing-sm); }
  .modal-body { padding: var(--spacing-sm); }
  .modal-footer { padding: var(--spacing-sm); }

  .detail-section h2 { font-size: 1.25rem; }
  .detail-title { font-size: clamp(1.25rem,5vw,1.75rem); }
  .detail-outcome { font-size: 1rem; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; justify-content: center; }

  .breadcrumbs { font-size: 0.6875rem; flex-wrap: wrap; padding-top: calc(var(--spacing-xl) + 64px); }

  .search-field { font-size: 0.875rem; padding: 0.75rem 0.875rem; }
  .nav-logo-img { height: 26px; }
}

/* ── Responsive: very small phones (375px and below) ── */
@media (max-width: 375px) {
  .container { padding: 0 0.625rem; }
  .nav-container { padding: 0.5rem 0.625rem; }
  .home-main { padding: 0.5rem 0.5rem 1.25rem; }
  .home-pillar-card { padding: 0.875rem; gap: 0.5rem; }
  .home-pillar-card .hpc-desc { font-size: 0.75rem; }
  .hpc-stats { font-size: 0.625rem; gap: 0.5rem; }
  .hpc-stat { font-size: 0.625rem; }
  .hpc-badge { font-size: 0.5rem; padding: 0.2rem 0.5rem; }
  .home-search-input { font-size: 0.75rem; padding: 0.5rem 0.625rem !important; }
  .home-graph-canvas-wrap { min-height: 160px; border-radius: 6px; }

  .card { padding: 0.875rem; min-height: 200px; }
  .card-title { font-size: 0.9375rem; }
  .card-body { font-size: 0.75rem; }
  .card-accent { top: 0.875rem; }
  .card-badge { font-size: 0.625rem; }

  .hero-title { font-size: 1.375rem !important; }
  .hero-description { font-size: 0.9375rem; }

  .sidebar-link { padding: 0.5rem 0.375rem; font-size: 0.75rem; }
  .sidebar-heading { font-size: 0.6rem; }

  .modal-header h2 { font-size: 1.25rem; }
}


