/* ============================================================
   CSS Custom Properties — edytuj tutaj kolory i typografię
   ============================================================ */
:root {
  /* Kolory tła */
  --bg-primary:   #070b14;
  --bg-secondary: #0d1117;
  --bg-card:      #161b27;
  --bg-card-hover:#1c2333;
  --bg-alt:       #0f1420;

  /* Kolory akcentu */
  --accent:       #4f8ef7;
  --accent-dark:  #3a73d4;
  --accent-glow:  rgba(79, 142, 247, 0.15);
  --accent-2:     #818cf8;

  /* Kolory tekstu */
  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  /* Obramowania */
  --border:       #21262d;
  --border-light: #30363d;

  /* Status */
  --success: #3fb950;
  --warning: #d29922;
  --error:   #f85149;

  /* Gradienty */
  --gradient: linear-gradient(135deg, #4f8ef7 0%, #818cf8 100%);

  /* Typografia */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Zaokrąglenia */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Cienie */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.7);
  --shadow-accent: 0 0 40px rgba(79,142,247,0.2);

  /* Layout */
  --container:  1200px;
  --nav-height: 72px;
  --section-py: 5rem;

  /* Przejścia */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   Utilities
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-py) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

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

.w-full { width: 100%; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-lg { font-size: 1rem; padding: 0.75rem 1.75rem; }
.btn-sm { font-size: 0.825rem; padding: 0.45rem 1rem; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79,142,247,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-card);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(79,142,247,0.35);
}
.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* Loading state */
.btn--loading .btn-text { opacity: 0; }
.btn--loading .btn-arrow { display: none; }
.btn--loading .btn-spinner {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-spinner { display: none; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
}
.badge-sm {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

/* ============================================================
   Logo image
   ============================================================ */
.logo-img {
  height: 30px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.logo-img--footer {
  height: 32px;
  filter: brightness(1.1);
}
.logo-fallback {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
/* Wyrównanie logo w nav */
.nav-logo {
  display: flex;
  align-items: center;
  height: var(--nav-height);
}

/* ============================================================
   Legal pages (Polityka prywatności, Regulamin)
   ============================================================ */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
}
.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--text-primary);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.legal-content h2:first-of-type { border-top: none; margin-top: 1rem; }
.legal-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.legal-content ul, .legal-content ol {
  list-style: none;
  margin: 0.5rem 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.legal-content ul li, .legal-content ol li {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 1.25rem;
  position: relative;
}
.legal-content ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.legal-content ol { counter-reset: ol-counter; }
.legal-content ol li { counter-increment: ol-counter; }
.legal-content ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }

.legal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 1rem 0 1.5rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0 1.5rem;
}
.legal-table th, .legal-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.9rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.legal-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.legal-table td { color: var(--text-secondary); }
.legal-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.legal-table code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-2);
}

.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.legal-toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem !important;
}
.legal-toc ol { margin: 0; }
.legal-toc ol li { padding-left: 1.5rem; }
.legal-toc ol li a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; }
.legal-toc ol li a:hover { color: var(--accent); }

.legal-updated {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
}

/* ============================================================
   HMI Operator Panel (hero automatyki)
   ============================================================ */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

/* ============================================================
   Hero — robot photo + screen overlay
   ============================================================ */
.hero-robot-wrap {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  /* delikatna poświata accentem */
  filter: drop-shadow(0 20px 60px rgba(79,142,247,0.12));
}

.hero-robot-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Nakładka terminala — pozycja dopasowana do ekranu LCD na pendant */
.hero-screen-overlay {
  position: absolute;
  left:   14%;
  top:    16.5%;
  width:  71.5%;
  height: 45.5%;
  border-radius: 8px;
  overflow: hidden;
  background: #05080e;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 40px rgba(0,0,0,0.7),
    inset 0 0 4px rgba(79,142,247,0.05);
}

/* ============================================================
   HMI Operator Panel (CSS fallback — zachowane)
   ============================================================ */
