/* ============================================
   HubNex 3D Website — V2 Radical Redesign
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --primary: #2374C6;
  --primary-light: #4d9eea;
  --primary-dark: #1a5a9e;
  --primary-glow: rgba(35, 116, 198, 0.35);
  --secondary: #13C296;
  --secondary-glow: rgba(19, 194, 150, 0.3);
  --accent: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.3);
  --orange: #F98B69;

  --bg-deep: #030712;
  --bg-primary: #0a0f1e;
  --bg-elevated: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(17, 24, 39, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-border: 1px solid rgba(255, 255, 255, 0.05);

  --text-white: #f8fafc;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --border: rgba(148, 163, 184, 0.08);
  --border-hover: rgba(148, 163, 184, 0.15);
  --border-glow: rgba(35, 116, 198, 0.25);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg-deep: #f0f4f8;
  --bg-primary: #f8faff;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);

  --text-white: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);
  --border-glow: rgba(35, 116, 198, 0.2);

  --primary-glow: rgba(35, 116, 198, 0.15);
  --secondary-glow: rgba(19, 194, 150, 0.15);
}

/* Light mode — body & global */
[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Light mode — navbar */
[data-theme="light"] .navbar {
  background: transparent !important;
  border-bottom: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.72) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 24px rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

/* Swap white logo to dark logo in light mode */
[data-theme="light"] .navbar-logo img {
  filter: invert(1) hue-rotate(180deg);
}


[data-theme="light"] .nav-links a {
  color: var(--text-secondary);
}

[data-theme="light"] .nav-links a:hover {
  color: var(--primary);
}

[data-theme="light"] .nav-login {
  color: var(--text-secondary);
  border-color: var(--border-hover);
}

/* Light mode — mobile dropdown menu only */
@media (max-width: 768px) {
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  }
}

[data-theme="light"] .nav-links a:hover {
  background: rgba(35, 116, 198, 0.06);
}

[data-theme="light"] .mobile-toggle span {
  background: var(--text-primary);
}

/* Light mode — hero */
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f9ff 50%, #e0faf4 100%);
}

[data-theme="light"] .hero h1 {
  color: var(--text-white);
}

[data-theme="light"] .hero-sub {
  color: var(--text-secondary);
}

[data-theme="light"] .btn-ghost {
  border-color: rgba(15, 23, 42, 0.2);
  color: var(--text-primary);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.06);
}

/* Light mode — partner logos */
[data-theme="light"] .hero-partners-label {
  color: var(--text-muted);
}

/* Show partner logos in natural dark colours on light hero background */
[data-theme="light"] .partner-logo {
  filter: brightness(0) opacity(0.65);
}

[data-theme="light"] .partner-logo:hover {
  filter: brightness(0) opacity(1);
}

/* Light mode — compliance section */
[data-theme="light"] .compliance-section {
  background: rgba(241, 245, 249, 0.8);
}

[data-theme="light"] .compliance-track {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(35, 116, 198, 0.15);
  box-shadow: 0 4px 24px rgba(35, 116, 198, 0.06);
}

[data-theme="light"] .compliance-badge {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.12);
}

[data-theme="light"] .compliance-badge:hover {
  background: rgba(35, 116, 198, 0.04);
  border-color: rgba(35, 116, 198, 0.25);
}

[data-theme="light"] .badge-text {
  color: var(--text-primary);
}

/* Light mode — crisis/stats section */
[data-theme="light"] .crisis-section {
  background: #ffffff;
}

[data-theme="light"] .insight-row {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

[data-theme="light"] .insight-row:hover {
  border-color: rgba(35, 116, 198, 0.25);
}

[data-theme="light"] .insight-meta {
  background: rgba(35, 116, 198, 0.03);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .insight-meta h4 {
  color: var(--text-primary);
}

[data-theme="light"] .stat-number {
  color: var(--primary);
}

[data-theme="light"] blockquote {
  border-left-color: var(--primary);
  color: var(--text-secondary);
}

/* Light mode — features section */
[data-theme="light"] .features-section {
  background: #ffffff;
}

[data-theme="light"] .ftab {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-secondary);
}

[data-theme="light"] .ftab.active {
  background: rgba(35, 116, 198, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .features-panel {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

[data-theme="light"] .fpanel-visual {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.12);
  box-shadow: 0 8px 32px rgba(35, 116, 198, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .fmock-bar {
  background: #f4f7fb;
  border-bottom-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .fmock-body {
  background: #ffffff;
}

[data-theme="light"] .fmock-sidebar {
  background: #f5f8ff;
  border-right-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .fmock-stat-box,
[data-theme="light"] .fcomp-badge,
[data-theme="light"] .fmock-audit-log,
[data-theme="light"] .fexpert-card,
[data-theme="light"] .fint-row,
[data-theme="light"] .fflow-node,
[data-theme="light"] .fmock-rule,
[data-theme="light"] .fmock-install-note {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.12);
}

[data-theme="light"] .fexpert-card.online-card {
  border-color: rgba(19, 194, 150, 0.25);
  background: rgba(19, 194, 150, 0.03);
}

[data-theme="light"] .fflow-node.done {
  background: rgba(19, 194, 150, 0.06);
  border-color: rgba(19, 194, 150, 0.3);
}

[data-theme="light"] .fflow-node.active-node {
  background: rgba(35, 116, 198, 0.08);
  border-color: var(--primary);
}

[data-theme="light"] .fbar-wrap {
  background: rgba(35, 116, 198, 0.08);
}

[data-theme="light"] .fmock-install-note {
  border-color: rgba(35, 116, 198, 0.15);
}

[data-theme="light"] .fcomp-badge strong {
  color: var(--text-white);
  /* text-white maps to near-black in light mode */
}

[data-theme="light"] .fcomp-badge small,
[data-theme="light"] .fexpert-card small {
  color: var(--text-secondary);
}

/* Remaining grey elements in light mode */
[data-theme="light"] .fmock-scan-placeholder {
  background: #f0f4fa;
  border-color: rgba(35, 116, 198, 0.2);
}

[data-theme="light"] .fmock-case {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.12);
}

[data-theme="light"] .fmock-bubble {
  background: rgba(35, 116, 198, 0.07);
  border-color: rgba(35, 116, 198, 0.15);
}

[data-theme="light"] .fmock-bubble.self {
  background: rgba(19, 194, 150, 0.07);
  border-color: rgba(19, 194, 150, 0.2);
}



[data-theme="light"] .fmock-bar {
  background: #f0f4fa;
  border-bottom-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .fmock-body {
  background: #ffffff;
}

[data-theme="light"] .fmock-sidebar {
  background: #f5f8ff;
  border-right-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .fmock-item {
  color: var(--text-secondary);
}

[data-theme="light"] .fmock-item.active-item {
  background: rgba(35, 116, 198, 0.08);
  color: var(--primary);
}

/* Light mode — process section */
[data-theme="light"] .process-section {
  background: var(--bg-primary);
}

[data-theme="light"] .process-number {
  background: #ffffff;
  border-color: var(--border-hover);
  color: var(--primary);
}

[data-theme="light"] .process-step h4 {
  color: var(--text-white);
}

[data-theme="light"] .process-step p {
  color: var(--text-secondary);
}

/* Light mode — CTA box */
[data-theme="light"] .cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Light mode — FAQ section */
[data-theme="light"] .faq-section {
  background: #ffffff;
}

[data-theme="light"] .faq-categories .fcat {
  background: transparent;
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-secondary);
}

[data-theme="light"] .faq-categories .fcat.active {
  background: rgba(35, 116, 198, 0.08);
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .faq-panel {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

[data-theme="light"] .facc-item {
  border-color: var(--border);
}

[data-theme="light"] .facc-q {
  color: var(--text-primary);
}

[data-theme="light"] .facc-a {
  color: var(--text-secondary);
}

/* Light mode — contact section */
[data-theme="light"] .contact-section {
  background: var(--bg-primary);
}

[data-theme="light"] .contact-card {
  background: #ffffff;
  border-color: var(--border-hover);
}

[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #f8faff;
  border-color: var(--border-hover);
  color: var(--text-primary);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: var(--text-dim);
}

/* Light mode — footer */
[data-theme="light"] footer,
[data-theme="light"] .footer {
  background: #1e293b;
}

/* ── Theme Toggle Button ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  margin-left: 8px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
  transform: rotate(20deg);
}

/* Dark mode (default): show sun (click to switch to light), hide moon */
.theme-toggle .icon-moon {
  display: none;
}

.theme-toggle .icon-sun {
  display: block;
}

/* Light mode: show moon (click to switch to dark), hide sun */
[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: #475569;
}





/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 9999;
  pointer-events: none;
}

#scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, 
    var(--primary) 0%, 
    var(--secondary) 50%, 
    var(--accent) 100%
  );
  background-size: 200% auto;
  box-shadow: 0 0 15px var(--primary-glow), 0 0 5px var(--secondary-glow);
  transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

#scroll-tooltip {
  position: absolute;
  top: 12px;
  right: -10px;
  transform: translateX(50%);
  background: var(--bg-card);
  border: var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#scroll-progress:hover #scroll-tooltip,
body.is-scrolling #scroll-tooltip {
  opacity: 1;
  transform: translateX(50%) translateY(4px);
}

#scroll-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--glass-border);
}

#scroll-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4));
  filter: blur(4px);
}

/* ── Back to Top Button ── */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  box-shadow: 0 4px 20px rgba(35, 116, 198, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease, box-shadow 0.2s ease;
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 32px var(--primary-glow), 0 0 15px var(--secondary-glow);
  transform: translateY(-4px) scale(1.1);
}

#back-to-top:active {
  transform: translateY(1px) scale(0.95);
}

#back-to-top svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

[data-theme="light"] #back-to-top {
  box-shadow: 0 4px 20px rgba(35, 116, 198, 0.25);
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  /* hand all scroll control to body */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  overscroll-behavior-y: contain;
}


/* ── SECTION LAYOUT ──
   Sections use their natural content height — no forced scroll snapping.
   Smooth scroll-behavior on the body handles anchor navigation.
   Each section centres its content with sensible vertical padding. */
section[id] {
  scroll-margin-top: 72px;
  /* offset for fixed navbar on anchor jumps */
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  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");
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  transition: all var(--transition);
  will-change: transform;
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(3, 7, 18, 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  height: 56px;
  transition: transform var(--transition);
}

.navbar-logo:hover img {
  transform: scale(1.04);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  padding: 10px 24px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--primary-light) !important;
  box-shadow: 0 0 30px var(--primary-glow) !important;
  transform: translateY(-1px) !important;
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.nav-login {
  color: var(--text-white);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all var(--transition);
}

.nav-login svg {
  color: var(--primary-light);
  width: 16px;
  height: 16px;
}

.nav-login:hover {
  border-color: var(--border-glow);
  background: rgba(35, 116, 198, 0.08);
}

.mobile-toggle {
  display: none;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-white);
  margin: 5px 0;
  border-radius: 2px;
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Responsive padding: always clears the fixed navbar (≥88px), scales with viewport */
  padding: clamp(88px, 14vh, 140px) 0 clamp(40px, 8vh, 80px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(35, 116, 198, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(19, 194, 150, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(168, 85, 247, 0.06), transparent);
  animation: heroGradient 15s ease-in-out infinite;
}

@keyframes heroGradient {

  0%,
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.05) translateY(-2%);
  }
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to top, var(--bg-deep), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* ── HERO ZOOM: scale content proportionally on short viewports ──
   Keeps all layout intact; just shrinks the content block to fit. */
@media (max-height: 800px) {
  .hero-content {
    zoom: 0.85;
  }
}

@media (max-height: 700px) {
  .hero-content {
    zoom: 0.75;
  }
}

@media (max-height: 600px) {
  .hero-content {
    zoom: 0.65;
  }
}

@media (max-height: 500px) {
  .hero-content {
    zoom: 0.55;
  }
}

.hero-partners {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

.hero-partner-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
}

.hero-partner-sep {
  width: 120px;
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.hero-partners-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.partner-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.65);
  transition: filter var(--transition), opacity var(--transition);
}

.partner-logo:hover {
  filter: brightness(0) invert(1) opacity(1);
}

/* KBC logos use real brand colours — no invert filter */
.kbc-logo {
  filter: none;
  opacity: 0.75;
}

.kbc-logo:hover {
  filter: none;
  opacity: 1;
}

/* Dark mode: show white, hide black */
.kbc-logo--light {
  display: none;
}

/* Light mode: show black, hide white */
[data-theme="light"] .kbc-logo--dark {
  display: none;
}

[data-theme="light"] .kbc-logo--light {
  display: block;
}

/* KBC Start it @KBC — slightly smaller on its own row */
.kbc-logo {
  height: 36px;
}

/* Logos row inside a group */
.hero-partner-logos {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-chip .pulse {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(19, 194, 150, 0.4);
  }

  50% {
    opacity: .7;
    box-shadow: 0 0 0 8px transparent;
  }
}

.scroll-indicator {
  position: fixed;
  bottom: 48px;
  right: 48px;
  left: auto;
  transform: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  animation: bounce 2s infinite;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.scroll-indicator .mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* ── CUSTOM CURSOR: Trailing Ring + Disappearing Dot ── */
/* Ring: trails behind the mouse with a lerp delay (handled in JS) */
.custom-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  /* CSS handles expand/shrink; position is JS-driven via left/top */
  transition: width 0.25s ease, height 0.25s ease,
    border-color 0.25s ease, opacity 0.25s ease,
    transform 0.15s ease;
  opacity: 0.7;
  transform: translate(-50%, -50%);
}

/* On hover: ring grows and turns accent color */
.custom-cursor.hover {
  width: 52px;
  height: 52px;
  border-color: var(--secondary);
  opacity: 1;
}

/* On click: brief squeeze */
.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(0.85);
}

