/* ============================================
   Homepage — simple, clear layout
   Square images, no carousels on first view
   ============================================ */

body[data-page="home"] .home-hero,
body[data-page="home"] .home-catalog,
body[data-page="home"] .home-work {
  --home-img-radius: 0;
}

/* ---- Hero banner ---- */
.home-hero--banner {
  position: relative;
  margin-top: var(--site-top);
  min-height: clamp(360px, 52vh, 520px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-lime) 100%);
  font-family: 'Montserrat', var(--font);
}

.home-hero__bg {
  position: absolute;
  inset: -5%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  animation: bannerKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}

.home-hero__shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.home-hero__shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.22;
  filter: blur(0.5px);
  animation: bannerShapeFloat 10s ease-in-out infinite;
}

.home-hero__shape--1 {
  width: 140px;
  height: 140px;
  top: 8%;
  right: 6%;
  background: linear-gradient(135deg, var(--yellow), var(--green-lime));
  animation-duration: 11s;
}

.home-hero__shape--2 {
  width: 90px;
  height: 90px;
  bottom: 15%;
  left: 5%;
  background: linear-gradient(135deg, var(--green-light), var(--green));
  animation-duration: 9s;
  animation-delay: -3s;
}

.home-hero__shape--3 {
  width: 60px;
  height: 60px;
  top: 35%;
  left: 18%;
  background: var(--yellow);
  animation-duration: 8s;
  animation-delay: -5s;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 107, 60, 0.58) 0%, rgba(56, 161, 105, 0.42) 100%);
  z-index: 2;
}

.home-hero__content {
  position: relative;
  z-index: 3;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  color: var(--white);
  max-width: 42rem;
}

.home-hero__label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 0.85rem;
}

.home-hero__title {
  font-family: 'Bebas Neue', 'Montserrat', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.home-hero__text {
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero--banner .btn--outline {
  border-color: rgba(255, 255, 255, 0.88);
  color: var(--white);
}

.home-hero--banner .btn--outline:hover {
  background: var(--white);
  color: var(--green-dark);
  border-color: var(--white);
}

/* ---- Section headings ---- */
.home-section-head {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.home-section-head__eyebrow,
.home-section-head .home-section-head__eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--green);
  margin-bottom: 0.45rem;
}

.home-section-head h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 0.65rem;
}

.home-section-head p {
  color: var(--gray-600);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---- Service catalogue grid ---- */
.home-catalog {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: var(--gray-50);
}

.home-catalog__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.home-catalog__item {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0;
  cursor: pointer;
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.home-catalog__item:hover,
.home-catalog__item:focus-visible {
  border-color: var(--green);
  box-shadow: 0 6px 24px rgba(26, 107, 60, 0.08);
  outline: none;
}

.home-catalog__media {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-catalog__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--home-img-radius, 0);
}

.home-catalog__item:hover .home-catalog__media img {
  transform: none;
}

.home-catalog__item h3 {
  padding: 0.85rem 1rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
}

.home-catalog__link {
  margin-top: 1.75rem;
  text-align: center;
}

.home-catalog__link a {
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
}

.home-catalog__link a:hover {
  color: var(--green);
  text-decoration: underline;
}

.home-catalog__stage {
  position: relative;
}

/* ---- Catalog swipe lightbox ---- */
body.catalog-lightbox-open {
  overflow: hidden;
}

.home-catalog-lightbox[hidden] {
  display: none;
}

.home-catalog-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.home-catalog-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 20, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.home-catalog-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 96vw);
  max-height: min(92vh, 860px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  padding: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: catalogLightboxIn 0.28s ease;
}

@keyframes catalogLightboxIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.home-catalog-lightbox__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.home-catalog-lightbox__close:hover,
.home-catalog-lightbox__close:focus-visible {
  background: var(--gray-200);
  outline: none;
}

.home-catalog-lightbox__title {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--gray-900);
  padding-right: 2.5rem;
  margin: 0;
}

.home-catalog-lightbox__carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}

.home-catalog-lightbox__viewport {
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.home-catalog-lightbox__viewport.is-dragging {
  cursor: grabbing;
}

.home-catalog-lightbox__track {
  display: flex;
  transition: transform 0.35s ease;
  backface-visibility: hidden;
}

.home-catalog-lightbox__slide {
  flex: 0 0 100%;
  margin: 0;
  height: clamp(240px, 52vw, 480px);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-catalog-lightbox__slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: clamp(240px, 52vw, 480px);
  object-fit: contain;
  object-position: center;
  background: var(--gray-100);
  border-radius: var(--home-img-radius, 0);
  user-select: none;
  -webkit-user-drag: none;
}

.home-catalog-lightbox__nav {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--green-dark);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.home-catalog-lightbox__nav:hover:not(:disabled),
.home-catalog-lightbox__nav:focus-visible:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.home-catalog-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.home-catalog-lightbox__counter {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  margin: 0;
}

.home-catalog-lightbox__hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-600);
  margin: -0.35rem 0 0;
}

.home-catalog-lightbox__cta {
  display: block;
  text-align: center;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
}

.home-catalog-lightbox__cta:hover {
  color: var(--green);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .home-catalog-lightbox__carousel {
    grid-template-columns: 1fr;
  }

  .home-catalog-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  }

  .home-catalog-lightbox__nav--prev {
    left: 0.5rem;
  }

  .home-catalog-lightbox__nav--next {
    right: 0.5rem;
  }
}

@media (max-width: 640px) {
  .home-catalog-lightbox {
    padding: 0.5rem;
  }

  .home-catalog-lightbox__dialog {
    width: 100%;
    max-height: 94vh;
  }
}

/* ---- Stats bar ---- */
.home-bar {
  padding: 1.35rem 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.home-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.home-bar__item strong {
  display: block;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.2;
}

.home-bar__item span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--gray-600);
}

/* ---- Work grid ---- */
.home-work {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
}

.home-work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.home-work__grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-work__grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--home-img-radius, 0);
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .home-catalog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .home-catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-work__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-hero__content {
    padding: clamp(2.5rem, 8vw, 3.5rem) 0;
  }

  .home-bar__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .home-catalog__grid {
    grid-template-columns: 1fr;
  }

  .home-hero__actions {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  .home-hero__bg,
  .home-hero__shape {
    animation: none;
  }
}

/* Bottom scrolling bar — solid green, white text (override cache) */
.site-ticker--bottom {
  background: var(--green-dark) !important;
  background-image: none !important;
  color: var(--white) !important;
}

.site-ticker--bottom .site-ticker__item {
  color: var(--white) !important;
}

.site-ticker--bottom .site-ticker__icon svg {
  stroke: var(--white) !important;
  color: var(--white) !important;
}

/* Top announcement bar — solid green, white text */
.site-ticker--top {
  background: var(--green-dark) !important;
  background-image: none !important;
  color: var(--white) !important;
}

.site-ticker--top::before,
.site-ticker--top::after {
  display: none !important;
}

.site-ticker--top .site-ticker__item,
.site-ticker--top .site-ticker__star {
  color: var(--white) !important;
}
