:root {
  --purple: #7b4696;
  --green: #5b8c51;
  --light-bg: #f5f0e9;
  --text: #2b2b2b;
  --muted: #6f6f6f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Barlow", sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 92px;
  background: transparent;
  box-shadow: none;
  position: relative;
}

.site-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(180deg, rgba(12, 28, 52, 0.96) 0%, rgba(15, 34, 62, 0.92) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 100;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  padding: 18px clamp(20px, 4vw, 56px);
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  padding-right: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.logo img {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.site-header nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.site-header.nav-open .nav-toggle-icon {
  transform: rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon::before {
  transform: rotate(90deg);
  top: 0;
}

.site-header.nav-open .nav-toggle-icon::after {
  opacity: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-menu a span {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.nav-menu a:hover span,
.nav-menu a:focus-visible span {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: #fff;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.nav-menu .active a span {
  background: #fff;
  color: #222;
}

.lang-flag {
  width: 18px;
  height: 12px;
}

.header-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.header-social {
  display: inline-flex;
  align-items: center;
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.header-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ------------------------------------------------------------
   HERO + PUZZLE (full working block)
------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background: #111;
  color: #fff;
  min-height: 680px;
  height: 680px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  --hero-zoom: 1.28;
  --hero-zoom-shift: -3%;
}

/* Base slide styling (works with or without JS) */
.hero-slide {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  background-size: cover;
  background-position: center calc(50% + var(--parallax-offset, 0px));
  padding: 100px 20px;
  position: relative;
}

/* If JS is enabled, turn slides into a real carousel stack */
.js .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.js .hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 1;
}

/* Puzzle container */
[data-puzzle] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --puzzle-overlap: 1px;
  --puzzle-bg-size: 100% 100%;
  --puzzle-bg-position: 0% 0%;
  background-image: none;

  /* ✅ anti-seam helpers */
  background-repeat: no-repeat;
  transform: translateZ(0);
}

[data-puzzle]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--puzzle-image);
  background-size: var(--puzzle-bg-size);
  background-position: var(--puzzle-bg-position);
  transform: translate3d(0, var(--hero-zoom-shift, 0%), 0) scale(var(--hero-zoom, 1));
  transform-origin: center;
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 0;
}

/* Subtle global darken (keep it light so images don't look black) */
[data-puzzle]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 0;
}

/* Show base image only after puzzle is fully revealed */
[data-puzzle].puzzle-done::before {
  opacity: 1;
  transition-delay: 150ms;
}

html:not(.js) [data-puzzle]::before {
  opacity: 1;
}

.puzzle-start {
  background-image: none;
}

.puzzle-start::before {
  opacity: 0;
}

.puzzle-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform: translate3d(0, var(--hero-zoom-shift, 0%), 0) scale(var(--hero-zoom, 1));
  transform-origin: center;
  transition: opacity 400ms ease;
}

.puzzle-start .puzzle-overlay {
  opacity: 1;
}

.puzzle-piece {
  position: absolute;
  background-image: var(--puzzle-image);
  background-size: calc(var(--puzzle-cols) * 100% + (var(--puzzle-overlap) * 2))
    calc(var(--puzzle-rows) * 100% + (var(--puzzle-overlap) * 2));
  width: calc(100% / var(--puzzle-cols) + var(--puzzle-overlap)) !important;
  height: calc(100% / var(--puzzle-rows) + var(--puzzle-overlap)) !important;
  background-repeat: no-repeat;
  opacity: 0;

  /* ✅ seam fix (GPU + no subpixel seams) */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-origin: center;
  transform: translate3d(var(--piece-x), var(--piece-y), 0) scale(0.85) rotate(var(--piece-rotate));
  filter: blur(2px);
  will-change: transform, opacity;
}

.puzzle-revealed .puzzle-piece {
  animation: puzzle-reveal 0.9s ease forwards;
  animation-delay: var(--piece-delay);
}