.hmi-panel {
  background: #1c2030;
  border: 2px solid #2e3450;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px #111827,
    0 24px 64px rgba(0,0,0,0.6),
    0 0 40px rgba(79,142,247,0.07),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Top bezel */
.hmi-bezel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem 0.6rem;
  background: linear-gradient(180deg, #252b3e 0%, #1c2030 100%);
  border-bottom: 1px solid #2e3450;
}
.hmi-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.hmi-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.hmi-brand-model {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #8b95ae;
  letter-spacing: 0.04em;
}
.hmi-leds {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.hmi-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
}
.hmi-led::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  opacity: 0.25;
}
.hmi-led--run {
  background: var(--success);
  box-shadow: 0 0 6px rgba(63,185,80,0.8);
  animation: hmi-pulse 2s ease infinite;
}
.hmi-led--run::after { background: var(--success); }
.hmi-led--pwr {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(79,142,247,0.6);
}
.hmi-led--pwr::after { background: var(--accent); }
.hmi-led--com {
  background: #f0a500;
  box-shadow: 0 0 5px rgba(240,165,0,0.5);
  animation: hmi-blink-com 1.2s step-end infinite;
}
@keyframes hmi-pulse    { 0%,100%{opacity:1} 50%{opacity:0.55} }
@keyframes hmi-blink-com { 0%,100%{opacity:1} 50%{opacity:0.1} }

/* Screen */
.hmi-screen {
  background: #080d14;
  margin: 0;
  position: relative;
  border-top: 2px solid #0e1420;
  border-bottom: 2px solid #0e1420;
}
.hmi-screen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.85rem;
  background: #0d1623;
  border-bottom: 1px solid #1a2540;
}
.hmi-screen-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  color: #5a7aaa;
}
.hmi-screen-status {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--success);
  letter-spacing: 0.05em;
}

/* Terminal inside HMI screen / photo overlay */
.terminal--hmi {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex: 1;
  overflow: hidden;
}
.terminal--hmi .terminal-body {
  padding: 0.6rem 0.8rem;
  gap: 0.28rem;
}
.terminal--hmi .terminal-line { font-size: 0.7rem; }

.hmi-screen-statusbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.3rem 0.85rem;
  background: #0d1623;
  border-top: 1px solid #1a2540;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: #4a6080;
}
.hmi-run-badge {
  margin-left: auto;
  color: var(--success);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* Bottom bezel */
.hmi-bezel-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: linear-gradient(0deg, #1a1f30 0%, #1c2030 100%);
  border-top: 1px solid #2e3450;
}
.hmi-btn-group {
  display: flex;
  gap: 0.35rem;
}
.hmi-btn {
  background: #252b3e;
  border: 1px solid #3a4158;
  border-bottom: 2px solid #111827;
  border-radius: 4px;
  color: #7a86a0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  cursor: default;
  letter-spacing: 0.03em;
  user-select: none;
  transition: filter 0.1s;
}
.hmi-btn:active { border-bottom-width: 1px; filter: brightness(1.15); }
.hmi-btn--enter {
  background: #1e3a6e;
  border-color: #2e5cb0;
  border-bottom-color: #0d1e45;
  color: #7ab0ff;
}
.hmi-screws {
  display: flex;
  gap: 0.5rem;
}
.hmi-screw {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3a4158, #1a1f30);
  border: 1px solid #2e3450;
  position: relative;
}
.hmi-screw::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) rotate(45deg);
  width: 5px;
  height: 1px;
  background: #111827;
  box-shadow: 0 0 0 0.5px #111827;
}

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  margin: 0;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-link.active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.lang-btn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: calc(var(--radius-sm) - 2px);
  text-decoration: none;
  transition: all var(--transition);
}
.lang-btn.lang-active {
  background: var(--accent);
  color: #fff;
}
.lang-btn:hover:not(.lang-active) { color: var(--text-primary); }

/* User menu */
.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.nav-user-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  z-index: 200;
}
.nav-user-menu:hover .user-dropdown,
.nav-user-menu:focus-within .user-dropdown { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-item--danger:hover { color: var(--error); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.4rem 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -5px; }
.hamburger::after  { top: 5px; }

.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open .hamburger::after  { transform: rotate(-45deg); top: 0; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  z-index: 200;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2rem;
}
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: var(--bg-card);
  color: var(--text-primary);
}
.mobile-nav-link--accent { color: var(--accent); }
.mobile-lang {
  display: flex;
  gap: 0.5rem;
}

