/* Nowa strona główna M-Instalacje (WWW-004) — kierunek B + A.
   Kolorystyka marki bez zmian; nacisk na czytelność (odbiorcy 22–80 lat) i szybki kontakt. */

:root {
  --bg: #f8f7f2;
  --bg-alt: #eef2ef;
  --panel: #ffffff;
  --line: rgba(19, 44, 39, 0.14);
  --ink: #132c27;
  --ink-soft: #3d524d;
  --green: #25bd7f;
  --green-hover: #2fd08e;
  --green-dark: #11835b;
  --mint: #0d7654;
  --mint-bg: #e7f7ef;
  --brick: #d9764a;
  --sun: #f5c45a;
  --teal: #3aa1c8;
  --night: #0c1f1b;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --wrap: 1200px;
  --r: 20px;
  --shadow: 0 30px 60px -30px rgba(19, 44, 39, .4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.125rem/1.6 var(--font-body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 58px; padding: 0 28px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1.15rem/1.15 var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn--green { background: var(--green); color: var(--ink); box-shadow: 0 12px 26px -12px rgba(37,189,127,.8); }
.btn--green:hover { background: var(--green-hover); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--light { background: #fff; color: var(--ink); }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- Nagłówek ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(248,247,242,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; }
.top__logo img { height: 44px; width: auto; }
.top__nav { display: flex; gap: 6px; font-weight: 500; }
.top__nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.top__nav a:hover { background: var(--bg-alt); color: var(--mint); }
.top__phone { display: inline-flex; align-items: center; gap: 10px; font: 700 1.2rem/1 var(--font-display); text-decoration: none; padding: 13px 20px; border-radius: 999px; background: var(--ink); color: #fff; white-space: nowrap; }
.top__phone svg { width: 20px; height: 20px; }

/* ---------- Hero: zdjęcie realizacji + formularz ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(12,31,27,.86) 0%, rgba(12,31,27,.6) 45%, rgba(12,31,27,.25) 100%),
  linear-gradient(180deg, rgba(12,31,27,0) 60%, rgba(12,31,27,.55) 100%); }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 64px); align-items: center; padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 72px); }
.hero__kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); padding: 8px 16px; border-radius: 999px; }
.hero__kicker .stars { color: var(--sun); letter-spacing: 2px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.8rem); margin: 22px 0 0; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero__lead { font-size: 1.3rem; color: rgba(255,255,255,.9); margin: 22px 0 0; max-width: 32em; }
.hero__ticks { display: grid; gap: 12px; margin-top: 28px; font-weight: 600; font-size: 1.15rem; }
.hero__ticks li { display: flex; gap: 12px; align-items: center; }
.hero__ticks svg { width: 26px; height: 26px; flex: none; color: var(--green); }
.hero__call { margin-top: 30px; color: #fff; }

/* Formularz-quiz */
.quiz { background: var(--panel); color: var(--ink); border-radius: 26px; padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow); }
.quiz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.quiz__head h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); }
.quiz__step { font-weight: 600; color: var(--mint); white-space: nowrap; }
.quiz__bar { height: 8px; border-radius: 99px; background: var(--bg-alt); overflow: hidden; margin: 16px 0 20px; }
.quiz__bar i { display: block; height: 100%; width: 50%; background: var(--green); border-radius: inherit; transition: width .5s ease; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 0; padding: 0; margin: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; font: 600 1.12rem/1.2 var(--font-body); transition: border-color .2s, background .2s, transform .2s; }
.opt svg { width: 34px; height: 34px; flex: none; color: var(--green-dark); }
.opt:hover span { border-color: var(--green); transform: translateY(-2px); }
.opt input:checked + span { border-color: var(--green-dark); background: var(--mint-bg); box-shadow: inset 0 0 0 1px var(--green-dark); }
.opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.quiz__fields { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field input { width: 100%; min-height: 58px; border: 2px solid var(--line); border-radius: 14px; padding: 0 16px; font: 400 1.15rem var(--font-body); color: var(--ink); background: #fff; }
.field input:focus { border-color: var(--green-dark); outline: none; box-shadow: 0 0 0 4px rgba(37,189,127,.2); }
.field input:user-invalid { border-color: #c2412b; }
.consent { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.consent input { width: 26px; height: 26px; margin: 0; accent-color: var(--green-dark); }
.quiz .btn { width: 100%; margin-top: 18px; }
.quiz__back { background: none; border: 0; padding: 10px 0 0; font: 600 1rem var(--font-body); color: var(--mint); cursor: pointer; text-decoration: underline; }
.quiz__note { margin-top: 12px; color: var(--ink-soft); font-size: .98rem; text-align: center; }
.quiz__status { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
.quiz__status--err { background: #fdeeea; color: #8f2f1c; }
.quiz [hidden] { display: none !important; }

/* ---------- Pasek zaufania ---------- */
.trust { background: var(--ink); color: #fff; }
.trust ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 26px 0; }
.trust li { display: flex; align-items: center; gap: 14px; font-weight: 600; line-height: 1.3; }
.trust b { display: block; font: 800 1.6rem/1 var(--font-display); color: var(--green); margin-bottom: 4px; }
.trust svg { width: 36px; height: 36px; flex: none; color: var(--green); }

/* ---------- Sekcje ---------- */
.section { padding: clamp(44px, 6vw, 84px) 0; }
.section--alt { background: var(--bg-alt); }
.eyebrow { font: 600 1rem/1.2 var(--font-body); color: var(--mint); letter-spacing: .02em; margin-bottom: 12px; }
.h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); max-width: 22ch; }
.sub { font-size: 1.2rem; color: var(--ink-soft); margin-top: 16px; max-width: 40em; }
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.more { font-weight: 600; color: var(--mint); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* Oferta – kafle ze zdjęciami */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.tile { position: relative; border-radius: var(--r); overflow: hidden; min-height: 460px; color: #fff; text-decoration: none; display: flex; align-items: flex-end; isolation: isolate; }
.tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.06); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12,31,27,0) 30%, rgba(12,31,27,.92)); }
.tile__txt { padding: 28px; }
.tile h3 { font-size: 2rem; }
.tile p { margin-top: 8px; color: rgba(255,255,255,.9); }
.tile .go { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 600; color: var(--sun); }

/* Jak działa magazyn – schemat */
.flow { display: grid; grid-template-columns: 1fr 1.1fr; border-radius: 30px; overflow: hidden; }
.flow__txt { background: var(--ink); color: #fff; padding: clamp(32px, 5vw, 64px); display: grid; align-content: center; gap: 18px; }
.flow__txt .eyebrow { color: var(--green); margin: 0; }
.flow__txt p { color: rgba(255,255,255,.85); }
.flow__list { display: grid; gap: 14px; margin: 4px 0 8px; }
.flow__list li { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; }
.flow__list i { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 6px; }
.flow__pic { background: linear-gradient(180deg, #dff1f8, #f4f8f1); display: grid; place-items: center; padding: 24px; }
.flow__pic svg { width: 100%; max-width: 560px; }
.wire { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 16; animation: run 1.1s linear infinite; }
@keyframes run { to { stroke-dashoffset: -18; } }

/* Dotacje */
.grant { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.g { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 30px; border-radius: var(--r); background: var(--panel); border: 2px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.g:hover { border-color: var(--green-dark); transform: translateY(-4px); box-shadow: var(--shadow); }
.g h3 { font-size: 1.7rem; }
.g p { color: var(--ink-soft); }
.g .go { font-weight: 600; color: var(--mint); }
.g__tag { justify-self: start; background: var(--sun); color: var(--ink); font-weight: 600; font-size: .95rem; padding: 6px 12px; border-radius: 999px; }
.g--hot { background: var(--mint-bg); border-color: var(--green); }
.grant-note { margin-top: 22px; color: var(--ink-soft); font-size: 1rem; }

/* Kroki */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; counter-reset: s; }
.step { background: var(--panel); border-radius: var(--r); padding: 30px; border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: var(--ink); font: 800 1.4rem var(--font-display); margin-bottom: 20px; }
.step h3 { font-size: 1.45rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); }

/* Realizacje – przewijany pasek */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(320px, calc((100% - 36px) / 3)); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; margin-top: 40px; scrollbar-width: thin; }
.shot { margin: 0; scroll-snap-align: start; position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/5; background: var(--bg-alt); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 12px 16px; font-weight: 600; line-height: 1.3; }
.shot small { display: block; color: var(--mint); font-size: .92rem; }
.gallery__nav { display: flex; gap: 10px; }
.gallery__nav button { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line); background: #fff; font-size: 1.4rem; cursor: pointer; }
.gallery__nav button:hover { border-color: var(--green-dark); }

/* Sprzęt */
.brands { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.brand { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); min-height: 320px; }
.brand img { width: 100%; height: 0; min-height: 100%; object-fit: cover; }
.brand__txt { padding: 28px; }
.brand h3 { font-size: 1.9rem; }
.brand p { color: var(--ink-soft); margin-top: 8px; }
.brand dl { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 0; }
.brand dt { font-size: .9rem; color: var(--ink-soft); }
.brand dd { margin: 2px 0 0; font-weight: 600; }

/* Opinie */
.reviews { display: grid; grid-template-columns: .8fr 2fr; gap: 28px; align-items: start; margin-top: 44px; }
.score { background: var(--ink); color: #fff; border-radius: var(--r); padding: 32px; }
.score b { display: block; font: 800 4.4rem/1 var(--font-display); }
.score .stars { color: var(--sun); font-size: 1.6rem; letter-spacing: 3px; margin: 8px 0; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.q { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: grid; gap: 16px; align-content: space-between; margin: 0; }
.q blockquote { margin: 0; font-size: 1.1rem; }
.q figcaption { font-weight: 600; color: var(--ink-soft); }

/* FAQ */
#pytania > .wrap { max-width: 900px; }
.faq { display: grid; gap: 12px; margin-top: 32px; }
.faq details { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; }
.faq details[open] { border-color: var(--green); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 26px; font: 700 1.3rem/1.3 var(--font-display); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 2rem; line-height: 1; color: var(--green-dark); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 26px 24px; color: var(--ink-soft); }

/* CTA końcowe */
.final { position: relative; color: #fff; overflow: hidden; isolation: isolate; text-align: center; }
.final img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(12,31,27,.82); }
.final .h2 { margin-inline: auto; }
.final p { color: rgba(255,255,255,.88); font-size: 1.25rem; margin: 18px auto 32px; max-width: 34em; }
.final__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.final .btn--ghost { color: #fff; }

/* Stopka */
.foot { background: var(--night); color: rgba(255,255,255,.82); padding: 56px 0 120px; font-size: 1.05rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot img { height: 44px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.foot h3 { font: 700 1.15rem var(--font-display); color: #fff; margin-bottom: 12px; }
.foot li { margin: 8px 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--green); text-decoration: underline; }
.foot__legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .95rem; }

/* Dolny pasek na telefonie */
.sticky-call { display: none; }

/* ---------- Responsywność ---------- */
@media (max-width: 1080px) {
  .top__nav { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .brand { grid-template-columns: 1fr; min-height: 0; }
  .brand img { height: 240px; min-height: 0; }
}
@media (max-width: 900px) {
  .hero__grid, .flow, .foot__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero__ticks { display: none; }
  .hero__call { display: none; }
  .trust ul { grid-template-columns: 1fr 1fr; }
  .tiles, .grant, .brands, .quotes { grid-template-columns: 1fr; }
  .tile { min-height: 320px; }
  .gallery { grid-auto-columns: 78%; }
  .gallery__nav { display: none; }
  .top__phone span { display: none; }
  .top__phone { padding: 14px; }
  .sticky-call { display: flex; gap: 10px; position: fixed; z-index: 60; left: 10px; right: 10px; bottom: 10px; }
  .sticky-call { transition: transform .35s ease, opacity .35s ease; }
  .sticky-call.is-hidden { transform: translateY(130%); opacity: 0; pointer-events: none; }
  .sticky-call .btn { flex: 1; min-height: 58px; padding: 0 12px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45); }
}
@media (max-width: 520px) {
  body { font-size: 1.1rem; }
  .opts { gap: 10px; }
  .opt span { flex-direction: column; justify-content: center; text-align: center; gap: 6px; min-height: 96px; padding: 10px 8px; font-size: 1.02rem; }
  .opt svg { width: 30px; height: 30px; }
  .hero__grid { padding-top: 28px; }
  .hero__lead { font-size: 1.15rem; }
  .steps { grid-template-columns: 1fr; }
  .trust ul { gap: 18px; }
  .trust li { font-size: 1rem; }
}

/* Animacje tylko, gdy ktoś ich nie wyłączył */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .wire { stroke-dasharray: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); }
}