/* Dot: sits precisely on the pointer; fades out on hover */
.custom-cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background: var(--primary-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Dot disappears when hovering an interactive element */
.custom-cursor-dot.hover {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

@media (max-width: 768px) {

  .custom-cursor,
  .custom-cursor-dot {
    display: none;
  }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero h1 .line {
  display: block;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 44px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 14px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  overflow: hidden;
  will-change: transform;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  z-index: -1;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition);
  filter: blur(12px);
}

.btn-glow:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 45px var(--primary-glow), 0 0 20px rgba(35, 116, 198, 0.4);
}

.btn-glow:active {
  transform: translateY(1px) scale(0.98);
}

.btn-glow:hover::after {
  opacity: 0.6;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 14px;
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(35, 116, 198, 0.05);
}

/* ── SECTION SEPARATORS ── */
.section-separator {
  position: relative;
  width: 100%;
  height: 1px;
  z-index: 5;
}

.section-separator::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.section-separator::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-glow);
  box-shadow: 0 0 8px var(--primary-glow);
}

[data-theme="light"] .section-separator::before {
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.15), transparent);
}

[data-theme="light"] .section-separator::after {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(35, 116, 198, 0.4);
}

.divider-glow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, var(--primary-glow), transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

/* ── CRISIS SECTION (Stats + Insights unified) ── */
.crisis-section {
  padding: 120px 0;
}

.crisis-header {
  margin-bottom: 56px;
}

.crisis-header .eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.crisis-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  max-width: 600px;
  margin-bottom: 16px;
}

.crisis-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 620px;
}

.crisis-stats {
  display: flex;
  gap: 0;
  align-items: stretch;
  justify-content: center;
  margin-bottom: 56px;
  background: linear-gradient(135deg, rgba(35, 116, 198, 0.06), rgba(19, 194, 150, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.crisis-stats .stat-item {
  flex: 1;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin: 8px;
  transition: all var(--transition), transform 0.15s ease-out;
  border: 1px solid transparent;
  transform-style: preserve-3d;
}

.crisis-stats .stat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.crisis-stats .stat-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(35, 116, 198, 0.15);
}

.crisis-stats .stat-item:hover::before {
  opacity: 1;
}

.crisis-stats .stat-item+.stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border);
}

.stat-item {
  text-align: center;
  min-width: 160px;
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: float 3s ease-in-out infinite;
}

.stat-item:nth-child(2) .stat-number {
  animation-delay: 0.5s;
}

.stat-item:nth-child(3) .stat-number {
  animation-delay: 1s;
}

.stat-item:nth-child(4) .stat-number {
  animation-delay: 1.5s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ── FEATURES EXPLORER ── */
.features-section {
  padding: 120px 0;
  overflow-x: clip;
  /* same: clip page bleed without trapping child tab-strip scroll */
}

.features-header {
  max-width: 700px;
  margin-bottom: 64px;
}

.features-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.features-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
}

/* Explorer layout */
.features-explorer {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Tab List ── */
.features-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ftab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  font-family: inherit;
  width: 100%;
  position: relative;
}

.ftab:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  transform: translateX(4px);
}

.ftab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.ftab:hover::before {
  opacity: 0.3;
}

.ftab.active {
  background: rgba(35, 116, 198, 0.08);
  border-color: rgba(35, 116, 198, 0.25);
}

.ftab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 0 2px 2px 0;
}

.ftab-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  transition: all var(--transition);
}

.ftab:hover .ftab-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(35, 116, 198, 0.12);
}

.ftab-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.ftab:hover .ftab-icon svg {
  color: var(--primary-light);
}

.ftab.active .ftab-icon {
  background: rgba(35, 116, 198, 0.15);
}

.ftab.active .ftab-icon svg {
  color: var(--primary-light);
}

.ftab-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ftab-text strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
  line-height: 1.3;
}

.ftab.active .ftab-text strong {
  color: var(--text-white);
}

.ftab-text span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.ftab-arrow {
  font-size: 0.9rem;
  color: var(--text-dim);
  opacity: 0;
  transition: all var(--transition);
  transform: translateX(-6px);
}

.ftab.active .ftab-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--primary-light);
}

/* ── Panel ── */
.features-panel {
  min-height: 520px;
  position: relative;
}

.fpanel {
  display: none;
  flex-direction: column;
  gap: 28px;
  animation: panelFadeIn 0.35s ease;
}

