/* ================================
   Woda z Domu – eSpring
   Responsywna strona landing page
   Mobile-first CSS
   ================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&family=Lato:wght@400;500&display=swap');

/* ================================
   CSS Variables
   ================================ */
:root {
  /* Colors */
  --color-bg: #FAF8F4;
  --color-accent: #6E9E73;
  --color-wood: #CBAE82;
  --color-text: #2C2C2C;
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Lato', sans-serif;

  /* Spacing */
  --spacing-mobile-side: 16px;
  --spacing-mobile-vertical: 48px;
  --spacing-desktop-side: 96px;
  --spacing-desktop-vertical: 96px;

  /* Container */
  --max-width: 1140px;
}

/* ================================
   CSS Reset
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.lead {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--color-text);
  opacity: 0.85;
}

/* ================================
   Container & Layout
   ================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-mobile-side);
}

.section {
  padding: calc(var(--spacing-mobile-vertical) * 1.5) 0;
}

/* ================================
   Header & Navigation
   ================================ */
.header {
  background-color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-accent);
  font-weight: 600;
}

.logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a.active {
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
}

/* ================================
   Hero Section
   ================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: var(--color-white);
  padding: 2rem var(--spacing-mobile-side);
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}

.hero .lead {
  color: var(--color-white);
  opacity: 1;
  font-size: 1.25rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
  margin-bottom: 2.5rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: var(--color-white);
  font-size: 0.875rem;
  text-align: center;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  margin: 0 auto;
  display: block;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ================================
   Buttons & CTAs
   ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.btn-icon-white {
  filter: brightness(0) invert(1);
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #5d8862;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(110, 158, 115, 0.3);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-text);
  border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-text);
  transform: translateY(-2px);
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

/* ================================
   Grid & Cards
   ================================ */
.grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.card {
  background-color: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-accent);
  font-size: 1.25rem;
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
}

/* ================================
   Benefits Section (Dlaczego)
   ================================ */
.benefit {
  margin-bottom: 3rem;
}

.benefit:last-child {
  margin-bottom: 0;
}

.benefit-image {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.benefit-content h3 {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.benefit-content p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ================================
   Steps Section (Jak to działa)
   ================================ */
.steps {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 2rem 0;
}

.step {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  object-fit: contain;
}

.step h3 {
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ================================
   CTA Section (Kup teraz)
   ================================ */
.cta-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-radius: 0;
  margin: 0;
}

.cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}

.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(110, 158, 115, 0.4), rgba(44, 44, 44, 0.6));
  z-index: 2;
}

.cta-content {
  position: relative;
  z-index: 3;
  color: var(--color-white);
  padding: 3rem var(--spacing-mobile-side);
  max-width: 700px;
}

.cta-logo {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  height: 24px;
  z-index: 4;
}

/* ================================
   Footer
   ================================ */
.footer {
  background-color: var(--color-white);
  border-top: 2px solid var(--color-accent);
  padding: 4rem 0 2rem;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-column h3 {
  font-size: 1.125rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.85;
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.875rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-list strong {
  color: var(--color-text);
  font-weight: 500;
}

.footer-list a {
  color: var(--color-accent);
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.footer-list a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.btn-footer {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #e0ddd8;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text);
  opacity: 0.7;
}

.footer-bottom p {
  margin: 0;
}

/* ================================
   Utility Classes
   ================================ */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

.back-link {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 500;
  margin-top: 2rem;
  transition: opacity 0.3s ease;
}

.back-link:hover {
  opacity: 0.7;
}

/* ================================
   Tablet Styles (≥768px)
   ================================ */
@media (min-width: 768px) {
  .container {
    padding: 0 calc(var(--spacing-mobile-side) * 2);
  }

  .section {
    padding: calc(var(--spacing-mobile-vertical) * 1.5) 0;
  }

  h1 {
    font-size: 2.75rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .card-image {
    height: 220px;
  }

  .steps {
    flex-direction: row;
    gap: 2rem;
  }

  .step {
    flex: 1;
  }

  /* Benefit layout: image left, text right (alternating) */
  .benefit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
  }

  .benefit-image {
    margin-bottom: 0;
  }

  .benefit:nth-child(even) .benefit-image {
    order: 2;
  }

  .benefit:nth-child(even) .benefit-content {
    order: 1;
  }

  /* Footer responsive */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* ================================
   Desktop Styles (≥1024px)
   ================================ */
@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-desktop-side);
  }

  .section {
    padding: var(--spacing-desktop-vertical) 0;
  }

  .footer {
    margin-top: var(--spacing-desktop-vertical);
  }

  h1 {
    font-size: 3rem;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero .lead {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 2.5rem;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .grid-2 {
    gap: 2.5rem;
  }

  .card-image {
    height: 240px;
  }

  .cta-buttons {
    gap: 1.5rem;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1.05rem;
  }

  /* Footer responsive */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
  }

  .btn-footer {
    width: auto;
  }
}

/* ================================
   Accessibility
   ================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
