/* Flow Block font loaded via <link> in HTML head */

:root {
  --bg: #0B0D10;
  --bg2: #10141A;
  --ink: #ECEFF4;
  --dim: #98A2B3;
  --line: rgba(255, 255, 255, 0.09);
  --amber: #E8862A;
  --amber-soft: rgba(232, 134, 42, 0.14);
  --ok: #5BD97A;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --sysbar-h: 54px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body.booting { overflow: hidden; height: 100vh; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: #ECEFF4;
  word-break: break-word;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

pre code {
  white-space: pre;
  word-break: normal;
}

/* ================= BOOT SEQUENCE ================= */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #06080B;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  contain: strict;
}

.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot.off { display: none !important; }

.boot-scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
}

.boot-frame {
  width: min(760px, 100%);
  position: relative;
  z-index: 1;
}

.boot-log {
  font-family: var(--mono);
  font-size: clamp(12px, 2.4vw, 14.5px);
  line-height: 1.85;
  color: #B7C2D0;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 340px;
}

.boot-log .b-head { color: var(--amber); font-weight: 700; }
.boot-log .b-ok { color: var(--ok); }
.boot-log .b-dim { color: #6B7686; }
.boot-log .b-key { color: var(--ink); }

.boot-log .b-line::after {
  content: '▊';
  color: var(--amber);
  animation: caret 0.9s steps(1) infinite;
}

.boot-log .b-line.b-done::after { content: ''; animation: none; }

@keyframes caret { 50% { opacity: 0; } }

.boot-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.boot-meter-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  overflow: hidden;
}

.boot-meter-track i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), #F5A451);
  transition: width 0.25s ease;
}

.boot-meter-pct { min-width: 42px; text-align: right; color: var(--ok); }

.boot-skip {
  position: absolute;
  right: 0;
  bottom: -46px;
  background: none;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.boot-skip:hover { border-color: var(--amber); color: var(--amber); }

/* ================= TŁO (log + scroll) ================= */
.term-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 72%, transparent 100%);
}

.term-bg-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 6vh 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2.1;
  color: rgba(232, 134, 42, 0.08);
  white-space: pre-wrap;
  word-break: break-all;
  will-change: transform;
  transition: color 0.4s ease;
  user-select: none;
}

.term-bg-inner.hot { color: rgba(91, 217, 122, 0.12); }

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* ================= PASEK SYSTEMOWY ================= */
.sysbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--sysbar-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sysbar-id {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.sysbar-id:hover { text-decoration: none; color: var(--amber); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

.sysbar-nav { display: flex; gap: 22px; }

.sysbar-nav a { color: var(--dim); transition: color 0.15s ease; }
.sysbar-nav a:hover { color: var(--amber); text-decoration: none; }
.sysbar-nav a[aria-current="page"] { color: var(--amber); }
.sysbar-nav a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--amber);
  opacity: 0.55;
}

.sysbar-status { color: var(--dim); }
.sysbar-status b { color: var(--amber); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ================= LAYOUT ================= */
.wrap {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================= HERO ================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--sysbar-h) + 90px) 0 90px;
  border-bottom: 1px solid var(--line);
}

/* zdjęcie B/W — półprzezroczyste, jak log po lewej */
.hero-photo {
  position: absolute;
  top: 0;
  right: -3vw;
  width: min(46vw, 620px);
  height: 100%;
  margin: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.36;
  will-change: transform;
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 99%);
  mask-image: linear-gradient(to left, #000 45%, transparent 99%);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 58%;
  filter: grayscale(1) contrast(1.05) brightness(0.98);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 76%, transparent 100%);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 28px;
}

.blink { color: var(--amber); animation: caret 1s steps(1) infinite; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

.role {
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 500;
  max-width: 640px;
  margin-bottom: 34px;
}

.role span {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--dim);
  margin-top: 6px;
}

.term-inline,
.cmd {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 36px;
  max-width: 620px;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.cmd { margin-top: 22px; margin-bottom: 0; }

.ti-prompt { color: var(--amber); font-weight: 700; }
.ti-out { color: #C9D1DC; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary { background: var(--amber); color: #14100B; }
.btn-primary:hover { background: #F59439; }

.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--amber); }

/* ================= SEKCJE ================= */
.section {
  padding: 90px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: var(--sysbar-h);
}

.section.alt { background: rgba(16, 20, 26, 0.86); }

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
  font-weight: 600;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 56px;
  align-items: start;
}

