/* RESET & VARS */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-lime: #accf3e;
  --color-lime-dark: #9bbd32;
  --color-text: #111;
  --color-grey: #555;
  --font-main: "Roboto", sans-serif;
  --font-script: "Allura", cursive;
  --container-width: 1300px;
  --header-height: 100px;
  --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  background-color: #fff;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  display: block;
}

a { text-decoration: none; color: inherit; transition: 0.3s var(--ease-soft); }
ul { list-style: none; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
}

/* TYPOGRAPHY */
.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.eyebrow {
  color: var(--color-lime);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.eyebrow-line.full-width-line::after {
  content: ''; height: 1px; background: #ddd; width: 100vw;
  border-bottom: 1px solid var(--color-lime); opacity: 0.5; display: block;
}

.section-title {
  font-size: 3.1rem; /* delikatnie mniejsze nagłówki */
  font-weight: 300;
  margin-bottom: 40px;
  line-height: 1.1;
  letter-spacing: -1px;
}

/* BUTTONS */
.btn-green, .btn-green-sm {
  display: inline-flex; align-items: center; gap: 10px;
  background-color: var(--color-lime);
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.4s var(--ease-soft), background 0.3s;
}
.btn-green { padding: 14px 30px; font-size: 1rem; }
.btn-green-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-green:hover, .btn-green-sm:hover { background-color: var(--color-lime-dark); }

.btn-white-outline {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 12px 28px;
  font-weight: 500;
  border-radius: 4px;
  margin-top: 20px;
}
.btn-white-outline:hover { background: #fff; color: var(--color-lime); }

.hover-arrow i { transition: transform 0.3s var(--ease-soft); }
.hover-arrow:hover i { transform: translateX(5px); }
.hover-scale { transition: transform 0.3s var(--ease-soft); }
.hover-scale:hover { transform: scale(1.1); }

/* HEADER */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background 0.6s var(--ease-soft), height 0.6s var(--ease-soft), padding 0.6s var(--ease-soft);
  display: flex; align-items: center;
  padding-top: 0;
}
.site-header.is-scrolled {
  background-color: rgba(255,255,255,0.98);
  height: 80px;
  padding-top: 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.header-inner { width: 100%; display: flex; justify-content: space-between; align-items: center; }

.logo-img {
  height: 120px;
  transition: height 0.6s var(--ease-soft);
}
.logo {
  display: inline-flex;
}
.site-header:not(.is-scrolled) .logo-img {
  margin-top: 40px; /* 10px odstępu od góry tylko w hero */
}
.site-header.is-scrolled .logo-img {
  height: 50px;
}

/* Nav Desktop */
.main-nav ul { display: flex; gap: 40px; }
/* menu: trochę większa, lżejsza, bardziej rozstrzelona */
.main-nav a { 
  color: #fff; 
  font-weight: 400; 
  font-size: 1.05rem; 
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative; 
}
.site-header.is-scrolled .main-nav a { color: #111; }
.main-nav a::after {
  content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
  background: var(--color-lime); transition: width 0.3s;
}
.main-nav a:hover::after { width: 100%; }

/* Hamburger */
.burger {
  display: none;
  background: transparent; border: none; cursor: pointer;
  flex-direction: column; gap: 5px;
  position: relative;
  z-index: 1100; /* zawsze nad wysuwanym menu */
}
.burger .bar { width: 30px; height: 3px; background: #fff; transition: 0.4s; }
.site-header.is-scrolled .burger .bar { background: #333; }
/* Stan X – zawsze ciemny, żeby był widoczny na białym menu mobilnym */
.burger.toggle .bar {
  background: #333;
}
.burger.toggle .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
.burger.toggle .bar:nth-child(2) { opacity: 0; }
.burger.toggle .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }


/* HERO SLIDER (FIXED FOR MOBILE) */
.hero-slider {
  position: relative; 
  height: 100vh;
  /* Use dvh for mobile browsers to avoid address bar jump */
  height: 100dvh; 
  min-height: 600px;
  background: #000; 
  overflow: hidden;
}
.slide { 
  position: absolute; inset: 0; 
  opacity: 0; visibility: hidden; 
  transition: 1.8s var(--ease-soft);
  width: 100%; height: 100%;
}
.slide.active { opacity: 1; visibility: visible; }
.slide-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.slide-bg img {
  width: 100%; height: 100%; 
  object-fit: cover;
  /* Center position to ensure visibility on mobile */
  object-position: center; 
  transform: scale(1.1); transition: transform 8s ease-out;
}
.slide.active .slide-bg img { transform: scale(1); }
.hero-dim-layer {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.4));
  z-index: 1;
}
.slide-content {
  position: absolute; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  width: 100%; z-index: 2;
  display: flex; justify-content: flex-start;
}

.hero-copy {
  max-width: 520px;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 3.6rem);   /* jeszcze minimalnie mniejszy, żeby na pewno był w jednym wierszu */
  line-height: 1.05;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  margin: 0 0 6px;
  white-space: nowrap;                   /* ZAWSZE jedna linia */
}

.hero-subtitle {
  font-family: var(--font-script);
  font-size: clamp(3rem, 4.8vw, 3.6rem); /* większy niż tytuł, zbliżona szerokość */
  color: var(--color-lime);
  margin-bottom: 14px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px; /* węższy i niższy */
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.8);
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-hero:hover {
  background: #fff;
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

/* SEKWENCYJNE WEJŚCIE ELEMENTÓW PO ZAŁADOWANIU STRONY */
.logo-img,
.hero-title,
.hero-subtitle,
.btn-hero {
  opacity: 0;
  transform: translateY(10px);
}

.page-loaded .logo-img {
  animation: fadeUp 0.5s var(--ease-soft) 0.1s forwards;
}
.page-loaded .hero-title {
  animation: fadeUp 0.5s var(--ease-soft) 0.4s forwards;
}
.page-loaded .hero-subtitle {
  animation: fadeUp 0.5s var(--ease-soft) 0.55s forwards;
}
.page-loaded .btn-hero {
  animation: fadeUp 0.5s var(--ease-soft) 0.7s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* POZNAJ NAS */
.section-about { padding: 120px 0; overflow: hidden; }
.about-container-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.about-text { width: 42%; flex-shrink: 0; z-index: 2; } /* szerszy box z tekstem */
.about-text .lead-text { font-size: 1.3rem; margin-bottom: 30px; font-weight: 500; }
.about-text p { margin-bottom: 30px; color: var(--color-grey); }

.about-video-wrapper {
  width: 58%;
  position: relative;
  margin-right: -15vw; /* trochę mniejszy „wyjazd” za krawędź */
  height: 600px;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
  box-shadow: -20px 20px 60px rgba(0,0,0,0.15);
  margin-left: 40px;
}
.video-sticky { width: 100%; height: 100%; object-fit: cover; }

/* PRODUKTY (UPDATED: 50/50 + Header align) */
.section-products { padding: 100px 0; background: #f9f9f9; }
.product-card {
  display: grid; 
  /* 50% / 50% split */
  grid-template-columns: 1fr 1fr;
  background: transparent; /* tło takie jak sekcja */
  box-shadow: none;
  row-gap: 30px;
}
.product-img { position: relative; overflow: hidden; height: 500px; }
.product-img {
  border-radius: 16px;
}
.product-img img { 
  width: 100%; height: 100%; 
  object-fit: cover; 
  transition: opacity 0.4s, transform 1.8s var(--ease-soft);
}
.slide.active .product-img img {
  transform: scale(1.03);
}

.product-info { 
  padding: 60px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center;
  position: relative; /* dla absolutnego przycisku CTA */
}
.product-info-inner {
  opacity: 0;
  transition: opacity 0.5s var(--ease-soft);
}
.product-info-inner.animate {
  opacity: 1;
}
.product-header {
  margin-bottom: 30px;
}
.product-header h3 { 
  font-size: 2.5rem; 
  font-weight: 300; 
  margin: 0; /* Reset default margin */
}
/* przycisk oferta zawsze w tym samym miejscu (prawy górny róg boxa tekstu) */
#productCta {
  position: absolute;
  top: 60px;        /* ta sama wysokość niezależnie od długości tytułu */
  right: 60px;
}
/* Opis produktu większy */
.product-info p { 
  color: #555; 
  margin-bottom: 40px; 
  font-size: 1.25rem; /* Larger font */
  line-height: 1.7;
}
.product-nav { 
  grid-column: 1 / -1; /* pod całym sliderem */
  display: flex; 
  justify-content: center; 
  gap: 20px; 
}
.nav-arrow {
  width: 50px; height: 50px; border: 1px solid #ddd;
  background: transparent; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--color-lime);
}
.nav-arrow:hover { border-color: var(--color-lime); background: var(--color-lime); color: #fff; }

/* JAKOŚĆ */
.section-quality-full {
  position: relative;
  padding: 100px 0 150px;
  min-height: 120vh;
}
.quality-bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
}
.quality-overlay-dark {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4); z-index: 2;
}
.quality-content-layer { position: relative; z-index: 3; width: 100%; }

.quality-glass-box {
  background: rgba(172, 207, 62, 0.9);
  backdrop-filter: blur(12px);
  padding: 60px;
  max-width: 600px;
  margin-left: auto;
  color: #fff;
  border-radius: 4px;
  margin-bottom: 100px;
}
.quality-glass-box h2 { font-size: 3rem; margin-bottom: 20px; line-height: 1.1; font-weight: 400; }
.quality-glass-box .light-text { font-weight: 300; opacity: 0.9; }

/* TILES 3D */
.tiles-container { width: 100%; }
.tiles-grid-3d {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 30px; 
}

.tile-flip-box {
  height: 400px; 
  perspective: 1000px;
  cursor: pointer;
}
.tile-flip-inner {
  position: relative; width: 100%; height: 100%;
  text-align: center;
  transition: transform 0.8s var(--ease-soft);
  transform-style: preserve-3d;
}
.tile-flip-box:hover .tile-flip-inner { transform: rotateY(180deg); }

.tile-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border: none; /* bez obramowania */
  border-radius: 14px; /* lekkie zaokrąglenie */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* FRONT FACE (SPLIT IMAGE EFFECT WITH WEBP) */
.tile-front {
  background-image: url('img/artykul.webp');
  background-size: 400% 100%;
  color: #fff;
  overflow: hidden;
}

.tile-flip-box:nth-child(1) .tile-front { background-position: 0% 50%; }
.tile-flip-box:nth-child(2) .tile-front { background-position: 33.3% 50%; }
.tile-flip-box:nth-child(3) .tile-front { background-position: 66.6% 50%; }
.tile-flip-box:nth-child(4) .tile-front { background-position: 100% 50%; }

.tile-overlay-gradient {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); 
  transition: 0.3s;
}
.tile-flip-box:hover .tile-overlay-gradient { opacity: 0; }

