/* ==========================================================================
   odbiorynadzory.pl — arkusz wspólny, motyw ciemny
   ========================================================================== */

:root {
  color-scheme: dark;

  --ink:        #E9EDE8;   /* tekst główny */
  --ink-soft:   #A6B5AC;   /* tekst pomocniczy */
  --paper:      #0F1712;   /* tło strony */
  --surface:    #16201A;   /* karty, tabele */
  --line:       #2B3A31;   /* obrysy */
  --line-soft:  #1E2A23;   /* podziały wewnętrzne */
  --green:      #4FA588;   /* akcent, odnośniki */
  --green-dark: #1F5C4C;   /* wypełnienia, hover */
  --green-deep: #10281F;   /* blok kontaktowy */
  --brass:      #C89A33;   /* akcent sygnalny */

  --display: "Archivo", system-ui, sans-serif;
  --body:    "IBM Plex Sans", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --max:  1160px;
  --sect: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--green); color: var(--paper); }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #6FC0A5; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--green); color: var(--paper);
  padding: 0.7rem 1.2rem; z-index: 100; text-decoration: none;
}
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  color: #F2F5F1;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.18rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1.1em; max-width: 66ch; }

.lead {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

/* --- Etykieta sekcji ---------------------------------------------------- */
.tag {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
}
.tag::before {
  content: "";
  width: 2rem; flex: none;
  border-top: 2px dashed currentColor;
}

/* --- Nagłówek: szkło ----------------------------------------------------- */
.top {
  border-bottom: 1px solid transparent;
  background: rgba(15, 23, 18, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  position: sticky; top: 0; z-index: 20;
  transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
@supports not (backdrop-filter: blur(1px)) {
  .top { background: rgba(15, 23, 18, 0.96); }
}
.top.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(15, 23, 18, 0.78);
  box-shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.8);
}
.top__in {
  display: flex; flex-wrap: wrap;               /* <-- naprawa nawigacji */
  align-items: center; gap: 0.9rem 1rem;
  padding: 0.85rem 0;
}
.brand {
  font-family: var(--display);
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.brand span { color: var(--green); }

.nav { display: flex; gap: 1.35rem; flex-wrap: wrap; align-items: center; }
.nav a { font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--green); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.top__tel {
  font-family: var(--mono); font-size: 0.92rem; font-weight: 600;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}

.burger {
  display: none;
  background: none; border: 1px solid var(--line);
  width: 2.6rem; height: 2.4rem; padding: 0;
  cursor: pointer; position: relative;
}
.burger span {
  position: absolute; left: 0.55rem; right: 0.55rem;
  height: 2px; background: var(--ink);
  transition: transform 0.25s, opacity 0.2s, top 0.25s;
}
.burger span:nth-child(1) { top: 0.68rem; }
.burger span:nth-child(2) { top: 1.12rem; }
.burger span:nth-child(3) { top: 1.56rem; }
.burger.is-open span:nth-child(1) { top: 1.12rem; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 1.12rem; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; order: 3; }
  .top__tel { order: 2; margin-left: auto; }
  .nav {
    order: 4; display: none; width: 100%; flex-basis: 100%;
    flex-direction: column; align-items: flex-start;
    gap: 0; padding-bottom: 0.6rem;
  }
  .nav.is-open { display: flex; animation: navdrop 0.25s ease both; }
  @keyframes navdrop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }
  .nav a {
    width: 100%; padding: 0.7rem 0;
    border-top: 1px solid var(--line-soft); font-size: 1rem;
  }
}

/* --- Hero --------------------------------------------------------------- */
.hero { padding: var(--sect) 0 0; }
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero__img img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line);
}
.hero__area {
  font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink-soft); max-width: none;
  border-top: 1px dashed var(--line);
  padding-top: 1rem; margin: 3rem 0 0;
}