.two-col > * {
  min-width: 0;
  max-width: 100%;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

.prose p { margin-bottom: 18px; color: #C9D1DC; }
.prose p:last-child { margin-bottom: 0; }

.facts {
  list-style: none;
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.facts li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: #C9D1DC;
}

.facts strong {
  color: var(--dim);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 3px;
}

/* ================= KONTAKT ================= */
.contact-h {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  margin: 8px 0 44px;
  letter-spacing: -0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.section.alt .contact-card { background: var(--bg); }

.contact-card:hover {
  border-color: var(--amber);
  transform: translateY(-3px);
  text-decoration: none;
}

.cc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.cc-value { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--ink); word-break: break-all; }

.contact-card .cc-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--dim);
}

.contact-card:hover .cc-value { color: var(--amber); }

/* ================= LISTA TEASERÓW ================= */
.teaser-list {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.teaser-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto 22px;
  gap: 18px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
}

.teaser-item:hover { text-decoration: none; }
.teaser-item:hover .t-title { color: var(--amber); }
.teaser-item:hover .t-arrow { transform: translateX(4px); }

.t-date {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.t-title {
  font-size: 15.5px;
  color: var(--ink);
  transition: color 0.15s ease;
}

.t-tag {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.t-arrow {
  color: var(--amber);
  text-align: right;
  transition: transform 0.15s ease;
}

/* ================= POBIERZ ================= */
.mono {
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--amber);
}

.dl-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 6px 0 26px;
}

.dl-shots figure { margin: 0; }

.dl-shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg2);
  transition: border-color 0.15s ease;
}

.dl-shots figure:hover img { border-color: var(--amber); }

.dl-shots figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 9px;
}

.dl-grid { margin-top: 2px; }

.dl-grid .contact-card .cc-value { font-size: 14.5px; }

/* ================= GALERIA SCREENÓW & LIGHTBOX ================= */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0 16px;
}

.shots.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.shots.single {
  grid-template-columns: 1fr;
  max-width: 680px;
}

.shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Karta podglądu z kadrowaniem */
.shot-card {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #080b0f;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.shot-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(230, 162, 60, 0.14);
}

.shot-frame {
  position: relative;
  width: 100%;
  height: 270px;
  background: #06080b;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: brightness(0.94);
}

.shot-card:hover .shot-frame img {
  transform: scale(1.04);
  filter: brightness(1.04);
}

/* Gradient przyciemniający dół kadru */
.shot-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 11, 0.08) 0%, transparent 45%, rgba(6, 8, 11, 0.8) 100%);
  pointer-events: none;
}

/* Szerokie zrzuty pulpitu bez pionowego kadrowania (Retina 16:10) */
.shot-card.wide .shot-frame {
  height: auto;
  aspect-ratio: 16 / 10;
}
.shot-card.wide .shot-frame img {
  object-fit: cover;
  object-position: top center;
}
.shot-card.wide .shot-frame::after {
  display: none;
}

/* Panoramiczny baner rzutów pojazdów Studio Carsized (1210x400) */
.shot-card.banner .shot-frame {
  height: auto;
  aspect-ratio: 121 / 40;
}
.shot-card.banner .shot-frame img {
  object-fit: contain;
  background: #080b0f;
}
.shot-card.banner .shot-frame::after {
  display: none;
}

/* Znacznik RAW / LIVE w lewym górnym rogu */
.shot-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--amber);
  border: 1px solid rgba(230, 162, 60, 0.35);
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
}

/* Przycisk powiększenia w prawym dolnym rogu */
.shot-action {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  pointer-events: none;
}

.shot-card:hover .shot-action {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(15, 20, 28, 0.95);
}

/* Fallback dla zwykłych img bez .shot-card */
.shots > figure > img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg2);
  transition: border-color 0.2s ease;
  cursor: zoom-in;
}

.shots > figure:hover > img {
  border-color: var(--amber);
}

.shots figcaption {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--dim);
  margin-top: 10px;
}