[data-puzzle].puzzle-done .puzzle-overlay {
  opacity: 0;
}

@keyframes puzzle-reveal {
  0% {
    opacity: 0;
    transform: translate3d(var(--piece-x), var(--piece-y), 0) scale(0.85) rotate(var(--piece-rotate));
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    filter: blur(0);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 0;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 40px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0.85;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow-prev {
  left: 16px;
}

.hero-arrow-next {
  right: 16px;
}

/* ------------------------------------------------------------
   SECTIONS / CONTENT
------------------------------------------------------------ */

.section {
  padding: 72px 0;
}

.section.light {
  background: var(--light-bg);
}

.section-title {
  color: var(--purple);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 12px;
}

.section-separator {
  width: 120px;
  height: auto;
  margin-bottom: 24px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

#enece .two-column {
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
}

.combined-text {
  max-width: 640px;
}

.combined-text p {
  margin: 0 0 16px;
  line-height: 1.65;
}

.text-accent {
  color: #00a4c8;
  font-weight: 700;
}

.enece-video-wrap {
  justify-self: end;
  width: 100%;
  max-width: 740px;
}

.enece-video {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  display: block;
}

.agri-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.gallery-item {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.gallery-lightbox-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  max-width: min(960px, 90vw);
  max-height: 85vh;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}

.gallery-lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: #fff;
  color: #222;
  font-size: 26px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.gallery-lightbox-close:hover {
  transform: scale(1.05);
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .agri-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .agri-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

.highlight-box {
  background: var(--green);
  color: #fff;
  padding: 40px;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.highlight-box h3 {
  margin: 0;
  font-size: 1.5rem;
}

.highlight-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.highlight-box:active {
  transform: translateY(-2px);
}

.products-grid {
  margin-top: -140px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.product-card:active {
  transform: translateY(-2px);
}

.product-card img {
  width: 150px;
  margin: 0 auto 24px;
  border-radius: 10px;
}

.product-card h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.banner {
  background: var(--green);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 0;
  overflow: hidden;
  text-align: center;
}

.banner-track {
  display: inline-block;
  position: relative;
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  min-height: 1.2em;
  max-width: 100%;
  text-align: center;
}

.banner-typing {
  position: relative;
  padding-right: 6px;
  display: inline-block;
  white-space: normal;
}

.banner-typing::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 2px;
  height: 1em;
  background: #fff;
  transform: translateY(-50%);
  animation: banner-caret 0.9s step-end infinite;
}

@keyframes banner-caret {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.map-embed {
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 360px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d7d7d7;
  font-family: inherit;
  font-size: 14px;
}

button {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

footer {
  padding: 24px 0;
  text-align: center;
  background: rgba(35, 96, 190, 0.3);
  color: #f5f9ff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  width: 22px;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .banner-track {
    animation: none;
    padding-left: 0;
  }

  .banner-typing::after {
    animation: none;
    opacity: 1;
  }

  button,
  .product-card,
  .highlight-box {
    transition: none;
  }
}

@media (max-width: 768px) {
  #enece .two-column {
    grid-template-columns: 1fr;
  }

  .enece-video-wrap {
    justify-self: stretch;
    max-width: 100%;
  }

  .site-shell {
    padding-top: 0;
  }

  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 18px 20px;
  }

  .logo,
  .header-social {
    padding: 0;
    border: none;
  }

  .site-header {
    position: static;
    background: #111;
  }

  .site-header nav {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 12px 0 4px;
  }

  .site-header.nav-open .nav-menu {
    display: flex;
  }

  .header-social {
    order: 4;
    width: 100%;
    justify-content: flex-start;
    padding-top: 10px;
  }

  .products-grid {
    margin-top: 0;
  }

  .hero {
    min-height: 360px;
    height: 360px;
  }

  .hero-slide {
    padding: 100px 18px;
  }
}
