/* ==========================================================================
   Blok „Bezpieczeństwo danych” (.mo-sect.mo-sec): bramka i dowody producentów.
   Źródło (prototyp): assets/css/podstrony/monitoring.css (bez .p-monitoring).
   Spoczynkowy CSS to stan końcowy; view.js tylko uzbraja rysowanie (.is-armed → .is-on).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Klocki strony Monitoringu (monitoring.css: .p-monitoring → .mo-sect): sekcja,
   separator z kropką, nagłówek w dwóch kolumnach, kafelek ikony. Te same reguły
   mają wszystkie bloki monitoring-* (każdy blok działa sam, bez innych).
   -------------------------------------------------------------------------- */

.mo-sect { --mo-y: clamp(3.75rem, 7vw, 6.5rem); --mo-gap: clamp(.75rem, 1.6vw, 1.25rem); position: relative; padding: var(--mo-y) 0; }
.mo-sect--tint { background: var(--paper-2); }

/* between two sections on the same ground: a hairline fading out at both ends with an
   orange dot in a white gap (the home page's .stairs separator), centred on the seam */
.mo-sep { position: relative; border-top: 0; }
.mo-sep::before {
  content: ""; position: absolute; left: 50%; top: 0; z-index: 1;
  width: min(100% - 2 * var(--gutter), var(--container)); height: 26px; transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, var(--orange) 0 4px, var(--orange-50) 4.5px 7px, #fff 7.5px 12px, transparent 12.5px) center / 26px 26px no-repeat,
    linear-gradient(90deg, rgba(203, 213, 224, 0), var(--line-strong) 28%, var(--line-strong) 72%, rgba(203, 213, 224, 0)) center / 100% 1px no-repeat;
}

/* two-column head: the prefix on its own row, then the title left and the lead right,
   both top-aligned so the lead never starts above the title */
.mo-head {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 1.25rem clamp(2rem, 6vw, 6rem); align-items: start; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.mo-head > .eyebrow.eyebrow { grid-column: 1 / -1; margin: 0; }
.mo-head h2 { margin: 0; max-width: 21ch; }
.mo-head__lead { margin: 0; padding-top: .4rem; color: var(--muted); font-size: 1.0625rem; max-width: 56ch; }

.mo-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-50); color: var(--navy);
}
.mo-ico .icon { width: 1.15rem; height: 1.15rem; }

@media (max-width: 900px) {
  .mo-head { grid-template-columns: minmax(0, 1fr); }
  .mo-head__lead { padding-top: 0; }
}

/* two SVG layers in one box: the pale track and the orange draw; the draw is revealed
   with a clip-path on its own box, so non-scaling strokes stay crisp at any size */
.mo-wires { position: relative; }
.mo-wires svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mo-wires path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.mo-wires__track path { stroke: var(--orange-100); stroke-width: 2; }
.mo-wires__draw path { stroke: var(--orange); stroke-width: 2.5; }


/* --------------------------------------------------------------------------
   Bezpieczeństwo: bramka – dane techniczne przechodzą do DTS, treść zostaje
   -------------------------------------------------------------------------- */