.shots figcaption b {
  color: var(--amber);
  font-weight: 600;
}

@media (max-width: 640px) {
  .shots {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .shots.cols-3 {
    grid-template-columns: 1fr;
  }
  .shot-frame {
    height: 230px;
  }
  .shot-card.wide .shot-frame {
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .shot-card.banner .shot-frame {
    height: auto;
    aspect-ratio: 121 / 40;
  }
  .shots figcaption {
    font-size: 11.5px;
  }
}

/* ================= FULLSCREEN LIGHTBOX MODAL ================= */
.lk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 7, 10, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lk-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lk-lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 16, 0.7);
  z-index: 2;
}

.lk-lb-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-transform: uppercase;
}

.lk-lb-counter {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ink);
}

.lk-lb-counter span {
  color: var(--amber);
}

.lk-lb-close {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lk-lb-close:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(230, 162, 60, 0.08);
}

.lk-lb-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 70px;
  min-height: 0;
  user-select: none;
}

.lk-lb-stage img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lk-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(14, 18, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  width: 46px;
  height: 46px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 3;
}

.lk-lb-nav:hover {
  background: rgba(20, 26, 36, 0.95);
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-50%) scale(1.05);
}

.lk-lb-prev { left: 18px; }
.lk-lb-next { right: 18px; }

.lk-lb-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 16, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  z-index: 2;
}

.lk-lb-caption {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 860px;
}

.lk-lb-caption b {
  color: var(--amber);
}

.lk-lb-hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

@media (max-width: 768px) {
  .lk-lb-stage {
    padding: 10px 14px;
  }
  .lk-lb-nav {
    display: none;
  }
  .lk-lb-stage img {
    max-height: calc(100vh - 170px);
  }
  .lk-lb-header, .lk-lb-footer {
    padding: 12px 16px;
  }
  .lk-lb-title {
    display: none;
  }
}

/* ================= STOPKA ================= */
.footer { padding: 34px 0; }

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

.dim { opacity: 0.7; }

.reboot {
  background: none;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.reboot:hover { border-color: var(--amber); color: var(--amber); }

/* ================= ANIMACJE WEJŚCIA ================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 640px) {
  .teaser-item { display: flex; flex-wrap: wrap; gap: 5px 14px; }
  .t-date { order: 1; }
  .t-tag { order: 2; }
  .t-arrow { order: 3; margin-left: auto; }
  .t-title { order: 4; flex: 1 0 100%; }
}

@media (max-width: 820px) {
  .sysbar-nav { display: none; }
  .hero { padding: calc(var(--sysbar-h) + 56px) 0 60px; }
  .section { padding: 64px 0; }
  .two-col { grid-template-columns: 1fr; gap: 26px; }
  .facts li { grid-template-columns: 100px 1fr; }
  .boot-log { min-height: 260px; }
  .boot-scanlines { display: none !important; }
  .term-bg-inner { will-change: auto !important; }
  .hero-photo { width: 100%; right: 0; opacity: 0.15; }
  .hero-photo img { object-position: 50% 55%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .contact-card, .teaser-item, .t-title, .t-arrow, .reveal { transition: none; }
  .reveal { opacity: 1; transform: none; }
  .dot, .blink, .boot-log .b-line::after { animation: none; }
}

/* ================= SCHEMAT BLOKOWY PIPELINE 70MAI (DOKŁADNA REPLIKA W HTML/CSS) ================= */
.pipeline-flow {
  background: #0B0D10;
  border: 1px solid #28303C;
  border-radius: 10px;
  padding: 24px;
  margin: 32px 0 28px;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.flow-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 18px;
}

.flow-header-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #E8862A;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  word-break: break-word;
}

.flow-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #E8862A;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
  word-break: break-word;
}

.flow-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #98A2B3;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

/* Karty węzłów */
.flow-card {
  background: #10141A;
  border: 1px solid #28303C;
  border-radius: 8px;
  padding: 14px 18px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
  max-width: 100%;
  min-width: 0;
}

.flow-card:hover {
  border-color: rgba(232, 134, 42, 0.4);
}

.flow-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
  gap: 8px 12px;
}

.flow-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #ECEFF4;
  margin: 0;
  min-width: 0;
  word-break: break-word;
  line-height: 1.4;
  flex: 1 1 200px;
}

