/* =====================================================================
   SPECTRUMWATCH — spectrumwatch.pl
   Kierunek: infrastructure / observability / control room.

   MOTYW PRZEWODNI: "ślad widma" — rząd cienkich pionowych kresek
   o nierównej wysokości. Wzięty z NAZWY produktu, nie z branży, więc jest
   abstrakcyjny i nie da się go pomylić z ikoną firmy alarmowej. Występuje
   w czterech skalach i NIESIE ZNACZENIE: brakująca kreska to wykryta
   anomalia. Ozdoba i komunikat to jedno.

   JĘZYK: polski tam, gdzie czytelnik czyta zdania. Angielski tam, gdzie
   patrzy na odczyt maszyny (telemetria, statusy, log). To nie jest
   niedokończone tłumaczenie, tylko podział na język i przyrząd.

   ZIELEŃ JEST OSZCZĘDNA. Oznacza wyłącznie: aktywność, zdrowie systemu,
   potwierdzenie, element interaktywny o najwyższym priorytecie. Kolory
   statusów (warning/critical/info) są od niej NIEZALEŻNE i nie są
   dekoracją.
   ===================================================================== */

:root {
  --bg:        #090A0C;
  --bg-2:      #0E1013;
  --surface:   #14171B;
  --elevated:  #191C21;
  --border:    #252A31;
  --hair:      rgba(255,255,255,.07);
  --hair-soft: rgba(255,255,255,.035);
  --gridline:  rgba(255,255,255,.025);

  --text:      #F2F4F5;
  --text-2:    #8B929A;
  --muted:     #5F6670;

  --accent:     #B7F34A;
  --accent-dim: rgba(183,243,74,.14);
  --warn:      #F5B942;
  --crit:      #FF5C5C;
  --info:      #6EA8FF;

  --f-head: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --maxw: 1240px;
  --pad: 40px;
  --ease: cubic-bezier(.22,.61,.36,1);
}
@media (max-width: 760px) { :root { --pad: 22px; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ziarno — jedyny "efekt" na stronie. 2,2% krycia: ma być wyczuwalne jako
   faktura, nie widoczne jako tekstura. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { margin: 0; font-family: var(--f-head); font-weight: 600; letter-spacing: -.03em; line-height: 1.06; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; }

/* Siatka: sześć osi, prawie niewidoczna. To ona sprawia, że układ wygląda
   na zaprojektowany, a nie wygenerowany. */
.rails {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: repeating-linear-gradient(90deg, var(--gridline) 0 1px, transparent 1px calc(100% / 6));
}
.shell > *:not(.rails) { position: relative; z-index: 1; }

.eyebrow { font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-2); }

/* --- Status: kropka + tekst + światło, nigdy badge -------------------- */
.st { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.st i { width: 5px; height: 5px; border-radius: 50%; display: block; flex: none; }
.st.ok   { color: var(--accent); } .st.ok i   { background: var(--accent); box-shadow: 0 0 7px rgba(183,243,74,.65); animation: pulse 3.4s var(--ease) infinite; }
.st.warn { color: var(--warn); }   .st.warn i { background: var(--warn);   box-shadow: 0 0 7px rgba(245,185,66,.55); }
.st.crit { color: var(--crit); }   .st.crit i { background: var(--crit);   box-shadow: 0 0 7px rgba(255,92,92,.55); }
.st.idle { color: var(--muted); }  .st.idle i { background: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* --- MOTYW: ślad widma ------------------------------------------------ */
.trace { display: flex; align-items: flex-end; gap: 3px; width: 100%; }
.trace i { flex: 1; display: block; background: rgba(255,255,255,.13); border-radius: .5px; transition: background .5s var(--ease); }
.trace i.hot { background: var(--accent); box-shadow: 0 0 8px rgba(183,243,74,.4); }
.trace i.notch { background: var(--crit); opacity: .9; }
.trace.hair { height: 26px; opacity: .5; }
.trace.ambient { height: 148px; opacity: .34; }

/* --- Header ----------------------------------------------------------- */
header { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s var(--ease); }
header.stuck { background: rgba(9,10,12,.72); backdrop-filter: blur(14px); border-bottom-color: var(--hair); }
.head-in { display: flex; align-items: center; gap: 34px; height: 68px; }
.wordmark { display: flex; align-items: center; gap: 11px; font-weight: 500; font-size: 13px; letter-spacing: .17em; text-transform: uppercase; }
.wordmark .glyph { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.wordmark .glyph b { width: 2px; background: var(--text); display: block; border-radius: .5px; }
.wordmark .glyph b:nth-child(1) { height: 55%; }
.wordmark .glyph b:nth-child(2) { height: 100%; background: var(--accent); }
.wordmark .glyph b:nth-child(3) { height: 38%; }
nav { display: flex; gap: 26px; margin-left: 14px; }
nav a { font-size: 13.5px; color: var(--text-2); transition: color .2s var(--ease); }
nav a:hover { color: var(--text); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.head-right .login { font-size: 13.5px; color: var(--text-2); }
.head-right .login:hover { color: var(--text); }
.cta-btn { font-size: 13px; font-weight: 500; padding: 8px 16px; border: 1px solid var(--border); border-radius: 3px; color: var(--text); transition: border-color .2s var(--ease), background .2s var(--ease); }
.cta-btn:hover { border-color: rgba(183,243,74,.5); background: var(--accent-dim); }
.cta-btn.solid { background: var(--accent); border-color: var(--accent); color: #0B1400; font-weight: 600; }
.cta-btn.solid:hover { background: #c8ff5e; border-color: #c8ff5e; }
@media (max-width: 940px) { nav, .head-right .login { display: none; } }

/* --- HERO ------------------------------------------------------------- */
.hero { padding: 118px 0 0; position: relative; }
.hero::after {
  content: ""; position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 620px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(183,243,74,.05) 0%, rgba(183,243,74,0) 62%);
}
.hero-label { display: flex; align-items: center; gap: 14px; margin-bottom: 46px; flex-wrap: wrap; }
.hero-label .bar { width: 34px; height: 1px; background: var(--border); }
h1 { font-size: clamp(2.75rem, 5vw, 4.4rem); max-width: 17ch; }
h1 em { font-style: normal; color: var(--muted); }
.hero-body { margin-top: 30px; max-width: 54ch; font-size: 17.5px; color: var(--text-2); }
.hero-meta { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--hair-soft); }

/* Dashboard wychodzi POZA kolumnę i jest przycięty — zaglądamy do środka
   produktu, nie oglądamy jego zdjęcia. */
.bleed { margin-top: 74px; position: relative; }
.bleed::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 190px;
  background: linear-gradient(to bottom, rgba(9,10,12,0), var(--bg) 88%);
  pointer-events: none; z-index: 3;
}
.panel { width: calc(100vw - 2 * var(--pad)); max-width: 1560px; margin-left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--border); border-radius: 5px 5px 0 0; border-bottom: none; overflow: hidden; }
@media (max-width: 1000px) { .panel { width: calc(100vw - 24px); } }

/* --- Dashboard -------------------------------------------------------- */
.p-bar { display: flex; align-items: center; gap: 18px; padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--bg-2); flex-wrap: wrap; }
.p-bar .title { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--text-2); }
.p-bar .sep { width: 1px; height: 12px; background: var(--border); }
.p-bar .right { margin-left: auto; display: flex; align-items: center; gap: 18px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--border); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 20px 18px 18px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--f-head); font-weight: 600; font-size: 30px; letter-spacing: -.03em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat .v.acc { color: var(--accent); } .stat .v.wr { color: var(--warn); } .stat .v.cr { color: var(--crit); }

