/* ════════════════════════════════════════════════
   FlowQuest Website — Shared Design System v3
   Modern, professional design with latest trends
   ════════════════════════════════════════════════ */

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

/* Performance hints */
img, svg, canvas { content-visibility: auto; }
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
.site-header { contain: none; }
section { contain: layout style paint; }

:root {
  /* Enhanced Brand palette — modern gradients */
  --blue:        #2563eb;
  --blue-400:    #3b82f6;
  --blue-300:    #60a5fa;
  --blue-200:    #93c5fd;
  --blue-glow:   rgba(37, 99, 235, 0.35);
  --green:       #10b981;
  --green-400:   #34d399;
  --amber:       #f59e0b;
  --amber-400:   #fbbf24;
  --purple:      #8b5cf6;
  --cyan:        #06b6d4;
  --pink:        #ec4899;
  
  /* New gradient variables */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

  /* Light backgrounds (domyślny motyw) - enhanced */
  --bg-950: #f8fafc;
  --bg-900: #f1f5f9;
  --bg-800: #e8edf3;
  --bg-700: #dde3ea;
  --bg-600: #cbd5e1;
  --bg-500: #ffffff;
  --bg-400: #f1f5f9;

  /* Light text - enhanced contrast */
  --text-100: #0f172a;
  --text-200: #1e293b;
  --text-300: #0f172a;
  --text-400: #334155;
  --text-500: #475569;
  --text-600: #64748b;
  --text-700: #94a3b8;

  /* Light borders - softer */
  --border:       rgba(15, 23, 42, 0.08);
  --border-light: rgba(15, 23, 42, 0.12);
  --border-blue:  rgba(37, 99, 235, 0.25);
  --border-hover: rgba(37, 99, 235, 0.45);

  /* Nav / dropdowns - modern glass effect */
  --nav-bg:              rgba(248, 250, 252, 0.85);
  --nav-bg-scrolled:     rgba(255, 255, 255, 0.95);
  --nav-link-hover:      rgba(37, 99, 235, 0.08);
  --dropdown-bg:         rgba(255, 255, 255, 0.95);
  --dropdown-link-hover: rgba(37, 99, 235, 0.08);
  --mobile-nav-bg:       rgba(255, 255, 255, 0.98);
  --accordion-hover-bg:  rgba(37, 99, 235, 0.05);
  --glass-bg:            rgba(255, 255, 255, 0.7);
  --logo-filter:         brightness(0) saturate(0);
  
  /* New shadow variables */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 40px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 12px 60px rgba(15, 23, 42, 0.16);
  --shadow-blue: 0 8px 32px rgba(37, 99, 235, 0.15);
  
  /* Animation variables */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme='dark'] {
  /* Dark backgrounds */
  --bg-950: #070d1a;
  --bg-900: #0a1121;
  --bg-800: #0f172a;
  --bg-700: #1a2540;
  --bg-600: #1e293b;
  --bg-500: #253047;
  --bg-400: #2d3a52;

  /* Dark text */
  --text-100: #ffffff;
  --text-200: #f1f5f9;
  --text-300: #e2e8f0;
  --text-400: #cbd5e1;
  --text-500: #94a3b8;
  --text-600: #64748b;
  --text-700: #475569;

  /* Dark borders */
  --border:       rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-blue:  rgba(59, 130, 246, 0.35);
  --border-hover: rgba(59, 130, 246, 0.55);

  /* Nav / dropdowns */
  --nav-bg:              rgba(10, 17, 33, 0.85);
  --nav-bg-scrolled:     rgba(10, 17, 33, 0.97);
  --nav-link-hover:      rgba(255, 255, 255, 0.06);
  --dropdown-bg:         rgba(10, 17, 33, 0.95);
  --dropdown-link-hover: rgba(255, 255, 255, 0.05);
  --mobile-nav-bg:       rgba(10, 17, 33, 0.98);
  --accordion-hover-bg:  rgba(255, 255, 255, 0.04);
  --glass-bg:            rgba(30, 41, 59, 0.60);
  --logo-filter:         brightness(0) invert(1);
}

/* ── BASE ── */
/* ═══════════════════════════════════
   VIEW TRANSITIONS API (CSS 2026)
   Smooth cross-document page transitions
   ═══════════════════════════════════ */
@view-transition { navigation: auto; }

html { scroll-behavior: smooth; }

/* Premium custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(37,99,235,.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(37,99,235,.45); }

/* Text selection */
::selection { background: rgba(37,99,235,.2); color: inherit; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--text-400);
  background: var(--bg-800);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'cv01';
}

body.nav-open { overflow: hidden; }

