:root {
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;

  --green: #2e7d32;
  --green2: #5aa72b;

  --card: #f7faf7;
  --shadow: 0 10px 26px rgba(0, 0, 0, .08);
  --radius: 16px;
  --max: 1100px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* HEADER */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 2px 0;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  height: 140px;
  width: auto;
  display: block;
  max-width: none;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav a {
  color: var(--green);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease, font-weight 0s;
}

.nav .btn {
  background: transparent;
  color: var(--green);
  border: none;
  box-shadow: none;
  padding: 8px 10px;
  transform: none;
}

.nav .btn:hover {
  transform: none;
}


.nav a:hover,
.nav .btn:hover,
.nav a.active,
.nav .btn.active {
  color: #fff;
  background: linear-gradient(90deg, var(--green), var(--green2));
  box-shadow: 0 8px 20px rgba(46, 125, 50, .12);
  font-weight: 800;
}

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  position: sticky;
  top: 50px;
  z-index: 99;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu__link {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}

.mobile-menu__link:hover {
  background: var(--card);
}

.mobile-menu__link--primary {
  color: var(--green);
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(46, 125, 50, .25);
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(46, 125, 50, .14);
  transition: all .15s ease;
}

.btn:hover {
  background: #256628;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(46, 125, 50, .18);
}

.btn--ghost {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(46, 125, 50, .35);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(46, 125, 50, .06);
  transform: none;
  box-shadow: none;
}

/* HERO */
.hero {
  padding: 8px 0 8px;

  background-image:
    linear-gradient(to right,
      rgba(255, 255, 255, .96) 0%,
      rgba(255, 255, 255, .90) 42%,
      rgba(255, 255, 255, .70) 78%,
      rgba(255, 255, 255, .55) 100%),
    url("../img/bg-spray.png");

  background-repeat: no-repeat;
  background-position: 80% center;
  background-size: cover;
  overflow: hidden;
}

.hero--kariera p {
  color: var(--text);
  font-weight: 500;
}

.hero--kariera {
  padding: 60px 0;
  background-image:
    linear-gradient(to right,
      rgba(255, 255, 255, .93) 0%,
      rgba(255, 255, 255, .72) 50%,
      rgba(255, 255, 255, .35) 100%),
    url("../img/bg-kariera-2.webp");
  background-repeat: no-repeat;
  background-position: center 70%;
  background-size: cover;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 30px;
  align-items: center;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.9);
}

.lead {
  color: #374151;
  /* better contrast in hero */
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 56ch;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.8);
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}

.bullets {
  color: var(--muted);
  margin: 14px 0 0;
  padding-left: 18px;
}

.bullets li {
  margin: 8px 0;
}

.hero__box {
  display: flex;
  justify-content: flex-start;
  margin-top: 40px;
  grid-column: 1;
}

.box {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 360px;
  box-shadow: var(--shadow);
}

.box strong {
  display: block;
}

.box span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

/* SECTIONS */
.section {
  padding: 52px 0;
}

/* offset anchors for sticky header so sections sit below the header when jumped-to */
/* desktop: logo 140px + padding 4px ≈ 144px header → 155px gives breathing room */
#uslugi,
#realizacje,
#kontakt {
  scroll-margin-top: 155px;
}

@media (max-width: 900px) {
  /* mobile: logo 46px + padding 4px ≈ 50px header */
  #uslugi,
  #realizacje,
  #kontakt {
    scroll-margin-top: 70px;
  }
}

.section--alt {
  background: #fbfdfb;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.gallery__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  /* overflow:hidden is kept for image crops but reveal works because
     the translateY is small enough not to be clipped */
}

.gallery__before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.gallery__photo {
  position: relative;
  overflow: hidden;
}

.gallery__photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery__photo small {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.gallery__title {
  margin: 12px 16px 4px;
  font-size: 15px;
}

.gallery__desc {
  margin: 0 16px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* CONTACT */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.form label {
  display: block;
  margin: 10px 0;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(46, 125, 50, .45);
  box-shadow: 0 0 0 4px rgba(46, 125, 50, .10);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__instagram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}
.footer__instagram:hover { color: var(--green); }

/* TRUST BADGES */
.section--trust {
  padding-top: 20px;
  padding-bottom: 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-item {
  text-align: center;
  padding: 10px;
}

.trust-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", NotoColorEmoji, sans-serif;
}

.trust-item p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* TESTIMONIALS */
.section--testimonials {
  background: #f9fdf9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.testimonial {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.stars {
  margin-bottom: 12px;
  font-size: 14px;
}

.testimonial p {
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 24px auto 0;
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background .2s;
}

.faq-item summary:hover {
  background: var(--card);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-weight: 400;
  font-size: 20px;
  color: var(--green);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* STICKY CALL BUTTON */
.sticky-call {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(46, 125, 50, .4);
  z-index: 999;
  font-weight: 700;
  transition: transform .2s;
}

.sticky-call:hover {
  transform: translateX(-50%) scale(1.05);
  background: #256628;
}

.sticky-call__icon {
  font-size: 18px;
}

/* MOBILE */
@media (max-width: 900px) {

  .hero__grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .hero__box {
    justify-content: flex-start;
  }

  .box {
    max-width: 100%;
    width: 100%;
  }

  .brand__logo {
    height: 46px;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .trust-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .sticky-call {
    display: flex;
    width: 90%;
    justify-content: center;
    bottom: 16px;
  }

  .footer {
    padding-bottom: 80px;
  }

  .hero {
    padding: 32px 0;
    background-image:
      linear-gradient(to bottom,
        rgba(255, 255, 255, .96) 0%,
        rgba(255, 255, 255, .90) 55%,
        rgba(255, 255, 255, .82) 100%),
      url("../img/bg-spray.png");

    background-position: center;
    background-size: cover;
  }
}

@media (max-width: 520px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ===== SCROLL REVEAL ANIMATIONS ===== */

/* ===== SCROLL REVEAL ANIMATIONS ===== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger effects using nth-child */
.cards .card:nth-child(1),
.gallery .gallery__item:nth-child(1),
.testimonials-grid .testimonial:nth-child(1),
.trust-grid .trust-item:nth-child(1),
.faq-list .faq-item:nth-child(1) {
  transition-delay: 0.1s;
}

.cards .card:nth-child(2),
.gallery .gallery__item:nth-child(2),
.testimonials-grid .testimonial:nth-child(2),
.trust-grid .trust-item:nth-child(2),
.faq-list .faq-item:nth-child(2) {
  transition-delay: 0.2s;
}

.cards .card:nth-child(3),
.gallery .gallery__item:nth-child(3),
.testimonials-grid .testimonial:nth-child(3),
.trust-grid .trust-item:nth-child(3),
.faq-list .faq-item:nth-child(3) {
  transition-delay: 0.3s;
}

.cards .card:nth-child(4),
.gallery .gallery__item:nth-child(4),
.trust-grid .trust-item:nth-child(4) {
  transition-delay: 0.4s;
}

/* fallback for elements without nth-child logic in hero */
.hero__grid>div>.reveal:nth-child(1) {
  transition-delay: 0.1s;
}

.hero__grid>div>.reveal:nth-child(2) {
  transition-delay: 0.2s;
}

.hero__grid>div>.reveal:nth-child(3) {
  transition-delay: 0.3s;
}

.hero__grid>div>.reveal:nth-child(4) {
  transition-delay: 0.4s;
}

/* respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}