.fpanel.active {
  display: flex;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mock browser window */
.fpanel-visual {
  position: relative;
  border-radius: var(--radius-lg);
}

.fpanel-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 200%;
  animation: gradientBorder 4s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes gradientBorder {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.fpanel-visual {
  overflow: hidden;
  border: var(--glass-border);
  background: var(--bg-card);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.fmock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
}

.fmock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fmock-dot.red {
  background: #ff5f57;
}

.fmock-dot.yellow {
  background: #febc2e;
}

.fmock-dot.green {
  background: #28c840;
}

.fmock-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 500;
}

.fmock-body {
  display: flex;
  min-height: 260px;
}

/* Imaging panel needs extra height to give the CT scan a square-ish display */
[data-panel="imaging"] .fmock-body {
  min-height: 360px;
}


/* Imaging panel */
.fmock-sidebar {
  width: 200px;
  border-right: 1px solid var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.fmock-item {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  cursor: default;
  transition: background var(--transition);
}

.fmock-item.active-item {
  background: rgba(35, 116, 198, 0.15);
  color: var(--primary-light);
  font-weight: 600;
}

.fmock-item.fmock-prior {
  color: var(--secondary);
  opacity: 0.7;
  font-size: 0.68rem;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.fmock-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.fmock-scan-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(77, 158, 234, 0.2);
}

.fmock-scan-placeholder svg {
  width: 80px;
  height: 80px;
}

.fmock-scan-placeholder span {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fmock-ct-svg {
  width: 100%;
  /* Cap height so the imaging panel doesn't exceed the other panels' size.
     Other fmock-body panels have min-height: 260px; the sidebar is 5 items × ~30px ≈ 160px
     leaving ~130px for the scan image below header/meta rows. */
  max-height: 260px;
  height: 260px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.jmock-ct-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.fmock-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Badges */
.fmock-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid;
  letter-spacing: 0.3px;
}

.fmock-badge.online {
  color: var(--secondary);
  border-color: rgba(19, 194, 150, 0.3);
  background: rgba(19, 194, 150, 0.08);
}

.fmock-badge.urgent {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
}

.fmock-badge.green-tag {
  color: var(--secondary);
  border-color: rgba(19, 194, 150, 0.3);
  background: rgba(19, 194, 150, 0.08);
}

/* Collab panel */
.fmock-collab {
  flex: 1;
  padding: 20px;
}

.fmock-case {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fmock-case-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.fmock-case-users {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fmock-avatar {
  width: 28px;
  height: 28px;
  aspect-ratio: 1 / 1;
  flex: none;
  /* prevent flex:1 from .fexpert-card > div:not(.fmock-avatar) {from stretching the avatar */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  object-fit: cover;
  object-position: center top;
}

.fmock-avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 0.78rem;
}

.fmock-typing {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-left: 4px;
  font-style: italic;
}

.fmock-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fmock-bubble {
  background: rgba(35, 116, 198, 0.1);
  border: 1px solid rgba(35, 116, 198, 0.15);
  border-radius: 10px 10px 10px 2px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 90%;
}

.fmock-bubble.self {
  background: rgba(19, 194, 150, 0.08);
  border-color: rgba(19, 194, 150, 0.15);
  border-radius: 10px 10px 2px 10px;
  align-self: flex-end;
}

/* Workload chart panel */
.fmock-body-chart {
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.fmock-stats-row {
  display: flex;
  gap: 12px;
}

.fmock-stat-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.fmock-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.fmock-stat-box span:last-child {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fmock-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fmock-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.fmock-bar-row>span:first-child {
  width: 90px;
  flex-shrink: 0;
}

.fmock-bar-row>span:last-child {
  width: 50px;
  text-align: right;
}

.fbar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.fbar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Workflow flowchart panel */
.fmock-flow-body {
  flex-direction: column;
  padding: 20px;
  gap: 20px;
}

.fmock-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.fflow-node {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
}

.fflow-node.done {
  border-color: rgba(19, 194, 150, 0.3);
  color: var(--secondary);
  background: rgba(19, 194, 150, 0.06);
}

.fflow-node.active-node {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(35, 116, 198, 0.1);
  box-shadow: 0 0 16px rgba(35, 116, 198, 0.2);
}

.fflow-node.faded {
  opacity: 0.4;
}

.fflow-arrow {
  font-size: 0.9rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.fflow-arrow.faded {
  opacity: 0.3;
}

.fmock-rule-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fmock-rule {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Security panel */
.fmock-security-body {
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.fmock-compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fcomp-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}

.fcomp-badge span:first-child {
  font-size: 1.2rem;
}

.fcomp-badge strong {
  font-size: 0.72rem;
  color: var(--text-white);
}

.fcomp-badge small {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.fmock-audit-log {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.flog-header {
  padding: 8px 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.flog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.flog-row:last-child {
  border-bottom: none;
}

.flog-time {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--primary-light);
  font-size: 0.68rem;
  flex-shrink: 0;
}

/* Remote panel */
.fmock-remote-body {
  flex: 1;
  padding: 20px;
}

.fmock-expert-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fexpert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.fexpert-card.online-card {
  border-color: rgba(19, 194, 150, 0.15);
}

.fexpert-card>div:not(.fmock-avatar) {
  flex: 1;
}

.fexpert-card strong {
  color: var(--text-white);
  font-size: 0.82rem;
}

.fexpert-card small {
  color: var(--text-dim);
  font-size: 0.68rem;
}

/* Upgrade panel */
.fmock-upgrade-body {
  flex-direction: column;
  padding: 20px;
  gap: 12px;
}

.fmock-integration-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.fint-icon {
  width: 20px;
  text-align: center;
  color: var(--secondary);
  font-weight: 700;
}

.fint-icon.fint-pending {
  color: var(--text-dim);
}

.fint-name {
  flex: 1;
}

.fmock-install-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.1);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.fmock-install-note svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Panel content area */
.fpanel-content {
  padding: 4px 4px 0;
}

.fpanel-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
}

.fpanel-content>p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 16px;
}

.fpanel-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fpanel-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.fpanel-bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  flex-shrink: 0;
}


/* ── HOW IT WORKS (Horizontal Process) ── */
.process-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: -40px !important;
}

.process-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), var(--border-glow), var(--border), transparent);
}

.process-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}

.process-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
}

.process-header p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 16px auto 0;
}

.process-track {
  display: flex;
  gap: 0;
  position: relative;
  z-index: 1;
}

.process-step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.process-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-light);
  margin: 0 auto 24px;
  transition: all var(--transition);
}

.process-step:hover .process-number {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
  background: rgba(35, 116, 198, 0.15);
}

.process-step h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-white);
}

.process-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 220px;
  margin: 0 auto;
}

.process-connector {
  position: absolute;
  top: 32px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--border-hover));
  opacity: 0.4;
}

.process-step:last-child .process-connector {
  display: none;
}

/* ── CTA RIBBON ── */
.cta-section {
  padding: 120px 0;
}

.cta-box {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 80px 64px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), #1a6bb5);
  text-align: center;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.05), transparent 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.cta-box .subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  z-index: 1;
  margin-bottom: 36px;
}

.cta-box .cta-actions {
  position: relative;
  z-index: 1;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 14px;
  transition: all var(--transition);
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ── INSIGHTS (inside crisis section) ── */
.crisis-sources {
  margin-top: 40px;
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.6;
  letter-spacing: 0.3px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.insights-header {
  margin-bottom: 64px;
}

.insights-header .eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.insights-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  max-width: 600px;
}

.insights-stack {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: flex-start;
  transition: height 0.3s ease;
  width: 100%;
}

.insights-stack::-webkit-scrollbar {
  display: none;
}

.insight-row {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: visible;
}

.insights-stack {
  padding: 8px 0;
}

/* Dots — visible on all screens */
.insight-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.insight-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border-hover);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.insight-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

.insight-dot:hover {
  background: var(--primary-light);
}

.journey-dots {
  display: none;
}

.adv-dots {
  display: none;
}

.features-dots {
  display: none;
}

.fpanel-capsule {
  display: none;
}

.insight-row {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  flex-shrink: 0;
}

.insight-row:hover {
  transform: none;
}

.insight-meta {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.insight-meta h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.insight-meta .src {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.insight-body {
  padding: 36px 40px;
  display: flex;
  align-items: center;
}

/* Force all carousel cards visible */
.insights-stack .insight-row {
  opacity: 1;
  transform: none;
}

.insight-body blockquote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--primary);
}

/* ── FAQ (Minimal single-column) ── */
.faq-section {
  padding: clamp(60px, 8vh, 100px) 0;
  /* min-height:100vh and flex centering come from the global section[id] rule */
}


.faq-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.faq-left h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
  position: sticky;
  top: 120px;
}

.faq-left p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  position: sticky;
  top: 180px;
}

.faq-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.faq-tag {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.faq-tag:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.faq-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-item.open {
  border-color: var(--border-glow);
}

.faq-q {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition);
}

.faq-q:hover {
  color: var(--primary-light);
}

.faq-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 116, 198, 0.08);
  border-radius: 6px;
  transition: transform var(--transition);
}

.faq-chevron svg {
  width: 14px;
  height: 14px;
  fill: var(--primary);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-a {
  max-height: 400px;
}

.faq-a-inner {
  padding: 0 24px 20px 66px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-tag-badge {
  display: inline-block;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(35, 116, 198, 0.1);
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
  font-weight: 500;
}

/* ── CONTACT ── */
.contact-section {
  padding: 120px 0;
  position: relative;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 116, 198, 0.08), transparent 70%);
  pointer-events: none;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.contact-left {
  padding-top: 20px;
}

.contact-left .eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.contact-left h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.contact-left>p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 440px;
}

.contact-detail {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.contact-detail-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 116, 198, 0.08);
  border: 1px solid rgba(35, 116, 198, 0.15);
  border-radius: 14px;
}

.contact-detail-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--primary-light);
}

.contact-detail h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.contact-detail p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.contact-form-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 44px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.contact-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0 var(--radius-xl) 0 60px;
  opacity: 0.6;
}

/* Mobile-only contact details (hidden on desktop) */
.contact-details-mobile {
  display: none;
}

.form-row {
  margin-bottom: 16px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-dim);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(35, 116, 198, 0.12);
  background: rgba(35, 116, 198, 0.02);
}

.form-row textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.btn-submit:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 30px var(--primary-glow);
  transform: translateY(-2px);
}

/* ── FOOTER ── */
.footer {
  padding: 32px 0;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

/* Logo: explicit block + auto margins guarantee centring regardless of SVG intrinsic width */
.footer-logo {
  display: block;
  line-height: 0;
  /* remove inline gap below img */
}

.footer-logo img {
  display: block;
  margin: 0 auto;
  /* optical: compensate for globe icon visual weight on the left */
  height: 40px;
  opacity: 0.8;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav button {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer-nav button:hover {
  color: var(--primary-light);
}

/* Legal nav links (Privacy, Legal Notice, Terms) */
.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 8px;
}

.legal-footer-nav a {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color var(--transition);
  padding: 4px 8px;
}

.legal-footer-nav a:hover {
  color: var(--primary-light);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── MODALS ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 540px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-divider {
  width: 50px;
  height: 3px;
  background: var(--primary);
  border-radius: 4px;
  margin-bottom: 24px;
}

.modal-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.modal-body strong {
  color: var(--text-primary);
}

.modal-body a {
  color: var(--primary-light);
}

.modal-close-btn {
  width: 100%;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--transition);
}

.modal-close-btn:hover {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}

/* ── SCROLL REVEALS ── */
.reveal {
  opacity: 0;
  transform: translateY(50px) scale(0.98);
  transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.9s ease;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal.glow-visible {
  box-shadow: 0 0 30px var(--primary-glow), 0 0 60px var(--secondary-glow);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px) scale(0.98);
  transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px) scale(0.98);
  transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.d1 {
  transition-delay: .1s;
}

.d2 {
  transition-delay: .2s;
}

.d3 {
  transition-delay: .3s;
}

.d4 {
  transition-delay: .4s;
}

.d5 {
  transition-delay: .5s;
}

.d6 {
  transition-delay: .6s;
}

/* Hero animations */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-anim.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 48px);
  max-width: 900px;
  background: rgba(3, 7, 18, 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  z-index: 9998;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1;
}

.cookie-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(19, 194, 150, 0.1);
  border: 1px solid rgba(19, 194, 150, 0.2);
  border-radius: 12px;
  color: var(--secondary);
}

