/* ===== Reset & variables ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-red: #e2231a;
  --color-red-dark: #b91c14;
  --color-gray-light: #f5f5f5;
  --color-gray-text: #4a4a4a;
  --color-border: #e0e0e0;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --header-height: 92px;
  --transition: 0.3s ease;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 17px; color: var(--color-black); line-height: 1.6; background: var(--color-white); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.1; }

/* ===== Layout helpers ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; scroll-margin-top: var(--header-height); }
.section-alt { background: var(--color-gray-light); }
.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; }
.section-lead { color: var(--color-gray-text); max-width: 700px; margin-bottom: 48px; font-size: 18px; }

/* ===== Skip link ===== */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--color-red); color: var(--color-white); padding: 12px 20px; z-index: 3000; }
.skip-link:focus { left: 16px; top: 16px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-size: 16px; border: 2px solid transparent; transition: background var(--transition), color var(--transition), border-color var(--transition); cursor: pointer; }
.btn-primary { background: var(--color-red); color: var(--color-white); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-red-dark); }
.btn-outline { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--color-white); color: var(--color-black); }
.btn-dark { background: var(--color-black); color: var(--color-white); margin-top: 8px; }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--color-red); }

/* ===== Header ===== */
#site-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--color-border); z-index: 1000; transition: box-shadow var(--transition); }
#site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { flex-shrink: 0; }
.logo img { height: 68px; }
.main-nav ul { display: flex; gap: 32px; }
.main-nav a { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; font-size: 18px; letter-spacing: 0.5px; padding: 8px 0; display: inline-block; border-bottom: 2px solid transparent; transition: border-color var(--transition), color var(--transition); }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--color-red); border-color: var(--color-red); }
.header-phone { font-family: var(--font-heading); font-weight: 700; font-size: 20px; white-space: nowrap; }
.header-phone:hover { color: var(--color-red); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--color-black); display: block; }

@media (max-width: 860px) {
  .main-nav { position: fixed; top: var(--header-height); left: 0; right: 0; background: var(--color-white); max-height: 0; overflow: hidden; transition: max-height var(--transition); border-bottom: 1px solid var(--color-border); }
  .main-nav.open { max-height: 500px; }
  .main-nav ul { flex-direction: column; padding: 8px 24px; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 14px 0; }
  .header-phone { display: none; }
  .nav-toggle { display: flex; }
}

/* ===== Hero ===== */
#hero { position: relative; height: 100vh; min-height: 560px; display: flex; align-items: center; color: var(--color-white); overflow: hidden; padding-top: var(--header-height); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: heroFade 20s infinite; }
.hero-bg img:nth-child(1) { animation-delay: 0s; }
.hero-bg img:nth-child(2) { animation-delay: 4s; }
.hero-bg img:nth-child(3) { animation-delay: 8s; }
.hero-bg img:nth-child(4) { animation-delay: 12s; }
.hero-bg img:nth-child(5) { animation-delay: 16s; }
@keyframes heroFade { 0% { opacity: 1; } 18% { opacity: 1; } 22% { opacity: 0; } 100% { opacity: 0; } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,26,26,.55), rgba(26,26,26,.78)); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; padding: 0 24px; }
.hero-content h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 20px; }
.hero-content p { font-size: 20px; margin-bottom: 32px; max-width: 600px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Trust bar ===== */
.trust-bar { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--color-border); }
.trust-bar .label { display: block; font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; margin-bottom: 16px; color: var(--color-gray-text); }
.trust-logos { display: flex; flex-wrap: wrap; gap: 24px 40px; font-family: var(--font-heading); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: 1px; opacity: .75; }

/* ===== Cards (usługi) ===== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.card { background: var(--color-white); border: 1px solid var(--color-border); padding: 32px; border-top: 4px solid var(--color-red); transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--color-gray-text); }

/* ===== Gallery + lightbox ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.gallery-item { position: relative; overflow: hidden; aspect-ratio: 4 / 3; cursor: pointer; border: 0; padding: 0; background: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }

#lightbox { position: fixed; inset: 0; background: rgba(26,26,26,.92); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 40px; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 85vh; }
#lightbox-close { position: absolute; top: 24px; right: 32px; color: var(--color-white); font-size: 36px; background: none; border: none; cursor: pointer; line-height: 1; }
#lightbox-prev, #lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--color-white); font-size: 40px; cursor: pointer; padding: 8px 16px; }
#lightbox-prev { left: 8px; }
#lightbox-next { right: 8px; }

/* ===== Domy Sadków facts ===== */
.facts-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.fact-badge { background: var(--color-black); color: var(--color-white); padding: 10px 18px; font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .5px; }

/* ===== FAQ accordion ===== */
.faq-list { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; background: none; border: none; text-align: left; font-family: var(--font-heading); font-weight: 700; font-size: 19px; cursor: pointer; }
.faq-question .icon { font-size: 24px; flex-shrink: 0; transition: transform var(--transition); }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--transition); color: var(--color-gray-text); }
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer p { padding-bottom: 24px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info dt { font-family: var(--font-heading); text-transform: uppercase; font-size: 14px; color: var(--color-gray-text); margin-top: 20px; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { font-size: 20px; font-weight: 700; }
.contact-info dd a:hover { color: var(--color-red); }
.contact-map iframe { width: 100%; height: 360px; border: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
#site-footer { background: var(--color-black); color: var(--color-white); padding: 48px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-nav ul { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: rgba(255,255,255,.8); font-size: 14px; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--color-red); }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.6); }

/* ===== Scroll reveal ===== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
