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

body {
  font-family: 'Helvetica Neue', sans-serif;
  color: rgb(20,49,94); /* Navy brand color */
  background-color: #f9f9f9; /* Off-white background */
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* Header */
header {
  background-color: #fff;
  padding: 20px 50px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .logo img {
  height: 80px;
  width: auto;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  font-size: 28px;
  color: rgb(20,49,94);
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.menu-toggle:hover {
  transform: scale(1.1);
}

nav .nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav .nav-links a {
  text-decoration: none;
  color: rgb(20,49,94);
  font-weight: 500;
  transition: color 0.3s;
}

nav .nav-links a:hover {
  color: #A67B5B; /* Brązowy akcent */
}

nav .nav-links a.active {
  color: #A67B5B;
  font-weight: 600;
}

/* Hero */
#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90vh;
  text-align: center;
  background: linear-gradient(rgba(20,49,94,0.5), rgba(20,49,94,0.5)), url('assets/black-white-layers-paper-top-view.jpg') center/cover no-repeat;
  color: #fff;
  padding: 0 20px;
}

#hero h1 {
  font-size: 3.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

#hero p {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto 32px;
  color: #fff;
  opacity: 1;
}

#hero .cta {
  display: inline-block;
  padding: 12px 30px;
  background-color: #A67B5B; /* Brąz */
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 5px;
  transition: background-color 0.3s;
  cursor: pointer;
}

#hero .cta:hover {
  background-color: #8a654a;
  transform: translateY(-3px);
  transition: background-color 0.3s, transform 0.3s;
}

/* Sections */
section {
  padding: 120px 50px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

section:last-of-type {
  border-bottom: none;
}

section h2 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: rgb(20,49,94);
  letter-spacing: -0.02em;
}

section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(20,49,94,0.85);
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* About */
#about p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Services */
.services-grid {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  margin-top: 60px;
}

/* Service item base styles */
.service-item {
  flex: 1 1 300px;
  padding: 10px 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  animation: fadeSlideUp 0.6s ease-out forwards;
}

.service-item:nth-child(1) {
  animation-delay: 0.2s;
}
.service-item:nth-child(2) {
  animation-delay: 0.4s;
}
.service-item:nth-child(3) {
  animation-delay: 0.6s;
}
.service-item:nth-child(4) {
  animation-delay: 0.8s;
}

.service-item:hover {
  transform: translateY(-2px);
}

.service-item h3 {
  margin-bottom: 15px;
  color: rgb(20,49,94);
}

/* Portfolio */
.portfolio-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 60px;
}

/* Portfolio item base styles */
.portfolio-item {
  flex: 1 1 300px;
  text-align: center;
  padding-bottom: 20px;
  animation: fadeSlideUp 0.6s ease-out forwards;
  display: flex;
  flex-direction: column;
}

.portfolio-item:nth-child(1) {
  animation-delay: 0.2s;
}
.portfolio-item:nth-child(2) {
  animation-delay: 0.4s;
}
.portfolio-item:nth-child(3) {
  animation-delay: 0.6s;
}
.portfolio-item:nth-child(4) {
  animation-delay: 0.8s;
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: transform 0.3s;
  display: block;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

/* Contact */
#contact ul {
  list-style: none;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#contact ul li {
  margin-bottom: 10px;
}

#contact ul li a {
  color: rgb(20,49,94);
  text-decoration: none;
  font-weight: 500;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
}

#contact input,
#contact textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 1rem;
}

#contact button {
  padding: 12px;
  border: none;
  background-color: rgb(20,49,94);
  color: #fff;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#contact button:hover {
  background-color: #16385f;
}

/* Footer */
footer {
  background-color: transparent;
  text-align: center;
  padding: 40px 20px;
  color: rgba(20,49,94,0.7);
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  0% {
    transform: rotate(90deg) scale(1);
  }
  50% {
    transform: rotate(90deg) scale(1.2);
  }
  100% {
    transform: rotate(90deg) scale(1);
  }
}

.menu-toggle.active {
  animation: pop 0.4s ease;
}

/* === Scroll Reveal Animation Classes === */
/* Add .reveal class to elements to enable scroll reveal effect (fade-in + slide-up) */
/* When .active is added (by JS), the element animates in */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 768px) {
  /* Header & Navigation */
  header {
    padding: 15px 20px;
    border-radius: 0 0 20px 20px;
  }

  nav .logo img {
    height: 60px;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active {
    transform: rotate(90deg);
  }

  nav .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    gap: 0;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 99;
  }

  nav .nav-links.active {
    max-height: 500px;
  }

  nav .nav-links li {
    border-bottom: 1px solid #f0f0f0;
  }

  nav .nav-links a {
    display: block;
    padding: 15px 20px;
    font-size: 1rem;
  }

  /* Hero Section */
  #hero {
    height: 50vh;
    padding: 0 15px;
  }

  #hero h1 {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  #hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  #hero .cta {
    padding: 10px 24px;
    font-size: 0.95rem;
  }

  /* Sections */
  section {
    padding: 60px 20px;
  }

  section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  section p {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Services & Portfolio Grid */
  .services-grid,
  .portfolio-grid {
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
  }

  .service-item {
    flex: 1 1 100%;
  }

  .portfolio-item {
    flex: 1 1 100%;
  }

  .portfolio-item img {
    width: 100%;
    border-radius: 6px;
  }

  /* Contact Form */
  #contact form {
    max-width: 100%;
  }

  #contact input,
  #contact textarea {
    padding: 14px;
    font-size: 1rem;
    min-height: 44px;
  }

  #contact textarea {
    min-height: 120px;
  }

  #contact button {
    padding: 14px;
    font-size: 1rem;
    min-height: 44px;
  }

  /* Footer */
  footer {
    padding: 30px 20px;
    font-size: 0.85rem;
  }
}

/* Extra small devices (max-width: 480px) */
@media (max-width: 480px) {
  header {
    padding: 12px 15px;
  }

  nav .logo img {
    height: 50px;
  }

  section {
    padding: 40px 15px;
  }

  section h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
  }

  section p {
    font-size: 0.95rem;
  }

  #hero {
    height: 45vh;
  }

  #hero h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  #hero p {
    font-size: 0.9rem;
    margin-bottom: 25px;
  }

  #hero .cta {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .services-grid,
  .portfolio-grid {
    gap: 30px;
  }

  nav .nav-links.active {
    max-height: 250px;
  }

  #contact ul li {
    margin-bottom: 8px;
  }

  #contact ul li a {
    font-size: 0.95rem;
  }
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  animation: lightboxZoom 0.35s ease;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

@keyframes lightboxZoom {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}