.tile-content-front {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
}
.tile-icon { font-size: 3.5rem; margin-bottom: 20px; }
.tile-arrow {
  margin-top: 30px;
  width: 40px; height: 40px; border: 2px solid #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.tile-back {
  background: var(--color-lime);
  color: #fff;
  transform: rotateY(180deg);
  padding: 30px;
}
.tile-back i { font-size: 2.5rem; margin-bottom: 20px; }
.tile-back h3 { font-size: 1.2rem; margin-bottom: 15px; text-transform: uppercase; }
.tile-back p { font-size: 0.95rem; line-height: 1.6; }


/* PROCES (FINAL LAYOUT) */
.section-process-final { background: #fff; }
.process-title-block { padding: 60px 0 10px; } /* mniejszy dół, bliżej tekstu */

.process-green-bar {
  background: #fff;      /* białe tło */
  color: #111;           /* ciemna czcionka */
  padding: 10px 0 30px;  /* jeszcze mniejszy odstęp od nagłówka */
}
.green-bar-flex {
  display: flex; align-items: center; gap: 40px;
}
.bar-icon { font-size: 3rem; flex-shrink: 0; }
.bar-text p { font-size: 1.1rem; max-width: 800px; }

.process-video-centered {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.process-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); z-index: 2; }

.logo-centered {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 400px;  /* jeszcze większe logo na filmie */
  opacity: 0.9;
  filter: brightness(0) invert(1);
  pointer-events: none;
  transition: opacity 0.5s;
}