/* Plakietki badge */
.flow-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ECEFF4;
}

.flow-badge.green {
  background: rgba(91, 217, 122, 0.15);
  border: 1px solid #5BD97A;
  color: #5BD97A;
}

.flow-badge.amber {
  background: rgba(232, 134, 42, 0.15);
  border: 1px solid #E8862A;
  color: #E8862A;
}

/* Linie wewnątrz kart */
.flow-lines,
.flow-card-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.flow-lines li,
.flow-card-bullets li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.45;
  color: #98A2B3;
  margin: 0;
  word-break: break-word;
}

.flow-lines li.primary {
  color: #ECEFF4;
}

/* Strzałki w dół łączące karty */
.flow-arrow-down {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 100%;
}

.flow-arrow-down::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 6px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #28303C;
}

.flow-arrow-label {
  position: relative;
  z-index: 2;
  background: #0B0D10;
  padding: 0 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: #E8862A;
  white-space: nowrap;
}

.flow-arrow-head {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #E8862A;
  z-index: 2;
}

/* Krok 3 - Filtr kontekstowy */
.flow-card-filter {
  background: #10141A;
  border: 1px solid #28303C;
  border-radius: 8px;
  padding: 14px 18px 16px;
  box-sizing: border-box;
}

.flow-filter-query {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #E8862A;
  margin: 4px 0 12px;
  word-break: break-word;
}

.flow-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.flow-branch-box {
  border-radius: 6px;
  padding: 10px 14px;
  box-sizing: border-box;
  background: #11151B;
  border: 1px solid #1C2430;
}

.flow-branch-box .flow-branch-title {
  color: #ECEFF4;
}

.flow-branch-box.red {
  background: #1C1212;
  border: 1px solid #642323;
}

.flow-branch-box.green {
  background: #101C14;
  border: 1px solid #235A2D;
}

.flow-branch-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.flow-branch-box.red .flow-branch-title {
  color: #EB5757;
}

.flow-branch-box.green .flow-branch-title {
  color: #5BD97A;
}

.flow-branch-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.flow-branch-items li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #98A2B3;
  line-height: 1.4;
  margin: 0;
}

/* Strzałka z gałęzi B (prawa strona) do Archiwum */
.flow-arrow-branch-b {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  height: 44px;
}

.flow-arrow-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.flow-arrow-slot::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 6px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #28303C;
}

.flow-arrow-slot .flow-arrow-label {
  position: relative;
  z-index: 2;
  background: #0B0D10;
  padding: 0 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: #E8862A;
  white-space: nowrap;
}

.flow-arrow-slot .flow-arrow-head {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #E8862A;
  z-index: 2;
}

/* Stopka schematu */
.flow-footer {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #5A6473;
}

/* ================= WARIANTY KOLORYSTYCZNE PIPELINE ================= */
.pipeline-flow.theme-blue .flow-title,
.pipeline-flow.theme-blue .flow-arrow-label,
.pipeline-flow.theme-blue .flow-filter-query {
  color: #4D96FF;
}
.pipeline-flow.theme-blue .flow-arrow-head,
.pipeline-flow.theme-blue .flow-arrow-slot .flow-arrow-head {
  border-top-color: #4D96FF;
}
.pipeline-flow.theme-blue .flow-card:hover {
  border-color: rgba(77, 150, 255, 0.4);
}

.pipeline-flow.theme-green .flow-title,
.pipeline-flow.theme-green .flow-arrow-label,
.pipeline-flow.theme-green .flow-filter-query {
  color: #30D158;
}
.pipeline-flow.theme-green .flow-arrow-head,
.pipeline-flow.theme-green .flow-arrow-slot .flow-arrow-head {
  border-top-color: #30D158;
}
.pipeline-flow.theme-green .flow-card:hover {
  border-color: rgba(48, 209, 88, 0.4);
}

/* Nowe warianty plakietek flow-badge */
.flow-badge.blue {
  background: rgba(77, 150, 255, 0.15);
  border: 1px solid #4D96FF;
  color: #4D96FF;
}

.flow-badge.red {
  background: rgba(235, 87, 87, 0.15);
  border: 1px solid #EB5757;
  color: #EB5757;
}