.mo-gate {
  --row: 58px; --wall: 46px;
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(56px, 7vw, 110px) auto;
  grid-template-rows: auto auto auto auto; align-items: start;
  padding: clamp(1.4rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--radius-xl); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -32px rgba(22, 42, 67, .4);
}
.mo-gate__h {
  grid-column: 1; display: flex; align-items: center; gap: .55rem; margin: 0 0 .5rem;
  font-size: 1rem; font-weight: 600; letter-spacing: -.005em; color: var(--navy-900);
}
.mo-gate__h .icon { width: 1.15rem; height: 1.15rem; color: var(--navy); }
.mo-gate__h--in { grid-row: 1; }
.mo-gate__h--out { grid-row: 3; margin-top: 1.25rem; color: var(--muted); }
.mo-gate__h--out .icon { color: var(--muted-2); }
.mo-gate__in { grid-column: 1; grid-row: 2; }
.mo-gate__out { grid-column: 1; grid-row: 4; }
.mo-gate__in, .mo-gate__out { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.mo-gate li { display: grid; grid-template-columns: auto minmax(1.5rem, 1fr) var(--wall); align-items: center; height: var(--row); }
.mo-gate__pill {
  display: inline-flex; align-items: center; gap: .6rem; min-width: 0; padding: .35rem 1rem .35rem .35rem;
  border-radius: var(--radius-pill); background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: .9375rem; font-weight: 500; line-height: 1.25; color: var(--navy-900);
}
.mo-gate__ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); }
.mo-gate__ico .icon { width: 1rem; height: 1rem; }
.mo-gate__line { height: 2px; margin: 0 -2px 0 .5rem; border-radius: 2px; background: var(--orange); transform-origin: 0 50%; }
.mo-gate__mark {
  justify-self: center; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: #fff; box-shadow: 0 0 0 3px var(--navy-50);
}
.mo-gate__mark .icon { width: .85rem; height: .85rem; stroke-width: 2.8; }
/* the document's content stops at the wall */
.mo-gate__out .mo-gate__pill { box-shadow: none; border: 1.5px dashed var(--line-strong); color: var(--muted); }
.mo-gate__out .mo-gate__ico { background: var(--paper-2); color: var(--muted-2); }
.mo-gate__out .mo-gate__line { background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 11px); }
.mo-gate__mark--stop { background: #fff; color: var(--navy-900); box-shadow: inset 0 0 0 2px var(--navy-900), 0 0 0 3px var(--navy-50); }
/* the wall: monitoring itself, a navy-50 column the lines pass through */
.mo-gate__wall {
  grid-column: 1; grid-row: 1 / -1; justify-self: end; align-self: stretch; position: relative; z-index: 0;
  width: var(--wall); margin: -.35rem 0 -.35rem; border-radius: var(--radius-pill);
  background: var(--navy-50); box-shadow: inset 0 0 0 1px var(--navy-100);
}
.mo-gate__shield {
  position: absolute; left: 50%; top: .3rem; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-900); color: #fff; box-shadow: 0 0 0 4px #fff;
}
.mo-gate__shield .icon { width: 1.05rem; height: 1.05rem; }
/* --n: liczba wierszy „odczytujemy” (render.php) */
.mo-gate__wires { grid-column: 2; grid-row: 2; align-self: stretch; height: calc(var(--n, 4) * var(--row)); }
.mo-gate__dst { grid-column: 3; grid-row: 2; align-self: center; display: grid; justify-items: center; gap: .55rem; margin: 0; }
.mo-gate__dts {
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: #fff;
  box-shadow: inset 0 0 0 2.5px var(--orange), 0 14px 28px -16px rgba(236, 110, 40, .6);
  font-family: var(--font-ui); font-weight: 600; font-size: 1.125rem; letter-spacing: .02em; color: var(--navy-900);
}
.mo-gate__dst small { font-family: var(--font-ui); font-size: .8125rem; font-weight: 500; color: var(--muted); white-space: nowrap; }

.mo-sec__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--mo-gap); align-items: stretch; }
.mo-proof { display: flex; flex-direction: column; gap: var(--mo-gap); }
.mo-proof__lead { margin: 0; padding: .35rem .25rem 0; max-width: 32ch; font-size: 1.0625rem; font-weight: 500; line-height: 1.45; color: var(--navy-900); }
.mo-proof__list { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--mo-gap); }
.mo-proof__list li {
  display: grid; align-content: start; gap: .9rem; padding: 1.35rem 1.5rem 1.4rem; border-radius: var(--radius-lg);
  background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
}
.mo-proof__list .brand-svg { display: block; height: var(--h, 28px); width: auto; }
.mo-proof__list p { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--text); }

/* --------------------------------------------------------------------------
   Rysowanie nitek: uzbrojone przez view.js, tylko bez ograniczenia ruchu
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .mo-gate.is-armed .mo-gate__in .mo-gate__line { transform: scaleX(0); }
  .mo-gate.is-armed .mo-gate__in .mo-gate__mark { transform: scale(.3); opacity: 0; }
  .mo-gate.is-armed .mo-gate__wires .mo-wires__draw { clip-path: inset(0 100% 0 0); }
  .mo-gate.is-armed .mo-gate__dts { transform: scale(.85); opacity: .4; }
  .mo-gate.is-on .mo-gate__in .mo-gate__line { transform: none; transition: transform .8s var(--ease); transition-delay: calc(var(--i) * .08s); }
  .mo-gate.is-on .mo-gate__in .mo-gate__mark { transform: none; opacity: 1; transition: transform .5s var(--ease), opacity .3s; transition-delay: calc(.6s + var(--i) * .08s); }
  .mo-gate.is-on .mo-gate__wires .mo-wires__draw { clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease) .95s; }
  .mo-gate.is-on .mo-gate__dts { transform: none; opacity: 1; transition: transform .6s var(--ease) 1.6s, opacity .4s 1.6s; }
}

/* --------------------------------------------------------------------------
   Układ na mniejszych ekranach
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .mo-sec__grid { grid-template-columns: minmax(0, 1fr); }
  .mo-proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-proof__lead { max-width: none; }
}

@media (max-width: 900px) {
  .mo-proof__list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  /* the gate becomes a checked list: what passes, what stays */
  .mo-gate { grid-template-columns: minmax(0, 1fr); padding: 1.25rem; }
  .mo-gate__wall, .mo-gate__wires, .mo-gate__dst, .mo-gate__line { display: none; }
  .mo-gate li { grid-template-columns: minmax(0, 1fr) 28px; gap: .75rem; height: auto; padding: .35rem 0; }
  .mo-gate__mark { box-shadow: none; }
  .mo-gate__mark--stop { box-shadow: inset 0 0 0 2px var(--navy-900); }
  .mo-gate__pill { padding-right: .85rem; }
}
