/* =========================================================
   Rozwiązania Ajax — /rozwiazania, /rozwiazania/<rozwiązanie>, /jak-dziala-ajax
   (page-rozwiazania.php, page-rozwiazanie.php, template-parts/solutions/, dane: inc/solutions.php)
   ========================================================= */

/* ---------- Góra: ciemna scena ze zdjęciem Ajax ---------- */
.sol-hero { background: #000; color: #fff; padding-top: clamp(28px, 4.7vw, 60px); text-align: center; overflow: hidden; }
.sol-hero__text { display: grid; justify-items: center; gap: 22px; position: relative; z-index: 1; }
.sol-hero h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); }
.sol-hero .lead { color: #a1a1a6; max-width: 32em; }
.sol-hero .hero__actions { margin-top: 4px; }
.sol-hero__img { margin: clamp(-24px, -2vw, 0px) auto 0; max-width: 1600px; }
.sol-hero__img img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 82%, transparent 100%);
}
.sol-hero--plain { background: var(--paper); color: var(--ink); padding-bottom: 0; }
.sol-hero--plain .lead { color: var(--ink-2); }

.sol-facts {
  list-style: none; margin-block: 0; padding: 22px 0 clamp(20px, 3.2vw, 32px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
  font-size: .9375rem; color: #a1a1a6;
}
.sol-hero--plain .sol-facts { color: var(--ink-2); padding-top: clamp(16px, 2.1vw, 20px); }
.sol-facts li { text-wrap: balance; } /* znaczek w linii z tekstem — przy dwóch liniach (telefon) zostaje przy tekście */
.sol-facts li::before { content: ""; display: inline-block; width: 12px; height: 7px; margin: 0 8px 0 0; vertical-align: .24em; border-left: 2px solid var(--armed); border-bottom: 2px solid var(--armed); transform: rotate(-45deg); }
.sol-hero--plain .sol-facts li::before { border-color: var(--armed-deep); }
.sol-facts a { color: inherit; text-decoration: underline; text-decoration-color: rgba(161,161,166,.5); text-underline-offset: 4px; }
.sol-facts a:hover { color: #fff; }
.sol-hero--plain .sol-facts a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .sol-hero__text > * { animation: rise .9s var(--ease) both; }
  .sol-hero__text > :nth-child(2) { animation-delay: .06s; }
  .sol-hero__text > :nth-child(3) { animation-delay: .12s; }
  .sol-hero__img img { animation: sol-fade 1.4s var(--ease) .15s both; }
}
@keyframes sol-fade { from { opacity: 0; transform: scale(1.03); } }

@media (max-width: 700px) {
  .sol-hero__img { margin-top: 8px; }
  .sol-hero__img img { aspect-ratio: 1 / .96; object-fit: cover; }
}

/* ---------- Karty ze zdjęciami ---------- */
.sol-feat { padding-block: var(--sec) 0; }
.sol-feat__title { text-align: center; margin-bottom: clamp(20px, 3.2vw, 36px); }
.sol-feat__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sol-card { background: var(--mist); border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.sol-card__img { aspect-ratio: 16 / 10; overflow: hidden; background: #e9eaec; }
.sol-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sol-card:hover .sol-card__img img { transform: scale(1.03); }
.sol-card__img--product { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #fdfdfd 0, #eceef1 75%); }
.sol-card__img--product img { width: auto; height: 78%; object-fit: contain; }
.sol-card__text { padding: clamp(20px, 3vw, 30px); display: grid; gap: 8px; align-content: start; }
.sol-card h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.02em; }
.sol-card p { color: var(--ink-2); max-width: 30em; }
@media (max-width: 760px) { .sol-feat__grid { grid-template-columns: 1fr; } }

/* ---------- Liczby ---------- */
.sol-stats { padding-block: var(--sec) 0; }
.sol-stats__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; border-top: 1px solid var(--line); padding-top: 32px; }
.sol-stats li { display: grid; gap: 6px; align-content: start; }
.sol-stats strong { font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1; font-weight: 650; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.sol-stats strong small { font-size: .42em; font-weight: 600; letter-spacing: -0.01em; margin-inline: .12em; color: var(--ink-2); }
.sol-stats strong small:first-child { margin-left: 0; }
.sol-stats span { color: var(--ink-2); max-width: 15em; }
.sol-note { margin-top: 24px; font-size: .8125rem; color: var(--ink-3); }
@media (max-width: 860px) { .sol-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Co robimy my ---------- */
.sol-svc .sec-head { max-width: 760px; }
.sol-svc__foot { margin-top: clamp(20px, 2.6vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--mist); }
.sol-svc__foot .hero__actions { margin: 0; justify-content: flex-start; }
.sol-proof { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 10px 32px; font-size: .9375rem; font-weight: 520; }
.sol-proof li { display: flex; align-items: center; gap: 10px; }
.sol-proof li::before { content: ""; width: 12px; height: 7px; flex: none; margin-top: -4px; border-left: 2px solid var(--armed-deep); border-bottom: 2px solid var(--armed-deep); transform: rotate(-45deg); }
.sol-proof a { color: inherit; text-decoration-thickness: 1.5px; }
@media (max-width: 900px) { .sol-svc__foot { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sol-proof { grid-template-columns: 1fr; } }

.sol-prods .lead { max-width: 30em; }
.sol-text { padding-bottom: var(--sec); }

/* ---------- Zobacz też / kafelki rozwiązań ---------- */
.sol-more { padding-block: clamp(28px, 4.2vw, 52px); }
.sol-more .sec-head { margin-bottom: 28px; }
.sol-more__nav { display: flex; align-items: center; gap: 20px; }
.sol-rail-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: #e2e4e8; color: var(--ink);
  transition: background-color .2s, opacity .2s;
}
.sol-rail-btn:hover { background: #d6d9de; }
.sol-rail-btn:disabled { opacity: .35; cursor: default; }
.sol-rail-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sol-more__chips { margin-top: 28px; }

.sol-tiles { list-style: none; margin: 0; padding: 0; }
.sol-tiles--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sol-tiles--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sol-tiles--rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 260px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(var(--gutter), (100% - var(--wrap)) / 2) 6px; scroll-padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
}
.sol-tiles--rail::-webkit-scrollbar { display: none; }
.sol-tiles--rail li { scroll-snap-align: start; display: grid; }
@media (max-width: 1000px) { .sol-tiles--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sol-tiles--grid, .sol-tiles--two { grid-template-columns: 1fr; } }

.sol-tile {
  position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%;
  border-radius: 24px; overflow: hidden; background: #0b0c0e; color: #fff; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.sol-tile:hover { box-shadow: 0 22px 44px -26px rgba(0,0,0,.55); }
.sol-tile:active { transform: scale(.985); }
.sol-tile__img { display: block; aspect-ratio: 1; overflow: hidden; background: #000; }
.sol-tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sol-tile:hover .sol-tile__img img { transform: scale(1.04); }
.sol-tile__text { display: grid; gap: 4px; align-content: start; padding: 16px 44px 20px 20px; }
.sol-tile strong { font-size: 1.0625rem; font-weight: 620; letter-spacing: -0.015em; }
.sol-tile__text span { font-size: .875rem; line-height: 1.4; color: #a1a1a6; }
.sol-tile__arrow { position: absolute; right: 16px; bottom: 20px; width: 20px; height: 20px; fill: none; stroke: #a1a1a6; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease), stroke .3s; }
.sol-tile:hover .sol-tile__arrow { transform: translateX(3px); stroke: #fff; }
.sol-tile--big .sol-tile__img { aspect-ratio: 4 / 3; }
.sol-tile--big .sol-tile__text { padding: 20px 52px 26px 24px; }
.sol-tile--big strong { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.02em; }
.sol-tile--big .sol-tile__text span { font-size: .9375rem; }
.sol-tile--stat .sol-tile__img { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1d2a22 0, #000 70%); }
.sol-tile__stat { display: grid; justify-items: center; gap: 6px; color: #a1a1a6; font-size: .9375rem; }
.sol-tile__stat b { font-size: clamp(3rem, 7vw, 5rem); line-height: 1; font-weight: 650; letter-spacing: -0.04em; color: #fff; }

/* ---------- Przegląd /rozwiazania ---------- */
.sol-hero--hub .sol-hero__text { padding-bottom: 4px; }
.sol-hub { padding-block: clamp(24px, 3.7vw, 48px) 0; }
.sol-hub__title { text-align: center; margin-bottom: clamp(14px, 2.1vw, 24px); }
.sol-banner { padding-block: 16px 0; }
.sol-banner__card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: clamp(20px, 4vw, 56px);
  border-radius: var(--radius-lg); overflow: hidden; background: #000; color: #fff; text-decoration: none; padding-right: clamp(20px, 5vw, 64px);
}
.sol-banner__img { display: block; aspect-ratio: 1 / .9; overflow: hidden; }
.sol-banner__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sol-banner__card:hover .sol-banner__img img { transform: scale(1.03); }
.sol-banner__text { display: grid; gap: 14px; justify-items: start; padding-block: 28px; }
.sol-banner__text strong { font-size: clamp(1.875rem, 4vw, 3rem); line-height: 1.06; font-weight: 650; letter-spacing: -0.03em; }
.sol-banner__text > span:not(.more-link) { color: #a1a1a6; font-size: 1.0625rem; max-width: 28em; }
.sol-banner .more-link { color: var(--armed); }
@media (max-width: 760px) {
  .sol-banner__card { grid-template-columns: 1fr; padding: 0 0 8px; }
  .sol-banner__text { padding: 4px 22px 22px; }
}

.sol-objs { padding-block: var(--sec) 0; }
.sol-objs__rail {
  list-style: none; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 max(var(--gutter), calc((100% - var(--wrap)) / 2)) 6px; scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
}
.sol-objs__rail::-webkit-scrollbar { display: none; }
.sol-objs__rail li { scroll-snap-align: start; display: grid; }
.sol-obj { display: grid; gap: 4px; align-content: start; text-decoration: none; color: var(--ink); }
.sol-obj__img { display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--mist); margin-bottom: 10px; }
.sol-obj__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.sol-obj:hover .sol-obj__img img { transform: scale(1.04); }
.sol-obj strong { font-weight: 620; letter-spacing: -0.012em; }
.sol-obj span:last-child { color: var(--ink-2); font-size: .9375rem; }
.sol-about { padding-block: var(--sec) 0; }

/* ---------- Źródła ---------- */
.sol-src { padding-block: 20px 28px; font-size: .8125rem; color: var(--ink-3); }
.sol-src a { color: inherit; }

/* =========================================================
   Pokazy — wspólne
   ========================================================= */
.sol-demo { background: var(--stage); color: var(--stage-ink); padding-block: var(--sec); margin-top: var(--sec); }
.sol-demo .lead { color: var(--stage-ink-2); }
.sol-demo--light { background: var(--paper); color: var(--ink); margin-top: 0; padding-top: clamp(20px, 3.2vw, 36px); }

.sol-stage {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #17191d 0%, #0e0f12 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  padding: 64px clamp(12px, 3vw, 32px) clamp(20px, 3vw, 32px);
}
.sol-stage svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.sol-status {
  position: absolute; top: 18px; left: 20px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.06); font-size: .875rem; font-weight: 560; color: var(--stage-ink);
}
.sol-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--armed); box-shadow: 0 0 0 4px rgba(34,197,94,.18); transition: background-color .3s, box-shadow .3s; }
.is-alarm .sol-status i { background: var(--alarm); box-shadow: 0 0 0 4px rgba(239,68,68,.25); }
.is-warn .sol-status i { background: var(--app-yellow); box-shadow: 0 0 0 4px rgba(242,197,68,.22); }

.sol-demo__actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.btn--mcp { background: #dc2626; color: #fff; }
.btn--mcp:hover { background: #b91c1c; }

/* Powiadomienia jak w aplikacji Ajax */
.sol-demo__pushes { display: grid; gap: 8px; justify-items: center; margin-top: 16px; min-height: 0; }
.sol-demo__pushes:empty { display: none; }
/* Na komputerze powiadomienia mają własną kolumnę obok sceny (nie zasłaniają rysunku), na telefonie są pod sceną. */
@media (min-width: 861px) {
  .sol-stage:has(.sol-demo__pushes--stage) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: center; }
  .sol-demo__pushes--stage {
    display: grid !important; align-self: stretch; align-content: start; justify-items: stretch; gap: 8px; margin: 0; padding: 12px; min-height: 180px;
    border-radius: 20px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  }
  .sol-demo__pushes--stage:empty::before { content: attr(data-empty); /* tekst w HTML — tłumaczy się z resztą strony */ padding: 6px 8px; color: #6f757e; font-size: .875rem; line-height: 1.4; }
  .sol-demo__pushes--stage .sol-push { width: 100%; }
}
.sol-push {
  width: min(360px, 100%); display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start;
  padding: 10px 14px; border-radius: 18px; text-align: left; color: #fff;
  background: rgba(58,58,62,.86); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
  animation: push-in .5s var(--ease) both;
}
@keyframes push-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.sol-push__app img { display: block; width: 36px; height: 36px; border-radius: 9px; } /* ikona aplikacji Ajax Security System */
.sol-push__body { display: grid; min-width: 0; }
.sol-push__top { display: flex; justify-content: space-between; font-size: 12px; color: #d1d1d6; }
.sol-push__title { font-size: 14px; font-weight: 600; margin-top: 1px; }
.sol-push__text { font-size: 13.5px; color: #e5e5ea; line-height: 1.3; }

/* Przełączniki (pigułki) */
.cam__tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.sol-toggle {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px;
  background: #1f2226; color: var(--stage-ink); font-size: .9375rem; font-weight: 560;
  transition: background-color .2s, color .2s, transform .12s;
}
.sol-toggle:hover { background: #2a2e33; }
.sol-toggle:active { transform: scale(.97); }
.sol-toggle[aria-pressed="true"] { background: var(--stage-ink); color: var(--ink); }
.sol-toggle--reset { background: none; box-shadow: inset 0 0 0 1.5px #3a3e45; }
.sol-why { margin: 16px auto 0; max-width: 40em; min-height: 3em; text-align: center; color: var(--stage-ink-2); text-wrap: balance; }

/* Przełącznik segmentowy (ciemny) */
.sol-tabs { margin-top: clamp(28px, 4vw, 40px); display: grid; justify-items: center; gap: 16px; }
.sol-seg { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 4px; border-radius: 999px; background: #1a1c20; }
.sol-seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--stage-ink-2); font-weight: 560; font-size: .9375rem; transition: background-color .25s, color .25s; }
.sol-seg button:hover { color: var(--stage-ink); }
.sol-seg button[aria-selected="true"], .sol-seg button[aria-checked="true"] { background: var(--stage-ink); color: var(--ink); }
.sol-tabs__panel { max-width: 36em; text-align: center; color: var(--stage-ink-2); min-height: 3em; text-wrap: balance; }
@media (max-width: 560px) { .sol-seg { border-radius: 22px; } .sol-seg button { padding: 0 12px; } } /* trzy tryby w jednym rzędzie od 360 px */

/* =========================================================
   Droga alarmu (flow)
   ========================================================= */
.flow__line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; position: relative; }
.flow__line::before, .flow__line::after {
  content: ""; position: absolute; top: 44px; left: calc(100% / 12); right: calc(100% / 12); height: 2px; border-radius: 2px; background: #2a2d33;
}
.flow__line::after { background: linear-gradient(90deg, var(--armed), var(--app-mint)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .45s linear; }
.flow__step { position: relative; z-index: 1; display: grid; }
.flow__node {
  display: grid; justify-items: center; gap: 6px; padding: 0 4px 10px; border: 0; background: none; color: var(--stage-ink); text-align: center;
}
.flow__ico {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center;
  background: #16181c; box-shadow: inset 0 0 0 1.5px #2a2d33, 0 0 0 6px var(--stage);
  transition: box-shadow .35s, background-color .35s, transform .35s var(--ease);
}
.flow__ico img { width: 64px; height: 64px; object-fit: contain; }
.flow__ico svg { width: 34px; height: 34px; fill: none; stroke: var(--stage-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow__node strong { font-size: 1rem; font-weight: 620; margin-top: 6px; }
.flow__node > span:last-child { font-size: .875rem; color: var(--stage-ink-2); }
.flow__node:hover .flow__ico { transform: translateY(-2px); }
.flow__node[aria-pressed="true"] .flow__ico { box-shadow: inset 0 0 0 2px var(--stage-ink), 0 0 0 6px var(--stage); }
.flow__step.is-on .flow__ico { background: #10261a; box-shadow: inset 0 0 0 2px var(--armed), 0 0 0 6px var(--stage), 0 0 28px 4px rgba(34,197,94,.35); }
.flow__step.is-on .flow__node > span:last-child { color: var(--armed); }
.flow__info { margin: 22px auto 0; max-width: 38em; min-height: 3.2em; text-align: center; color: var(--stage-ink-2); font-size: 1.0625rem; text-wrap: balance; }
@media (max-width: 860px) {
  .flow__line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .flow__line::before, .flow__line::after { display: none; }
  .flow__ico { width: 76px; height: 76px; }
  .flow__ico img { width: 54px; height: 54px; }
}

/* =========================================================
   Zalanie (water)
   ========================================================= */
.water__svg { max-width: 760px; margin-inline: auto; }
.w-label { fill: #8b9099; font-size: 13px; font-weight: 520; }
.w-label--mid { text-anchor: middle; }
.w-pipe { fill: #1b1d21; stroke: #33363c; stroke-width: 1.5; }
.w-flow { stroke: var(--water); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 10 14; animation: w-flow 1s linear infinite; transition: opacity .6s; }
@keyframes w-flow { to { stroke-dashoffset: -24; } }
.water[data-state="closed"] .w-flow--out { animation-play-state: paused; opacity: .18; }
.water[data-state="closed"] .w-flow--in { animation-play-state: paused; }
.w-body, .w-fit { fill: #24272c; stroke: #3a3e45; stroke-width: 1.5; }
.w-btn { fill: none; stroke: #4a4f57; stroke-width: 1.5; }
.w-led { fill: var(--armed); transition: fill .3s; }
.water[data-state="closing"] .w-led { fill: var(--app-yellow); animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.w-ring { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 26 82; opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s; }
.water[data-state="closing"] .w-ring { opacity: 1; animation: spin .9s linear infinite; }
.water[data-state="closed"] .w-ring { opacity: 1; stroke: var(--armed); stroke-dasharray: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.w-count { fill: #fff; font-size: 22px; font-weight: 650; text-anchor: middle; opacity: 0; transition: opacity .3s; }
.water[data-state="closing"] .w-count, .water[data-state="closed"] .w-count { opacity: 1; }
.water[data-state="closed"] .w-count { fill: var(--armed); }
.w-hose { fill: none; stroke: #3a3e45; stroke-width: 6; stroke-linecap: round; }
.w-appl rect, .w-appl circle { fill: #1b1d21; stroke: #3a3e45; stroke-width: 1.5; }
.w-appl line { stroke: #3a3e45; stroke-width: 1.5; }
.w-floor { stroke: #2c2f35; stroke-width: 2; }
.w-puddle { fill: var(--water); opacity: .55; transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform 1.3s var(--ease); }
.water:not([data-state="flow"]) .w-puddle { transform: scaleX(1); }
.w-drip { fill: var(--water); opacity: 0; }
.water[data-state="leak"] .w-drip, .water[data-state="wet"] .w-drip { animation: drip .7s ease-in infinite; }
@keyframes drip { 0% { opacity: 0; transform: translateY(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }
.w-sensor { fill: #2a2d32; stroke: #45494f; stroke-width: 1.5; }
.w-sled { fill: var(--armed); transition: fill .3s; }
.water[data-state="wet"] .w-sled, .water[data-state="closing"] .w-sled, .water[data-state="closed"] .w-sled { fill: var(--alarm); }
.w-waves path { fill: none; stroke: var(--alarm); stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.water[data-state="wet"] .w-waves path, .water[data-state="closing"] .w-waves path { animation: waves 1.2s ease-out infinite; }
.w-waves path:nth-child(2) { animation-delay: .2s !important; }
.w-waves path:nth-child(3) { animation-delay: .4s !important; }
@keyframes waves { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

/* =========================================================
   Kamera (camera)
   ========================================================= */
.cam__view { position: relative; max-width: 900px; margin-inline: auto; border-radius: 22px; overflow: hidden; aspect-ratio: 970 / 500; background: #111; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.cam__view img { width: 100%; height: 100%; object-fit: cover; transition: filter .6s var(--ease); }
.cam.is-night .cam__view img { filter: grayscale(1) brightness(.55) contrast(1.35); }
.cam__zone { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s; }
.cam__zone polygon { fill: rgba(34,197,94,.24); stroke: var(--armed); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cam.is-zone .cam__zone { opacity: 1; }
.cam__privacy {
  position: absolute; left: 10.8%; top: 19%; width: 29.4%; height: 56%;
  display: grid; place-items: center; border-radius: 6px; border: 2px dashed rgba(255,255,255,.7);
  background: rgba(30,30,32,.45); -webkit-backdrop-filter: blur(16px) saturate(.6); backdrop-filter: blur(16px) saturate(.6);
  opacity: 0; transition: opacity .4s;
}
.cam__privacy span { padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: clamp(.6875rem, 1.4vw, .8125rem); font-weight: 560; }
.cam.is-privacy .cam__privacy { opacity: 1; }
.cam__box { position: absolute; left: 64.2%; top: 65.6%; width: 6%; height: 8.8%; border: 2px solid var(--app-mint); border-radius: 4px; opacity: 0; transform: scale(1.3); transition: opacity .3s, transform .45s var(--ease); }
.cam__box span { position: absolute; left: -2px; bottom: calc(100% + 4px); padding: 2px 6px; border-radius: 4px; background: var(--app-mint); color: #000; font-size: 11px; font-weight: 650; white-space: nowrap; }
.cam.is-ai .cam__box { opacity: 1; transform: none; }
.cam__hud { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: linear-gradient(rgba(0,0,0,.45), transparent); color: #fff; font-size: .8125rem; font-weight: 560; }
.cam__live { display: inline-flex; align-items: center; gap: 6px; }
.cam__live i { width: 8px; height: 8px; border-radius: 50%; background: var(--alarm); animation: blink 1.2s steps(2) infinite; }
.cam__ir { position: absolute; top: 42px; right: 14px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.18); color: #fff; font-size: 11px; font-weight: 650; opacity: 0; transition: opacity .4s; }
.cam.is-night .cam__ir { opacity: 1; }
.cam__time { position: absolute; left: 14px; bottom: 12px; color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@media (max-width: 560px) {
  .cam__view { border-radius: 16px; aspect-ratio: 4 / 3; }
  .cam__view img { object-position: 62% 50%; }
}

/* =========================================================
   Ochrona zewnętrzna (outdoor)
   ========================================================= */
.yard__svg { max-width: 720px; margin-inline: auto; }
.o-fence { fill: none; stroke: #3a3e45; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.o-gate { stroke: #6b7079; stroke-width: 4; stroke-linecap: round; }
.o-drive, .o-terrace { fill: #17191d; }
.o-terrace { stroke: #23262b; }
.o-tree { fill: #15241a; stroke: #24382a; stroke-width: 2; transform-box: fill-box; transform-origin: 50% 90%; }
.yard[data-who="tree"] .o-tree--sway { animation: sway .7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.o-house > rect { fill: #121417; stroke: #4a4f57; stroke-width: 2; }
.o-house path { stroke: #2f3339; stroke-width: 2; fill: none; }
.o-house text, .o-label { fill: #6f757e; font-size: 12px; text-anchor: middle; }
.o-door { fill: #4a4f57; }
.ly { opacity: 0; transition: opacity .5s; }
.ly-fence path, .ly-fence line { fill: none; stroke: var(--armed); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(34,197,94,.6)); }
.ly-yard path { fill: url(#o-cone); }
.ly-facade rect { fill: none; stroke: var(--armed); stroke-width: 2.5; stroke-dasharray: 7 7; }
.ly-inside rect { fill: rgba(34,197,94,.1); }
.o-dev { fill: var(--armed); stroke: #0b0c0e; stroke-width: 2; }
.yard[data-mode="night"] :is(.ly-fence, .ly-yard, .ly-facade),
.yard[data-mode="armed"] .ly { opacity: 1; }
.yard.is-alarm .ly-fence path, .yard.is-alarm .ly-fence line, .yard.is-alarm .ly-facade rect { stroke: var(--alarm); filter: drop-shadow(0 0 6px rgba(239,68,68,.7)); }
.yard.is-alarm .ly-yard path { fill: rgba(239,68,68,.22); }
.yard.is-alarm .o-dev { fill: var(--alarm); }
.yard.is-alarm .ly { animation: blink .6s steps(2) 3; }
.o-rain { opacity: 0; transition: opacity .4s; }
.yard[data-who="rain"] .o-rain { opacity: .75; animation: rain .5s linear infinite; }
@keyframes rain { from { transform: translateY(-22px); } to { transform: translateY(0); } }
.o-cat, .o-man { opacity: 0; }
.o-cat { fill: #c7cbd1; }
.o-man { fill: #f3f4f6; }
.o-man path { fill: #f3f4f6; }
.yard[data-who="cat"] .o-cat { opacity: 1; animation: cat 2.4s var(--ease) both; }
@keyframes cat { from { transform: translate(40px, 200px); } to { transform: translate(120px, 250px); } }
.yard[data-who="man"] .o-man { opacity: 1; animation: man 1.8s var(--ease) both; }
@keyframes man { from { transform: translate(320px, 470px); } to { transform: translate(320px, 352px); } }
.yard.is-alarm .o-man, .yard.is-alarm .o-man path { fill: var(--alarm); }
.yard__who { margin-top: clamp(24px, 4vw, 36px); text-align: center; }
.yard__ask { font-weight: 620; font-size: 1.125rem; }

/* =========================================================
   Grade 3 — próby sabotażu (tamper)
   ========================================================= */
.tamper { display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "btns lock" "why lock"; gap: 20px clamp(24px, 5vw, 64px); align-items: start; }
.tamper__btns { grid-area: btns; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-self: end; }
.tamper__btns .sol-toggle { min-height: 52px; border-radius: 16px; text-align: left; padding: 0 18px; }
.tamper__why { grid-area: why; margin: 0; text-align: left; font-size: 1.0625rem; min-height: 4.5em; }
.lock { grid-area: lock; justify-self: center; width: 300px; padding: 8px; border-radius: 48px; background: #1d1d1f; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.lock__screen {
  height: 560px; border-radius: 40px; overflow: hidden; padding: 56px 12px 16px;
  background: radial-gradient(120% 70% at 50% 0%, #364156 0%, #151a24 55%, #07080b 100%);
  display: grid; grid-template-rows: auto auto 1fr; justify-items: center; color: #fff;
}
.lock__date { font-size: .9375rem; font-weight: 560; color: rgba(255,255,255,.85); }
.lock__time { font-size: 4.75rem; line-height: 1; font-weight: 600; letter-spacing: -0.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.lock__stack { width: 100%; display: grid; align-content: start; gap: 8px; margin-top: 28px; }
.lock .sol-push { width: 100%; background: rgba(245,245,247,.16); }
@media (max-width: 860px) {
  .tamper { grid-template-columns: 1fr; grid-template-areas: "lock" "btns" "why"; }
  .lock { width: 280px; }
  .lock__screen { height: 400px; }
  .tamper__why { text-align: center; }
}
@media (max-width: 420px) { .tamper__btns { grid-template-columns: 1fr 1fr; } .tamper__btns .sol-toggle { padding: 0 12px; font-size: .875rem; } }

/* =========================================================
   Fibra — pierścień (fibra)
   ========================================================= */
.fibra__svg { max-width: 720px; margin-inline: auto; }
.f-ring { fill: none; stroke: var(--armed); stroke-width: 5; stroke-linecap: round; transition: stroke .4s, stroke-dasharray .4s; }
.fibra[data-state="cut"] .f-ring--a { stroke-dasharray: 98 100; }
.fibra[data-state="cut"] .f-ring--b { stroke: var(--water); stroke-dasharray: 0 6 100; }
.f-cut path { fill: none; stroke: var(--alarm); stroke-width: 4; stroke-linecap: round; opacity: 0; transition: opacity .3s; }
.fibra[data-state="cut"] .f-cut path { opacity: 1; }
.f-tag { fill: #9aa1ab; font-size: 13px; font-weight: 560; text-anchor: middle; opacity: 0; transition: opacity .4s .2s; }
.fibra[data-state="cut"] .f-tag { opacity: 1; }
.fibra[data-state="cut"] .f-tag--b { fill: var(--water); }
.fibra[data-state="short"] .f-ring { animation: short .3s steps(2) 5; }
@keyframes short { 50% { stroke: var(--alarm); } }
.f-hub > rect { fill: #1f2226; stroke: #4a4f57; stroke-width: 2; }
.f-hub > circle { fill: var(--armed); }
.f-hub text { fill: #9aa1ab; font-size: 12px; text-anchor: middle; }
.f-volt rect { fill: #2a2d33; }
.f-volt .f-volt__bar { fill: var(--armed); transform-box: fill-box; transform-origin: bottom; transition: transform .8s var(--ease), fill .4s; }
.fibra[data-state="volt"] .f-volt__bar { transform: scaleY(.35); fill: var(--app-yellow); }
.f-dev circle:first-child { fill: #1b1d21; stroke: #4a4f57; stroke-width: 2; }
.f-dev__led { fill: var(--armed); }
.fibra[data-state="all"] .f-dev__led { fill: var(--alarm); }
.fibra[data-state="all"] .f-dev circle:first-child { stroke: var(--alarm); animation: blink .4s steps(2) 4; }
.fibra[data-state="cut"] .f-dev__led { animation: led-ok 1.4s ease-in-out infinite; }
@keyframes led-ok { 50% { opacity: .35; } }

/* =========================================================
   EN54 — przekrój budynku (fire)
   ========================================================= */
.fire__svg { max-width: 720px; margin-inline: auto; }
.b-wall { fill: #121417; stroke: #3a3e45; stroke-width: 2; }
.b-floor { stroke: #3a3e45; stroke-width: 2; }
.b-stairs { fill: none; stroke: #2c2f35; stroke-width: 2; }
.b-label { fill: #6f757e; font-size: 12px; }
.b-small { fill: #8b9099; font-size: 11px; text-anchor: middle; }
.b-det path { fill: #e5e7eb; }
.b-det__led { fill: var(--armed); }
.fire.is-alarm .b-det__led { fill: var(--alarm); }
.b-vad rect { fill: #1f2226; stroke: #4a4f57; stroke-width: 1.5; }
.b-vad__ring { fill: none; stroke: #6b7079; stroke-width: 3; }
.b-vad__waves { fill: none; stroke: var(--alarm); stroke-width: 2.5; stroke-linecap: round; opacity: 0; }
.fire.is-alarm .b-vad__ring { stroke: var(--alarm); animation: vad .5s steps(2) infinite; animation-delay: calc(var(--i) * .08s); }
.fire.is-alarm .b-vad__waves { animation: waves 1s ease-out infinite; animation-delay: calc(var(--i) * .1s); }
@keyframes vad { 50% { stroke: #fff; filter: drop-shadow(0 0 6px rgba(239,68,68,.9)); } }
.b-light { fill: #2c2f35; transition: fill .4s, filter .4s; }
.fire.is-scenario .b-light { fill: #fde68a; filter: drop-shadow(0 0 8px rgba(253,230,138,.8)); }
.b-door rect { fill: #1b1d21; stroke: #4a4f57; stroke-width: 1.5; }
.b-door__leaf { fill: #2c2f35; transition: fill .4s; }
.fire.is-scenario .b-door__leaf { fill: var(--armed); }
.b-cie > rect:first-child { fill: #1f2226; stroke: #4a4f57; stroke-width: 1.5; }
.b-cie__screen { fill: #2c3a4f; }
.fire.is-alarm .b-cie__screen { fill: var(--alarm); animation: blink .6s steps(2) infinite; }
.b-mcp rect { fill: #dc2626; }
.b-mcp circle { fill: #fff; }
.b-mcp { transform-box: fill-box; transform-origin: center; transition: transform .15s; }
.fire.is-press .b-mcp { transform: scale(.9); }
.fire.is-press .b-mcp rect { filter: drop-shadow(0 0 10px rgba(239,68,68,.9)); }
.b-timer { fill: #fff; font-size: 30px; font-weight: 650; text-anchor: middle; opacity: 0; transition: opacity .3s; }
.fire.is-alarm .b-timer { opacity: 1; }
.fire__steps { list-style: none; margin: 22px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 820px; }
.fire__steps li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: #16181c; color: var(--stage-ink-2); font-size: .9375rem; opacity: .45; transition: opacity .4s, background-color .4s, color .4s; }
.fire__steps svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fire__steps li.is-on { opacity: 1; background: #10261a; color: #d1fae5; }
.fire__steps li.is-on svg { stroke: var(--armed); }
.fire__sense { margin-top: clamp(36px, 5vw, 56px); text-align: center; }

/* =========================================================
   Modernizacja — dziś / po (retrofit)
   ========================================================= */
.retro { display: grid; justify-items: center; gap: 24px; }
.retro__list { list-style: none; margin: 0; padding: 0; width: min(860px, 100%); display: grid; border-top: 1px solid #22252a; }
.retro__row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) 92px; align-items: center; gap: 12px 20px; padding: 16px 4px; border-bottom: 1px solid #22252a; }
.retro__row strong { font-weight: 600; }
.retro__val, .retro__tag { display: grid; }
.retro__val > *, .retro__tag > * { grid-area: 1 / 1; transition: opacity .45s var(--ease), transform .45s var(--ease); transition-delay: calc(var(--i) * 40ms); }
.retro__val { color: var(--stage-ink-2); }
.retro__after { opacity: 0; transform: translateY(6px); }
.retro[data-state="after"] .retro__before { opacity: 0; transform: translateY(-6px); }
.retro[data-state="after"] .retro__after { opacity: 1; transform: none; }
.retro[data-state="after"] .retro__val { color: var(--stage-ink); }
.retro__tag { justify-self: end; }
.retro__tag > * { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 650; text-align: center; }
.retro__tag .retro__before { background: #22252a; color: var(--stage-ink-2); }
.retro__row--keep .retro__tag .retro__after { background: #10261a; color: #86efac; }
.retro__row--new .retro__tag .retro__after { background: #172036; color: #a5b4fc; }
.sol-why > .retro__before, .sol-why > .retro__after { display: block; }
.retro .sol-why { display: grid; }
.retro .sol-why > * { grid-area: 1 / 1; transition: opacity .45s; }
@media (max-width: 640px) {
  .retro__row { grid-template-columns: minmax(0, 1fr) auto; }
  .retro__val { grid-column: 1 / -1; grid-row: 2; }
}

/* =========================================================
   Typy obiektów (objects)
   ========================================================= */
.objs__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.objs__chips button { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--mist); color: var(--ink); font-size: .9375rem; font-weight: 560; transition: background-color .2s, color .2s; }
.objs__chips button:hover { background: #e6e8eb; }
.objs__chips button[aria-selected="true"] { background: var(--ink); color: #fff; }
.objs:not(.is-ready) .objs__chips { display: none; }
.objs__panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; scroll-margin-top: 220px; } /* po wejściu z #kotwicą widać też wybór obiektów nad panelem */
.objs:not(.is-ready) .objs__panel + .objs__panel { margin-top: 56px; }
.objs.is-ready .objs__panel { animation: rise .5s var(--ease) both; }
.objs__img { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 10; background: var(--mist); }
.objs__img img { width: 100%; height: 100%; object-fit: cover; }
.objs__text { display: grid; gap: 16px; justify-items: start; }
.objs__text h3 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); letter-spacing: -0.03em; font-weight: 650; }
.objs__slogan { font-size: 1.25rem; color: var(--ink-2); letter-spacing: -0.01em; }
.objs__points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.objs__points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.objs__points svg { width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--armed-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.objs__links { margin-top: 4px; }
@media (max-width: 860px) {
  .objs__panel { grid-template-columns: 1fr; }
  .objs__chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .objs__chips::-webkit-scrollbar { display: none; }
  .objs__chips button { flex: none; }
}

/* =========================================================
   Telefon: większe napisy w rysunkach (SVG się zmniejsza), niższe kafelki
   ========================================================= */
@media (max-width: 560px) {
  .sol-stage { padding-top: 58px; }
  .w-label { font-size: 22px; }
  .w-count { font-size: 30px; }
  .o-house text, .o-label { font-size: 20px; }
  .f-tag { font-size: 22px; }
  .f-hub text { font-size: 17px; }
  .b-label { font-size: 20px; }
  .b-small { font-size: 18px; }
  .b-timer { font-size: 40px; }
  .sol-tile--big .sol-tile__img { aspect-ratio: 16 / 10; }
}

/* =========================================================
   Mniej ruchu
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .w-flow, .w-ring, .cam__live i, .o-tree--sway, .o-rain, .f-ring, .b-vad__ring, .b-vad__waves { animation: none !important; }
  .o-cat, .o-man { animation-duration: .01ms !important; }
}
