/*
Theme Name: W&G Budownictwo
Theme URI: https://wgbudownictwo.pl
Author: W&G Budownictwo
Description: Minimalistyczny, premium motyw dla firmy wykończeniowo-remontowej. Klasyczny motyw z panelem "Treść strony" (Customizer), typem wpisów "Realizacje" i sekcjami strony głównej.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wgb
Tags: business, custom-menu, featured-images, translation-ready
*/

/* ---------- Reset / podstawy ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #F5F2EC;
  color: #171717;
  font: 400 17px/1.6 'Instrument Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #171717; text-decoration: none; transition: color .25s ease; }
a:hover { color: #D08D57; }
h1, h2, h3, h4 { font-family: 'Archivo', system-ui, sans-serif; font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: pretty; }
p { margin: 0; text-wrap: pretty; }
button { font-family: inherit; }
.wgb-skip { position: absolute; left: -9999px; }
.wgb-skip:focus { left: 16px; top: 16px; z-index: 200; background: #171717; color: #F5F2EC; padding: 12px 18px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ---------- Layout ---------- */
.wgb-wrap { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.wgb-section { padding: clamp(80px, 11vw, 170px) 0; }
.wgb-section--tight { padding: clamp(64px, 8vw, 120px) 0; }
.wgb-dark { background: #171717; color: #F5F2EC; }
.wgb-dark h1, .wgb-dark h2, .wgb-dark h3 { color: #F5F2EC; }
.wgb-dark p { color: #C9C4BA; }
.wgb-eyebrow { font-size: 12px; line-height: 1; letter-spacing: .18em; text-transform: uppercase; color: #8A8479; margin: 0; }
.wgb-eyebrow--gold { color: #D08D57; }
.wgb-h2 { font-size: clamp(30px, 4vw, 54px); line-height: 1.1; letter-spacing: -0.025em; }
.wgb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); }
.wgb-head h2 { max-width: 820px; }
.wgb-lede { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.7; color: #5A554D; }
.wgb-dark .wgb-lede { color: #C9C4BA; }
.wgb-grid { display: grid; gap: clamp(28px, 4vw, 72px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }

/* ---------- Przyciski ---------- */
.wgb-btn {
  display: inline-block; padding: 18px 32px; background: #171717; color: #F5F2EC;
  font-size: 13px; line-height: 1; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid #171717; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.wgb-btn:hover { background: #D08D57; border-color: #D08D57; color: #171717; }
.wgb-btn--ghost { background: transparent; color: #171717; border-color: rgba(23,23,23,.25); }
.wgb-btn--ghost:hover { background: transparent; color: #D08D57; border-color: #D08D57; }
.wgb-btn--light { background: #F5F2EC; color: #171717; border-color: #F5F2EC; }
.wgb-btn--light:hover { background: #D08D57; border-color: #D08D57; color: #171717; }
.wgb-btn--sm { padding: 12px 22px; }

/* ---------- Header ---------- */
.wgb-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,242,236,.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23,23,23,.1);
}
body.admin-bar .wgb-header { top: 32px; }
.wgb-bar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wgb-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wgb-logo__mark {
  width: 34px; height: 34px; border: 1px solid #171717; display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo', sans-serif; font-size: 12px; line-height: 1; letter-spacing: .02em;
}
.wgb-logo__name { font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 15px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; }
.wgb-logo img { max-height: 40px; width: auto; }
.wgb-nav { display: flex; align-items: center; gap: 30px; }
.wgb-nav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.wgb-nav a { font-size: 14px; }
.wgb-nav .current-menu-item > a { color: #D08D57; }
.wgb-burger {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(23,23,23,.18); cursor: pointer;
}
.wgb-burger span { display: block; width: 18px; height: 1px; background: #171717; box-shadow: 0 -5px 0 #171717, 0 5px 0 #171717; }
.wgb-mobile { position: fixed; inset: 76px 0 0 0; z-index: 55; background: #F5F2EC; padding: 32px clamp(20px, 6vw, 48px); display: none; flex-direction: column; overflow-y: auto; }
.wgb-mobile.is-open { display: flex; animation: wgbFade .3s ease both; }
.wgb-mobile ul { list-style: none; margin: 0; padding: 0; }
.wgb-mobile a { display: block; padding: 18px 0; border-bottom: 1px solid rgba(23,23,23,.1); font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.2; }
.wgb-mobile .wgb-btn { margin-top: 28px; text-align: center; padding: 20px; }

/* ---------- Hero ---------- */
.wgb-hero { padding: clamp(48px, 7vw, 104px) 0 0; }
.wgb-hero__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.wgb-hero__text { max-width: 620px; }
.wgb-hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -0.03em; }
.wgb-hero__eyebrow { margin-bottom: 28px; }
.wgb-hero__sub { margin-top: 28px; max-width: 520px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: #4A463F; }
.wgb-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.wgb-hero__media { position: relative; width: 100%; height: clamp(380px, 62vh, 660px); overflow: hidden; background: #E7E2D9; }
.wgb-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.wgb-values { margin-top: clamp(40px, 5vw, 72px); padding-top: 26px; border-top: 1px solid rgba(23,23,23,.14); }
.wgb-values__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, minmax(0, 1fr))); }
.wgb-values__grid p { padding: 14px 20px; border-left: 1px solid rgba(23,23,23,.14); font-size: 13px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; color: #4A463F; }
.wgb-values__grid p:first-child { padding-left: 0; border-left: 0; }

/* ---------- Pas zdjęcia ---------- */
.wgb-band { position: relative; width: 100%; height: clamp(280px, 52vh, 560px); overflow: hidden; background: #E7E2D9; }
.wgb-band img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Wprowadzenie ---------- */
.wgb-lead__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: clamp(28px, 5vw, 80px); align-items: start; }
.wgb-lead h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.12; }
.wgb-lead__body { max-width: 560px; }
.wgb-lead__body p + p { margin-top: 20px; }
.wgb-lead__note { margin-top: 28px; padding-top: 22px; border-top: 1px solid #D08D57; font-family: 'Archivo', sans-serif; font-weight: 500; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; letter-spacing: -0.01em; color: #171717; }

/* ---------- Usługi ---------- */
.wgb-services__top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(24px, 3vw, 40px); margin-bottom: clamp(40px, 5vw, 72px); }
.wgb-service__media { position: relative; width: 100%; height: clamp(300px, 44vh, 460px); overflow: hidden; background: #E7E2D9; }
.wgb-service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.wgb-service:hover .wgb-service__media img { transform: scale(1.03); }
.wgb-service h3 { margin: 22px 0 8px; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.wgb-service p { max-width: 420px; font-size: 16px; line-height: 1.6; color: #5A554D; }
.wgb-rows { border-top: 1px solid rgba(23,23,23,.14); }
.wgb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 40px; padding: 26px 0; border-bottom: 1px solid rgba(23,23,23,.14); }
.wgb-row h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.wgb-row p { font-size: 16px; line-height: 1.6; color: #5A554D; }

/* ---------- Dlaczego my ---------- */
.wgb-why__grid { margin-top: clamp(44px, 6vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(28px, 3vw, 44px); }
.wgb-why__item { padding-top: 20px; border-top: 1px solid rgba(245,242,236,.22); }
.wgb-why__num { font-family: 'Archivo', sans-serif; font-size: 12px; line-height: 1; letter-spacing: .14em; color: #D08D57; margin-bottom: 18px; }
.wgb-why__item h3 { margin-bottom: 12px; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.wgb-why__item p { font-size: 16px; line-height: 1.65; }

/* ---------- Realizacje ---------- */
.wgb-projects { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 40px); }
.wgb-projects__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 40px); }
.wgb-project { display: block; }
.wgb-project__media { position: relative; width: 100%; height: clamp(280px, 48vh, 520px); overflow: hidden; background: #E7E2D9; }
.wgb-project--wide .wgb-project__media { height: clamp(300px, 60vh, 640px); }
.wgb-project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.wgb-project:hover .wgb-project__media img { transform: scale(1.03); }
.wgb-project__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 18px; margin-top: 18px; border-top: 1px solid rgba(23,23,23,.14); }
.wgb-project__meta h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.wgb-project__meta h3 span { color: #8A8479; }
.wgb-project__more { font-size: 14px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #D08D57; }
.wgb-project__scope { margin-top: 8px; font-size: 16px; line-height: 1.6; color: #5A554D; }
.wgb-projects__all { margin-top: clamp(36px, 4vw, 56px); }
.wgb-empty { padding: 48px 0; border-top: 1px solid rgba(23,23,23,.14); color: #5A554D; }

/* ---------- Proces ---------- */
.wgb-step { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 40px; padding: clamp(26px, 3vw, 40px) 0; border-bottom: 1px solid rgba(23,23,23,.14); }
.wgb-step:first-child { border-top: 1px solid rgba(23,23,23,.14); }
.wgb-step__num { font-family: 'Archivo', sans-serif; font-size: clamp(36px, 4.5vw, 58px); line-height: 1; letter-spacing: -0.03em; color: #D08D57; }
.wgb-step h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.wgb-step p { font-size: 16px; line-height: 1.65; color: #5A554D; }

/* ---------- CTA ---------- */
.wgb-ctaband { text-align: center; }
.wgb-ctaband__inner { max-width: 1000px; margin: 0 auto; padding: clamp(72px, 9vw, 140px) clamp(20px, 4vw, 64px); }
.wgb-ctaband h2 { font-size: clamp(28px, 3.8vw, 48px); line-height: 1.15; }
.wgb-ctaband p { margin: 22px auto 0; max-width: 620px; }
.wgb-ctaband .wgb-btn { margin-top: 36px; }

/* ---------- FAQ ---------- */
.wgb-faq__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(28px, 4vw, 72px); align-items: start; }
.wgb-faq__intro h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.12; }
.wgb-faq__intro p { margin-top: 20px; max-width: 380px; font-size: 16px; line-height: 1.65; color: #5A554D; }
.wgb-faq__intro a { color: #D08D57; border-bottom: 1px solid rgba(208,141,87,.4); }
.wgb-faq__list { border-top: 1px solid rgba(23,23,23,.14); }
.wgb-faq__item { border-bottom: 1px solid rgba(23,23,23,.14); }
.wgb-faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 24px 0; background: transparent; border: 0; text-align: left; cursor: pointer; color: #171717;
  font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 18px; line-height: 1.4; letter-spacing: -0.01em;
  transition: color .2s ease;
}
.wgb-faq__q:hover { color: #D08D57; }
.wgb-faq__sign { flex-shrink: 0; font-family: 'Instrument Sans', sans-serif; font-weight: 400; color: #D08D57; }
.wgb-faq__a { display: none; padding: 0 0 26px; max-width: 640px; font-size: 16px; line-height: 1.7; color: #5A554D; }
.wgb-faq__item.is-open .wgb-faq__a { display: block; animation: wgbFade .3s ease both; }

/* ---------- Kontakt ---------- */
.wgb-contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.wgb-contact h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.14; }
.wgb-contact__eyebrow { margin-bottom: 22px; }
.wgb-contact__sub { margin-top: 22px; max-width: 460px; font-size: 17px; line-height: 1.65; }
.wgb-contact__list { margin-top: 44px; display: flex; flex-direction: column; }
.wgb-contact__item { padding: 20px 0; border-top: 1px solid rgba(245,242,236,.18); }
.wgb-contact__item:first-child { border-top: 0; }
.wgb-contact__label { font-size: 11px; line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: #8A8479; margin-bottom: 6px; }
.wgb-contact__value { font-family: 'Archivo', sans-serif; font-weight: 500; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; color: #F5F2EC; }
.wgb-contact__value--sm { font-family: 'Instrument Sans', sans-serif; font-weight: 400; font-size: 17px; line-height: 1.5; }
.wgb-dark .wgb-contact__value { color: #F5F2EC; }
.wgb-form { background: #F5F2EC; color: #171717; padding: clamp(24px, 3.5vw, 48px); }
.wgb-form h3 { font-size: 22px; margin-bottom: 8px; }
.wgb-form__hint { font-size: 15px; line-height: 1.6; color: #5A554D; }

/* Stylowanie formularzy wtyczek (WPForms / Fluent Forms / CF7) pod projekt */
.wgb-form input[type="text"], .wgb-form input[type="tel"], .wgb-form input[type="email"],
.wgb-form input[type="number"], .wgb-form select, .wgb-form textarea {
  width: 100%; min-height: 52px; padding: 14px 0;
  font: 400 16px/1.4 'Instrument Sans', sans-serif; color: #171717;
  background: transparent; border: 0; border-bottom: 1px solid rgba(23,23,23,.22);
  border-radius: 0; outline: none; box-shadow: none; transition: border-color .2s ease;
}
.wgb-form textarea { min-height: 120px; resize: vertical; }
.wgb-form input:focus, .wgb-form select:focus, .wgb-form textarea:focus { border-bottom-color: #D08D57; }
.wgb-form label, .wgb-form .wpforms-field-label, .wgb-form .ff-el-input--label label {
  display: block; font: 400 11px/1 'Instrument Sans', sans-serif; letter-spacing: .16em;
  text-transform: uppercase; color: #8A8479; margin-bottom: 4px;
}
.wgb-form ::placeholder { color: #A8A29A; }
.wgb-form .wpforms-field, .wgb-form .ff-el-group, .wgb-form .wpcf7-form p { margin-bottom: 26px; }
.wgb-form input[type="submit"], .wgb-form button[type="submit"], .wgb-form .wpforms-submit, .wgb-form .ff-btn-submit {
  width: auto; min-height: 0; padding: 20px 28px; background: #171717; color: #F5F2EC; border: 1px solid #171717;
  font: 400 13px/1 'Instrument Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; border-radius: 0; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.wgb-form input[type="submit"]:hover, .wgb-form button[type="submit"]:hover, .wgb-form .wpforms-submit:hover, .wgb-form .ff-btn-submit:hover {
  background: #D08D57; border-color: #D08D57; color: #171717;
}
.wgb-form .wpforms-error, .wgb-form .ff-el-is-error .text-danger, .wgb-form .wpcf7-not-valid-tip {
  font-size: 13px; line-height: 1.4; color: #9B3B2E;
}
.wgb-form input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: #D08D57; }
.wgb-form .wpforms-field-checkbox label, .wgb-form .ff-el-form-check label {
  display: inline; text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.55; color: #5A554D;
}

/* ---------- Treść (podstrony) ---------- */
.wgb-page { padding: clamp(56px, 8vw, 120px) 0; }
.wgb-page__head { max-width: 860px; margin-bottom: clamp(32px, 4vw, 56px); }
.wgb-page h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; }
.wgb-prose { max-width: 760px; }
.wgb-prose h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 48px 0 14px; }
.wgb-prose h3 { font-size: 20px; margin: 32px 0 10px; }
.wgb-prose p, .wgb-prose li { font-size: 17px; line-height: 1.75; color: #3E3A34; }
.wgb-prose p, .wgb-prose ul, .wgb-prose ol { margin-bottom: 18px; }
.wgb-prose a { color: #171717; border-bottom: 1px solid #D08D57; }
.wgb-prose img, .wgb-prose figure { margin: 32px 0; }
.wgb-prose .wp-block-gallery { margin: 40px 0; }
.wgb-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 20px 0; border-top: 1px solid rgba(23,23,23,.14); border-bottom: 1px solid rgba(23,23,23,.14); margin-bottom: clamp(32px, 4vw, 56px); }
.wgb-meta div { min-width: 180px; }
.wgb-meta__label { font-size: 11px; line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: #8A8479; margin-bottom: 6px; }
.wgb-meta__value { font-size: 17px; line-height: 1.5; }
.wgb-back { display: inline-block; margin-top: 48px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #D08D57; }

/* ---------- Footer ---------- */
.wgb-footer { background: #171717; color: #F5F2EC; border-top: 1px solid rgba(245,242,236,.14); }
.wgb-footer__inner { padding: clamp(48px, 6vw, 88px) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: clamp(32px, 4vw, 64px); }
.wgb-footer .wgb-logo__mark { border-color: rgba(245,242,236,.5); }
.wgb-footer__about { margin-top: 18px; max-width: 280px; font-size: 16px; line-height: 1.6; color: #C9C4BA; }
.wgb-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wgb-footer a { color: #C9C4BA; font-size: 15px; }
.wgb-footer a:hover { color: #D08D57; }
.wgb-footer__contact { display: flex; flex-direction: column; gap: 12px; }
.wgb-footer__contact a { color: #F5F2EC; }
.wgb-footer__contact p { color: #8A8479; font-size: 15px; }
.wgb-footer__bottom { padding: 22px 0 clamp(32px, 4vw, 48px); border-top: 1px solid rgba(245,242,236,.14); font-size: 13px; line-height: 1.5; color: #8A8479; }

/* ---------- Animacje ---------- */
@keyframes wgbFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .wgb-project__media img, .wgb-service__media img { transition: none; }
}

/* ---------- Responsywność ---------- */
@media (max-width: 1080px) {
  .wgb-nav { display: none; }
  .wgb-burger { display: flex; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wgb-hero__media { height: 52vh; }
  .wgb-values__grid p { padding: 12px 0; border-left: 0; border-top: 1px solid rgba(23,23,23,.14); }
  .wgb-values__grid p:first-child { border-top: 0; }
  .wgb-btn { width: 100%; text-align: center; }
  .wgb-hero__actions .wgb-btn { width: 100%; }
  .wgb-meta div { min-width: 100%; }
}