.p-grid { display: grid; grid-template-columns: 1.35fr 1fr; }
@media (max-width: 980px) { .p-grid { grid-template-columns: 1fr; } }
.p-col + .p-col { border-left: 1px solid var(--border); }
@media (max-width: 980px) { .p-col + .p-col { border-left: none; border-top: 1px solid var(--border); } }
.p-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.p-head .t { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-head .r { margin-left: auto; }

.row { display: grid; grid-template-columns: 92px 1fr 62px 118px; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--hair-soft); font-size: 13px; }
.row:last-child { border-bottom: none; }
.row:hover { background: var(--elevated); }
.row .id { font-family: var(--f-mono); font-size: 12px; color: var(--text-2); }
.row .dv { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); text-align: right; }
@media (max-width: 640px) { .row { grid-template-columns: 80px 1fr; } .row .dv { display: none; } }

.chartbox { padding: 20px 18px 16px; border-bottom: 1px solid var(--border); }
.chart { width: 100%; height: 108px; display: block; overflow: visible; }
.chart .grid-l { stroke: rgba(255,255,255,.05); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.9s var(--ease); }
.chart.in .line { stroke-dashoffset: 0; }
.chart .fillp { fill: url(#gfill); opacity: 0; transition: opacity 1.3s var(--ease) .5s; }
.chart.in .fillp { opacity: 1; }
.chart .dot { fill: var(--accent); opacity: 0; transition: opacity .4s var(--ease) 1.7s; }
.chart.in .dot { opacity: 1; }
.chart-x { display: flex; justify-content: space-between; margin-top: 9px; font-family: var(--f-mono); font-size: 10px; color: var(--muted); letter-spacing: .08em; }

.log-line { display: grid; grid-template-columns: 66px 74px 1fr; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--hair-soft); font-family: var(--f-mono); font-size: 11.5px; align-items: baseline; }
.log-line:last-child { border-bottom: none; }
.log-line .ts { color: var(--muted); }
.log-line .src, .log-line .msg { color: var(--text-2); }
.log-line .msg b { font-weight: 400; color: var(--text); }
.log-line.is-crit .msg b { color: var(--crit); }
.log-line.is-warn .msg b { color: var(--warn); }
@media (max-width: 640px) { .log-line { grid-template-columns: 60px 1fr; } .log-line .src { display: none; } }

/* --- Sekcje treściowe -------------------------------------------------- */
.section { padding: 128px 0; border-top: 1px solid var(--hair-soft); }
.section.tight { padding: 96px 0; }
.section.alt { background: var(--bg-2); }
@media (max-width: 760px) { .section, .section.tight { padding: 76px 0; } }
.sec-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 46px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.6rem, 3.1vw, 2.35rem); }
.sec-head .note { margin-left: auto; max-width: 34ch; font-size: 13.5px; color: var(--muted); }

