/* =====================================================================
   NCAM Group — Shared Design System (Quant Finance Edition)
   All HTML class names are preserved; no regressions.
   ===================================================================== */

/* ----- Design Tokens ----- */
:root {
  --bg:           #05080f;
  --bg-dark:      #020408;
  --panel:        rgba(15, 23, 42, 0.6);
  --panel-solid:  #0f172a;
  --panel-light:  rgba(30, 41, 59, 0.4);

  --primary:      #3df9e4;
  --primary-rgb:  61, 249, 228;
  --accent:       #ffb233;
  --accent-rgb:   255, 178, 51;

  --text:         #f8fafc;
  --text-dim:     #94a3b8;
  --muted:        #64748b;

  --glow:         rgba(61, 249, 228, 0.2);
  --glow-accent:  rgba(255, 178, 51, 0.1);

  --border:       rgba(255, 255, 255, 0.06);
  --border2:      rgba(61, 249, 228, 0.18);
  --border-bright:rgba(61, 249, 228, 0.18);

  --shadow:       rgba(0, 0, 0, 0.5);

  --nav-h:        80px;

  --font-main:    'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ----- Reset ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(61,249,228,0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(255,178,51,0.03) 0%, transparent 40%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----- Background Decoration (applied via divs in HTML) ----- */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.011) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.009) 1px, transparent 1px);
  background-size: 120px 24px; /* Bloomberg: wide columns + tight data rows */
  pointer-events: none;
  z-index: -2;
}

.bg-dots {
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(61,249,228,0.018) 1px, transparent 1px);
  background-size: 40px 48px; /* offset from grid for visual depth */
  pointer-events: none;
  z-index: -1;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(61,249,228,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =====================================================================
   NAVIGATION
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(5, 8, 15, 0.75);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.nav.scrolled {
  background: rgba(2, 4, 8, 0.95);
  border-bottom-color: var(--border-bright);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.nav-inner {
  height: var(--nav-h);
  max-width: 1300px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  transition: height 0.3s ease;
}

.nav.scrolled .nav-inner { height: 64px; }

/* Brand */
.brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-heading); font-weight: 700; font-size: 20px;
  letter-spacing: -0.5px; color: var(--text);
}

.brand-logo-img {
  width: 44px; height: 44px; border-radius: 8px; object-fit: contain;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  filter: drop-shadow(0 0 8px rgba(61,249,228,0.2));
}

.brand:hover .brand-logo-img {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 0 18px var(--primary));
}

.brand-logo-fallback {
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(61,249,228,0.08);
  border: 1px solid rgba(61,249,228,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--primary);
}

/* Desktop nav links */
.nav-links { display: flex; align-items: center; gap: 36px; }

.nav-links a {
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  font-family: var(--font-mono);
  position: relative; transition: color 0.3s ease; padding: 8px 0;
}

.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--primary); border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1);
}

.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }

/* Language Switcher */
.lang-switcher {
  display: flex; gap: 2px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px;
  margin-left: 12px;
}

.lang-btn {
  padding: 5px 12px; border: none; background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 700;
  font-family: var(--font-mono); border-radius: 4px; cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.active {
  background: var(--primary); color: var(--bg-dark);
  box-shadow: 0 2px 10px rgba(61,249,228,0.2);
}

/* Hamburger button */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 8px;
  background: transparent; cursor: pointer; gap: 5px;
  transition: all 0.3s ease; flex-shrink: 0;
}

.hamburger:hover { border-color: var(--primary); background: rgba(61,249,228,0.07); }

.hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(5,8,15,0.97); backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border); z-index: 190;
  flex-direction: column; padding: 20px 28px 32px; gap: 4px;
  transform: translateY(-12px); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.3s ease;
  pointer-events: none;
}

.mobile-drawer.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.mobile-drawer a {
  display: block; padding: 14px 0; color: var(--muted); font-size: 15px;
  font-weight: 600; border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); letter-spacing: 0.5px; text-transform: uppercase;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-drawer a:hover { color: var(--primary); padding-left: 6px; }
.mobile-drawer a:last-of-type { border-bottom: none; }
.mobile-drawer .lang-switcher { margin-top: 20px; align-self: flex-start; }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.container { max-width: 1300px; margin: 0 auto; padding: 0 32px; }

.section { padding: 80px 0; position: relative; }

