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

:root {
  --bg:        #09090f;
  --bg-2:      #0f0f17;
  --bg-3:      #14141e;
  --accent:    #3b82f6;
  --accent-2:  #6366f1;
  --accent-dim: rgba(59, 130, 246, 0.12);
  --text:      #e8e8f0;
  --text-muted: #6b7280;
  --border:    rgba(255, 255, 255, 0.07);
  --nav-h:     68px;
  --radius:    14px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
strong { color: var(--text); font-weight: 600; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot,
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  mix-blend-mode: screen;
}

.cursor-glow {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  transition: transform 0.12s var(--ease), opacity 0.3s;
}

body:not(:hover) .cursor-dot,
body:not(:hover) .cursor-glow { opacity: 0; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(9, 9, 15, 0.85);
  backdrop-filter: blur(18px);
  border-color: var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--accent-dim);
}

.nav-link-cta {
  background: var(--accent);
  color: #fff !important;
  margin-left: 8px;
}

.nav-link-cta:hover {
  background: #2563eb;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 24px;
}

.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.orb-1 {
  width: 600px; height: 600px;
  background: rgba(59, 130, 246, 0.18);
  top: -100px; left: -100px;
  animation: orb-float 14s ease-in-out infinite;
}

.orb-2 {
  width: 400px; height: 400px;
  background: rgba(99, 102, 241, 0.15);
  bottom: 0; right: -80px;
  animation: orb-float 18s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px; height: 300px;
  background: rgba(59, 130, 246, 0.1);
  top: 50%; left: 50%;
  animation: orb-float 22s ease-in-out infinite 4s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-30px, 20px) scale(0.97); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  text-align: center;
}

.hero-avatar {
  margin-bottom: 28px;
  display: flex;
  justify-content: center;
}

.hero-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.08), 0 0 40px rgba(59, 130, 246, 0.15);
  transition: box-shadow 0.4s var(--ease);
}

.hero-avatar img:hover {
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.25);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
  background: var(--bg-2);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 6px rgba(59,130,246,0); }
}

.hero-title {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.accent-text { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero reveal animations */
.reveal-hero {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 0.7s var(--ease) forwards;
}
.reveal-hero:nth-child(1) { animation-delay: 0.1s; }
.reveal-hero:nth-child(2) { animation-delay: 0.2s; }
.reveal-hero:nth-child(3) { animation-delay: 0.35s; }
.reveal-hero:nth-child(4) { animation-delay: 0.5s; }
.reveal-hero:nth-child(5) { animation-delay: 0.65s; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: hero-in 0.7s 0.9s var(--ease) both;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(1.1); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(59,130,246,0.4);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 8px 32px rgba(59,130,246,0.35);
}

.btn-ghost {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-2);
  border-color: rgba(255,255,255,0.15);
}

.btn-full { width: 100%; justify-content: center; }

/* ===== SECTION SHARED ===== */
.section-header {
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 560px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== O FIRMIE ===== */
#o-firmie { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-3px);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}

.stat-suffix {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 2px;
  display: inline;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== OFERTA ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(59,130,246,0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

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

.service-card:hover {
  border-color: rgba(59,130,246,0.35);
  transform: translateY(-4px);
  background: var(--bg-3);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s;
}

.service-card:hover .service-icon { background: rgba(59,130,246,0.22); }

.service-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== PROJEKTY ===== */
#projekty { background: var(--bg-2); }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.project-card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-4px);
}

.project-visual {
  padding: 24px 24px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-3) 100%);
}

.project-screen {
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: none;
}

.project-mockup {
  background: var(--bg-2);
}

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.mockup-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.mockup-bar span:nth-child(1) { background: rgba(255,95,86,0.7); }
.mockup-bar span:nth-child(2) { background: rgba(255,189,46,0.7); }
.mockup-bar span:nth-child(3) { background: rgba(39,201,63,0.7); }

.mockup-content { padding: 20px; }

/* IoT Mockup */
.mockup-device-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mockup-device {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color 0.3s;
}

.project-card:hover .mockup-device.active {
  border-color: rgba(59,130,246,0.4);
}

.device-icon { width: 22px; height: 22px; color: var(--text-muted); }
.device-icon svg { width: 100%; height: 100%; }

.mockup-device span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.device-status {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.device-status.on  { background: rgba(34,197,94,0.15); color: #4ade80; }
.device-status.off { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.device-status.warn { background: rgba(251,191,36,0.15); color: #fbbf24; }

/* CRM Mockup */
.mockup-crm-layout {
  display: flex;
  gap: 12px;
  height: 120px;
}

.mockup-sidebar {
  width: 70px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-item {
  font-size: 0.65rem;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--text-muted);
  cursor: default;
}

.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.mockup-main { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.crm-stat-row {
  display: flex;
  gap: 8px;
}

.crm-stat {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.crm-stat span { font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.crm-stat small { font-size: 0.55rem; color: var(--text-muted); }

.crm-bar-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0 2px;
}

.bar {
  flex: 1;
  background: var(--accent-dim);
  border-radius: 3px 3px 0 0;
  transition: background 0.3s;
}

.project-card:hover .bar { background: rgba(59,130,246,0.25); }

/* Project info */
.project-info {
  padding: 24px;
}

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

.project-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.project-link:hover {
  color: var(--accent);
  border-color: rgba(59,130,246,0.4);
  background: var(--accent-dim);
}

.project-link svg { width: 15px; height: 15px; }

.project-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ===== KONTAKT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(107,114,128,0.6); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.form-group textarea { min-height: 130px; }

.form-status {
  margin-top: 16px;
  font-size: 0.88rem;
  border-radius: 8px;
  padding: 0;
  min-height: 0;
  transition: all 0.3s;
}

.form-status.success {
  padding: 12px 16px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  color: #4ade80;
}

.form-status.error {
  padding: 12px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  color: #f87171;
}

/* Contact info */
.contact-info-inner {
  padding: 8px 0;
}

.contact-info-inner h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(59,130,246,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  transition: background 0.3s;
}

.contact-icon:hover { background: rgba(59,130,246,0.22); }

.contact-icon svg { width: 18px; height: 18px; }

.contact-list .contact-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.contact-list a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

.contact-list a:hover { color: var(--accent); }

.contact-list span:not(.contact-label) {
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
.hide-mobile { display: initial; }

@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid    { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  section { padding: 80px 0; }
  .hide-mobile { display: none; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(9,9,15,0.97);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .nav-link { width: 100%; padding: 12px 16px; }
  .nav-link-cta { margin-left: 0; text-align: center; }

  .services-grid  { grid-template-columns: 1fr; }
  .projects-grid  { grid-template-columns: 1fr; }
  .contact-grid   { grid-template-columns: 1fr; }

  .section-header { margin-bottom: 40px; }

  .contact-form-wrap { padding: 28px 20px; }

  .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
  .footer-links { justify-content: center; flex-wrap: wrap; }

  .cursor-dot, .cursor-glow { display: none; }
  body { cursor: default; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