/* ── LAYOUT ── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

:where(
  .container,
  .nav-inner,
  .nav-links,
  .nav-item,
  .dropdown-menu,
  .dropdown-section,
  .crosslink-grid,
  .crosslink-card,
  .contact-card,
  .service-card,
  .article-card,
  .cat-card,
  .module-card,
  .module-header,
  .price-card,
  .ind-pkg-card,
  .instance-card,
  .target-card,
  .standard-card,
  .vertical-card,
  .t-card,
  .faq-item,
  .option-card
) > * {
  min-width: 0;
}

/* ═══════════════════════════════════
   ANIMATIONS & KEYFRAMES
   ═══════════════════════════════════ */

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%      { transform: translateY(-12px) rotate(1deg); }
  66%      { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes pulseGlow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3), 
                0 4px 20px rgba(37, 99, 235, 0.2); 
  }
  50% { 
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.5), 
                0 8px 32px rgba(37, 99, 235, 0.4); 
  }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: .7; }
}

@keyframes borderFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* Modern animation classes */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-left {
  animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-right {
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 100ms; }
.stagger-children > *:nth-child(2) { animation-delay: 200ms; }
.stagger-children > *:nth-child(3) { animation-delay: 300ms; }
.stagger-children > *:nth-child(4) { animation-delay: 400ms; }
.stagger-children > *:nth-child(5) { animation-delay: 500ms; }

/* Scroll reveal utility classes */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.from-left  { transform: translateX(-20px); }
.reveal.from-right { transform: translateX(20px); }
.reveal.visible    { opacity: 1; transform: none; }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Floating animation class */
.float { animation: float 5s ease-in-out infinite; }
.float-slow { animation: float 7s ease-in-out infinite; }

@supports (animation-timeline: view()) {
  .scroll-reveal,
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    animation: fqViewReveal both ease-out;
    animation-timeline: view();
    animation-range: entry 12% cover 34%;
  }
}

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

/* ═══════════════════════════════════
   MODERN GRADIENT TEXT
   ═══════════════════════════════════ */
.gradient-text {
  background: var(--gradient-primary);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.gradient-text-blue {
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-success {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════
   MODERN GLASS CARD
   ═══════════════════════════════════ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.glass:hover {
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* Modern card with gradient border */
.modern-card {
  position: relative;
  background: var(--bg-500);
  border-radius: 20px;
  padding: 24px;
  overflow: hidden;
  transition: all var(--transition-base);
}

.modern-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-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-base);
}

.modern-card:hover::before {
  opacity: 1;
}

.modern-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.float-element {
  animation: float 5s ease-in-out infinite;
}

/* ═══════════════════════════════════
   MODERN SECTION STYLES
   ═══════════════════════════════════ */
.section { 
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-400), transparent);
  opacity: 0.3;
}

.section-dark  { 
  background: var(--bg-800);
  background: linear-gradient(135deg, var(--bg-800) 0%, var(--bg-900) 100%);
}
.section-deep  { 
  background: var(--bg-900);
  background: linear-gradient(135deg, var(--bg-900) 0%, #0f172a 100%);
}
.section-card  { 
  background: var(--bg-700);
  background: linear-gradient(135deg, var(--bg-700) 0%, var(--bg-800) 100%);
}
.section-light { 
  background: var(--bg-600);
  background: linear-gradient(135deg, var(--bg-600) 0%, var(--bg-700) 100%);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  color: var(--text-100);
  text-wrap: balance;
  background: linear-gradient(135deg, var(--text-100) 0%, var(--text-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-500);
  margin: 0 0 60px;
  max-width: 600px;
  text-wrap: pretty;
}

/* Modern section with gradient accent */
.section-accent {
  position: relative;
}

.section-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Section with background pattern */
.section-pattern {
  position: relative;
}

.section-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.module-showcase {
  padding: 88px 0;
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(6,182,212,.05) 55%, rgba(255,255,255,.03));
}
.module-showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.module-showcase h2 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  color: var(--text-100);
  margin-bottom: 16px;
}
.module-showcase p {
  color: var(--text-500);
  margin-bottom: 24px;
}
.module-callout {
  background: var(--bg-500);
  color: var(--text-100);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(15,23,42,.25);
  border: 1px solid var(--border);
}
.module-callout strong {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #2563eb;
}
.module-callout span {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-top: 6px;
  color: var(--text-100);
}
.module-callout p { color: var(--text-500); }
:root[data-theme='dark'] .module-callout {
  background: linear-gradient(180deg, rgba(11,20,38,.96), rgba(7,17,31,.98));
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.08);
}
.module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.module-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.9));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  transition: transform 320ms cubic-bezier(.22,1,.36,1), border-color 250ms ease, box-shadow 320ms cubic-bezier(.22,1,.36,1);
}
:root[data-theme='dark'] .module-card {
  background: linear-gradient(180deg, rgba(37,48,71,.92), rgba(26,37,64,.94));
  box-shadow: none;
}
.module-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(37,99,235,.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 16px 40px rgba(15,23,42,.1);
}
.module-card:hover::after { opacity: 1; }
.module-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-100);
}
.module-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-400);
}
.module-card a {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-200);
}
.module-card a:hover { color: var(--blue-300); }