.section-header { text-align: center; margin-bottom: 64px; }

/* =====================================================================
   TYPOGRAPHY
   ===================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading); line-height: 1.1; font-weight: 700;
}

h1 {
  font-size: clamp(44px, 8vw, 80px); letter-spacing: -3px;
  background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(34px, 5vw, 52px); letter-spacing: -2px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 19px; color: var(--text-dim);
  max-width: 640px; margin: 0 auto; line-height: 1.7;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 15px 30px;
  border-radius: 4px;  /* sharp corners = finance terminal */
  font-weight: 700; font-size: 13px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1.2px;
  cursor: pointer; border: 1px solid var(--border-bright);
  background: rgba(61,249,228,0.05); color: var(--text);
  position: relative; overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  z-index: 1;
}

.btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--primary);
  transform: translateX(-101%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  z-index: -1;
}

.btn:hover {
  color: var(--bg-dark); border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(61,249,228,0.2);
}

.btn:hover::before { transform: translateX(0); }

.btn.primary {
  background: var(--primary); color: var(--bg-dark); border: none;
  box-shadow: 0 8px 25px rgba(61,249,228,0.25);
}

.btn.primary::before { background: #fff; }

.btn.primary:hover { box-shadow: 0 14px 40px rgba(61,249,228,0.4); }

.btn.primary:active { transform: translateY(-1px); }

/* =====================================================================
   CARDS
   ===================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: 8px; padding: 36px;
  transition: all 0.5s cubic-bezier(0.16,1,0.3,1);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

/* Quant data label */
.card::before {
  content: 'NC-DS // 001'; position: absolute; top: 12px; right: 16px;
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  opacity: 0.4; letter-spacing: 1px; pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--primary); border-top-color: var(--primary);
  box-shadow: 0 24px 56px rgba(0,0,0,0.5), 0 0 20px rgba(61,249,228,0.06);
  background: var(--panel-light);
}

.card h3 {
  font-size: 21px; margin-bottom: 14px; color: var(--primary);
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.5px;
  -webkit-text-fill-color: var(--primary); /* override gradient on h */
}

.card p { color: var(--text-dim); font-size: 15px; line-height: 1.75; }

.card-icon {
  width: 50px; height: 50px; border-radius: 8px;
  background: rgba(61,249,228,0.08); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; border: 1px solid rgba(61,249,228,0.15);
  filter: drop-shadow(0 0 6px var(--glow));
}

/* Info card (secondary pages) */
.info-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 32px; margin-bottom: 20px;
  backdrop-filter: blur(10px); transition: border-color 0.3s ease;
}

.info-card:hover { border-color: var(--border-bright); }

.highlight-box {
  background: rgba(61,249,228,0.05);
  border-left: 3px solid var(--primary);
  padding: 28px 32px; margin: 40px 0; border-radius: 0 8px 8px 0;
}

.contact-box {
  background: linear-gradient(135deg, rgba(61,249,228,0.08), rgba(255,178,51,0.08));
  border: 1px solid var(--border-bright); border-radius: 12px;
  padding: 48px 40px; margin: 40px 0; text-align: center;
}

.contact-box h2 { margin-bottom: 16px; }

/* =====================================================================
   HERO SECTION
   ===================================================================== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(61,249,228,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,178,51,0.05) 0%, transparent 50%);
}

/* Legacy animated bg classes (from old hero) */
.hero-animated-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160vw; height: 160vh;
  background:
    radial-gradient(circle at 50% 50%, rgba(61,249,228,0.05), transparent 60%),
    radial-gradient(circle at 10% 10%, rgba(61,249,228,0.08), transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(255,178,51,0.05), transparent 50%);
  animation: heroRotate 18s linear infinite;
  filter: blur(60px); will-change: transform; pointer-events: none;
}

.hero-orb {
  position: absolute; border-radius: 50%; opacity: 0.07;
  filter: blur(100px); animation: orbFloat 28s ease-in-out infinite;
}

.hero-orb:nth-child(2) { width: 700px; height: 700px; top: -15%; left: -10%; background: var(--primary); }
.hero-orb:nth-child(3) { width: 600px; height: 600px; bottom: -15%; right: -10%; background: var(--accent); animation-delay: -14s; }

