/* ============================================
   Serwis Domowy Krzysztof Chmiel
   Mobile-first | BEM | CSS Custom Properties
   ============================================ */

/* ----- 1. Custom Properties ----- */
:root {
  --color-primary: #2c3e50;
  --color-accent: #1abc9c;
  --color-accent-dark: #16a085;
  --color-cta: #e67e22;
  --color-cta-hover: #d35400;
  --color-bg: #f8f9fa;
  --color-bg-alt: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #6c757d;
  --color-border: #dee2e6;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-cta: 0 4px 16px rgba(230, 126, 34, 0.35);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --max-width: 1200px;
  --nav-height: 140px;

  --font-body: "Inter", sans-serif;
  --font-heading: "Poppins", sans-serif;
}

/* ----- 2. Reset / Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

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

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

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

/* ----- 3. Utilities ----- */
.u-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.u-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;
}

/* ----- 4. Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  border: 2px solid transparent;
}

.btn--cta {
  background-color: var(--color-cta);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.btn--cta:hover {
  background-color: var(--color-cta-hover);
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: #fff;
}

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

.btn__icon {
  flex-shrink: 0;
}

/* ----- 5. Nav ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

.nav--scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-sm);
}

.nav__logo img {
  height: 130px;
  width: auto;
}

.nav__links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.nav__links--open {
  display: flex;
}

.nav__link {
  padding: 0.75rem var(--space-sm);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--color-accent);
}

.nav__phone {
  display: none;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-cta);
  white-space: nowrap;
}

.nav__phone:hover {
  color: var(--color-cta-hover);
}

.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

.nav__hamburger--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- 6. Hero ----- */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
  background:
    linear-gradient(
      160deg,
      rgba(26, 42, 58, 0.92) 0%,
      rgba(44, 62, 80, 0.88) 40%,
      rgba(26, 42, 58, 0.92) 100%
    ),
    url("../images/portfolio/kitchen-1.webp") center 40% / cover no-repeat;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(230, 126, 34, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(244, 162, 97, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.hero__cta {
  margin-bottom: var(--space-lg);
}

.hero__hook {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

/* ----- 7. Services ----- */
.services {
  padding: var(--space-xl) 0;
  background-color: var(--color-bg-alt);
}

.services__problems {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.services__problems-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.services__problems-list {
  max-width: 360px;
  margin: 0 auto var(--space-md);
  text-align: left;
}

.services__problems-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
}

.services__problems-icon {
  color: var(--color-accent);
  flex-shrink: 0;
}

.services__problems-text {
  text-align: center;
  color: var(--color-text-light);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.services__heading {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-md);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  justify-items: center;
}

.services__card {
  width: 100%;
}

.services__card {
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.services__card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.services__card-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.services__card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.services__card-list {
  color: var(--color-text-light);
  font-size: 0.9375rem;
}

.services__card-list li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.services__card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* ----- 8. Portfolio ----- */
.portfolio {
  padding: var(--space-xl) 0;
  background-color: var(--color-bg);
}

.portfolio__heading {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xs);
}

.portfolio__subheading {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.portfolio__item {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
}

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

.portfolio__item:hover img {
  transform: scale(1.05);
}

/* ----- 9. About ----- */
.about {
  padding: var(--space-xl) 0;
  background-color: var(--color-bg-alt);
}

.about__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-align: center;
}

.about__profile {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--color-bg);
  box-shadow: var(--shadow-card);
}

.about__text p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.about__text p:first-child {
  color: var(--color-text);
  font-size: 1.0625rem;
}

.about__area {
  max-width: 720px;
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.about__area-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about__area-text {
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

.about__area-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.about__area-list li {
  background-color: var(--color-bg);
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
}

.about__map {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* ----- 10. Contact ----- */
.contact {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a2a3a 100%);
  color: #fff;
  text-align: center;
}

.contact__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.contact__text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-md);
  font-size: 1.0625rem;
}

.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.contact__actions .btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.contact__actions .btn--outline:hover {
  background-color: #fff;
  color: var(--color-primary);
  border-color: #fff;
}

.contact__phone-number {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.contact__email {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}

/* ----- 11. Footer ----- */
.footer {
  padding: var(--space-md) 0;
  background-color: #1a2a3a;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  font-size: 0.875rem;
}

.footer__business {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xs);
}

.footer__contact {
  margin-bottom: var(--space-xs);
}

.footer__contact a {
  transition: color 0.2s;
}

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

.footer__copy {
  font-size: 0.8125rem;
}

/* ----- 12. Lightbox ----- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox--open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox__close:hover {
  opacity: 1;
}

.portfolio__item {
  cursor: pointer;
}

/* ----- 13. Sticky CTA (mobile) ----- */
.sticky-cta {
  display: none;
}

/* ----- 13. Media Queries ----- */

/* -- Tablet (>=768px) -- */
@media (min-width: 768px) {
  .u-container {
    padding: 0 var(--space-md);
  }

  /* Nav */
  .nav__links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    gap: var(--space-xs);
  }

  .nav__phone {
    display: flex;
  }

  .nav__hamburger {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-height) + 5rem);
    padding-bottom: 5rem;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  /* Services */
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services__heading,
  .services__problems-title {
    font-size: 1.75rem;
  }

  /* Portfolio */
  .portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio__heading {
    font-size: 1.75rem;
  }

  /* About */
  .about__profile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-align: left;
  }

  .about__photo {
    width: 180px;
    height: 180px;
    margin: 0;
    flex-shrink: 0;
  }

  .about__heading {
    font-size: 1.75rem;
  }

  /* Contact */
  .contact__heading {
    font-size: 1.75rem;
  }

  .contact__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* -- Desktop (>=1024px) -- */
@media (min-width: 1024px) {
  body {
    font-size: 1.0625rem;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 7rem);
    padding-bottom: 7rem;
  }

  .hero__title {
    font-size: 3rem;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services__heading,
  .services__problems-title {
    font-size: 2rem;
  }

  .portfolio__heading,
  .about__heading,
  .contact__heading {
    font-size: 2rem;
  }
}

/* -- Mobile only (<768px) -- */
@media (max-width: 767px) {
  .sticky-cta {
    display: flex;
    position: fixed;
    bottom: var(--space-sm);
    left: var(--space-sm);
    right: var(--space-sm);
    z-index: 99;
    background-color: var(--color-cta);
    color: #fff;
    padding: 0.875rem;
    border-radius: var(--radius-lg);
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.0625rem;
    box-shadow: 0 4px 20px rgba(230, 126, 34, 0.4);
    transition: background-color 0.2s;
  }

  .sticky-cta:hover {
    background-color: var(--color-cta-hover);
  }

  /* Extra bottom padding so content isn't hidden behind sticky CTA */
  .footer {
    padding-bottom: 5rem;
  }
}