.industry-articles-section {
  padding: 88px 0;
  background: var(--bg-950);
}
.industry-article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.industry-article {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-500) 90%, white 10%), var(--bg-500));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  gap: 14px;
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  transition: border-color 280ms ease, box-shadow 350ms cubic-bezier(.22,1,.36,1), transform 350ms cubic-bezier(.22,1,.36,1);
}
.industry-article:hover {
  border-color: rgba(37,99,235,.2);
  box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 12px 32px rgba(15,23,42,.08);
  transform: translateY(-2px);
}
.industry-article::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(37,99,235,.14), transparent 65%);
  opacity: 0;
  transition: opacity 280ms ease;
}
.industry-article:hover::after { opacity: 1; }
.industry-article h3 {
  margin: 0;
  font-size: 1.16rem;
  color: var(--text-100);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.industry-article p {
  margin: 0;
  color: var(--text-400);
  line-height: 1.72;
}
.industry-article-meta {
  margin-top: auto;
  display: grid;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-400);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.industry-article-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  line-height: 1.55;
}
.article-tag {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue-200);
}

@container (max-width: 320px) {
  .industry-article {
    padding: 20px;
    gap: 12px;
  }

  .industry-article h3 {
    font-size: 1.04rem;
  }

  .industry-article-meta {
    font-size: .78rem;
  }
}

.text-center { text-align: center; }
.text-center .section-sub { margin-left: auto; margin-right: auto; }

/* ═══════════════════════════════════
   GLOW CARD (dark themed)
   ═══════════════════════════════════ */
.glow-card {
  background: var(--bg-600);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 280ms ease, box-shadow 350ms cubic-bezier(.22,1,.36,1), transform 350ms cubic-bezier(.22,1,.36,1);
}
.glow-card:hover {
  border-color: var(--border-blue);
  box-shadow: 0 0 0 1px rgba(59,130,246,.12), 0 8px 32px rgba(0,0,0,.3);
  transform: translateY(-3px);
}

.p-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: .85rem;
  color: var(--blue-200);
  text-decoration: none;
  font-weight: 600;
  transition: color 180ms ease;
}
.p-link i {
  font-size: .85rem;
}
.p-link:hover {
  color: var(--blue-400);
}

/* ═══════════════════════════════════
   MODERN HEADER / NAV
   ═══════════════════════════════════ */