/* Editorial: prawie pusty ekran, jedno zdanie i ślad obok */
.editorial { padding: 190px 0 170px; border-top: 1px solid var(--hair-soft); }
@media (max-width: 900px) { .editorial { padding: 110px 0 100px; } }
.editorial h2 { font-size: clamp(2.1rem, 4.1vw, 3.5rem); max-width: 15ch; }
.editorial .sub { margin-top: 34px; max-width: 46ch; font-size: 17px; color: var(--text-2); }
.ed-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; }
@media (max-width: 900px) { .ed-split { grid-template-columns: 1fr; gap: 44px; } }
.ed-aside { display: flex; flex-direction: column; gap: 16px; }
.ed-aside .cap { display: flex; justify-content: space-between; align-items: baseline; }

/* Problem: trzy fakty na wspólnej powierzchni, nie trzy kafle */
.facts3 { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); }
@media (max-width: 860px) { .facts3 { grid-template-columns: 1fr; } }
.fact { padding: 26px 26px 30px; border-right: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft); }
.fact:last-child { border-right: none; }
.fact .n { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.fact h3 { font-size: 1.06rem; margin: 12px 0 10px; letter-spacing: -.015em; }
.fact p { color: var(--text-2); font-size: 14.5px; }

/* Telemetria */
.tel { border-top: 1px solid var(--hair); }
.tel-row { display: grid; grid-template-columns: 1fr 96px 128px 92px; gap: 20px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--hair-soft); }
.tel-row .what { font-size: 14.5px; }
.tel-row .iv { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .07em; text-align: right; }
.tel-row .last { font-family: var(--f-mono); font-size: 11.5px; color: var(--text-2); text-align: right; }
@media (max-width: 760px) { .tel-row { grid-template-columns: 1fr auto; gap: 6px 14px; } .tel-row .last { display: none; } }
.footnote { margin-top: 26px; color: var(--muted); font-size: 13.5px; max-width: 76ch; }