/* Flash messages */
.flash {
  position: fixed;
  top: calc(var(--nav-height) + 1rem);
  right: 1.5rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.flash--success { background: rgba(63,185,80,0.15); border: 1px solid rgba(63,185,80,0.4); color: var(--success); }
.flash--error   { background: rgba(248,81,73,0.15);  border: 1px solid rgba(248,81,73,0.4);  color: var(--error); }
.flash-close    { background: none; border: none; color: inherit; font-size: 1.25rem; line-height: 1; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ============================================================
   Main content offset
   ============================================================ */
main { padding-top: var(--nav-height); }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.hero-glow--1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; right: -100px;
}
.hero-glow--2 {
  width: 400px; height: 400px;
  background: var(--accent-2);
  bottom: -100px; left: 5%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Hero bez grafiki — wyśrodkuj treść */
.hero-inner--centered {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-inner--centered .hero-actions {
  justify-content: center;
}

.hero-content { max-width: 560px; }
.hero-headline {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 1rem 0;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Terminal */
.hero-visual { position: relative; }
.terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-accent);
  font-family: var(--font-mono);
  font-size: 0.825rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot--red    { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green  { background: #28c840; }
.terminal-title {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.terminal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.terminal-line { display: flex; gap: 0.5rem; }
.t-prompt { color: var(--accent-2); }
.t-cmd { color: var(--text-primary); }
.t-output { color: var(--text-secondary); padding-left: 1rem; }
.t-ok { color: var(--success); }
.t-success { color: var(--success); }
.t-cursor {
  display: inline-block;
  background: var(--accent);
  width: 8px;
  height: 14px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ============================================================
   Stats
   ============================================================ */
.stats-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   Cards Grid
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px; height: 44px;
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.card-icon svg { width: 22px; height: 22px; }

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
}
.card-link:hover { gap: 0.6rem; }

/* ============================================================
   CTA Band
   ============================================================ */
.cta-band {
  background: linear-gradient(135deg, rgba(79,142,247,0.1) 0%, rgba(129,140,248,0.1) 100%);
  border-top: 1px solid rgba(79,142,247,0.2);
  border-bottom: 1px solid rgba(79,142,247,0.2);
  padding: 4rem 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-band-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.cta-band-text p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ============================================================
   Page Hero
   ============================================================ */
.page-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(79,142,247,0.08), transparent);
}
.page-hero--sm { padding: 3rem 0 2rem; }
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.75rem 0;
}
.page-hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   About Page
   ============================================================ */
.about-intro-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4rem;
  align-items: start;
}
.about-avatar-wrap { text-align: center; }
.about-avatar {
  width: 200px; height: 200px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  overflow: hidden;
}
.about-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.08;
}
.about-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.about-role { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.about-avatar-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.about-bio {}
.about-p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; font-size: 1.05rem; }
.about-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.skill-item {}
.skill-header { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.skill-name { font-size: 0.875rem; font-weight: 500; }
.skill-pct { font-size: 0.8rem; color: var(--accent); font-weight: 600; font-family: var(--font-mono); }
.skill-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: var(--pct);
  background: var(--gradient);
  border-radius: 100px;
  transform-origin: left;
  animation: fillBar 1s ease forwards;
}
@keyframes fillBar { from { width: 0; } }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-year { font-size: 0.75rem; font-weight: 600; color: var(--accent); font-family: var(--font-mono); }
.timeline-role { font-size: 1.05rem; font-weight: 700; margin: 0.25rem 0; }
.timeline-company { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.timeline-desc { font-size: 0.875rem; color: var(--text-muted); }

/* Certifications */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cert-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}
.cert-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.cert-icon {
  width: 44px; height: 44px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.cert-name { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.2rem; }
.cert-org { font-size: 0.775rem; color: var(--text-muted); }

/* ============================================================
   Offer Page
   ============================================================ */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
}
.offer-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.offer-card-header { display: flex; align-items: flex-start; gap: 1rem; }
.offer-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.offer-icon svg { width: 24px; height: 24px; }
.offer-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.25rem; }
.offer-short { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.offer-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }
.offer-bullets {
  display: flex; flex-direction: column; gap: 0.5rem;
  flex: 1;
}
.offer-bullets li {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
}
.offer-bullets li svg { flex-shrink: 0; margin-top: 2px; color: var(--success); }

/* Process */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; }
.process-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: 0.3;
}
.process-step { text-align: center; }
.process-num {
  display: inline-flex;
  width: 56px; height: 56px;
  background: var(--gradient);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.process-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.process-desc { font-size: 0.825rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   Portfolio Page
   ============================================================ */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.filter-btn {
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-btn--hidden { display: none; }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.portfolio-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.portfolio-card.hidden { display: none; }

.portfolio-thumb { height: 180px; }
.portfolio-thumb-placeholder {
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-alt) 100%);
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  position: relative;
}
.portfolio-thumb-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.05;
}
.portfolio-cat-badge {
  background: var(--gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  position: relative;
  z-index: 1;
}
.portfolio-body { padding: 1.5rem; }
.portfolio-tech-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.tech-tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-family: var(--font-mono);
}
.portfolio-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.portfolio-desc { font-size: 0.825rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.portfolio-results {
  display: flex; flex-direction: column; gap: 0.35rem;
  margin-bottom: 1.25rem;
}
.portfolio-results li {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.775rem; color: var(--success);
}

/* ============================================================
   Articles Page
   ============================================================ */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
}
.featured-article-thumb { height: 320px; }
.article-thumb-placeholder {
  height: 100%;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-alt) 100%);
  display: flex; align-items: flex-start; padding: 1.25rem;
  position: relative;
}
.article-thumb-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.06;
}
.article-cat-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  position: relative;
  z-index: 1;
}
.article-cat-badge--lg { font-size: 0.8rem; padding: 0.35rem 0.8rem; }
.featured-article-body { padding: 2rem 2rem 2rem 0; }
.featured-article-title { font-size: 1.5rem; font-weight: 700; margin: 0.75rem 0; line-height: 1.3; }
.featured-article-excerpt { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.775rem;
  color: var(--text-muted);
}
.article-cat { color: var(--accent); font-weight: 600; }
.article-sep { color: var(--text-muted); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.article-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.article-thumb { height: 160px; }
.article-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.article-title { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.article-excerpt { font-size: 0.825rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.article-read-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.775rem;
  color: var(--text-muted);
}
.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* ============================================================
   Articles — coming soon
   ============================================================ */
.articles-coming-soon {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 0;
}
.coming-soon-icon {
  width: 88px; height: 88px;
  margin: 0 auto 1.75rem;
  background: var(--accent-glow);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.coming-soon-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.coming-soon-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.coming-soon-topics { margin-bottom: 2.5rem; }
.coming-soon-topics-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.coming-soon-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.coming-tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  transition: all var(--transition);
}
.coming-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.coming-soon-cta p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}
.contact-info-card, .contact-social-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.contact-info-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.contact-info-list { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-info-item { display: flex; align-items: flex-start; gap: 0.875rem; }
.contact-info-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.info-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.info-value { font-size: 0.9rem; color: var(--text-primary); }
.info-value a { color: var(--text-primary); }
.info-value a:hover { color: var(--accent); }
.info-value small { color: var(--text-muted); }
.contact-social-links { display: flex; flex-direction: column; gap: 0.75rem; }
.social-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}
.social-link-card:hover { border-color: var(--border-light); color: var(--text-primary); background: var(--bg-card-hover); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label { display: block; font-size: 0.825rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; }
.required { color: var(--error); }

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input--error { border-color: var(--error); }
.form-input--error:focus { box-shadow: 0 0 0 3px rgba(248,81,73,0.15); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
.form-error { display: block; font-size: 0.775rem; color: var(--error); margin-top: 0.3rem; min-height: 1em; }

/* Checkbox */
.form-group--checkbox { display: flex; flex-direction: column; gap: 0.25rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-custom {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-secondary);
  transition: all var(--transition);
  position: relative;
  margin-top: 1px;
}
.checkbox-input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-left: none; border-top: none;
  transform: rotate(45deg);
}
.checkbox-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* Password */
.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--text-secondary); }