/* ── Modern sticky header with glass effect ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
  overflow: visible;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-base);
}

.site-header.scrolled {
  padding: 8px 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  min-height: 70px;
  gap: 16px;
  padding: 0 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-base);
  margin: 0 12px;
}

.site-header.scrolled .nav-inner {
  min-height: 60px;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-sm);
}

/* Dark mode header */
:root[data-theme='dark'] .site-header {
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .site-header.scrolled {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

:root[data-theme='dark'] .nav-inner {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .site-header.scrolled .nav-inner {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modern navigation links */
.nav-links a {
  position: relative;
  color: var(--text-500);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 12px;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
  border-radius: 12px;
}

.nav-links a:hover {
  color: white;
  transform: translateY(-2px);
}

.nav-links a:hover::before {
  opacity: 1;
}

.nav-links a.active {
  color: white;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-blue);
}

.nav-links a.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.3);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 10px;
  position: relative;
  z-index: 1;
}

.site-logo-mark {
  display: inline-flex;
  align-items: center;
  min-width: clamp(132px, 14vw, 180px);
}

.logo-img {
  height: 34px;
  width: auto;
  display: none;
  transition: opacity 200ms, transform 200ms;
}
.site-logo:hover .logo-img {
  opacity: .92;
  transform: translateY(-1px);
}

/* NAPRAWA LOGO - zawsze pokazuj logo dla jasnego motywu */
.logo-on-light { display: block !important; }
.logo-on-dark { display: none !important; }

:root:not([data-theme='dark']) .logo-on-light { display: block !important; }
:root:not([data-theme='dark']) .logo-on-dark { display: none !important; }
:root[data-theme='dark'] .logo-on-light { display: none !important; }
:root[data-theme='dark'] .logo-on-dark { display: block !important; }

.logo-wordmark {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text-100);
  letter-spacing: -.4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.nav-links a {
  color: var(--text-500);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 10px;
  transition: color 180ms, background 180ms, transform 180ms, box-shadow 180ms;
  white-space: nowrap;
  position: relative;
}
.nav-item > a,
.nav-links > a {
  background: transparent;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 280ms cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover {
  color: var(--text-100);
  background: rgba(37,99,235,.06);
  box-shadow: none;
  transform: translateY(-1px);
}
.nav-links a:hover::after { width: 60%; }
.nav-links a.active {
  color: #ffffff;
  font-weight: 700;
  background: rgba(37,99,235,.08);
  box-shadow: none;
}
.nav-links a.active::after {
  width: 70%;
  background: #3b82f6;
  height: 2px;
  box-shadow: 0 0 8px rgba(59,130,246,.5);
}
:root:not([data-theme='dark']) .nav-links a.active {
  color: #0f172a;
}
:root[data-theme='dark'] .nav-links a:hover,
:root[data-theme='dark'] .nav-links a.active {
  box-shadow: none;
}

/* Logo: dedykowane pliki logo-on-light / logo-on-dark — bez filtra */
:root[data-theme='dark'] .footer-logo { filter: brightness(0) invert(1); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.nav-cta .cta-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-nav-outline {
  color: var(--text-300);
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-500);
  text-decoration: none;
  transition: all 180ms;
  white-space: nowrap;
  box-shadow: none;
}
:root[data-theme='dark'] .btn-nav-outline {
  background: var(--bg-800);
  color: var(--text-200);
}
.btn-nav-outline:hover {
  color: var(--text-100);
  border-color: rgba(37,99,235,.22);
  background: rgba(37,99,235,.08);
}

.btn-nav-primary {
  background: #2563eb;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 200ms ease, box-shadow 300ms ease, transform 200ms ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(37,99,235,.3);
  position: relative;
  overflow: hidden;
}
.btn-nav-primary::before {
  content: none;
}
.btn-nav-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
  transform: translateY(-1px);
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-item > a {
  padding: 8px 13px;
}
.nav-item.dropdown > a {
  padding-right: 24px;
}

/* Zwiększ obszar hover dla dropdown */
.nav-item.dropdown {
  padding: 8px 0;
}
.nav-item.dropdown > a::before {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-62%) rotate(45deg);
  opacity: .55;
  transition: transform 180ms ease, opacity 180ms ease;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--dropdown-bg);
  border-radius: 20px;
  border: 1px solid var(--border-light);
  padding: 10px 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 24px rgba(15,23,42,.08), 0 12px 48px rgba(15,23,42,.06);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(.22,1,.36,1), transform 220ms cubic-bezier(.22,1,.36,1);
  transform: translateY(8px);
  z-index: 1001;
  overflow: hidden;
}
.dropdown-menu a {
  color: var(--text-400);
  padding: 9px 16px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
  white-space: normal;
  position: static;
  border-radius: 14px;
  line-height: 1.45;
  display: block;
}
.dropdown-menu a::after {
  display: none;
}
.dropdown-menu a:hover {
  background: var(--dropdown-link-hover);
  color: var(--text-100);
}
.dropdown-menu-wide {
  min-width: 620px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  background: var(--dropdown-bg);
}
.dropdown-section {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-500);
  border: 1px solid var(--border);
  box-shadow: none;
}
.dropdown-title {
  padding: 4px 8px 4px;
  color: var(--text-500);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dropdown-title::before {
  content: '';
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}
.dropdown-note {
  padding: 6px 12px 2px;
  color: var(--text-600);
  font-size: .75rem;
  line-height: 1.55;
}
.dropdown-link-rich {
  display: block;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}
.dropdown-link-rich strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-200);
  font-size: .88rem;
  margin-bottom: 4px;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.dropdown-link-rich strong::before {
  content: '';
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 0 0 1px rgba(59,130,246,.18), 0 4px 10px rgba(37,99,235,.18);
}
.dropdown-link-rich span {
  display: block;
  color: var(--text-600);
  font-size: .76rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.dropdown-section:nth-child(2) .dropdown-link-rich strong::before {
  background: linear-gradient(135deg, #475569, #64748b);
  box-shadow: 0 0 0 1px rgba(100,116,139,.18), 0 4px 10px rgba(71,85,105,.16);
}
:root[data-theme='dark'] .dropdown-link-rich strong::before {
  box-shadow: 0 0 0 1px rgba(96,165,250,.22), 0 4px 12px rgba(37,99,235,.22);
}
.dropdown-link-rich:hover {
  border-color: rgba(59,130,246,.22);
  background: rgba(37,99,235,.05);
  box-shadow: none;
  transform: translateY(-1px);
}
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-item:hover > a::before,
.nav-item:focus-within > a::before {
  transform: translateY(-36%) rotate(225deg);
  opacity: .8;
}
:root[data-theme='dark'] .dropdown-menu {
  background: var(--dropdown-bg);
}
:root[data-theme='dark'] .dropdown-menu-wide {
  background: var(--dropdown-bg);
}
:root[data-theme='dark'] .dropdown-section {
  background: var(--bg-800);
  border-color: var(--border);
  box-shadow: none;
}
:root[data-theme='dark'] .dropdown-link-rich {
  background: transparent;
  box-shadow: none;
}
:root[data-theme='dark'] .dropdown-link-rich:hover {
  background: rgba(37,99,235,.09);
  box-shadow: none;
}
.mobile-nav-cta { display: none; }
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-500);
  color: var(--text-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
  position: relative;
  z-index: 1;
}
:root[data-theme='dark'] .theme-toggle {
  background: var(--bg-800);
  box-shadow: none;
}
.theme-toggle:hover {
  border-color: var(--border-hover);
  background: rgba(37,99,235,.08);
  color: var(--text-100);
  transform: translateY(-1px);
}
.theme-toggle i { font-size: 0.9rem; }

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-500);
  color: var(--text-400);
  font-size: 1.05rem;
  cursor: pointer;
  margin-left: auto;
  box-shadow: none;
  transition: color 160ms, background 160ms ease, border-color 160ms ease, transform 160ms ease;
  z-index: 1;
}
:root[data-theme='dark'] .hamburger {
  background: var(--bg-800);
  box-shadow: none;
}
.hamburger:hover {
  color: var(--text-100);
  border-color: var(--border-hover);
  background: rgba(37,99,235,.08);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════
   PAGE HERO (inner pages)
   ═══════════════════════════════════ */
.page-hero {
  background: var(--bg-900);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,.12) 0%, transparent 65%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.3), transparent);
}