.video-play-btn {
  position: absolute;
  bottom: 40px; left: 40px;
  z-index: 20;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 15px 30px;
  border-radius: 30px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
}
.video-play-btn:hover {
  background: #fff; color: #000;
}

/* AKTUALNOŚCI */
.section-news { padding: 100px 0; }
.news-item {
  display: grid; grid-template-columns: 400px 1fr; gap: 60px; margin-bottom: 80px;
}
.news-img-wrap { overflow: hidden; border-radius: 4px; height: 300px; }
.hover-zoom-img { transition: transform 0.8s var(--ease-soft); width: 100%; height: 100%; object-fit: cover; }
.news-img-wrap:hover .hover-zoom-img { transform: scale(1.08); }

.news-content { padding-top: 20px; }
.news-content h3 { font-size: 2.2rem; margin-bottom: 20px; font-weight: 300; line-height: 1.2; }
.news-content p {
  color: #555; margin-bottom: 30px;
  font-size: 1.1rem; line-height: 1.8;
}

/* FOOTER */
.site-footer { background-color: var(--color-lime); color: #fff; padding: 80px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.footer-logo img { height: 80px; filter: brightness(0) invert(1); margin-bottom: 30px; }
.footer-right { text-align: right; }
.footer-right h4 { font-size: 1.5rem; font-weight: 300; margin-bottom: 30px; }
.footer-links a { font-size: 1.1rem; opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* pasek na dole stopki: copy po lewej, crafted po prawej */
.footer-bottom {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.footer-bottom a {
  color: inherit;
  text-decoration: none;
}
.footer-bottom a:hover {
  text-decoration: underline;
}

/* ANIMATIONS */
.reveal-up { opacity: 0; transform: translateY(40px); transition: 1.2s var(--ease-soft); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: 1.2s var(--ease-soft); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: 1.2s var(--ease-soft); }
.reveal-scale { opacity: 0; transform: scale(0.8); transition: 1.2s var(--ease-soft); }
.is-visible { opacity: 1; transform: translate(0) scale(1); }

/* RESPONSIVE & MOBILE MENU */
@media (max-width: 1024px) {
  .about-container-flex { flex-direction: column; }
  .about-text { width: 100%; margin-bottom: 40px; }
  .about-video-wrapper { width: 100%; margin-right: 0; margin-left: 0; height: 350px; }
  .tiles-grid-3d { grid-template-columns: 1fr 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 30px; }
  /* Produkty na tablecie też 50/50, ale może z mniejszym obrazkiem */
  .product-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .burger { 
    display: flex; 
    position: fixed;       /* niezależnie od headera i menu */
    top: 20px; 
    right: 20px; 
    z-index: 2000;         /* zawsze nad wysuwanym panelem */
  }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: 80%; max-width: 300px;
    background: #fff;
    flex-direction: column;
    padding-top: 120px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-soft);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 1500; /* pod burgerem */
  }
  .main-nav.nav-active { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: center; gap: 30px; }
  .main-nav a { color: #111; font-size: 1.2rem; }
  
  .section-title { font-size: 2.5rem; }
  .logo-img { height: 50px; } 
  .site-header { padding: 0 10px; }
  
  /* Hero Fix Mobile */
  .hero-slider { min-height: 100dvh; height: 100dvh; } 
  .slide-bg img { object-position: center; height: 100%; }
  
  /* Produkty Mobile stack */
  .product-card { grid-template-columns: 1fr; }
  .product-header { flex-wrap: wrap; gap: 15px; }
  .product-img { height: 300px; }
  
  .process-video-centered { height: 400px; }
}

@media (max-width: 600px) {
  .tiles-grid-3d { grid-template-columns: 1fr; }
  .tile-flip-box { height: 300px; }
  .tile-front { background-size: cover; background-position: center !important; }
}