@keyframes heroRotate {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(40px,-40px) scale(1.06); }
  66%       { transform: translate(-25px,25px) scale(0.95); }
}

.hero-content { position: relative; z-index: 2; max-width: 880px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 20px; border-radius: 100px;
  background: rgba(61,249,228,0.07); border: 1px solid rgba(61,249,228,0.22);
  font-size: 12px; font-weight: 700; color: var(--primary);
  margin-bottom: 32px; letter-spacing: 0.6px; text-transform: uppercase;
  font-family: var(--font-mono);
  opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.2s forwards;
}

.hero-badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

.hero-lead {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-dim); line-height: 1.65; margin-bottom: 48px; max-width: 700px;
  opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.6s forwards;
}

.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0; animation: fadeInUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.8s forwards;
}

/* =====================================================================
   STATS
   ===================================================================== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin: 80px 0;
}

.stat-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 36px 24px; text-align: center;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Teal top accent line */
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}

.stat-card:hover {
  transform: translateY(-6px); border-color: var(--border-bright);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.stat-card:hover::after { transform: scaleX(1); }

.stat-value {
  font-size: 48px; font-weight: 800; font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px; line-height: 1;
}

.stat-label {
  font-size: 12px; color: var(--muted); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-mono);
}

/* =====================================================================
   TABS (Ecosystem)
   ===================================================================== */
.tabs { margin-top: 40px; }

.tab-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-width: 800px; margin: 0 auto 44px;
}

.tab-btn {
  padding: 14px 20px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s ease;
}

.tab-btn:hover { border-color: var(--border-bright); color: var(--text); }

.tab-btn[aria-selected="true"],
.tab-btn.active {
  background: var(--primary); color: var(--bg-dark); border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(61,249,228,0.2);
}

.tab-panel { display: none; animation: fadeIn 0.4s ease; }
.tab-panel.active { display: block; }

/* =====================================================================
   MAP / ORG CHART
   ===================================================================== */
.map-container {
  background: rgba(5,8,15,0.6); border: 1px solid var(--border);
  border-radius: 6px; padding: 20px; margin-top: 24px;
  backdrop-filter: blur(10px);
}

.map-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05);
}

.map-title {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--primary); opacity: 0.7;
}

.map-legend { display: flex; gap: 16px; align-items: center; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

.legend-item { display: flex; align-items: center; gap: 6px; }

.legend-dot { width: 8px; height: 8px; border-radius: 2px; }

.svg-map { width: 100%; max-height: 260px; height: auto; display: block; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px); display: none;
  align-items: center; justify-content: center; z-index: 300; padding: 20px;
}

.modal.open { display: flex; }

.modal-content {
  background: var(--panel-solid); border: 1px solid var(--border);
  border-radius: 16px; max-width: 1100px; width: 100%; padding: 36px;
  position: relative; animation: scaleIn 0.4s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }

.modal-title { font-size: 20px; font-weight: 700; }

.zoom-controls { display: flex; gap: 8px; }

.zoom-btn {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; transition: all 0.25s ease;
  font-size: 16px; font-weight: 700; font-family: var(--font-mono);
  display: inline-flex; align-items: center; justify-content: center;
}

.zoom-btn:hover { border-color: var(--primary); background: rgba(61,249,228,0.1); color: var(--primary); }
.zoom-btn.auto { width: auto; padding: 0 14px; font-size: 12px; }

.panzoom-container {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  height: 560px; background: var(--bg-dark); position: relative; cursor: grab;
}

.panzoom-container:active { cursor: grabbing; }

/* =====================================================================
   FOOTER
   ===================================================================== */
/* ── Footer top bar (terminal header) ── */
.footer-top-bar {
  border-top: 1px solid rgba(61,249,228,0.18);
  background: rgba(61,249,228,0.03);
  padding: 10px 0;
  margin-top: 100px;
}

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

.footer-sys-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--primary); opacity: 0.6;
}

.footer-sys-status {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--primary); opacity: 0.5;
}

.footer-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Footer body ── */
footer {
  background: var(--bg-dark);
  padding: 60px 0 40px;
}

/* Both class names supported (footer-content from old HTML, footer-grid from new) */
.footer-content,
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 48px;
}

.footer-brand { display: flex; flex-direction: column; gap: 16px; }

.footer-logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 700; font-family: var(--font-heading);
}