/* Form status */
.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.form-status:empty { display: none; }
.form-status--success {
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.3);
  color: var(--success);
}
.form-status--error {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--error);
}

/* ============================================================
   Customer Center
   ============================================================ */
.cc-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.cc-section-icon {
  width: 40px; height: 40px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.cc-section-header h2 { font-size: 1.25rem; font-weight: 700; }

.download-list { display: flex; flex-direction: column; gap: 0.75rem; }
.download-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition);
}
.download-item:hover { border-color: var(--border-light); }
.download-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.download-icon svg { width: 22px; height: 22px; }
.download-info { flex: 1; }
.download-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.download-desc { font-size: 0.825rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.download-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.download-btn { flex-shrink: 0; }

.external-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.external-app-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-decoration: none;
  transition: all var(--transition);
}
.external-app-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.external-app-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.external-app-icon svg { width: 22px; height: 22px; }
.external-app-info { flex: 1; }
.external-app-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; }
.external-app-desc { font-size: 0.775rem; color: var(--text-secondary); line-height: 1.5; }
.external-app-arrow { color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }
.external-app-card:hover .external-app-arrow { color: var(--text-secondary); }

/* ============================================================
   Auth Pages
   ============================================================ */
.auth-section {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.auth-card--wide { max-width: 600px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.auth-sub { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }
.auth-footer-text {
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}
.auth-footer-text a { color: var(--accent); font-weight: 600; }

/* 404 */
.not-found-card { text-align: center; }
.not-found-code {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.not-found-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.not-found-sub { color: var(--text-secondary); margin-bottom: 2rem; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  margin-top: auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding: 3.5rem 0;
}
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); margin: 0.75rem 0 1.25rem; max-width: 240px; }
.social-links { display: flex; gap: 0.5rem; }
.social-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}
.social-link:hover { border-color: var(--border-light); color: var(--text-primary); }
.footer-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer-nav-list { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav-list a { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-nav-list a:hover { color: var(--text-primary); }
.footer-contact-list { gap: 0.75rem; }
.footer-contact-list li {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-secondary);
}
.footer-contact-list svg { flex-shrink: 0; color: var(--text-muted); margin-top: 1px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-legal-links { display: flex; gap: 1.5rem; }
.footer-legal-links a { font-size: 0.8rem; color: var(--text-muted); transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--text-secondary); }

/* ============================================================
   Animations (Intersection Observer)
   ============================================================ */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}
