/* --- ZMIENNE CSS (Design System) --- */
:root {
  --bg-color: #121414;
  --text-main: #e3e2e2;
  --text-muted: #d0c5b3;
  --primary: #e5c36c;
  --primary-container: #b89947;
  --on-primary-container: #423200;
  --outline-variant: #4d4638;

  --margin-desktop: 80px;
  --gutter: 32px;

  --font-main: 'Inter', sans-serif;
}

/* --- RESET I BAZA --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- PRZYCISKI --- */
.btn {
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: none;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background-color: var(--primary-container);
  color: var(--on-primary-container);
  padding: 12px 24px;
}

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

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--outline-variant);
  padding: 12px 24px;
}

.btn-outline:hover {
  background-color: #1e2020;
}

.btn-large {
  padding: 20px 40px;
}

/* --- NAWIGACJA (HEADER) --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--margin-desktop);
  background-color: rgba(18, 20, 20, 0.95);
  backdrop-filter: blur(4px); /* Efekt rozmycia tła pod nawigacją */
  border-bottom: 1px solid var(--outline-variant);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-img {
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s;
  padding-bottom: 4px;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

/* --- SEKCJA HERO --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--margin-desktop);
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: radial-gradient(#333 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1024px;
}

.hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--gutter);
}

.hero-title {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 32px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 672px;
  margin-bottom: 48px;
}

.hero-buttons {
  display: flex;
  gap: var(--gutter);
  align-items: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: var(--margin-desktop);
  display: flex;
  align-items: center;
  gap: 16px;
}

.text-primary {
  color: var(--primary);
}

.scroll-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- RESPONSYWNOŚĆ (Mobile) --- */
@media (max-width: 768px) {
  :root {
    --margin-desktop: 24px;
  }

  .main-nav {
    display: none; /* Ukrywamy menu na telefonach (tymczasowo) */
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-large {
    width: 100%;
  }
}

/* ========================================== */
/* WSPÓLNE KLASY POMOCNICZE                   */
/* ========================================== */
.border-top {
  border-top: 1px solid var(--outline-variant);
}
.mt-8 {
  margin-top: 32px;
}
.mb-12 {
  margin-bottom: 48px;
}

.section-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 672px;
}

/* ========================================== */
/* SEKCJA USŁUGI PRECYZYJNE (BENTO GRID)      */
/* ========================================== */
.services-section {
  padding: 160px var(--margin-desktop);
  background-color: #0d0e0f; /* Bardzo ciemne tło (surface-container-lowest) */
}

.section-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 96px;
}

.section-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 16px;
}

.title-underline {
  width: 96px;
  height: 4px;
  background-color: var(--primary);
}

/* Główny kontener siatki */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr; /* Domyślnie na telefony 1 kolumna */
  gap: var(--gutter);
}

/* Wspólne style dla każdego kafelka w siatce */
.bento-card {
  position: relative;
  overflow: hidden;
  background-color: #1e2020;
  border: 1px solid var(--outline-variant);
  aspect-ratio: 1 / 1; /* Standardowe kafelki są kwadratowe */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Ustawienia zdjęć w tle kafelków */
.bento-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  z-index: 1;
}

/* Przezroczystość zdjęć */
.opacity-60 {
  opacity: 0.6;
}
.opacity-40 {
  opacity: 0.4;
}

/* Efekt powiększenia zdjęcia po najechaniu myszką */
.bento-card:hover .bento-img {
  transform: scale(1.05);
}

/* Ciemny gradient na dole kafelka, żeby tekst był czytelny */
.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 60%);
  z-index: 2;
}

/* Kontener na tekst wewnątrz kafelka */
.bento-content {
  position: relative;
  z-index: 3;
  padding: var(--gutter);
}

.bento-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 8px;
}

.bento-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 450px;
}

/* ========================================== */
/* RESPONSYWNOŚĆ BENTO GRID (Tablet i Desktop)*/
/* ========================================== */
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr); /* Włączamy 12-kolumnową siatkę */
  }

  .bento-card {
    grid-column: span 4; /* Mniejsze kafelki zajmują 4 z 12 kolumn (czyli 1/3 szerokości) */
  }

  .card-large {
    grid-column: span 8; /* Główny duży kafelek zajmuje 8 z 12 kolumn (czyli 2/3 szerokości) */
    aspect-ratio: 16 / 9; /* Główny kafelek robi się panoramiczny */
  }
}

/* ========================================== */
/* SEKCJA REALIZACJE (Siatka ze zdjęciami)    */
/* ========================================== */
.projects-section {
  padding: 160px var(--margin-desktop);
  background-color: var(--bg-color);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}

.project-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--surface-container);
  border: 1px solid var(--outline-variant);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 20, 20, 0.9) 0%,
    transparent 60%
  );
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.project-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ========================================== */
/* BANER WYRÓŻNIONY (Zabudowa kampera)        */
/* ========================================== */
.feature-section {
  padding: 160px var(--margin-desktop);
  background-color: #1a1c1c; /* surface-container-low */
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--gutter);
}

.feature-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
}

.arrow-icon {
  transition: transform 0.3s;
}

.feature-link:hover .arrow-icon {
  transform: translateX(4px);
}

.feature-banner {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: 1px solid var(--outline-variant);
}

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================== */
/* FORMULARZ KONTAKTOWY                       */
/* ========================================== */
.contact-section {
  padding: 160px var(--margin-desktop);
  background-color: var(--bg-color);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 80px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-group {
  position: relative;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--outline-variant);
  color: var(--text-main);
  padding: 8px 0;
  font-family: var(--font-main);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus {
  border-bottom-color: var(--primary);
}

.form-input option {
  background-color: var(--bg-color);
}

.resize-none {
  resize: none;
}

.submit-btn {
  align-self: flex-start;
  margin-top: 16px;
}

/* ========================================== */
/* STOPKA (FOOTER)                            */
/* ========================================== */
.main-footer {
  padding: 80px var(--margin-desktop);
  background-color: #0d0e0f; /* surface-container-lowest */
  border-top: 1px solid var(--outline-variant);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 32px;
}

.footer-bottom p {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ========================================== */
/* RESPONSYWNOŚĆ (Desktop & Tablet)           */
/* ========================================== */
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-section,
  .feature-section,
  .contact-section {
    padding: 80px var(--margin-desktop); /* Zmniejszamy odstępy na mobile */
  }
  .feature-banner {
    aspect-ratio: 16 / 9; /* Na telefonie baner wyższy, żeby lepiej wyglądał */
  }
}

/* Zaktualizowana sekcja kontaktowa (bez formularza) */
.contact-section {
  padding: 160px var(--margin-desktop);
  background-color: var(--bg-color);
}

.contact-info {
  max-width: 800px; /* Ograniczamy szerokość, żeby tekst dobrze się czytało */
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-details a {
  color: #d0c5b3;
}

.contact-details a:hover {
  color: #b89947;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
}