.footer-desc { color: var(--muted); font-size: 13px; line-height: 1.75; }

/* Business unit tags */
.footer-units { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.footer-unit-tag {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--primary); opacity: 0.55;
  border: 1px solid rgba(61,249,228,0.18);
  padding: 3px 8px; border-radius: 2px;
  background: rgba(61,249,228,0.04);
}

/* old: footer-section h4, new: footer-col h4 */
.footer-section h4,
.footer-col h4 {
  font-size: 10px; font-weight: 700; margin-bottom: 20px;
  color: var(--primary); letter-spacing: 2px; text-transform: uppercase;
  font-family: var(--font-mono); opacity: 0.7;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }

.footer-links a {
  color: var(--muted); font-size: 13px;
  transition: color 0.25s ease, transform 0.25s ease; display: inline-block;
}

.footer-links a::before {
  content: '›'; margin-right: 7px;
  color: var(--primary); opacity: 0;
  transition: opacity 0.2s ease;
}

.footer-links a:hover { color: var(--text); transform: translateX(4px); }
.footer-links a:hover::before { opacity: 0.7; }

/* ── Footer bottom bar ── */
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono); letter-spacing: 0.5px;
}

.footer-bottom-prompt {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 1px;
  color: var(--primary); opacity: 0.35;
}

/* =====================================================================
   SECTION BACKGROUNDS — Bloomberg Quant Terminal
   ===================================================================== */

/* ── Stats: amber data-row band ── */
.section-stats {
  position: relative;
  padding: 80px 0;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(255,178,51,0.025) 30%,
    rgba(255,178,51,0.025) 70%,
    transparent 100%);
}

.section-stats::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,178,51,0.5) 50%, transparent 100%);
}

.section-stats::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,178,51,0.18) 50%, transparent 100%);
}

/* ── Services: fine vertical column guides ── */
#services {
  position: relative;
}

#services::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(61,249,228,0.007) 0px,
    rgba(61,249,228,0.007) 1px,
    transparent 1px,
    transparent 120px
  );
  pointer-events: none;
}

/* ── Ecosystem: teal terminal panel ── */
#ecosystem {
  position: relative;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(61,249,228,0.022) 30%,
    rgba(61,249,228,0.028) 50%,
    rgba(61,249,228,0.022) 70%,
    transparent 100%);
}

#ecosystem::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(61,249,228,0.7) 0%, rgba(61,249,228,0.2) 50%, transparent 100%);
}

#ecosystem::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(61,249,228,0.25) 0%, transparent 50%);
}

/* ── Map: Bloomberg crosshatch data grid ── */
#map {
  position: relative;
}

#map::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(61,249,228,0.013) 0px, rgba(61,249,228,0.013) 1px,
      transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg,
      rgba(61,249,228,0.008) 0px, rgba(61,249,228,0.008) 1px,
      transparent 1px, transparent 120px);
  pointer-events: none;
}

#map::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%,
    rgba(61,249,228,0.04) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Contact: amber terminal prompt ── */
#contact {
  position: relative;
}

#contact::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,178,51,0.6) 50%, transparent 100%);
}

