:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #f2f7f7;
  --text: #15353b;
  --muted: #567177;
  --primary: #1f444a;
  --primary-2: #5fa5b5;
  --accent: #ff6f52;
  --border: #dfe9ea;
  --shadow: 0 16px 40px rgba(18, 43, 47, 0.08);
  --radius: 22px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f4f3f1 0%, #fbfbfa 100%);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.section { padding: 88px 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
}

h1, h2, h3, h4 { margin: 0 0 14px; line-height: 1.1; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); }
h2 { font-size: clamp(2rem, 3vw, 3rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.45rem); }

p.section-lead,
.hero-copy p,
.text-muted {
  color: var(--muted);
  font-size: 1.05rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 34px rgba(31, 68, 74, 0.18);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  border-color: var(--border);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover { border-color: var(--primary-2); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 245, 243, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 233, 234, 0.7);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--primary);
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: var(--shadow);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-weight: 600;
  color: var(--muted);
}

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

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.82);
  color: var(--primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 43, 47, 0.08);
  transition: 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  border-color: var(--primary-2);
  outline: none;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu-toggle-lines::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(6px) rotate(90deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  opacity: 0;
}

.hero {
  padding: 74px 0 30px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy .badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.8);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.92rem;
}

.hero-card {
  position: relative;
  min-height: 560px;
  border-radius: 34px;
  background: radial-gradient(circle at top right, rgba(95,165,181,0.28), transparent 34%), linear-gradient(160deg, #ffffff 0%, #eaf2f3 100%);
  box-shadow: var(--shadow);
  border: 1px solid rgba(223, 233, 234, 0.95);
  overflow: hidden;
  padding: 28px;
  display: grid;
  gap: 18px;
  align-content: space-between;
}

.hero-visual {
  border-radius: 26px;
  min-height: 360px;
  background:
    linear-gradient(135deg, rgba(31,68,74,0.1), rgba(255,111,82,0.08)),
    url("/assets/images/produkcje/Szafa/main.png") center/cover no-repeat;
  border: 1px solid rgba(223, 233, 234, 0.9);
  position: relative;
  overflow: hidden;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-card {
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
}

.stat-card strong {
  display: block;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.grid-4, .grid-3, .grid-2 { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,111,82,0.16), rgba(95,165,181,0.14));
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 900;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.highlight-band {
  background: linear-gradient(135deg, rgba(31,68,74,0.98), rgba(31,68,74,0.9));
  color: #fff;
  border-radius: 30px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.highlight-band .text-muted { color: rgba(255,255,255,0.78); }

.process-step { position: relative; padding-top: 14px; }

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  margin-bottom: 18px;
}

.portfolio-card {
  overflow: hidden;
  padding: 0;
}

.portfolio-visual {
  aspect-ratio: 16 / 11;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

.portfolio-copy { padding: 22px 24px 26px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.testimonial { position: relative; }

.testimonial::before {
  content: "“";
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 3.4rem;
  color: rgba(255,111,82,0.18);
  font-weight: 900;
  line-height: 1;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.faq details + details { margin-top: 14px; }

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  padding-right: 24px;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 1.4rem;
  color: var(--accent);
}

.faq details[open] summary::after { content: "–"; }

.contact-wrap {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: stretch;
}

.contact-panel,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.contact-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.contact-item {
  padding: 16px 18px;
  background: var(--surface-2);
  border-radius: 18px;
  border: 1px solid var(--border);
}

.contact-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
}

form { display: grid; gap: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

input, select, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 14px 15px;
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 4px rgba(95,165,181,0.14);
}

textarea { min-height: 150px; resize: vertical; }

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.status-message {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.status-message.success {
  display: block;
  background: rgba(76, 175, 80, 0.12);
  color: #27632a;
  border: 1px solid rgba(76, 175, 80, 0.18);
}

.status-message.error {
  display: block;
  background: rgba(244, 67, 54, 0.1);
  color: #8a2c25;
  border: 1px solid rgba(244, 67, 54, 0.16);
}

.footer { padding: 26px 0 40px; }

.footer-box {
  border-radius: 28px;
  background: linear-gradient(145deg, #15353b, #1d474e);
  color: #fff;
  padding: 38px 32px 28px;
  box-shadow: var(--shadow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr;
  gap: 24px;
}

.footer-box h4 { margin-bottom: 12px; font-size: 1rem; }

.footer-box a, .footer-box p, .footer-box li {
  color: rgba(255,255,255,0.8);
  margin: 0 0 8px;
}

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

.footer-bottom {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.66);
  font-size: 0.92rem;
}

.mobile-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  display: none;
  gap: 10px;
}

.mobile-cta .btn {
  flex: 1 1 auto;
  min-height: 52px;
}

@media (max-width: 1199px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-card { min-height: auto; }
  .contact-wrap { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .section { padding: 76px 0; }
  .navbar { min-height: 74px; }
  .grid-2 { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-copy p, p.section-lead, .text-muted { font-size: 1rem; }
}

@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .hero .btn-row,
  .hero .badge-row {
    display: none;
  }
  .topbar { backdrop-filter: blur(10px); }
  .navbar {
    position: relative;
    min-height: 70px;
    padding: 10px 0;
  }
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(223, 233, 234, 0.95);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(18, 43, 47, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
  }
  .nav-links a.btn {
    width: 100%;
    min-height: 50px;
  }
  .hero {
    padding: 34px 0 18px;
  }
  .hero-grid, .grid-4, .grid-3, .form-grid, .footer-grid, .mini-stats {
    grid-template-columns: 1fr;
  }
  .contact-panel, .contact-form, .card, .highlight-band {
    padding: 24px;
  }
  .hero-card {
    padding: 18px;
    border-radius: 24px;
  }
  .hero-visual {
    min-height: 240px;
  }
  .btn-row {
    gap: 10px;
  }
  .btn-row .btn {
    width: 100%;
  }
  .mobile-cta { display: flex; }
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 575px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }
  h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  h2 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .brand { gap: 10px; }
  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .hero-copy .badge-row {
    gap: 10px;
  }
  .pill {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .stat-card,
  .contact-item {
    padding: 14px;
  }
  .contact-panel,
  .contact-form,
  .card,
  .highlight-band,
  .footer-box {
    padding-left: 20px;
    padding-right: 20px;
  }
  .footer-box {
    padding-top: 30px;
  }
  .mobile-cta {
    left: 10px;
    right: 10px;
    gap: 8px;
  }
  .mobile-cta .btn {
    min-height: 50px;
    padding: 0 16px;
  }
}

/* Gallery Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gallery-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.gallery-slider {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-slider img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-prev, .gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s;
}

.gallery-prev:hover, .gallery-next:hover {
  background: rgba(255, 255, 255, 0.5);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  margin-top: 10px;
  justify-content: center;
}

.gallery-thumbnails img {
  height: 60px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  object-fit: cover;
  width: 80px;
}

.gallery-thumbnails img.active, .gallery-thumbnails img:hover {
  opacity: 1;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  margin-top: 1rem;
  display: inline-block;
}