.cookie-icon svg {
  width: 22px;
  height: 22px;
}

.cookie-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.cookie-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cookie-link {
  color: var(--primary-light);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-cookie-manage,
.btn-cookie-reject {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-cookie-accept {
  padding: 12px 24px;
  font-size: 0.85rem;
  background: var(--primary);
  color: white;
}

.btn-cookie-accept:hover {
  background: var(--primary-light);
}

/* ── COOKIE PREFERENCES MODAL ── */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  overscroll-behavior: contain;
  transition: opacity 0.3s ease;
}

.cookie-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.cookie-modal {
  background: var(--surface-2, #0d1525);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal-overlay.visible .cookie-modal {
  transform: translateY(0);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cookie-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.cookie-modal-close:hover {
  color: var(--text-white);
}

.cookie-modal-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Category rows */
.cookie-cat {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}

.cookie-cat:last-of-type {
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.cookie-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-cat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cookie-cat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
}

.cookie-cat-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-always-on {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  background: rgba(19, 194, 150, 0.1);
  border: 1px solid rgba(19, 194, 150, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: background 0.25s, border-color 0.25s;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}

.cookie-toggle input:checked+.cookie-toggle-slider {
  background: var(--primary);
  border-color: var(--primary);
}

.cookie-toggle input:checked+.cookie-toggle-slider::before {
  transform: translateX(20px);
  background: #ffffff;
}

.cookie-toggle input:focus-visible+.cookie-toggle-slider {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* Modal action buttons */
.cookie-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-modal-save {
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-save:hover {
  background: var(--primary-light);
}

/* Light mode overrides */
[data-theme="light"] .cookie-banner {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(35, 116, 198, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .cookie-text h4 {
  color: var(--text-primary);
}

[data-theme="light"] .cookie-text p {
  color: var(--text-secondary);
}

[data-theme="light"] .cookie-modal {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.15);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .cookie-modal-overlay {
  background: rgba(15, 23, 42, 0.5);
}

[data-theme="light"] .cookie-toggle-slider {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* ── COMPLIANCE BADGES ── */

.compliance-section {
  padding: 40px 0 20px;
  position: relative;
  z-index: 5;
}

.compliance-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: rgba(3, 7, 18, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.compliance-badge {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  transition: all var(--transition), transform 0.15s ease-out;
  white-space: nowrap;
  transform-style: preserve-3d;
}

.compliance-badge:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(19, 194, 150, 0.2);
}

.badge-icon {
  width: 16px;
  height: 16px;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-text {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: 0.3px;
}

/* ── FAQ EXPLORER ── */
.faq-section {
  padding: 100px 0;
  position: relative;
  overflow-x: clip;
  /* clip prevents page bleed without creating a scroll container
     so child overflow-x:auto strips (pills) still scroll by touch */
}

.faq-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.faq-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
}

.faq-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-explorer {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Category Nav ── */
.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 100px;
}

.fcat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  width: 100%;
}

.fcat:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.fcat.active {
  background: rgba(35, 116, 198, 0.12);
  border-color: rgba(35, 116, 198, 0.4);
  color: var(--text-white);
  box-shadow: 0 0 0 1px rgba(35, 116, 198, 0.12) inset;
}

.fcat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.fcat.active .fcat-icon {
  background: rgba(35, 116, 198, 0.2);
  border-color: rgba(35, 116, 198, 0.3);
  color: var(--primary-light);
}

.fcat-icon svg {
  width: 16px;
  height: 16px;
}

.fcat-body {
  flex: 1;
  min-width: 0;
}

.fcat-body strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.fcat-body span {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.fcat-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.fcat.active .fcat-count {
  background: rgba(35, 116, 198, 0.25);
  color: var(--primary-light);
}

.faq-cta-box {
  margin-top: 16px;
  padding: 20px;
  background: rgba(19, 194, 150, 0.06);
  border: 1px solid rgba(19, 194, 150, 0.15);
  border-radius: var(--radius);
  text-align: center;
}

.faq-cta-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.faq-cta-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.faq-cta-link:hover {
  opacity: 0.75;
}

/* ── FAQ Panel ── */
.faq-panel {
  position: relative;
}

.faq-pane {
  display: none;
}

.faq-pane.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.faq-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.faq-pane-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-white);
}

.faq-pane-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
}

/* ── Accordion ── */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.facc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.facc-item.open {
  border-color: rgba(35, 116, 198, 0.3);
  box-shadow: 0 4px 20px rgba(35, 116, 198, 0.06);
}

.facc-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: background 0.2s ease;
}

.facc-q:hover {
  background: rgba(255, 255, 255, 0.04);
}

.facc-item.open .facc-q {
  background: rgba(35, 116, 198, 0.06);
}

.facc-q>span:first-child {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-white);
  line-height: 1.5;
}

.facc-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.facc-chevron svg {
  width: 18px;
  height: 18px;
}

.facc-item.open .facc-chevron {
  transform: rotate(180deg);
  color: var(--primary-light);
}

.facc-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.facc-item.open .facc-body {
  grid-template-rows: 1fr;
}

.facc-body>p {
  overflow: hidden;
  padding: 0 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.facc-item.open .facc-body>p {
  padding: 0 24px 20px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {


  /* Features Explorer: collapse to stacked layout */
  .features-explorer {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .features-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .ftab-arrow {
    display: none;
  }

  .ftab-text span {
    display: none;
  }

  .ftab {
    padding: 10px 12px;
  }

  /* Legacy bento compat */
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .bento-large {
    grid-column: span 6;
  }

  .bento-tall {
    grid-column: span 6;
    grid-row: span 1;
  }

  .bento-wide {
    grid-column: span 6;
  }

  .bento-medium {
    grid-column: span 3;
  }

  .bento-small {
    grid-column: span 3;
  }

  /* FAQ Explorer */
  .faq-explorer {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .faq-categories {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .faq-categories::-webkit-scrollbar {
    display: none;
  }

  .fcat {
    flex: 0 0 auto;
    padding: 12px 16px;
  }

  .fcat-body span {
    display: none;
  }

  .faq-cta-box {
    display: none;
  }

  .process-track {
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
  }

  .process-connector {
    display: none !important;
  }

  .process-section::before {
    display: none;
  }

  .crisis-stats {
    flex-wrap: wrap;
  }

  .crisis-stats .stat-item {
    flex: 0 0 50%;
    padding: 28px 20px;
  }

  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
  }

  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 24px;
    background: rgba(3, 7, 18, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    flex-direction: column;
    min-width: 200px;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 8px 0;
  }

  .nav-links.open {
    display: flex;
  }

  /* Restore "Get In Touch" inside the open mobile dropdown */
  .nav-links.open .nav-cta {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 4px;
    border-radius: 8px !important;
    padding: 10px 16px !important;
  }


  .mobile-toggle {
    display: block;
  }

  /* Push theme-toggle to the right so it sits next to the hamburger */
  .theme-toggle {
    margin-left: auto;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-large,
  .bento-tall,
  .bento-wide,
  .bento-medium,
  .bento-small {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* ── Insight cards carousel ── */
  .insights-stack {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: flex-start;
    transition: height 0.3s ease;
  }

  .insights-stack::-webkit-scrollbar {
    display: none;
  }

  .insight-row {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .insight-row:hover {
    transform: none;
  }

  .insight-meta {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
  }

  .insight-body {
    padding: 24px 20px;
  }

  /* Force all carousel cards visible (override reveal animation) */
  .insights-stack .insight-row {
    opacity: 1;
    transform: none;
  }

  .insight-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
  }

  .insight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border-hover);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
  }

  .insight-dot.active {
    background: var(--primary);
  }

  .compliance-track {
    gap: 16px;
    padding: 16px;
  }

  .compliance-badge {
    padding: 10px 16px;
    width: calc(50% - 8px);
    justify-content: center;
  }

  .badge-text {
    font-size: 0.8rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-left {
    display: block;
  }

  /* Hide contact details in .contact-left on mobile */
  .contact-left .contact-detail {
    display: none;
  }

  .contact-left .eyebrow,
  .contact-left h2,
  .contact-left>p {
    width: 100%;
    margin-bottom: 24px;
  }

  /* Show mobile contact details below form - horizontal layout */
  .contact-details-mobile {
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
    gap: 16px;
  }

  .contact-details-mobile .contact-detail {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 0;
    min-width: 120px;
  }

  .contact-details-mobile .contact-detail-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(35, 116, 198, 0.08);
    border: 1px solid rgba(35, 116, 198, 0.15);
    border-radius: 14px;
  }

  .contact-details-mobile .contact-detail-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--primary-light);
  }

  .contact-details-mobile .contact-detail h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .contact-details-mobile .contact-detail p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .contact-detail {
    flex: 1 1 calc(33.333% - 14px);
    min-width: 200px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 0;
  }

  .contact-detail-icon {
    width: 40px;
    height: 40px;
  }

  .crisis-stats .stat-item {
    flex: 0 0 50%;
    padding: 24px 16px;
  }

  .crisis-stats .stat-item+.stat-item::before {
    display: none;
  }

  .cta-box {
    padding: 48px 28px;
  }

  .bento-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {

  .container,
  .container-wide {
    padding: 0 16px;
  }

  .bento-large {
    padding: 28px;
  }

  .bento-large h3 {
    font-size: 1.3rem;
  }

  .contact-form-card {
    padding: 28px 20px;
  }

  /* Adjust mobile contact details for very small screens */
  .contact-details-mobile .contact-detail {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .process-step {
    padding: 0 12px;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}

/* ── LEGAL PAGES ── */
.legal-page {
  min-height: 100vh;
  padding-top: 80px;
}

.legal-page .navbar {
  background: rgba(3, 7, 18, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.legal-hero {
  padding: 80px 0 48px;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 116, 198, 0.1), transparent 70%);
  pointer-events: none;
}

.legal-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.legal-hero .eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.legal-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--text-white);
}

.legal-hero .legal-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-hero .legal-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legal-hero .legal-meta svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.legal-body {
  padding: 0 0 100px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.legal-toc h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.legal-toc a {
  display: block;
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  padding-left: 14px;
  margin-left: -1px;
  transition: all var(--transition);
}

.legal-toc a:hover,
.legal-toc a.active {
  color: var(--primary-light);
  border-left-color: var(--primary);
}

.legal-content {
  max-width: 780px;
}

.legal-section {
  margin-bottom: 48px;
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.legal-section:hover {
  border-color: var(--border-hover);
}

.legal-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(35, 116, 198, 0.1);
  border: 1px solid rgba(35, 116, 198, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
  flex-shrink: 0;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 10px;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.legal-section ul li {
  position: relative;
  padding-left: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.legal-section a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section a:hover {
  color: var(--primary);
}

.legal-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.legal-highlight {
  padding: 16px 20px;
  background: rgba(35, 116, 198, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.legal-highlight p {
  color: var(--text-primary);
  margin-bottom: 0;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  margin-top: 40px;
}

.legal-back-link:hover {
  color: var(--primary-light);
  border-color: var(--primary);
  background: rgba(35, 116, 198, 0.06);
}

.legal-back-link svg {
  width: 16px;
  height: 16px;
}

/* Legal page footer nav uses <a> tags */
.legal-footer-nav {
  display: flex;
  gap: 28px;
}

.legal-footer-nav a {
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.legal-footer-nav a:hover {
  color: var(--primary-light);
}

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .legal-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  .legal-toc h4 {
    width: 100%;
  }

  .legal-toc a {
    border-left: none;
    padding-left: 0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .legal-toc a:hover,
  .legal-toc a.active {
    background: rgba(35, 116, 198, 0.08);
    border-left: none;
  }
}

@media (max-width: 768px) {
  .legal-hero {
    padding: 56px 0 32px;
  }

  .legal-section {
    padding: 24px 20px;
  }

  .legal-hero .legal-meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* ── ADVANCED WORKFLOWS SECTION ── */
.adv-section {
  padding: 100px 0;
  position: relative;
}

.adv-header {
  text-align: center;
  margin-bottom: 64px;
}

.adv-sub {
  max-width: 560px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.adv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.adv-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(35, 116, 198, 0.3);
}

.adv-card-accent {
  background: linear-gradient(135deg, rgba(35, 116, 198, 0.06), rgba(19, 194, 150, 0.04));
  border-color: rgba(35, 116, 198, 0.25);
  box-shadow: 0 0 30px rgba(35, 116, 198, 0.07);
}

.adv-card-accent:hover {
  border-color: rgba(35, 116, 198, 0.45);
  box-shadow: 0 0 40px rgba(35, 116, 198, 0.12);
}

.adv-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.adv-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(35, 116, 198, 0.1);
  border: 1px solid rgba(35, 116, 198, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}

.adv-icon-green {
  background: rgba(19, 194, 150, 0.1);
  border-color: rgba(19, 194, 150, 0.2);
  color: var(--secondary);
}

.adv-icon-purple {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}

.adv-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adv-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.adv-stat-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.adv-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
}

.adv-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.adv-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.adv-card-bullets li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}

.adv-card-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-size: 0.7rem;
}

.adv-card-tag {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

/* Light mode */
[data-theme="light"] .adv-card {
  background: #ffffff;
  border-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .adv-card-accent {
  background: linear-gradient(135deg, rgba(35, 116, 198, 0.04), rgba(19, 194, 150, 0.02));
  border-color: rgba(35, 116, 198, 0.2);
}

[data-theme="light"] .adv-card-tag {
  border-top-color: rgba(15, 23, 42, 0.08);
}

/* Mobile */
@media (max-width: 900px) {
  .adv-grid {
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    width: 100%;
    align-items: flex-start;
    transition: height 0.3s ease;
  }

  .adv-grid::-webkit-scrollbar {
    display: none;
  }

  .adv-card {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .adv-grid .adv-card {
    opacity: 1;
    transform: none;
  }

  .adv-card-accent {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: none;
  }

  .adv-grid.reveal,
  .adv-grid.reveal.visible {
    opacity: 1;
    transform: none;
  }

  .adv-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
  }

  .adv-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border-hover);
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
  }

  .adv-dot.active {
    background: var(--primary);
    transform: scale(1.3);
  }

  .adv-dot:hover {
    background: var(--primary-light);
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .adv-card:last-child {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ── CRITICAL FINDINGS PANEL ── */

.fcrit-body {
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.fcrit-alert-card {
  background: rgba(248, 113, 113, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fcrit-alert-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(248, 113, 113, 0.08);
  border-bottom: 1px solid rgba(248, 113, 113, 0.15);
}

.fcrit-alert-icon {
  color: #f87171;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fcrit-alert-title {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f87171;
}

.fcrit-alert-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fcrit-row {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.fcrit-label {
  color: var(--text-dim);
  min-width: 72px;
  flex-shrink: 0;
}

.fcrit-ack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(248, 113, 113, 0.12);
  background: rgba(0, 0, 0, 0.08);
}

.fcrit-ack-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.fcrit-ack-btn {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--secondary);
  background: rgba(19, 194, 150, 0.1);
  border: 1px solid rgba(19, 194, 150, 0.3);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.fcrit-ack-btn:hover {
  background: rgba(19, 194, 150, 0.2);
}

.fcrit-audit {
  margin-top: 0;
}

.flog-pending {
  opacity: 0.5;
  font-style: italic;
}

/* ── IN-VIEWER CHAT PANEL ── */
.fchat-body {
  flex-direction: column;
  padding: 0;
}

.fchat-context-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(35, 116, 198, 0.04);
}

.fchat-case-label {
  flex: 1;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.fchat-thread {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.fchat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.fchat-me {
  justify-content: flex-end;
}

.fchat-avatar {
  width: 28px;
  height: 28px;
  aspect-ratio: 1 / 1;
  flex: none;
  border-radius: 50%;
  background: rgba(35, 116, 198, 0.2);
  border: 1px solid rgba(35, 116, 198, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--primary-light);
  object-fit: cover;
  object-position: center top;
}

.fchat-bubble {
  max-width: 75%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px 10px 10px 2px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fchat-bubble-me {
  background: rgba(35, 116, 198, 0.1);
  border-color: rgba(35, 116, 198, 0.2);
  border-radius: 10px 10px 2px 10px;
}

.fchat-sender {
  font-size: 0.62rem;
  color: var(--primary-light);
  font-weight: 600;
}

.fchat-bubble span:last-child {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.fchat-token-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.fchat-token-bar svg {
  color: var(--secondary);
  flex-shrink: 0;
}

/* Light mode */
[data-theme="light"] .fcrit-alert-card {
  background: rgba(248, 113, 113, 0.04);
  border-color: rgba(248, 113, 113, 0.18);
}

[data-theme="light"] .fcrit-alert-header {
  background: rgba(248, 113, 113, 0.06);
}

[data-theme="light"] .fchat-bubble {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .fchat-bubble-me {
  background: rgba(35, 116, 198, 0.07);
  border-color: rgba(35, 116, 198, 0.18);
}

[data-theme="light"] .fchat-context-bar,
[data-theme="light"] .fchat-token-bar {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
}

/* ── HOSPITAL IT PANEL ── */

.fmock-it-body {
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

/* Firewall diagram */
.fit-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 12px;
}

.fit-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fit-node-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 116, 198, 0.1);
  border: 1px solid rgba(35, 116, 198, 0.25);
  color: var(--primary-light);
}

.fit-node.fit-cloud .fit-node-icon {
  background: linear-gradient(135deg, rgba(35, 116, 198, 0.2), rgba(19, 194, 150, 0.12));
  border-color: rgba(35, 116, 198, 0.4);
  box-shadow: 0 0 20px rgba(35, 116, 198, 0.15);
}

.fit-node-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.fit-node-sub {
  font-size: 0.62rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* Arrow connectors */
.fit-arrow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 0 6px;
}

.fit-port-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.58rem;
  color: var(--secondary);
  background: rgba(19, 194, 150, 0.08);
  border: 1px solid rgba(19, 194, 150, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

.fit-arrow-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(35, 116, 198, 0.4), rgba(19, 194, 150, 0.4));
  position: relative;
}

.fit-arrow-line::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 28%;
  height: 3px;
  /* Symmetric gradient — looks correct in both sweep directions */
  background: linear-gradient(to right, transparent, var(--primary-light), transparent);
  border-radius: 2px;
  animation: fit-flow 1.6s ease-in-out infinite alternate;
}

@keyframes fit-flow {
  from {
    left: -28%;
  }

  to {
    left: 100%;
  }
}

.fit-arrow-head {
  font-size: 0.65rem;
  color: rgba(35, 116, 198, 0.6);
}

/* Status grid */
.fit-status-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.fit-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.fit-status-row:last-child {
  border-bottom: none;
}

.fit-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.green-dot {
  background: var(--secondary);
}

.fit-status-text {
  flex: 1;
  color: var(--text-muted);
}

.fit-status-val {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.none-val {
  color: var(--secondary) !important;
}

/* Light mode */
[data-theme="light"] .fit-diagram,
[data-theme="light"] .fit-status-grid {
  background: #f4f7fb;
  border-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .fit-status-row {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

/* ── SLA PERFORMANCE STRIP ── */

.sla-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 20px;
  padding: 18px 32px;
  background: rgba(35, 116, 198, 0.04);
  border: 1px solid rgba(35, 116, 198, 0.12);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.sla-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 36px;
  text-align: center;
}

.sla-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.sla-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  white-space: nowrap;
}

.sla-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* Light mode */
[data-theme="light"] .sla-strip {
  background: rgba(35, 116, 198, 0.04);
  border-color: rgba(35, 116, 198, 0.12);
}

/* Mobile */
@media (max-width: 700px) {
  .sla-strip {
    gap: 0;
    padding: 16px;
  }

  .sla-item {
    padding: 10px 20px;
    flex: 1 1 40%;
  }

  .sla-divider {
    display: none;
  }
}

/* ── USER JOURNEY SECTION ── */

.journey-section {
  padding: 120px 0;
  position: relative;
  /* NOTE: no overflow:hidden here — it would break position:sticky on the preview panel */
}

.journey-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--border-glow), transparent);
  pointer-events: none;
}

.journey-header {
  text-align: center;
  margin-bottom: 80px;
}

.journey-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.journey-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* Two-column layout */
.journey-layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 64px;
  align-items: start;
}

/* ── Left: Steps ── */
.journey-steps {
  display: flex;
  flex-direction: column;
}

.journey-step {
  display: flex;
  gap: 24px;
  padding: 36px 0;
  opacity: 0.4;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
  cursor: default;
  transform: scale(0.98);
}

.journey-step.active {
  opacity: 1;
  transform: scale(1);
}

.journey-step:hover {
  opacity: 0.7;
  transform: scale(0.99);
}

.journey-step.active:hover {
  opacity: 1;
  transform: scale(1.02);
}

/* Icon column */
.jstep-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.jstep-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(35, 116, 198, 0.08);
  border: 1px solid rgba(35, 116, 198, 0.2);
  color: var(--text-muted);
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.jstep-icon svg {
  width: 22px;
  height: 22px;
  transition: color 0.4s ease;
}

.journey-step.active .jstep-icon {
  background: linear-gradient(135deg, rgba(35, 116, 198, 0.2), rgba(19, 194, 150, 0.12));
  border-color: rgba(35, 116, 198, 0.4);
  color: var(--primary-light);
  box-shadow: 0 0 24px rgba(35, 116, 198, 0.2);
}

.jstep-line {
  flex: 1;
  width: 1px;
  min-height: 48px;
  margin: 10px 0 0;
  background: linear-gradient(to bottom, var(--border-glow), transparent);
}

/* Step body */
.jstep-body {
  flex: 1;
  padding-top: 12px;
}

/* Mobile inline preview — hidden on desktop, shown on mobile via media query */
.jstep-mobile-preview {
  display: none;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  box-shadow:
    0 0 0 1px rgba(35, 116, 198, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  width: 100%;
  /* Make it feel like a non-interactive screen */
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
}

/* Screen glow at top to signal it's a display */
.jstep-mobile-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.7;
  z-index: 1;
}

/* Scale down all inner text and padding to feel like a preview */
.jstep-mobile-preview .jmock-bar {
  padding: 7px 10px;
  font-size: 0.72rem;
}

.jstep-mobile-preview .jmock-toolbar {
  padding: 6px 10px;
  font-size: 0.7rem;
}

.jstep-mobile-preview .jwl-row {
  padding: 7px 10px;
  font-size: 0.72rem;
}

.jstep-mobile-preview .jwl-mod {
  font-size: 0.72rem;
}

.jstep-mobile-preview .jmock-footer {
  padding: 5px 10px;
  font-size: 0.65rem;
  opacity: 0.6;
}

.jstep-mobile-preview .jprior-section-label {
  font-size: 0.65rem;
  padding: 4px 10px;
}

.jstep-mobile-preview .jai-finding-row {
  padding: 4px 10px;
  font-size: 0.7rem;
}

.jstep-mobile-preview .jread-meta-row {
  padding: 5px 10px;
  font-size: 0.7rem;
}

.jstep-mobile-preview .jmock-ct-img {
  max-height: 120px;
  object-fit: cover;
}

.jstep-mobile-preview .jdone-icon svg {
  width: 36px;
  height: 36px;
}

.jstep-mobile-preview .jdone-label {
  font-size: 0.82rem;
}

.jstep-mobile-preview .jtrail-row {
  font-size: 0.7rem;
  padding: 3px 10px;
}

.jstep-mobile-preview .fmock-badge {
  font-size: 0.62rem;
  padding: 2px 6px;
}


.jstep-num {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary-light);
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.7;
}

.jstep-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.jstep-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 440px;
  margin-bottom: 14px;
}

.jstep-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
}

.jstep-tag svg {
  color: var(--secondary);
  flex-shrink: 0;
}

.jstep-tag-done {
  color: var(--secondary);
  border-color: rgba(19, 194, 150, 0.25);
  background: rgba(19, 194, 150, 0.05);
}

/* ── Right: Sticky Preview ── */
.journey-preview-wrap {
  position: sticky;
  /* Position so the preview's center lands at ~50% of the viewport.
     50vh = viewport midpoint; subtract half the card's typical height
     (~180px) so the CENTER of the card sits at the viewport centre.
     Does not require transform or flex tricks — works in any grid layout. */
  top: calc(50vh - 180px);
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.journey-preview {
  background: var(--bg-elevated);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

/* Browser chrome bar */
.jmock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
}

.jmock-title {
  flex: 1;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}

.jmock-status {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.3px;
}

/* Mock states — only active one is visible */
.jmock-state {
  display: none;
  flex-direction: column;
  animation: jmock-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.jmock-state.active {
  display: flex;
}

@keyframes jmock-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jmock-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.jmock-tbl-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
}

.jmock-tbl-count {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.jmock-incoming-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--secondary);
  background: rgba(19, 194, 150, 0.08);
  border: 1px solid rgba(19, 194, 150, 0.2);
  border-radius: 100px;
  padding: 3px 10px;
}

.jmock-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* Worklist rows */
.jmock-worklist,
.jmock-priors-panel {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jwl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s;
}

.jwl-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.jwl-new {
  background: rgba(35, 116, 198, 0.07);
  border: 1px solid rgba(35, 116, 198, 0.15);
  animation: jwl-flash 2s ease-in-out infinite;
}

@keyframes jwl-flash {

  0%,
  100% {
    border-color: rgba(35, 116, 198, 0.15);
  }

  50% {
    border-color: rgba(35, 116, 198, 0.35);
  }
}

.jwl-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.urgent-dot {
  background: #f87171;
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

.jwl-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jwl-mod {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.jwl-patient {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.jwl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.jwl-time {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.jprior-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  padding: 4px 12px;
}

.jprior-mt {
  margin-top: 12px;
}

/* AI panel */
.jmock-ai-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jai-scan {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(77, 158, 234, 0.15);
}

.jai-scan svg {
  width: 100%;
  height: auto;
  display: block;
}

.jai-findings {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.jai-finding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}

.jai-finding-row:last-child {
  border-bottom: none;
}

.jai-label {
  color: var(--text-muted);
}

.jai-val {
  font-weight: 600;
  color: var(--text-secondary);
}

.urgent-text {
  color: #f87171 !important;
}

.green-text {
  color: var(--secondary) !important;
}

/* Reading panel */
.jmock-reading-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jread-viewer {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(77, 158, 234, 0.15);
}

.jread-viewer svg {
  width: 100%;
  height: auto;
  display: block;
}

.jread-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.jread-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.jread-meta-row:last-child {
  border-bottom: none;
}

/* Done panel */
.jmock-done-panel {
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.jdone-icon {
  width: 56px;
  height: 56px;
}

.jdone-icon svg {
  width: 100%;
  height: 100%;
}

.jdone-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
}

.jdone-trail {
  width: 100%;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.jtrail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.jtrail-row:last-child {
  border-bottom: none;
}

.jtrail-row span:nth-child(2) {
  flex: 1;
}

.jtrail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.done-dot {
  background: var(--secondary);
}

/* Footer bar */
.jmock-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  background: rgba(0, 0, 0, 0.1);
}

/* ── Light mode overrides ── */
[data-theme="light"] .journey-section {
  background: #ffffff !important;
}

[data-theme="light"] .journey-preview {
  background: #ffffff !important;
  border-color: rgba(35, 116, 198, 0.12);
  box-shadow: 0 8px 32px rgba(35, 116, 198, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

[data-theme="light"] .jmock-bar {
  background: #f4f7fb;
  border-bottom-color: rgba(35, 116, 198, 0.1);
}

[data-theme="light"] .jmock-toolbar {
  background: #f8faff;
  border-bottom-color: rgba(35, 116, 198, 0.08);
}

[data-theme="light"] .jmock-state {
  background: #ffffff !important;
}

[data-theme="light"] .jmock-footer {
  background: #f4f7fb;
  border-top-color: rgba(35, 116, 198, 0.1);
  color: var(--text-muted);
}

[data-theme="light"] .jwl-row:hover {
  background: rgba(35, 116, 198, 0.04);
}

[data-theme="light"] .jai-findings,
[data-theme="light"] .jread-meta,
[data-theme="light"] .jdone-trail {
  background: #f4f7fb;
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .jai-finding-row,
[data-theme="light"] .jread-meta-row,
[data-theme="light"] .jtrail-row {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .jstep-tag {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-secondary);
}

[data-theme="light"] .jstep-body h3 {
  color: var(--text-white);
}

/* ── Mobile responsive ── */
@media (max-width: 1024px) {
  .journey-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .journey-preview-wrap {
    position: static;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }

  .journey-step {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .journey-step {
    gap: 16px;
  }

  .jstep-icon {
    width: 40px;
    height: 40px;
  }
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ═══════════════════════════════════════════
   COMPREHENSIVE MOBILE OPTIMISATION
   Breakpoints: 768px | 480px | 360px
═══════════════════════════════════════════ */

/* ── 768px — tablet & large phone ── */
@media (max-width: 768px) {

  /* ── Global section padding ── */
  section,
  .section,
  .crisis-section,
  .features-section,
  .process-section,
  .cta-section,
  .contact-section,
  .adv-section,
  .journey-section,
  .faq-section {
    padding: 24px 0 !important;
    min-height: unset !important;
  }

  section[id] {
    scroll-margin-top: 56px;
  }

  /* ── Reduce section header bottom margins ── */
  .features-header,
  .insights-header,
  .adv-header,
  .journey-header,
  .process-header {
    margin-bottom: 32px;
  }

  .contact-left>p {
    margin-bottom: 28px;
  }

  /* ── Hero ── */
  .hero {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 120px 0 60px !important;
  }

  .hero-chip {
    font-size: 0.72rem;
    padding: 8px 14px;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3.4rem);
    letter-spacing: -1.5px;
    line-height: 1.15;
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-buttons .btn-glow,
  .hero-buttons .btn-outline {
    width: 100%;
    max-width: 340px;
    justify-content: center;
  }

  .hero-partners {
    margin-top: 36px;
  }

  .hero-partner-logos {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .partner-logo {
    height: 36px;
  }

  .hero-partner-sep {
    width: 80px;
  }

  /* Hide forced line breaks that look awkward on mobile */
  .desktop-br {
    display: none;
  }

  /* ── Navbar ── */
  .navbar {
    padding: 0 16px;
  }

  .nav-cta {
    display: none;
  }

  /* ── Section headers ── */
  .section-header h2,
  .adv-header h2,
  .journey-section h2,
  .contact-left h2,
  .cta-box h2 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    letter-spacing: -0.5px;
  }

  /* ── Feature tabs panel ── */
  .feat-panel-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .feat-panel-inner::-webkit-scrollbar {
    display: none;
  }

  /* ── Features mock UI — inner panels ── */
  .fmock-body {
    overflow-x: hidden;
    flex-direction: column;
  }

  /* Hide sidebar on mobile — viewer gets full width */
  .fmock-sidebar {
    display: none;
  }

  .fmock-viewer {
    min-width: 0;
    width: 100%;
  }

  /* Compliance grid: 2×2 instead of 4-across */
  .fmock-compliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Workflow flow: allow wrapping on narrow screens */
  .fmock-flow {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .fflow-node {
    flex: 1 1 40%;
    min-width: 0;
    font-size: 0.7rem;
  }

  .fflow-arrow {
    display: none;
  }

  .fmock-stat-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .fmock-stat-box {
    flex: 1 1 calc(50% - 4px);
  }

  /* ── Journey section ── */
  .journey-section {
    padding: 24px 0;
  }

  /* Hide patient name on mobile — study type (jwl-mod) stays visible */
  .jwl-patient {
    display: none;
  }

  /* ── Hospital IT diagram ── */
  .fit-diagram {
    gap: 0;
    padding: 16px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fit-node-label {
    font-size: 0.65rem;
  }

  .fit-node-sub {
    font-size: 0.55rem;
  }

  .fit-port-tag {
    font-size: 0.5rem;
    padding: 2px 4px;
  }

  /* ── Contact section ── */
  .contact-info-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }

  .contact-form-card {
    padding: 24px 20px;
  }

  /* ── CTA section ── */
  .cta-box {
    padding: 48px 24px;
    text-align: center;
  }

  .cta-box-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .cta-box-actions .btn-glow,
  .cta-box-actions .btn-outline {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  /* ── Footer ── */
  .footer-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 20px;
  }

  /* ── Compliance badges ── */
  /* Styles removed - now using same styles on desktop */

  /* ── Cookie modal ── */
  .cookie-modal {
    padding: 24px 20px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .cookie-modal-actions {
    justify-content: stretch;
  }

  .cookie-modal-actions button {
    flex: 1;
    text-align: center;
  }

  /* ── Crisis stats ── */
  .crisis-stats {
    flex-wrap: wrap;
  }

  .crisis-stats .stat-item {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
  }

  /* ── SLA strip ── */
  .sla-strip {
    flex-wrap: wrap;
    gap: 0;
  }

  .sla-item {
    flex: 1 1 50%;
    padding: 12px 16px;
  }

  .sla-divider {
    display: none;
  }
}

/* ── Feature Explorer — mobile stacking (768px) ── */
@media (max-width: 768px) {

  /* Stack tabs on top, panel below */
  .features-explorer {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* Hide tab strip on mobile — titles are inside each panel card */
  .features-tabs {
    display: none !important;
  }

  .fpanel-visual {
    box-shadow: none;
  }

  .fpanel-capsule {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-light);
    background: rgba(35, 116, 198, 0.1);
    border: 1px solid rgba(35, 116, 198, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    margin-bottom: 16px;
    align-self: flex-start;
  }

  /* Each tab: compact horizontal chip */
  .ftab {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    width: auto;
    white-space: nowrap;
    min-height: 44px;
    /* touch target */
  }

  /* Hide subtitle and arrow — show icon + title only */
  .ftab-text>span,
  .ftab-arrow {
    display: none;
  }

  .ftab-text strong {
    font-size: 0.82rem;
  }

  .ftab-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .ftab-icon svg {
    width: 15px;
    height: 15px;
  }

  /* Panel takes full width */
  .features-panel {
    min-height: unset;
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: height 0.3s ease;
    align-items: flex-start;
  }

  .fmock-body {
    min-height: unset;
  }

  [data-panel="imaging"] .fmock-body {
    min-height: unset;
  }

  .fmock-ct-svg {
    height: auto;
    max-height: 180px;
  }

  .features-panel::-webkit-scrollbar {
    display: none;
  }

  .fpanel {
    display: flex !important;
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .features-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
  }

  .features-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border-hover);
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
  }

  .features-dot.active {
    background: var(--primary);
    transform: scale(1.3);
  }

  .features-dot:hover {
    background: var(--primary-light);
  }

  /* Mock UI panels: clip overflow so nothing bleeds out */
  .fpanel,
  .fmock-body,
  .fmock-window {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* ── Footer legal links — touch-friendly spacing ── */
@media (max-width: 768px) {

  .legal-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 0;
  }

  .legal-footer-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
  }

  .footer-inner {
    gap: 20px;
  }
}

/* ── 480px — small phone ── */
@media (max-width: 480px) {

  section,
  .section,
  .crisis-section,
  .features-section,
  .process-section,
  .cta-section,
  .contact-section,
  .adv-section,
  .journey-section,
  .faq-section {
    padding: 20px 0 !important;
  }

  section[id] {
    scroll-margin-top: 52px;
  }

  .hero {
    padding: 100px 0 48px !important;
  }

  /* ── Containers ── */
  .container,
  .container-wide {
    padding: 0 16px;
  }

  /* ── Typography ── */
  .hero-title {
    font-size: clamp(1.75rem, 10vw, 2.4rem);
    letter-spacing: -1px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  /* ── Hero buttons full-width ── */
  .hero-buttons .btn-glow,
  .hero-buttons .btn-outline {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  /* ── Feature tabs: single column ── */
  .features-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .ftab {
    padding: 8px 10px;
  }

  .ftab-icon {
    width: 18px;
    height: 18px;
  }

  /* ── Mock UI panels ── */
  .fmock-stat-box {
    flex: 1 1 100%;
  }

  .jmock-ct-img,
  .fmock-ct-svg {
    max-height: 160px;
    object-fit: cover;
  }

  /* ── Journey PACS worklist ── */
  .jwl-row {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .jwl-time {
    display: none;
  }

  .jwl-info {
    flex: 1;
  }

  /* ── Adv cards ── */
  .adv-card {
    padding: 20px;
  }

  .adv-grid {
    max-width: 100%;
    gap: 0;
  }

  /* ── Contact ── */
  .contact-layout {
    gap: 32px;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    font-size: 16px;
    /* prevents iOS zoom on focus */
  }

  /* Prevent iOS zoom on any input */
  input,
  textarea,
  select {
    font-size: 16px;
  }

  /* ── Process steps: true vertical stack ── */
  .process-track {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .process-step {
    max-width: 100%;
    width: 100%;
    text-align: left;
    padding: 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }

  .process-number {
    margin: 0;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .process-step h4,
  .process-step p {
    text-align: left;
  }

  /* ── Footer ── */
  .footer-nav {
    gap: 12px 16px;
  }

  /* ── Cookie banner ── */
  .cookie-banner {
    bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    left: 0;
    transform: translateY(150%);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .cookie-banner.visible {
    transform: translateY(0);
  }

  /* ── Cookie modal ── */
  .cookie-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .cookie-modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 80vh;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
  }

  /* ── Crisis stats: full width on tiny screens ── */
  .crisis-stats .stat-item {
    flex: 1 1 100%;
  }

  /* ── Compliance badges ── */
  .compliance-badge {
    padding: 8px 12px;
  }

  .badge-text {
    font-size: 0.72rem;
  }

  /* ── Modal ── */
  .modal {
    padding: 28px 20px;
    max-height: 90vh;
  }
}

/* ── 360px — very small phone safety net ── */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.65rem;
  }

  .hero-chip {
    font-size: 0.65rem;
    padding: 6px 10px;
  }

  .btn-glow,
  .btn-outline {
    padding: 12px 18px;
    font-size: 0.85rem;
  }

  .navbar .logo-text {
    font-size: 1rem;
  }

  .fcat-name {
    display: none;
  }

  .fit-diagram {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .fit-arrow-wrap {
    transform: rotate(90deg);
    flex-direction: row;
    width: 60px;
  }
}

/* ═══════════════════════════════════════════
   FAQ & JOURNEY SECTION — CORRECT MOBILE FIXES
═══════════════════════════════════════════ */

@media (max-width: 900px) {

  /* ─── FAQ ─── */

  /* Allow section to breathe - remove min-height so it doesn't fill 100vh */
  .faq-section {
    min-height: unset;
    padding: 24px 0;
  }

  /* Force single column layout */
  .faq-explorer {
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* no overflow restriction — let the pill strip scroll horizontally */
  }

  /* Category pills: horizontal scrolling row */
  .faq-categories {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    /* bound width so overflow-x actually fires */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    /* Bleed slightly past container so first/last pills have breathing room */
    padding-bottom: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .faq-categories::-webkit-scrollbar {
    display: none;
  }

  /* Category pill: compact horizontal chip */
  .fcat {
    flex: 0 0 auto;
    /* never stretch */
    width: auto;
    /* override desktop width:100% */
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    white-space: nowrap;
  }

  /* Category icon: smaller on mobile */
  .fcat-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .fcat-icon svg {
    width: 16px;
    height: 16px;
  }

  /* Category body: show title only, hide subtitle */
  .fcat-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  .fcat-body strong {
    font-size: 0.85rem;
  }

  /* Hide the subtitle "What HubNex is & how it differs" */
  .fcat-body>span {
    display: none;
  }

  /* Count badge */
  .fcat-count {
    font-size: 0.72rem;
    padding: 2px 8px;
  }

  /* Pane header: stack vertically */
  .faq-pane-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .faq-pane-header h3 {
    font-size: 1.1rem;
  }

  /* FAQ CTA box: hide on mobile (already done at 1024px but reinforce) */
  .faq-cta-box {
    display: none;
  }

  /* Accordion: comfortable tap targets */
  .facc-q {
    padding: 16px 18px;
    gap: 12px;
  }

  .facc-q>span:first-child {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .facc-body>p {
    font-size: 0.88rem;
    padding: 0 18px;
    line-height: 1.7;
  }

  .facc-item.open .facc-body>p {
    padding: 0 18px 16px;
  }

  /* ─── Journey "Your Workflow, Unchanged" ─── */

  .journey-section {
    padding: 24px 0;
  }

  /* Stack to single column: steps on top, preview below */
  .journey-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* Hide the sticky central preview — inline per-step previews replace it */
  .journey-preview-wrap {
    display: none;
  }

  /* Journey carousel */
  .journey-steps {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    min-width: 0;
    transition: height 0.3s ease;
    align-items: flex-start;
  }

  .journey-steps::-webkit-scrollbar {
    display: none;
  }

  .journey-step {
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    opacity: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
  }

  .journey-step .jstep-left {
    display: none !important;
  }

  .journey-step .jstep-line {
    display: none !important;
  }

  .journey-section::before {
    display: none;
  }

  .jstep-mobile-preview {
    box-shadow: none;
    border: 1px solid var(--border-glow);
  }

  .jstep-mobile-preview::before {
    display: none;
  }

  .journey-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
  }

  .journey-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--border-hover);
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
  }

  .journey-dot.active {
    background: var(--primary);
    transform: scale(1.3);
  }

  .journey-dot:hover {
    background: var(--primary-light);
  }

  /* Reveal the inline mobile preview card below each step's text */
  .jstep-mobile-preview {
    display: block;
  }

  /* Step body becomes a flex column so the preview card sits below the text */
  .jstep-body {
    display: flex;
    flex-direction: column;
  }

  /* PACS worklist rows: only hide patient name, keep study type visible */
  .jwl-patient {
    display: none;
  }

  .jwl-info {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .jwl-new {
    flex-shrink: 0;
  }

  .jwl-row {
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.76rem;
    overflow: hidden;
  }

  .jwl-priority {
    font-size: 0.65rem;
    padding: 3px 8px;
    white-space: nowrap;
  }

  /* Toolbar: wrap if needed */
  .jmock-toolbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .jmock-tbl-label {
    font-size: 0.7rem;
  }

  /* AI panel */
  .jmock-ai-panel {
    padding: 10px;
    gap: 8px;
  }

  .jai-finding-row {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  /* Reading panel */
  .jmock-reading-panel {
    padding: 10px;
    gap: 8px;
  }

  .jread-meta-row {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  /* Journey step body */
  .jstep-body h3 {
    font-size: 1.05rem;
  }

  .jstep-body p {
    font-size: 0.88rem;
  }

  .journey-step {
    padding: 24px 16px;
    gap: 18px;
  }
}

/* Extra tightening at 480px phones */
@media (max-width: 480px) {

  /* FAQ: icon-only chips (no title text) */
  .fcat-body strong {
    display: none;
  }

  .fcat {
    padding: 10px 12px;
    gap: 0;
  }

  .fcat-count {
    margin-left: 6px;
  }

  /* Journey: hide timestamp column */
  .jwl-time {
    display: none;
  }

  /* Tighter journey steps */
  .journey-step {
    padding: 20px 16px;
    gap: 14px;
  }

  .jstep-line {
    min-height: 24px;
  }
}


@media (max-width: 768px) {

  /* ── FAQ: section header ── */
  .faq-section {
    padding: 24px 0;
  }

  .faq-header {
    max-width: 100%;
    padding: 0 4px;
    margin-bottom: 32px;
  }

  /* ── FAQ: category pills strip ── */
  .faq-categories {
    gap: 6px;
    padding: 0 0 8px;
  }

  .fcat {
    padding: 10px 14px;
    min-width: 80px;
    flex: 0 0 auto;
  }

  .fcat-icon {
    width: 18px;
    height: 18px;
  }

  /* ── FAQ: pane header ── */
  .faq-pane-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .faq-pane-header h3 {
    font-size: 1.1rem;
  }

  /* ── FAQ: accordion question row — comfortable tap target ── */
  .facc-q {
    padding: 16px 18px;
    gap: 12px;
  }

  .facc-q>span:first-child {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .facc-chevron {
    width: 18px;
    height: 18px;
  }

  /* ── FAQ: accordion answer padding ── */
  .facc-body>p {
    padding: 0 18px;
    font-size: 0.88rem;
  }

  .facc-item.open .facc-body>p {
    padding: 0 18px 16px;
  }

  /* ── Journey section ── */
  .journey-section {
    padding: 24px 0;
  }

  /* Journey step body text */
  .jstep-body h3 {
    font-size: 1.1rem;
  }

  .jstep-body p {
    font-size: 0.88rem;
  }

  /* ── Journey preview: PACS mock worklist ── */
  .jmock-worklist {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Hide patient name — keep study type (jwl-mod) visible */
  .jwl-patient {
    display: none;
  }

  /* Make info column fill the freed space */
  .jwl-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jwl-row {
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.76rem;
  }

  /* Priority pill — keep it visible but compact */
  .jwl-priority {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  /* ── Journey preview: AI panel ── */
  .jmock-ai-panel {
    padding: 10px;
    gap: 8px;
  }

  .jai-finding-row {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  /* ── Journey preview: Reading panel ── */
  .jmock-reading-panel {
    padding: 10px;
    gap: 8px;
  }

  .jread-meta-row {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  /* ── Journey preview: collab panel ── */
  .jmock-collab-panel {
    padding: 10px;
    gap: 8px;
  }

  .jmock-case {
    padding: 10px 12px;
  }

  .jmock-bubble {
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  /* ── Journey preview container ── */
  .journey-preview-wrap {
    max-width: 100%;
    padding: 0 4px;
  }

  .journey-preview {
    border-radius: 12px;
  }

  .jmock-bar {
    padding: 10px 14px;
  }

  .jmock-title {
    font-size: 0.78rem;
  }
}

/* Extra tightening at 480px */
@media (max-width: 480px) {

  /* FAQ: show category icon only, hide text label */
  .fcat-name {
    display: none;
  }

  .fcat {
    min-width: 44px;
    padding: 10px 12px;
    justify-content: center;
  }

  /* FAQ: tighter accordion */
  .facc-q {
    padding: 14px 14px;
  }

  .facc-q>span:first-child {
    font-size: 0.88rem;
  }

  /* Journey: compact step connectors */
  .journey-step {
    padding: 24px 16px;
    gap: 16px;
  }

  .jstep-line {
    min-height: 28px;
  }

  /* Journey PACS preview: hide time column too, keep only priority + info */
  .jwl-time {
    display: none;
  }

  .jmock-toolbar {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .jmock-tbl-label {
    font-size: 0.68rem;
  }
}

/* Contact section — padding only; min-height:100vh + flex come from global section[id] rule */
.contact-section {
  padding: 100px 0 140px;
  position: relative;
  overflow-x: clip;
  scroll-margin-top: -40px !important;
}


/* ═══════════════════════════════════════════
   LARGE SCREEN — keep sections snug on 1400px+
   Removes min-height:100vh overrides that cause
   empty gaps between sections on high-res displays
═══════════════════════════════════════════ */
@media (min-width: 1400px) {

  /* Hero: cap padding so it doesn't swell on 4K */
  .hero {
    min-height: unset;
    padding: 140px 0 80px;
  }

  /* General section breathing room — clamp so it scales */
  .features-section,
  .adv-section,
  .bento-section,
  .journey-section,
  .contact-section,
  .sla-section,
  .process-section,
  .crisis-section,
  .stats-section {
    padding: clamp(60px, 6vw, 100px) 0;
  }

  .contact-section {
    padding: 100px 0 140px;
    scroll-margin-top: -40px !important;
  }

  .process-section {
    scroll-margin-top: -40px !important;
  }
}

/* ── Technical Term Tooltips ── */
.term-tooltip {
  position: relative;
  border-bottom: 1px dotted var(--primary);
  cursor: help;
  color: inherit;
  display: inline-block;
}

.term-tooltip::before {
  content: attr(data-definition);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  width: 220px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
}

.term-tooltip::after {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--glass-border);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10000;
}

.term-tooltip:hover::before,
.term-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="light"] .term-tooltip::before {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero h1 .gradient {
    animation: none;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