.page-hero-inner { max-width: 700px; }

.page-hero .section-label { margin-bottom: 12px; }

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-100);
  letter-spacing: -1px;
  line-height: 1.12;
  margin: 0 0 16px;
}

.page-hero p {
  font-size: 1.08rem;
  color: var(--text-400);
  line-height: 1.75;
  margin: 0;
  max-width: 600px;
}

/* ═══════════════════════════════════
   ACCORDION (dark)
   ═══════════════════════════════════ */
.accordion {
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-500);
}
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: .97rem;
  font-weight: 700;
  color: var(--text-200);
  text-align: left;
  gap: 12px;
  transition: background 160ms, color 160ms;
  font-family: inherit;
}
.accordion-trigger:hover { background: var(--accordion-hover-bg); color: var(--text-100); }
.accordion-trigger i { color: var(--text-600); transition: transform 300ms, color 200ms; flex-shrink: 0; }
.accordion-trigger.open {
  color: var(--text-100);
  background: rgba(37,99,235,.06);
}
.accordion-trigger.open i { transform: rotate(45deg); color: var(--blue); }

.accordion-body {
  display: none;
  padding: 14px 22px 20px;
  font-size: .92rem;
  color: var(--text-400);
  line-height: 1.85;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-900) 76%, white 24%);
}
.accordion-body.open { display: block; }
:root[data-theme='dark'] .accordion-trigger.open {
  background: rgba(59,130,246,.12);
}
:root[data-theme='dark'] .accordion-body {
  background: rgba(255,255,255,.03);
}

/* ═══════════════════════════════════
   DIVIDER
   ═══════════════════════════════════ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.25), transparent);
  border: none;
  margin: 0;
}

/* ═══════════════════════════════════
   CROSSLINK BAND
   ═══════════════════════════════════ */
.crosslink-band {
  padding: 0 0 68px;
  background: var(--bg-900);
}

.crosslink-shell {
  display: grid;
  gap: 28px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-500) 92%, white 8%), var(--bg-500));
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 34px rgba(15,23,42,.06);
}

:root[data-theme='dark'] .crosslink-shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.012));
  box-shadow: 0 10px 34px rgba(0,0,0,.22);
}

.crosslink-copy {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.crosslink-copy h2 {
  color: var(--text-100);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.crosslink-copy p {
  color: var(--text-500);
  line-height: 1.72;
  margin: 0;
}

.crosslink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.crosslink-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 100%;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-500);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  position: relative;
}

.crosslink-card:hover {
  border-color: rgba(37,99,235,.24);
  background: color-mix(in srgb, var(--bg-500) 94%, var(--blue) 6%);
  transform: translateY(-2px);
}

.crosslink-eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,.16);
  background: rgba(37,99,235,.06);
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crosslink-card strong {
  color: var(--text-100);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.crosslink-card span:last-of-type {
  color: var(--text-500);
  font-size: .84rem;
  line-height: 1.65;
}

.crosslink-card i {
  margin-top: 6px;
  color: var(--blue);
  font-size: .9rem;
  transition: transform 180ms ease;
}

.crosslink-card:hover i {
  transform: translateX(4px);
}

/* ═══════════════════════════════════
   FOOTER
   ═══════════════════════════════════ */
.site-footer {
  background: var(--bg-900);
  padding-top: 68px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}

.footer-logo {
  height: 26px;
  width: auto;
  display: block;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: .84rem;
  color: var(--text-700);
  line-height: 1.65;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-600);
  font-size: .9em;
  text-decoration: none;
  transition: all 180ms;
}
.footer-social a:hover { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 4px 12px rgba(37,99,235,.4); }

.footer-col { display: flex; flex-direction: column; gap: 9px; }

.footer-col-title {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-700);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 6px;
}

.footer-col a {
  color: var(--text-600);
  text-decoration: none;
  font-size: .85rem;
  transition: color 140ms;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col a:hover { color: var(--text-300); }
.footer-col a i { font-size: .85em; color: var(--text-700); }

.footer-bottom { padding: 20px 0; }

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

.footer-bottom-inner span { font-size: .78rem; color: var(--text-700); }

.footer-bottom-links { display: flex; gap: 22px; }

.footer-bottom-links a {
  font-size: .78rem;
  color: var(--text-700);
  text-decoration: none;
  transition: color 140ms;
}
.footer-bottom-links a:hover { color: var(--text-500); }

/* ═══════════════════════════════════
   MODERN BUTTONS
   ═══════════════════════════════════ */
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-blue);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-outline-light {
  color: var(--text-400);
  font-weight: 600;
  font-size: 0.93rem;
  padding: 13px 28px;
  border-radius: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--border-light);
  transition: all var(--transition-base);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-outline-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.btn-outline-light:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light:hover::before {
  opacity: 1;
}