/* --- Przyciski ---------------------------------------------------------- */
.cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }
.btn {
  display: inline-block; position: relative; overflow: hidden;
  font-family: var(--display); font-weight: 600; font-size: 0.98rem;
  padding: 0.8rem 1.5rem; border: 2px solid var(--green);
  text-decoration: none; z-index: 0;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn:hover { transform: translateY(-1px); }
.btn:hover::before { transform: scaleX(1); }
.btn--solid { background: var(--green-dark); color: #fff; }
.btn--solid::before { background: var(--green); }
.btn--solid:hover { color: var(--paper); border-color: var(--green); }
.btn--ghost { background: transparent; color: var(--green); }
.btn--ghost::before { background: var(--green); }
.btn--ghost:hover { color: var(--paper); }

/* --- Sekcje ------------------------------------------------------------- */
.about, .process, .services { padding: var(--sect) 0; }
.about { border-top: 1px solid var(--line); margin-top: var(--sect); }
.process, .services { border-top: 1px solid var(--line); }

/* --- Kroki -------------------------------------------------------------- */
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: s; }
.step {
  counter-increment: s;
  display: grid; grid-template-columns: 3rem 1fr; gap: 1.1rem;
  padding: 1.4rem 0; border-top: 1px dashed var(--line);
}
.step:last-child { border-bottom: 1px dashed var(--line); }
.step::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.92rem; font-weight: 600;
  color: var(--brass); padding-top: 0.2rem;
}
.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* --- Karty -------------------------------------------------------------- */
.grid {
  display: grid; gap: 1.25rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card::after {
  content: ""; position: absolute; top: -1px; left: -1px;
  height: 3px; width: 0; background: var(--brass);
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover {
  border-color: var(--green); transform: translateY(-4px);
  box-shadow: 0 26px 44px -26px rgba(0, 0, 0, 0.85);
}
.card:hover::after { width: calc(100% + 2px); }
.card__img { display: block; overflow: hidden; }
.card__img img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .card__img img { transform: scale(1.045); }
.card__in { padding: 1.35rem 1.5rem 1.6rem; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 0.45rem; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card:hover h3 a { color: var(--green); }
.card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.grid__more { margin-top: 2rem; font-size: 0.97rem; color: var(--ink-soft); }

/* --- Podstrony ---------------------------------------------------------- */
.page-head { padding: var(--sect) 0 2.5rem; }
.page-body { padding-bottom: var(--sect); }
.page-body h2 { margin-top: 2.8rem; }
.page-body h3 {
  margin-top: 2rem; margin-bottom: 0.4rem;
  font-family: var(--mono); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.01em; color: var(--brass); text-transform: none;
}
.page-body h3 + p { color: var(--ink-soft); }
.page-body ul { max-width: 66ch; padding-left: 1.2rem; }
.page-body li { margin-bottom: 0.55rem; }

.shot { margin: 0 0 1rem; }
.shot img {
  width: 100%; aspect-ratio: 21 / 9; object-fit: cover;
  border: 1px solid var(--line);
}

.panel {
  background: rgba(22, 32, 26, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 237, 232, 0.08);
  border-left: 3px solid var(--brass);
  box-shadow: 0 18px 40px -30px rgba(0, 0, 0, 0.9);
  padding: 1.35rem 1.6rem; margin: 2.2rem 0;
}
@supports not (backdrop-filter: blur(1px)) {
  .panel { background: var(--surface); }
}
.panel p:last-child { margin-bottom: 0; }
.panel strong { font-family: var(--display); color: #F2F5F1; }

/* --- Tabela cen --------------------------------------------------------- */
.price {
  width: 100%; border-collapse: collapse; margin: 2.5rem 0 1rem;
  background: var(--surface); font-size: 0.98rem;
  border: 1px solid var(--line);
}
.price caption {
  caption-side: bottom; text-align: left;
  font-size: 0.85rem; color: var(--ink-soft); padding-top: 0.9rem;
}
.price th, .price td {
  text-align: left; padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
.price thead th {
  font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); border-bottom: 2px solid var(--line);
}
.price tbody th { font-weight: 400; color: var(--ink); }
.price tbody tr { transition: background-color 0.15s; }
.price tbody tr:hover { background: rgba(79, 165, 136, 0.06); }
.price td {
  font-family: var(--mono); font-weight: 600;
  white-space: nowrap; color: var(--green);
}
.price td.todo { color: var(--brass); font-weight: 500; }
.price .note {
  display: block; font-family: var(--body); font-weight: 400;
  font-size: 0.84rem; color: var(--ink-soft); margin-top: 0.15rem;
  white-space: normal;
}
@media (max-width: 620px) {
  .price th, .price td { padding: 0.75rem 0.6rem; font-size: 0.92rem; }
  .price td { white-space: normal; }
}

/* --- Kontakt ------------------------------------------------------------ */
.contact {
  padding: var(--sect) 0;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 85% 0%, rgba(79, 165, 136, 0.12), transparent 60%),
    var(--green-deep);
  color: #fff;
}
.contact h2 { color: #F2F5F1; }
.contact p { color: #BCCDC4; }
.contact .tag { color: #7FC0A6; }
.contact__lines {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  margin-top: 2rem; font-family: var(--mono);
}
.contact__lines a { color: #fff; font-size: 1.05rem; }
.contact__lines span {
  display: block; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #7FC0A6; margin-bottom: 0.3rem;
}
.contact__plain { color: #fff !important; font-size: 1.05rem; margin: 0; }

/* --- Stopka ------------------------------------------------------------- */
.foot { padding: 2.5rem 0; font-size: 0.9rem; color: var(--ink-soft); }
.foot__nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.foot__nav a { color: var(--ink-soft); text-decoration: none; }
.foot__nav a:hover { color: var(--green); }
.foot__meta { max-width: none; }

/* ==========================================================================
   WARSTWA OZDOBNA
   Czysto dekoracyjna: działa bez JS, znika przy prefers-reduced-motion,
   nie wpływa na układ treści. Poświaty zbudowane z gradientów, bez
   filter: blur() — celowo, bo filtry na dużych polach zawodzą na mobilnych
   GPU. Gradient renderuje się wszędzie i kosztuje ułamek tego samego.
   ========================================================================== */

.bg {
  position: fixed; inset: 0; z-index: -1;
  overflow: hidden; pointer-events: none;
}
.bg::before {                       /* siatka kreślarska */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right,  rgba(233, 237, 232, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 237, 232, 0.055) 1px, transparent 1px),
    linear-gradient(to right,  rgba(233, 237, 232, 0.024) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 237, 232, 0.024) 1px, transparent 1px);
  background-size: 112px 112px, 112px 112px, 28px 28px, 28px 28px;
  -webkit-mask-image: radial-gradient(120% 120% at 50% 0%, #000 55%, transparent 100%);
  mask-image: radial-gradient(120% 120% at 50% 0%, #000 55%, transparent 100%);
}
.bg__blob {
  position: absolute; border-radius: 50%;
  will-change: transform;
}
.bg__blob--a {
  width: 52vw; height: 52vw; min-width: 460px; min-height: 460px;
  top: -14%; right: -12%;
  background: radial-gradient(circle at 40% 40%,
    rgba(79, 165, 136, 0.20), rgba(79, 165, 136, 0.07) 45%, transparent 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
.bg__blob--b {
  width: 44vw; height: 44vw; min-width: 380px; min-height: 380px;
  bottom: -16%; left: -10%;
  background: radial-gradient(circle at 55% 45%,
    rgba(200, 154, 51, 0.13), rgba(200, 154, 51, 0.045) 45%, transparent 68%);
  animation: drift-b 41s ease-in-out infinite alternate;
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, 5vh) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.08); }
  to   { transform: translate(5vw, -4vh) scale(1); }
}

/* kompas: kreskowane okręgi obracające się jak limbus teodolitu */
.bg__ring {
  position: absolute; border-radius: 50%;
  border: 2px dashed rgba(79, 165, 136, 0.20);
  will-change: transform;
}
.bg__ring--a {
  width: 34rem; height: 34rem; top: 6rem; right: -12rem;
  animation: spin 90s linear infinite;
}
.bg__ring--b {
  width: 20rem; height: 20rem; top: 12rem; right: -4rem;
  border-color: rgba(200, 154, 51, 0.22);
  animation: spin 60s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .bg__ring--a { width: 20rem; height: 20rem; top: 4rem; right: -9rem; }
  .bg__ring--b { width: 12rem; height: 12rem; top: 8rem; right: -3rem; }
  .bg__blob--a { min-width: 340px; min-height: 340px; }
  .bg__blob--b { min-width: 300px; min-height: 300px; }
}

/* --- Pasek postępu przewijania ------------------------------------------ */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 40; pointer-events: none;
}
.progress__bar {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--green), var(--brass));
  transform: scaleX(0); transform-origin: left;
}

/* --- Odsłony przy przewijaniu -------------------------------------------- */
/* Stany ukryte istnieją wyłącznie przy zgodzie na ruch — przy
   prefers-reduced-motion treść jest widoczna od razu. */
@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0; transform: translateY(20px);
    transition:
      opacity 0.6s ease var(--rv-d, 0s),
      transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rv-d, 0s);
  }
  .rv.in { opacity: 1; transform: none; }

  .rv .tag::before,
  .rv.tag::before { width: 0; transition: width 0.7s ease 0.25s; }
  .rv.in .tag::before,
  .rv.tag.in::before { width: 2rem; }

  .shot.rv img {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s;
  }
  .shot.rv.in img { clip-path: inset(0 0 0 0); }

  .hero__text > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__text > *:nth-child(1) { animation-delay: 0.05s; }
  .hero__text > *:nth-child(2) { animation-delay: 0.14s; }
  .hero__text > *:nth-child(3) { animation-delay: 0.23s; }
  .hero__text > *:nth-child(4) { animation-delay: 0.32s; }
  .hero__img { animation: unveil 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
  .hero__area { animation: rise 0.7s ease 0.55s both; }
  .page-head .tag,
  .page-head h1,
  .page-head .lead,
  .page-head .cta-row { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .page-head h1 { animation-delay: 0.09s; }
  .page-head .lead { animation-delay: 0.18s; }
  .page-head .cta-row { animation-delay: 0.27s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes unveil {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* --- Pasek z terminem: przesuwająca się taśma ---------------------------- */
/* Po 1 stycznia 2027 pasek znika razem ze stałą TICKER w build.py —
   te reguły mogą wtedy zostać, nie kolidują z niczym.                      */
.ticker {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg,
      rgba(200, 154, 51, 0.10), rgba(79, 165, 136, 0.08) 55%, transparent);
  overflow: hidden;
  position: relative;
}
.ticker::after {                     /* wygaszenie krawędzi */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg,
    var(--paper), transparent 8%, transparent 92%, var(--paper));
}
.ticker__link {
  display: block; padding: 0.62rem 0;
  text-decoration: none; color: var(--ink);
}
.ticker__track {
  display: flex; width: max-content;
  animation: slide 78s linear infinite;
  will-change: transform;
}
.ticker__item {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.07em;
  text-transform: uppercase; white-space: nowrap;
  padding-inline: 1.5rem;
  display: inline-flex; align-items: center;
}
.ticker__item::before {              /* znacznik pikietażu */
  content: ""; width: 6px; height: 6px; flex: none;
  margin-right: 1.5rem;
  background: var(--brass); transform: rotate(45deg);
}
.ticker__item:nth-child(4n + 1) { color: var(--brass); font-weight: 600; }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker__link:hover .ticker__track,
.ticker__link:focus-visible .ticker__track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; width: 100%; justify-content: center; }
  .ticker__item { display: none; }
  .ticker__item:first-child { display: inline-flex; }
  .ticker::after { display: none; }
}
@media (max-width: 700px) {
  .ticker__track { animation-duration: 52s; }
  .ticker__item { font-size: 0.72rem; padding-inline: 1.1rem; }
  .ticker__item::before { margin-right: 1.1rem; }
}
