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

:root {
  --blue: #1d4ed8;
  --blue-dark: #1e40af;
  --blue-light: #eff6ff;
  --text: #1e293b;
  --text-muted: #475569;   /* darkened: 5.9:1 contrast on white — passes WCAG AA */
  --border: #e2e8f0;
  --gray-bg: #f8fafc;
  --white: #ffffff;
  --green: #16a34a;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --radius: 12px;
  --radius-sm: 8px;
  --focus-ring: 0 0 0 3px rgba(29,78,216,.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ===== LAYOUT ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--gray { background: var(--gray-bg); }
.section--contact {
  background: var(--white);
  border-top: 1px solid var(--border);
}

.section__head { text-align: center; margin-bottom: 56px; }

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}

.section__sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== BRANDS MARQUEE ===== */
.brands {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--gray-bg);
  padding: 20px 0;
  overflow: hidden;
}

.brands__head {
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.brands__track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}

.brands__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 120s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .brands__track { animation: none; }
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 40px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.brand img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: .45;
  filter: grayscale(100%);
  transition: opacity .25s, filter .25s;
  display: block;
}

.brand:hover img {
  opacity: 1;
  filter: grayscale(0%);
}

@media (prefers-reduced-motion: reduce) {
  .brands__track { animation: none; }
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}

.header.scrolled { box-shadow: var(--shadow); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.logo strong { color: var(--blue); }

/* ===== NAV ===== */
.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}

.nav__link:hover { color: var(--blue); background: var(--blue-light); }

.nav__link--cta {
  background: var(--blue);
  color: var(--white) !important;
  margin-left: 8px;
}

.nav__link--cta:hover { background: var(--blue-dark); }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

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

.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 {
  padding: 96px 0 80px;
  text-align: center;
  background: linear-gradient(160deg, var(--white) 60%, var(--blue-light) 100%);
}

.hero__badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
}
.hero__sub strong { color: var(--blue); }

.hero__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  max-width: 560px;
  margin: 0 auto;
}

.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-size: 1.4rem; font-weight: 800; color: var(--blue); }
.hero__stat span { font-size: .85rem; color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  border: 2px solid transparent;
}

.btn:active { transform: scale(.97); }

.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); box-shadow: 0 4px 16px rgba(29,78,216,.3); }

.btn--outline { border-color: var(--border); color: var(--text); background: var(--white); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }

/* ===== CARDS (usługi) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .2s, box-shadow .2s;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card__icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: 20px;
}

.card__title { font-size: 1.08rem; font-weight: 700; margin-bottom: 10px; }
.card__text { font-size: .92rem; color: var(--text-muted); line-height: 1.65; }

/* ===== TILES (szczegółowe usługi) ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: box-shadow .2s;
}
.tile:hover { box-shadow: var(--shadow); }

.tile__dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 6px;
}
.tile__dot--green { background: var(--green); }

.tile__title { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.tile__text { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }

/* ===== PRICING ===== */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.price-card--featured {
  border-color: var(--blue);
  background: var(--blue-light);
}

.price-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

.price-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

.price-card__price {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: var(--text-muted);
}
.price-card__price strong { font-size: 2rem; font-weight: 800; color: var(--blue); }

.price-card__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.price-card__list li {
  font-size: .9rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.price-card__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.pricing__note {
  text-align: center;
  font-size: .88rem;
  color: var(--text-muted);
}
.pricing__note a { color: var(--blue); text-decoration: underline; }

/* ===== ABOUT ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

.about__text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.about__text p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.75; }
.about__text strong { color: var(--text); }

.about__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.badge {
  background: var(--blue-light);
  color: var(--blue);
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
}

.info-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.info-box__title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

.info-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.info-box dt { font-size: .82rem; color: var(--text-muted); font-weight: 500; }
.info-box dd { font-size: .88rem; font-weight: 600; }

/* ===== ARTICLES ===== */
.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.article-card__tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.article-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.article-card__excerpt { font-size: .88rem; color: var(--text-muted); flex: 1; line-height: 1.65; margin-bottom: 16px; }
.article-card__more { font-size: .85rem; font-weight: 600; color: var(--blue); }

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

.contact__items { display: flex; flex-direction: column; gap: 24px; }

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.contact__label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact__item p { font-size: 1rem; line-height: 1.6; color: var(--text); }
.contact__item a { color: var(--blue); }
.contact__item a:hover { text-decoration: underline; }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: var(--white); border-top: 3px solid var(--blue); }

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 48px 24px;
}

.footer__brand .logo__text { font-size: 1.1rem; font-weight: 600; }
.footer__brand p { font-size: .85rem; color: rgba(255,255,255,.72); margin-top: 8px; line-height: 1.6; }

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.footer__nav a { font-size: .88rem; color: rgba(255,255,255,.72); transition: color .15s; }
.footer__nav a:hover { color: var(--white); }

.footer__data { text-align: right; font-size: .82rem; color: rgba(255,255,255,.65); line-height: 1.8; }

.footer__copy {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 24px;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  text-align: center;
}

/* ===== REVEAL ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .articles { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .about { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
  .footer__data { text-align: center; }
}

@media (max-width: 700px) {
  .nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    z-index: 99;
  }
  .nav.open { display: flex; }
  .nav__link { padding: 12px 16px; width: 100%; }
  .nav__link--cta { text-align: center; }
  .hamburger { display: flex; }

  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .articles { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }

  .hero__stats { gap: 24px; }
  .section { padding: 64px 0; }
}