/* New modern button variants */
.btn-gradient {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}

.btn-gradient:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 48px rgba(37, 99, 235, 0.5);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-100);
  padding: 13px 28px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════
   GLOW DOT (live indicator)
   ═══════════════════════════════════ */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--green);
}

/* ═══════════════════════════════════
   CHIP / BADGE
   ═══════════════════════════════════ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.chip-blue   { background: rgba(37,99,235,.15);  color: var(--blue-200); border: 1px solid rgba(37,99,235,.3); }
.chip-green  { background: rgba(16,185,129,.12); color: var(--green-400); border: 1px solid rgba(16,185,129,.25); }
.chip-amber  { background: rgba(245,158,11,.12); color: var(--amber-400); border: 1px solid rgba(245,158,11,.25); }
.chip-purple { background: rgba(139,92,246,.12); color: #c4b5fd; border: 1px solid rgba(139,92,246,.25); }
.chip-slate  { background: rgba(255,255,255,.07); color: var(--text-500); border: 1px solid var(--border); }

.module-showcase-inner {
  align-items: stretch;
}
.module-callout {
  min-height: 220px;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media(max-width: 1024px) {
  .module-showcase-inner { grid-template-columns: 1fr; }
  .module-callout { order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  /* Ukryj "Umów demo" jako pierwszy */
  .nav-cta .cta-links .btn-nav-outline { display: none; }
}

@media(max-width: 900px) {
  /* Ukryj też "Panel klienta" */
  .nav-cta .cta-links { display: none; }
}