.flow-badge.purple {
  background: rgba(187, 134, 252, 0.15);
  border: 1px solid #BB86FC;
  color: #BB86FC;
}

/* Wyróżnienia encji HA w liniach flow */
.flow-entity {
  display: inline-block;
  background: #141922;
  border: 1px solid #232B38;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #61AFEF;
}

.flow-val {
  color: #98C379;
  font-weight: 600;
}

.flow-calc {
  color: #E5C07B;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* Warianty gałęzi w schematach */
.flow-branches.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.flow-branch-box.blue {
  background: #0E1626;
  border: 1px solid #1C3D6E;
}
.flow-branch-box.blue .flow-branch-title {
  color: #4D96FF;
}

.flow-branch-box.amber {
  background: #1C1710;
  border: 1px solid #5A3E1E;
}
.flow-branch-box.amber .flow-branch-title {
  color: #E8862A;
}

/* ================= KARTY iOS / LIVE ACTIVITY / NOTIFICATIONS ================= */
.ios-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}

.ios-card {
  position: relative;
  background: rgba(28, 30, 36, 0.85);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  padding: 15px 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  box-sizing: border-box;
  color: #FFFFFF;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.ios-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.ios-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.ios-app-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ios-app-icon {
  width: 20px;
  height: 20px;
  border-radius: 5.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ios-app-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.ios-app-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(235, 235, 245, 0.65);
  text-transform: uppercase;
}

.ios-app-sep {
  color: rgba(235, 235, 245, 0.35);
  font-size: 11px;
  margin: 0 1px;
}

.ios-app-ctx {
  font-size: 11px;
  font-weight: 500;
  color: rgba(235, 235, 245, 0.5);
}

.ios-app-time {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.45);
  font-weight: 400;
}

.ios-la-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-left: 2px;
}

.ios-la-dot {
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ios-la-dot.green {
  background: #30D158;
  box-shadow: 0 0 6px #30D158;
  animation: iosPulse 2s ease-in-out infinite;
}

.ios-la-dot.blue {
  background: #0A84FF;
  box-shadow: 0 0 6px #0A84FF;
  animation: iosPulse 2s ease-in-out infinite;
}

@keyframes iosPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.ios-la-title {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.015em;
  margin: 0 0 3px 0;
  line-height: 1.3;
}

.ios-la-status {
  font-size: 13.5px;
  color: rgba(235, 235, 245, 0.82);
  margin: 0 0 10px 0;
  line-height: 1.35;
  font-weight: 400;
}

.ios-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.ios-progress-track {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.ios-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.ios-progress-fill.green {
  background: #30D158;
  box-shadow: 0 0 10px rgba(48, 209, 88, 0.6);
}

.ios-progress-fill.blue {
  background: #0A84FF;
  box-shadow: 0 0 10px rgba(10, 132, 255, 0.6);
}

.ios-progress-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

.ios-progress-badge.green {
  background: rgba(48, 209, 88, 0.18);
  color: #30D158;
}

.ios-progress-badge.blue {
  background: rgba(10, 132, 255, 0.2);
  color: #409CFF;
}

/* Styl dla podsumowania sesji (Push Notification) */
.ios-summary-body {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(235, 235, 245, 0.9);
}

.ios-summary-body p {
  margin: 0 0 4px 0;
}

.ios-summary-body p:last-child {
  margin-bottom: 0;
}

.ios-summary-body b {
  color: #FFFFFF;
  font-weight: 600;
}

.ios-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.ios-stat-tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.ios-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.55);
  margin-bottom: 2px;
  letter-spacing: 0.04em;
}

