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

:root {
  --bg: #ffffff;
  --fg: #09090b;
  --muted: #71717a;
  --border: #e4e4e7;
  --card: #ffffff;
  --muted-bg: #f4f4f5;
  --accent-violet: #7c3aed;
  --accent-emerald: #059669;
  --accent-orange: #ea580c;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height 0.3s ease;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

.logo-img--footer {
  height: 40px;
}

.nav-desktop {
  display: flex;
  gap: 0.25rem;
}

.nav-desktop a {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
  position: relative;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--accent-violet);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  border-radius: 2px;
}

.nav-desktop a:hover { color: var(--fg); }
.nav-desktop a:hover::after { transform: scaleX(1); }

/* Aktywny stan */
.nav-desktop a.active {
  color: var(--fg);
  font-weight: 600;
}
.nav-desktop a.active::after { transform: scaleX(1); }

/* Kolorowe akcenty działów */
.nav-desktop a[data-dept="ai"]::after { background: var(--accent-violet); }
.nav-desktop a[data-dept="ai"]:hover { color: var(--accent-violet); }
.nav-desktop a[data-dept="ai"].active { color: var(--accent-violet); }

.nav-desktop a[data-dept="ksiegowosc"]::after { background: var(--accent-emerald); }
.nav-desktop a[data-dept="ksiegowosc"]:hover { color: var(--accent-emerald); }
.nav-desktop a[data-dept="ksiegowosc"].active { color: var(--accent-emerald); }

.nav-desktop a[data-dept="reklama"]::after { background: var(--accent-orange); }
.nav-desktop a[data-dept="reklama"]:hover { color: var(--accent-orange); }
.nav-desktop a[data-dept="reklama"].active { color: var(--accent-orange); }

/* CTA Kontakt */
.nav-desktop a.nav-cta {
  background: var(--accent-violet);
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  transition: background 0.2s, transform 0.15s, color 0.2s;
}
.nav-desktop a.nav-cta:hover {
  background: #6d28d9;
  color: #ffffff;
  transform: translateY(-1px);
}
.nav-desktop a.nav-cta::after { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
}

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

.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); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s, background .15s;
}

.nav-mobile a:hover { color: var(--fg); background: var(--muted-bg); }

.nav-mobile a.active {
  color: var(--fg);
  font-weight: 600;
  border-left: 3px solid var(--accent-violet);
  padding-left: 9px;
}
.nav-mobile a[data-dept="ai"].active { border-left-color: var(--accent-violet); color: var(--accent-violet); }
.nav-mobile a[data-dept="ksiegowosc"].active { border-left-color: var(--accent-emerald); color: var(--accent-emerald); }
.nav-mobile a[data-dept="reklama"].active { border-left-color: var(--accent-orange); color: var(--accent-orange); }

.nav-mobile a.nav-cta {
  background: var(--accent-violet);
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
  border-radius: 8px;
}
.nav-mobile a.nav-cta:hover { background: #6d28d9; color: #ffffff; }

/* ─── Shrink header on scroll ─── */
.site-header { transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 1px 8px rgba(0,0,0,0.08); }
.site-header.scrolled .header-inner { height: 56px; }
.site-header.scrolled .logo-img { height: 36px; }

/* ─── Hero ─── */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #09090b;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
}

.hero-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.45;
}

/* Strzałki */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-arrow:hover { background: rgba(255,255,255,0.2); }
.slider-prev { left: 1.5rem; }
.slider-next { right: 1.5rem; }

/* Kropki */
.slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 0.5rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .2s, border-color .2s, transform .2s;
}

.slider-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,11,0.3) 0%,
    rgba(9,9,11,0.1) 40%,
    rgba(9,9,11,0.5) 100%
  );
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(124,58,237,0.2);
  filter: blur(120px);
  pointer-events: none;
}

.hero-glow-left {
  position: absolute;
  left: -8rem;
  top: 25%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(37,99,235,0.15);
  filter: blur(100px);
  pointer-events: none;
}

.hero-glow-right {
  position: absolute;
  right: -8rem;
  bottom: 25%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(5,150,105,0.1);
  filter: blur(100px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 6rem 1.5rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.1);
  padding: 0.375rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1.05;
}

.hero h1 .gradient-text {
  background: linear-gradient(90deg, #a78bfa, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: #a1a1aa;
  max-width: 36rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 2rem;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.btn-primary:hover { background: #6d28d9; }

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background .15s;
}

.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--bg), transparent);
}

/* ─── Sekcje ─── */
section { padding: 5rem 0; }
section.alt { background: #fafafa; }

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

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Karty działów ─── */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.dept-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  padding: 2rem;
  transition: box-shadow .2s, transform .2s;
}

.dept-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.dept-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.dept-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dept-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.dept-link {
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap .15s;
}

.dept-card:hover .dept-link { gap: 0.5rem; }

/* ─── O nas ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.about-text p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

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

.stat-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* ─── Kontakt ─── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contact-items { display: flex; flex-direction: column; gap: 1rem; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s;
}

.contact-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--muted-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.contact-value { font-weight: 600; font-size: 0.95rem; }

/* Formularz */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.form-field textarea { resize: none; }

.btn-submit {
  height: 48px;
  border: none;
  border-radius: 10px;
  background: #09090b;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.btn-submit:hover { background: #27272a; }

/* ─── Lokalizacja ─── */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}

.location-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }

.location-info address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.hours-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.hours-text { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

.map-placeholder {
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 300px;
  background: var(--muted-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2.5rem 0;
}

.footer-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.footer-phone:hover { color: var(--fg); }

.footer-social { display: flex; gap: 1rem; }

.footer-social a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.footer-social a:hover { color: var(--fg); }

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

/* ─── Podstrony ─── */
.page-hero {
  padding: 5rem 0;
  background: #fafafa;
  text-align: center;
}

.page-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.page-hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.75;
}

.page-placeholder {
  margin: 4rem 0;
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 4rem;
  text-align: center;
  color: var(--muted);
}

/* ─── Responsywność ─── */
@media (max-width: 1024px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 768px) {
  .departments-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}