@media(max-width: 768px) {
  .site-header {
    position: fixed;
    width: 100%;
    padding-top: 0;
    overflow: visible;
    background: rgba(248,250,252,.92);
    backdrop-filter: blur(24px) saturate(1.3);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    border-bottom: 1px solid rgba(15,23,42,.06);
  }
  :root[data-theme='dark'] .site-header {
    background: rgba(10,17,33,.72);
  }

  .site-header.scrolled {
    padding: 6px 8px 6px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
  }
  .nav-inner {
    min-height: 56px;
    gap: 12px;
    padding: 0 16px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    transition: border-radius .35s cubic-bezier(.22,1,.36,1),
                background .35s cubic-bezier(.22,1,.36,1),
                box-shadow .35s cubic-bezier(.22,1,.36,1);
  }
  .site-header.scrolled .nav-inner {
    border-radius: 14px;
    background: rgba(248,250,252,.88);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 2px 16px rgba(15,23,42,.06);
  }
  :root[data-theme='dark'] .nav-inner {
    background: transparent;
    border: none;
  }
  :root[data-theme='dark'] .site-header.scrolled .nav-inner {
    background: rgba(10,17,33,.85);
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 2px 16px rgba(0,0,0,.2);
  }
  .site-logo {
    margin-right: auto;
    min-width: 0;
  }
  .site-logo-mark { min-width: 0; }
  .logo-img { height: 28px; }

  /* Motyw toggle zawsze obok hamburgera */
  .nav-cta {
    margin-left: 0;
    order: 0;
    gap: 8px;
    flex: 0 0 auto;
  }
  .theme-toggle {
    order: 0;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
  }
  .hamburger {
    order: 1;
    margin-left: 0;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
  }

  .nav-links {
    display: none !important; /* Ukryj menu domyślnie */
    position: fixed;
    top: 88px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: var(--mobile-nav-bg);
    backdrop-filter: blur(28px) saturate(1.4);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
    border: 1px solid var(--border-light);
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    gap: 6px;
    z-index: 520;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(15,23,42,.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 240ms cubic-bezier(.4,0,.2,1), transform 240ms cubic-bezier(.4,0,.2,1);
    display: flex;
  }
  .nav-links.open {
    display: flex !important; /* Pokaż menu po kliknięciu hamburger */
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-links a {
    padding: 13px 18px;
    border-radius: 12px;
    font-size: .95rem;
  }
  .nav-links a:hover {
    background: var(--nav-link-hover);
  }
  .nav-item { width: 100%; }
  .dropdown-menu {
    position: static;
    border: 1px solid var(--border);
    background: rgba(15,23,42,.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
    padding: 6px;
    display: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin: 4px 0;
    border-radius: 14px;
  }
  :root[data-theme='dark'] .dropdown-menu { background: rgba(255,255,255,.03); }
  .nav-item.dropdown.open .dropdown-menu { display: flex; }
  .dropdown-menu a { padding: 12px 14px; border-radius: 10px; font-size: .88rem; }
  .dropdown-menu-wide {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .dropdown-title,
  .dropdown-note {
    padding-inline: 10px;
  }

  .mobile-nav-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  .mobile-nav-cta .btn-nav-primary,
  .mobile-nav-cta .btn-nav-outline {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding-block: 13px;
    border-radius: 13px;
  }

  .nav-cta { margin-left: 0; }
  .nav-cta .cta-links { display: none; }
  .hamburger {
    display: flex;
    z-index: 500;
    position: relative;
    margin-left: 0;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.4);
    z-index: 480;
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms;
    backdrop-filter: blur(2px);
  }
  .nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  body { padding-top: 94px; }
  body.nav-open .site-header { z-index: 560; }

  .crosslink-band {
    padding-bottom: 56px;
  }
  .crosslink-shell {
    padding: 22px;
    border-radius: 20px;
    gap: 22px;
  }
  .crosslink-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .crosslink-card {
    padding: 18px;
    border-radius: 16px;
  }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom-inner { flex-direction: column; gap: 10px; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
}

/* ═══════════════════════════════════
   MODERN RESPONSIVE ENHANCEMENTS
   ═══════════════════════════════════ */
@media(max-width: 768px) {
  .section { 
    padding: 80px 0;
  }
  
  .section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  .section-sub {
    font-size: 1rem;
    margin-bottom: 40px;
  }
  
  .nav-inner {
    margin: 0 8px;
    padding: 0 16px;
    border-radius: 14px;
  }
  
  .btn-primary,
  .btn-gradient,
  .btn-outline-light {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

@media(max-width: 480px) {
  .nav-inner { 
    padding-inline: 14px;
    margin: 0 6px;
  }
  
  .nav-links {
    left: 12px;
    right: 12px;
    top: 80px;
    bottom: 12px;
    border-radius: 20px;
    padding: 16px;
  }
  
  .section { 
    padding: 60px 0;
  }
  
  .section-label {
    font-size: 0.65rem;
    padding: 6px 16px;
    letter-spacing: 2px;
  }
  
  .crosslink-grid { 
    grid-template-columns: 1fr; 
  }
  
  .footer-inner { 
    grid-template-columns: 1fr; 
    gap: 30px;
  }
  
  /* Modern mobile adjustments */
  .modern-card {
    padding: 20px;
  }
  
  .glass {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
}

/* Dark mode enhancements for mobile */
@media(max-width: 768px) {
  :root[data-theme='dark'] .nav-inner {
    background: rgba(30, 41, 59, 0.7);
  }
  
  :root[data-theme='dark'] .site-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
  }
}

/* Smooth scrolling for the whole site */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* Better focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Modern selection color */
::selection {
  background: rgba(37, 99, 235, 0.3);
  color: var(--text-100);
}

::-moz-selection {
  background: rgba(37, 99, 235, 0.3);
  color: var(--text-100);
}

@media(max-width: 640px) {
  .page-hero-inner {
    margin-inline: auto;
    text-align: center;
  }

  .page-hero .section-label {
    justify-content: center;
  }

  .page-hero p,
  .section-sub {
    margin-inline: auto;
  }

  .module-callout,
  .module-card,
  .crosslink-copy,
  .crosslink-card,
  .industry-content-card {
    text-align: center;
  }

  .module-card a,
  .industry-content-card .eyebrow-mini {
    margin-inline: auto;
  }
}

/* ═══════════════════════════════════
   SCROLL REVEAL INIT SCRIPT (inline)
   ═══════════════════════════════════
   Add  <script src="motion.js"></script>
   at bottom of each page, OR embed the
   IntersectionObserver snippet inline. */

/* Industry landing pages */
.industry-page {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-950) 0%, var(--bg-900) 100%);
}

.industry-page .site-header { background: transparent; }
.industry-main { padding-bottom: 32px; }

.industry-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px;
}

.industry-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: .8rem;
  color: var(--text-600);
  margin-bottom: 22px;
}

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

.industry-breadcrumbs a:hover { color: var(--blue); }

.industry-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 32px;
}

.industry-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 185, 129, 0.08), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.14), transparent 28%);
  pointer-events: none;
}

.industry-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 32px;
  align-items: stretch;
}

.industry-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--industry-accent, var(--blue)) 28%, transparent);
  background: color-mix(in srgb, var(--industry-accent, var(--blue)) 12%, var(--bg-500));
  color: var(--industry-accent, var(--blue));
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.industry-hero-copy h1 {
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: 1.06;
  color: var(--text-100);
  margin: 0 0 18px;
}

.industry-hero-copy p {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-500);
  margin: 0 0 22px;
}

.industry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 30px;
}

.industry-btn-primary,
.industry-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.industry-btn-primary {
  background: linear-gradient(135deg, var(--industry-accent, var(--blue)), color-mix(in srgb, var(--industry-accent, var(--blue)) 82%, white));
  color: #fff;
  box-shadow: 0 14px 38px color-mix(in srgb, var(--industry-accent, var(--blue)) 28%, transparent);
}

.industry-btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg-500);
  color: var(--text-300);
}

.industry-btn-primary:hover,
.industry-btn-secondary:hover { transform: translateY(-1px); }

.industry-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.industry-kpi {
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-500) 0%, color-mix(in srgb, var(--bg-500) 86%, var(--industry-accent, var(--blue)) 14%) 100%);
  min-height: 114px;
}