.ios-stat-value {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.ios-stat-value.highlight {
  color: #409CFF;
}

.ios-stat-value.green {
  color: #30D158;
}

.ios-stat-value.amber {
  color: #FF9F0A;
}

@media (max-width: 680px) {
  .pipeline-flow {
    padding: 16px 12px;
  }
  .flow-branches {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .flow-branches.three-col {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .flow-arrow-branch-b {
    display: flex;
    justify-content: center;
  }
  .flow-arrow-slot {
    width: 100%;
  }
  .flow-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .ios-summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* ================= TELEGRAM-STYLE SPOILER / CENZURA PIKSELOWA ================= */
.tg-spoiler.tg-spoiler {
  position: relative;
  display: inline-block;
  font-family: 'Flow Block', monospace;
  font-size: 0.95em;
  color: rgba(225, 232, 242, 0.72);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  padding: 0 4px;
  margin: 0 1px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  vertical-align: baseline;
  letter-spacing: 0.04em;
  transition: color 0.2s ease, background 0.2s ease, font-family 0.1s ease;
}

.tg-spoiler::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(255,255,255,0.40) 0.8px, transparent 1.2px),
    radial-gradient(circle at 75% 35%, rgba(255,255,255,0.30) 0.8px, transparent 1.2px),
    radial-gradient(circle at 35% 75%, rgba(255,255,255,0.40) 1.0px, transparent 1.4px),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,0.25) 0.8px, transparent 1.2px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.35) 1.0px, transparent 1.4px);
  background-size: 12px 12px;
  opacity: 0.22;
  animation: tgSparkle 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tgSparkle {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-0.8px, 0.4px); }
  50% { transform: translate(0.4px, -0.8px); }
  75% { transform: translate(-0.4px, 0.4px); }
  100% { transform: translate(0, 0); }
}

.tg-spoiler.tg-spoiler:hover,
.tg-spoiler.tg-spoiler:active,
.tg-spoiler.tg-spoiler.revealed {
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 700;
  color: var(--amber);
  background: rgba(232, 134, 42, 0.16);
  border: 1px solid rgba(232, 134, 42, 0.45);
  box-shadow: 0 0 10px rgba(232, 134, 42, 0.2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tg-spoiler:hover::before,
.tg-spoiler:active::before,
.tg-spoiler.revealed::before {
  opacity: 0;
  display: none;
}

/* ================= PANEL FLOTY OBD2-CENTRAL ================= */
.obd2-fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0;
}

.obd2-vehicle-card {
  background: #10141A;
  border: 1px solid #223044;
  border-radius: 10px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.obd2-vehicle-card:hover {
  border-color: rgba(77, 163, 255, 0.5);
  transform: translateY(-2px);
}

.obd2-veh-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}

.obd2-veh-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #ECEFF4;
  margin: 0 0 4px 0;
}

.obd2-veh-engine {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #4DA3FF;
  margin: 0;
}

.obd2-veh-vin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #717A8A;
  margin-top: 4px;
}

.obd2-veh-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 10px;
  background: #0B0E14;
  border: 1px solid #1E2533;
  border-radius: 8px;
  padding: 10px;
}

.obd2-stat-item {
  display: flex;
  flex-direction: column;
}

.obd2-stat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  color: #717A8A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.obd2-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ECEFF4;
}

.obd2-stat-num.highlight {
  color: #4DA3FF;
}

.obd2-stat-num.green {
  color: #30D158;
}

.obd2-stat-num.amber {
  color: #E8862A;
}

.obd2-veh-footer {
  border-top: 1px solid #1E2533;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #98A2B3;
}

@media (max-width: 900px) {
  .obd2-fleet-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}