#contact::after {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 64px; height: 2px;
  background: rgba(255,178,51,0.85);
}

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
  will-change: transform, opacity;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* =====================================================================
   ANIMATIONS
   ===================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(14px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   SECONDARY PAGES (sub-nav bar)
   ===================================================================== */
.sub-nav {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(5,8,15,0.92); border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.sub-nav-inner {
  max-width: 900px; margin: 0 auto; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}

.sub-nav .brand { font-size: 15px; }
.sub-nav .brand-logo-img { width: 30px; height: 30px; }
.sub-nav .brand-logo-fallback { width: 30px; height: 30px; font-size: 10px; }

/* ── Subpage shell ── */
.sub-container {
  max-width: 900px; margin: 0 auto; padding: 40px 24px 100px;
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-size: 12px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 28px; opacity: 0.7;
  transition: gap 0.25s ease, opacity 0.25s ease;
}

.back-link:hover { gap: 12px; opacity: 1; }

/* ── Subpage hero ── */
.sub-container h1 {
  font-size: clamp(28px, 4vw, 46px); margin-bottom: 12px; letter-spacing: -2px;
}

.sub-container .lead {
  font-size: 15px; color: var(--text-dim); max-width: 720px;
  margin-bottom: 36px; line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 28px;
}

/* ── Section blocks ── */
.sub-container > .section {
  padding: 28px 0 0;
  margin-bottom: 0;
}

/* ── Bloomberg-style field-label headings ── */
.sub-container h2 {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
  background: none;
  margin: 0 0 16px;
  padding: 7px 12px 7px 12px;
  border-left: 2px solid var(--primary);
  background: linear-gradient(90deg, rgba(61,249,228,0.07) 0%, transparent 100%);
  border-radius: 0 3px 3px 0;
  display: flex; align-items: center;
}

/* ── Sub-headings ── */
.sub-container h3 {
  font-size: 13px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim); background: none;
  margin: 20px 0 6px; padding-left: 2px;
}

/* ── Body text ── */
.sub-container p {
  margin-bottom: 10px; color: var(--text-dim);
  font-size: 14px; line-height: 1.65;
}

.sub-container ul {
  margin: 6px 0 12px 0; color: var(--text-dim);
  list-style: none; padding: 0;
}

.sub-container li {
  margin-bottom: 5px; line-height: 1.55; font-size: 14px;
  padding-left: 16px; position: relative;
}

.sub-container li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--primary); opacity: 0.5; font-family: var(--font-mono);
}

.sub-container strong { color: var(--text); font-weight: 600; }

.sub-container a { color: var(--primary); transition: opacity 0.2s ease; }
.sub-container a:hover { opacity: 0.75; }

/* ── Section dividers ── */
.sub-container > .section + .section {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 28px;
}

/* ── Info cards — compact two-col grid ── */
.info-card {
  background: rgba(15,23,42,0.55); border: 1px solid var(--border);
  border-radius: 6px; padding: 16px 18px; margin-bottom: 8px;
  backdrop-filter: blur(10px); transition: border-color 0.25s ease;
}

.info-card:hover { border-color: rgba(61,249,228,0.2); }

.info-card h3 {
  font-size: 12px; font-weight: 700;
  font-family: var(--font-mono); letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--primary);
  -webkit-text-fill-color: var(--primary); background: none;
  margin: 0 0 6px; padding: 0;
}

/* Two-column grid for consecutive info-cards */
.section > .info-card ~ .info-card:nth-child(2n) {
  /* Handled via wrapping container or explicit grid class */
}

/* ── Highlight box — tighter ── */
.highlight-box {
  background: rgba(61,249,228,0.04);
  border-left: 2px solid var(--primary);
  padding: 16px 20px; margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.highlight-box h2 { margin-bottom: 10px !important; }

/* ── Contact box ── */
.contact-box {
  background: linear-gradient(135deg, rgba(61,249,228,0.06), rgba(255,178,51,0.06));
  border: 1px solid var(--border-bright); border-radius: 8px;
  padding: 32px 28px; margin: 28px 0; text-align: center;
}

.contact-box h2 { margin-bottom: 10px; }

/* ── Icon / prefix layout ── */
.icon-text { display: flex; align-items: flex-start; gap: 12px; }

.icon { font-size: 22px; flex-shrink: 0; line-height: 1; }

/* Terminal prefix — replaces emoji icons */
.section-prefix {
  font-family: var(--font-mono);
  color: var(--primary);
  opacity: 0.55;
  font-size: 14px;
  flex-shrink: 0;
  padding-top: 1px;
  min-width: 16px;
  user-select: none;
}

/* ── Email CTA ── */
.email-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; background: var(--primary); color: var(--bg-dark);
  border-radius: 4px; font-weight: 700; font-size: 14px; font-family: var(--font-mono);
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 4px 16px rgba(61,249,228,0.2);
}

.sub-container .email-link,
.email-link { color: var(--bg-dark) !important; }

.email-link:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(61,249,228,0.35); color: var(--bg-dark) !important; }

/* ── Profile cards ── */
.profile-card {
  background: rgba(15,23,42,0.55); border: 1px solid var(--border);
  border-radius: 6px; padding: 18px 20px; margin-bottom: 8px;
  backdrop-filter: blur(10px); transition: border-color 0.25s ease;
}