.industry-kpi strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text-100);
  margin-bottom: 10px;
}

.industry-kpi span {
  display: block;
  color: var(--text-500);
  font-size: .88rem;
  line-height: 1.55;
}

.industry-side-card,
.industry-content-card,
.industry-proof-card,
.industry-related-card {
  background: color-mix(in srgb, var(--bg-500) 92%, white 8%);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.industry-side-card { padding: 26px; }

.industry-side-card h2,
.industry-content-card h2,
.industry-related-card h2 {
  color: var(--text-100);
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.industry-side-card p,
.industry-content-card p,
.industry-proof-card p,
.industry-related-card p {
  color: var(--text-500);
  line-height: 1.72;
}

.industry-side-card .eyebrow-mini,
.industry-content-card .eyebrow-mini,
.industry-related-card .eyebrow-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--industry-accent, var(--blue));
  margin-bottom: 14px;
}

.industry-side-stack,
.industry-note-list,
.industry-checklist,
.industry-module-list,
.industry-related-links {
  display: grid;
  gap: 12px;
}

.industry-note-item,
.industry-checklist li,
.industry-module-item,
.industry-related-links a {
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-900) 76%, white 24%);
  border: 1px solid var(--border);
}

.industry-note-item i,
.industry-checklist i,
.industry-module-item i,
.industry-related-links a i {
  color: var(--industry-accent, var(--blue));
  margin-top: 3px;
}

.industry-note-item strong,
.industry-checklist strong,
.industry-module-item strong {
  color: var(--text-200);
  display: block;
  margin-bottom: 4px;
}

.industry-story-section,
.industry-related-section { padding: 18px 0 30px; }

.industry-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: 24px;
  align-items: start;
}

.industry-content-card { padding: 28px; }
.industry-content-card + .industry-content-card { margin-top: 18px; }

.industry-section-title {
  color: var(--text-100);
  font-size: 1.7rem;
  margin: 0 0 12px;
}

.industry-section-lead {
  color: var(--text-500);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 22px;
}

.industry-proof-card { padding: 22px; }

.industry-proof-card blockquote {
  color: var(--text-200);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 16px;
}

.industry-proof-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-600);
  font-size: .84rem;
}

.industry-module-list { margin-top: 16px; }

.industry-module-item { justify-content: space-between; }
.industry-module-copy { flex: 1; }

.industry-module-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--industry-accent, var(--blue)) 12%, var(--bg-500));
  color: var(--industry-accent, var(--blue));
}

.industry-related-card { padding: 28px; }

.industry-related-links a {
  color: var(--text-300);
  text-decoration: none;
  justify-content: space-between;
  transition: border-color 180ms ease, transform 180ms ease;
}

.industry-related-links a:hover {
  border-color: color-mix(in srgb, var(--industry-accent, var(--blue)) 32%, transparent);
  transform: translateY(-1px);
}

.industry-cta-band {
  margin-top: 24px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--industry-accent, var(--blue)) 88%, #111827), color-mix(in srgb, var(--industry-accent, var(--blue)) 62%, #ffffff));
  color: #fff;
}

.industry-cta-band h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.industry-cta-band p {
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 18px;
}

.industry-cta-band .industry-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.industry-hub-section { padding: 26px 0 34px; }
.industry-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.industry-hub-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 24px;
  text-decoration: none;
  background: color-mix(in srgb, var(--bg-500) 92%, white 8%);
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.industry-hub-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--industry-accent, var(--blue)) 30%, transparent);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.1);
}
.industry-hub-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--industry-accent, var(--blue));
  background: color-mix(in srgb, var(--industry-accent, var(--blue)) 10%, var(--bg-500));
  border: 1px solid color-mix(in srgb, var(--industry-accent, var(--blue)) 24%, transparent);
  font-size: 1.2rem;
}
.industry-hub-card h2,
.industry-hub-card h3 {
  color: var(--text-100);
  font-size: 1.08rem;
  margin: 0;
}
.industry-hub-card p {
  color: var(--text-500);
  line-height: 1.7;
  margin: 0;
}
.industry-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.industry-hub-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--industry-accent, var(--blue)) 8%, var(--bg-500));
  color: var(--industry-accent, var(--blue));
  border: 1px solid color-mix(in srgb, var(--industry-accent, var(--blue)) 18%, transparent);
}

@media(max-width: 980px) {
  .industry-shell { padding: 0 20px; }
  .industry-hero-grid,
  .industry-story-grid,
  .industry-hub-grid { grid-template-columns: 1fr 1fr; }
}

@media(max-width: 720px) {
  .industry-hero { padding-top: 34px; }
  .industry-kpis { grid-template-columns: 1fr; }
  .industry-side-card,
  .industry-content-card,
  .industry-related-card,
  .industry-proof-card { border-radius: 20px; }
  .industry-content-card,
  .industry-side-card,
  .industry-related-card,
  .industry-proof-card,
  .industry-cta-band,
  .industry-hub-card { padding: 20px; }
  .industry-hub-grid { grid-template-columns: 1fr; }
}