/* ================= GATE PANEL VISUALIZATION ================= */
.gate-panel {
  margin: 32px 0 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.gate-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.gate-panel-title {
  font-family: var(--mono);
  font-size: 0.72em;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
}
.gate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gate-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gate-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 4px;
}
.gate-icon.closed { color: #5BD97A; background: rgba(91, 217, 122, 0.1); }
.gate-icon.open { color: #F05545; background: rgba(240, 85, 69, 0.1); }
.gate-icon.moving { color: var(--amber); background: rgba(232, 134, 42, 0.1); }
.gate-name {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--fg);
  font-weight: 600;
}
.gate-status {
  font-family: var(--mono);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.gate-status.closed { color: #5BD97A; }
.gate-status.open { color: #F05545; }
.gate-status.moving { color: var(--amber); }
.gate-meta {
  font-size: 0.7em;
  color: var(--dim);
  font-family: var(--mono);
}
.gate-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.gate-legend-item {
  font-size: 0.72em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.gate-dot.green { background: #5BD97A; }
.gate-dot.red { background: #F05545; }
.gate-dot.amber { background: var(--amber); }
.gate-note {
  font-size: 0.82em;
  color: var(--dim);
  margin-top: 12px;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .gate-grid { grid-template-columns: 1fr; }
}

/* ================= COOKIE BANNER (RODO/GDPR) ================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(16, 20, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.82em;
  color: var(--dim);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner.hidden { display: none; }
.cookie-text {
  max-width: 600px;
  line-height: 1.5;
}
.cookie-text a {
  color: var(--amber);
  text-decoration: underline;
}
.cookie-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  border: 1px solid var(--amber);
  background: transparent;
  color: var(--amber);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.9em;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.cookie-btn:hover {
  background: var(--amber);
  color: var(--bg);
}
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    padding: 14px 16px;
    gap: 10px;
    text-align: center;
  }
}

/* ================= LIGHT LOGIC PANEL & SIMULATOR ================= */
.light-logic-panel {
  margin: 32px 0 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.light-logic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.light-logic-title {
  font-family: var(--mono);
  font-size: 0.74em;
  letter-spacing: 0.08em;
  color: var(--fg);
  text-transform: uppercase;
  font-weight: 700;
}
.light-logic-sub {
  font-size: 0.82em;
  color: var(--dim);
  margin-top: 4px;
}
.light-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.light-tab {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--dim);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.76em;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}
.light-tab:hover {
  color: var(--fg);
  border-color: #3B4B60;
}
.light-tab.active {
  background: rgba(232, 134, 42, 0.12);
  border-color: var(--amber);
  color: var(--amber);
  font-weight: 700;
}
.light-sim-stage {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 20px;
  background: var(--bg);
  border: 1px solid #1D2633;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}
.light-fixture-card {
  position: relative;
  height: 150px;
  background: #080A0D;
  border: 1px solid #1C2430;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.light-fixture-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}
.light-fixture-glow.glow-green {
  opacity: 1;
  background: radial-gradient(circle at 50% 40%, rgba(0, 255, 0, 0.45) 0%, rgba(0, 255, 0, 0.22) 25%, rgba(0, 255, 0, 0.05) 52%, transparent 72%);
}
.light-fixture-glow.glow-red {
  opacity: 1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 59, 48, 0.55) 0%, rgba(255, 59, 48, 0.28) 25%, rgba(255, 59, 48, 0.07) 52%, transparent 72%);
}
.light-fixture-glow.glow-warm {
  opacity: 1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 179, 102, 0.35) 0%, rgba(255, 179, 102, 0.18) 25%, rgba(255, 179, 102, 0.04) 52%, transparent 72%);
}
.light-fixture-glow.glow-neutral {
  opacity: 1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 25%, rgba(255, 255, 255, 0.07) 52%, transparent 72%);
}
.light-fixture-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.light-led {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3441 0%, #151a22 70%, #0d1117 100%);
  border: 2px solid #334255;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5);
  transition: all 0.35s ease;
}
.light-led.led-green {
  background: radial-gradient(circle at 35% 35%, #a6ffb2 0%, #00ff00 55%, #008f00 100%);
  border-color: #70ff70;
  box-shadow: 0 0 24px #00ff00, 0 0 8px #ffffff, inset 0 1px 3px rgba(255,255,255,0.8);
}
.light-led.led-red {
  background: radial-gradient(circle at 35% 35%, #ffb3b0 0%, #ff3b30 55%, #b30000 100%);
  border-color: #ff8580;
  box-shadow: 0 0 24px #ff3b30, 0 0 8px #ffffff, inset 0 1px 3px rgba(255,255,255,0.8);
}
.light-led.led-warm {
  background: radial-gradient(circle at 35% 35%, #ffe6cc 0%, #ffb366 55%, #cc7a1f 100%);
  border-color: #ffd1a4;
  box-shadow: 0 0 20px rgba(255,179,102,0.8), 0 0 6px #ffffff, inset 0 1px 3px rgba(255,255,255,0.8);
}
.light-led.led-neutral {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f0f6fc 55%, #c5d1de 100%);
  border-color: #ffffff;
  box-shadow: 0 0 26px rgba(255,255,255,0.9), 0 0 10px #ffffff, inset 0 1px 4px rgba(255,255,255,1);
}
.light-state-badge {
  font-family: var(--mono);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(8, 10, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all 0.3s ease;
  color: var(--dim);
}
.light-state-badge.badge-off {
  color: #6e7681;
  border-color: rgba(255, 255, 255, 0.08);
}
.light-state-badge.badge-warm {
  color: #ffb366;
  border-color: rgba(255, 179, 102, 0.35);
  box-shadow: 0 0 10px rgba(255, 179, 102, 0.15);
}
.light-state-badge.badge-green {
  color: #00ff00;
  border-color: rgba(0, 255, 0, 0.35);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.15);
}
.light-state-badge.badge-neutral {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}
.light-state-badge.badge-red {
  color: #ff4d4d;
  border-color: rgba(255, 59, 48, 0.35);
  box-shadow: 0 0 10px rgba(255, 59, 48, 0.15);
}
.light-details-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.light-detail-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.light-lbl {
  font-family: var(--mono);
  font-size: 0.68em;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: uppercase;
}
.light-val {
  font-size: 0.84em;
  line-height: 1.45;
  color: var(--fg);
  font-family: var(--mono);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.light-matrix-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #1C2430;
  box-sizing: border-box;
  margin-top: 18px;
}
.light-matrix {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 0.82em;
  text-align: left;
}
.light-matrix th {
  background: #080A0D;
  padding: 10px 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #1C2430;
  white-space: nowrap;
}
.light-matrix td {
  padding: 10px 14px;
  border-bottom: 1px solid #141A24;
  color: var(--fg);
  line-height: 1.5;
}
.light-matrix td.nowrap {
  white-space: nowrap;
}
.light-matrix tr:last-child td {
  border-bottom: none;
}
.light-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 700;
  white-space: nowrap;
}
.light-pill.green { background: rgba(0, 255, 0, 0.12); color: #00FF00; border: 1px solid rgba(0, 255, 0, 0.35); }
.light-pill.red { background: rgba(255, 59, 48, 0.12); color: #FF3B30; border: 1px solid rgba(255, 59, 48, 0.35); }
.light-pill.warm { background: rgba(255, 179, 102, 0.12); color: #FFB366; border: 1px solid rgba(255, 179, 102, 0.35); }
.light-pill.off { background: rgba(255, 255, 255, 0.05); color: var(--dim); border: 1px solid rgba(255, 255, 255, 0.1); }
.light-pill.neutral { background: rgba(255, 255, 255, 0.15); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.4); }

@media (max-width: 720px) {
  .pipeline-flow {
    padding: 16px 14px;
    margin: 22px 0 18px;
  }
  .flow-card {
    padding: 12px 14px;
  }
  .flow-branches,
  .flow-branches.three-col {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .flow-arrow-branch-b {
    grid-template-columns: 1fr;
  }
  .light-sim-stage {
    grid-template-columns: 1fr;
  }
  .light-fixture-card {
    height: 140px;
  }
}

/* ================= FEATURED FLAGSHIP CARD (HOME ASSISTANT CORE) ================= */
.featured-card {
  position: relative;
  background: linear-gradient(135deg, rgba(232, 134, 42, 0.08) 0%, rgba(20, 26, 36, 0.95) 100%) !important;
  border: 1px solid rgba(232, 134, 42, 0.45) !important;
  padding: 30px !important;
  margin-bottom: 28px;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.featured-card:hover {
  border-color: var(--amber) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(232, 134, 42, 0.18);
}
.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(232, 134, 42, 0.12);
  border: 1px solid rgba(232, 134, 42, 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  width: fit-content;
}
.fc-badge .dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  display: inline-block;
}
.fc-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #ECEFF4 !important;
  margin-top: 10px;
}
.fc-desc {
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: #B7C2D0 !important;
  margin-top: 6px;
}
.fc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  align-items: center;
}
.fc-meta-item strong {
  color: #ECEFF4;
}
.fc-cta {
  margin-left: auto;
  color: var(--amber);
  font-weight: 700;
}
.subprojects-header {
  margin-top: 36px;
  margin-bottom: 20px;
}
.subprojects-title {
  font-size: 19px;
  font-weight: 600;
  color: #ECEFF4;
  margin: 0 0 6px;
}
.subprojects-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--dim);
  margin: 0;
}