.profile-card:hover { border-color: var(--border-bright); }
.profile-card h3 { color: var(--primary); margin-bottom: 8px; -webkit-text-fill-color: var(--primary); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* ── 1024px — tablettes paysage ── */
@media (max-width: 1024px) {
  .stats                              { grid-template-columns: repeat(2, 1fr); }
  .cards                              { grid-template-columns: repeat(2, 1fr); }
  .footer-content, .footer-grid       { grid-template-columns: 1fr 1fr; gap: 40px; }
  .tab-list                           { grid-template-columns: repeat(2, 1fr); }
}

/* ── 768px — tablettes portrait + grands mobiles ── */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  /* Nav */
  .nav-links     { display: none; }
  .hamburger     { display: flex; }
  .mobile-drawer { display: flex; }

  /* Hero */
  .hero          { padding-top: var(--nav-h); }
  .hero-lead     { font-size: 16px; margin-bottom: 32px; }
  .hero-actions  { gap: 10px; }

  /* Stats / cards */
  .stats, .cards { grid-template-columns: 1fr; }

  /* Services */
  .service-row   { grid-template-columns: 1fr; }
  .service-lhs   { border-right: none; border-bottom: 1px solid var(--border); }

  /* Ecosystem */
  .eco-cards     { grid-template-columns: 1fr; }

  /* Org map */
  .map-header         { flex-direction: column; align-items: flex-start; }
  .panzoom-container  { height: 320px; }
  .svg-map            { max-height: 200px; }
  .map-legend         { flex-wrap: wrap; gap: 10px; }

  /* Contact box */
  .contact-box  { padding: 32px 20px; }

  /* Footer */
  .footer-content, .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom                { flex-direction: column; gap: 10px; text-align: center; }
  .footer-bottom-prompt         { display: none; }
  .footer-units                 { gap: 5px; }

  /* Secondary pages */
  .sub-container { padding: 32px 20px 80px; }
}

/* ── 480px — mobiles ── */
@media (max-width: 480px) {
  .container   { padding: 0 16px; }
  .section     { padding: 56px 0; }

  /* Hero — boutons pleine largeur */
  .hero-badge   { font-size: 11px; padding: 7px 14px; }
  .hero-lead    { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; text-align: center; }

  /* Stats / cards */
  .cards  { gap: 14px; }
  .stats  { gap: 12px; }
  .card, .info-card, .profile-card { padding: 22px 18px; }

  /* Org map */
  .svg-map           { max-height: 150px; }
  .panzoom-container { height: 260px; }

  /* Tabs */
  .tab-list    { grid-template-columns: 1fr; gap: 8px; }
  .tab-btn     { padding: 12px 16px; font-size: 12px; }

  /* Contact */
  .contact-box      { padding: 24px 16px; }
  .highlight-box    { padding: 20px 16px; }

  /* Modal */
  .modal-content { padding: 18px 16px; }

  /* Footer */
  .footer-content, .footer-grid { gap: 28px; }
  .footer-top-bar               { padding: 8px 0; }
}

/* ── Touch — états :active en remplacement du :hover ── */
@media (hover: none) {
  /* Cards */
  .card:active {
    transform: translateY(-4px);
    border-color: var(--primary); border-top-color: var(--primary);
    background: var(--panel-light);
  }

  /* Stat cards */
  .stat-card:active          { transform: translateY(-3px); border-color: var(--border-bright); }
  .stat-card:active::after   { transform: scaleX(1); }

  /* Eco cards */
  .eco-card:active { border-color: rgba(61,249,228,0.2); background: rgba(15,23,42,0.8); }

  /* Info cards */
  .info-card:active    { border-color: var(--border-bright); }
  .profile-card:active { border-color: var(--border-bright); }

  /* Tab buttons */
  .tab-btn:active { border-color: var(--border-bright); color: var(--text); }

  /* Buttons */
  .btn:active          { color: var(--bg-dark); border-color: var(--primary); transform: translateY(-1px); }
  .btn:active::before  { transform: translateX(0); }

  /* Footer links */
  .footer-links a:active          { color: var(--text); transform: translateX(4px); }
  .footer-links a:active::before  { opacity: 0.7; }

  /* Brand logo */
  .brand:active .brand-logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 14px var(--primary));
  }
}

/* ── Reduced motion — respecte les préférences système ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1ms !important;
  }
  .hero-animated-bg  { animation: none; }
  .hero-orb          { animation: none; }
  #hero-canvas       { display: none; }
  .footer-status-dot { animation: none; }
}