/* Granice usługi */
.bounds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 780px) { .bounds { grid-template-columns: 1fr; } }
.bound { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 16px 18px; border: 1px solid var(--hair-soft); border-radius: 3px; font-size: 14.5px; color: var(--text-2); }
.bound .m { font-family: var(--f-mono); color: var(--muted); }
.bound.yes { border-color: var(--border); }
.bound.yes .m { color: var(--accent); }
.bound b { color: var(--text); font-weight: 600; }

/* Cennik — zestawienie, nie trzy kafle */
.plans { border-top: 1px solid var(--hair); }
.plan-row { display: grid; grid-template-columns: 150px 130px 1fr; gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--hair-soft); align-items: start; }
@media (max-width: 860px) { .plan-row { grid-template-columns: 1fr; gap: 10px; } }
.plan-row .nm { font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em; }
.plan-row .scale { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-top: 6px; text-transform: uppercase; }
.plan-row .amt { font-family: var(--f-head); font-weight: 600; font-size: 1.7rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-row .unit { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .1em; }
.plan-row ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
@media (max-width: 660px) { .plan-row ul { grid-template-columns: 1fr; } }
.plan-row li { color: var(--text-2); font-size: 14px; padding-left: 16px; position: relative; }
.plan-row li::before { content: "+"; position: absolute; left: 0; color: var(--muted); }
.plan-row.is-featured .nm { color: var(--accent); }

/* CTA */
.cta { padding: 150px 0 130px; }
@media (max-width: 760px) { .cta { padding: 90px 0 80px; } }
.cta h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); max-width: 18ch; }
.cta p { margin-top: 26px; max-width: 48ch; color: var(--text-2); font-size: 17px; }
.cta .acts { margin-top: 42px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta .acts .cta-btn { padding: 12px 24px; font-size: 14px; }

footer { border-top: 1px solid var(--hair-soft); padding: 34px 0 60px; }
footer .fr { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: baseline; }
footer .fr a { color: var(--muted); font-size: 12px; font-family: var(--f-mono); }
footer .fr a:hover { color: var(--text-2); }

/* --- Wejście sekcji: fade + 8px, nic więcej -------------------------- */
.rise { opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rise.in { opacity: 1; transform: none; }

/* --- Strona treściowa (polityka prywatności) ------------------------- */
.doc-page { padding: 90px 0 110px; max-width: 72ch; }
.doc-page h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); max-width: none; }
.doc-page h2 { font-size: 1.25rem; margin: 46px 0 14px; }
.doc-page p, .doc-page li { color: var(--text-2); font-size: 15.5px; }
.doc-page p + p { margin-top: 14px; }
.doc-page ul { padding-left: 20px; margin: 12px 0; }
.doc-page li { margin: 7px 0; }
.doc-page a { color: var(--accent); }
.doc-page .updated { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .08em; margin-top: 18px; }
.doc-page strong { color: var(--text); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .rise { opacity: 1; transform: none; }
  .chart .line { stroke-dashoffset: 0; }
  .chart .fillp, .chart .dot { opacity: 1; }
}