[data-animate="fade-left"]  { transform: translateX(24px); }
[data-animate="fade-right"] { transform: translateX(-24px); }
[data-animate].visible {
  opacity: 1;
  transform: translate(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid::before { display: none; }
  .about-intro-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-avatar-wrap { display: flex; align-items: center; gap: 2rem; text-align: left; }
  .about-avatar { margin: 0; width: 120px; height: 120px; }
  .about-avatar-badges { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Tablet / Mobile (768px) ---- */
@media (max-width: 768px) {
  :root { --section-py: 2.5rem; }

  /* NAV — ukryj linki, pokaż hamburger */
  .nav {
    gap: 0;
    justify-content: space-between;
    padding: 0 1rem;
  }
  .nav-links { display: none !important; }

  /* nav-actions: zostaw tylko lang + hamburger */
  .nav-actions {
    gap: 0.5rem;
  }
  .nav-actions > a.btn,
  .nav-actions > .nav-user-menu { display: none !important; }

  /* Hamburger — zawsze widoczny */
  .nav-toggle {
    display: flex !important;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-color: var(--border-light);
  }

  /* Logo — mniejsze na mobile */
  .logo-img { height: 22px; }
  .logo-text { font-size: 0.9rem; }

  /* Reszta układu */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-nav-group:last-child { grid-column: span 2; }
  .cta-band-inner { flex-direction: column; text-align: center; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article-thumb { height: 200px; }
  .featured-article-body { padding: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .download-item { flex-wrap: wrap; }
  .download-btn { width: 100%; justify-content: center; }
  .coming-soon-tags { gap: 0.4rem; }
  .external-apps-grid { grid-template-columns: 1fr; }
}

/* ---- Małe telefony (480px) ---- */
@media (max-width: 480px) {
  :root { --section-py: 2rem; }

  .nav { padding: 0 0.75rem; }

  /* Ukryj lang-switcher w nav na bardzo małych ekranach — jest w mobile menu */
  .nav-actions .lang-switcher { display: none; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .auth-card { padding: 1.5rem 1rem; }
  .about-avatar-wrap { flex-direction: column; text-align: center; }
  .about-avatar-badges { justify-content: center; }
  .section-header h2 { font-size: 1.5rem; }
  .page-hero h1 { font-size: 1.75rem; }
  .cta-band { padding: 2.5rem 0; }
  .legal-table { font-size: 0.775rem; }
  .legal-table th, .legal-table td { padding: 0.5rem 0.6rem; }
}
