/* Strony bez logowania: strona startowa (start.html), logowanie, pierwsze konto i zaproszenie.
   Motyw: mapa anomalii z izoliniami (izolinie.js) – ta sama, co w logo – na tle w barwie nocy. */

.site { --gutter: clamp(20px, 5vw, 48px); background: var(--paper); line-height: 1.5; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--paper); color: var(--ink);
  padding: 10px 14px; border-radius: 8px; font-weight: 650;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ nagłówek strony startowej */
.site-nav {
  position: sticky; top: 0; z-index: 20; background: rgba(14, 18, 22, 0.9); color: var(--paper);
  border-bottom: 1px solid rgba(245, 243, 239, 0.08); padding-top: env(safe-area-inset-top);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.nav-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.nav-brand { display: flex; flex: none; }
.nav-brand img { display: block; height: 36px; width: auto; }
.nav-links { display: flex; gap: 24px; margin-left: 8px; }
.nav-links a { color: rgba(245, 243, 239, 0.78); text-decoration: none; font-size: 0.98rem; padding: 6px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.nav-actions { display: flex; gap: 10px; margin-left: auto; }

/* ------------------------------------------------------------------ pierwszy ekran: mapa, nad nią przelot drona */
.hero {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper);
  min-height: min(860px, calc(100svh - 64px)); display: flex; flex-direction: column; justify-content: space-between;
}
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 18, 22, 0.95) 0%, rgba(14, 18, 22, 0.86) 30%,
    rgba(14, 18, 22, 0.3) 57%, rgba(14, 18, 22, 0) 70%);
}
.hero-body { position: relative; z-index: 2; padding-block: clamp(64px, 12vh, 132px) 40px; }
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.1rem); line-height: 0.98; letter-spacing: -0.028em; max-width: 12.5ch;
  text-wrap: balance;
}
.hero-lead {
  font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.5; color: rgba(245, 243, 239, 0.84); max-width: 33em;
  margin: 26px 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-actions .btn { min-height: 50px; padding-inline: 22px; font-size: 1.05rem; }
.hero-note { margin: 16px 0 0; font-size: 0.95rem; color: var(--muted-on-ink); }
.hero-flash { display: inline-block; margin: 0 0 22px; padding: 8px 12px; border-radius: 8px; background: var(--paper);
  color: var(--ink); font-weight: 650; }
.hero-devices {
  position: relative; z-index: 2; margin-block: 0 28px; padding-top: 18px; font-size: 0.95rem;
  color: rgba(245, 243, 239, 0.62); border-top: 1px solid rgba(245, 243, 239, 0.12); max-width: none;
}

/* cel na mapie – jak znacznik celu w aplikacji */
.hero-pin {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; transform: translate(-14px, -14px);
  opacity: 0; transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.hero-pin.show { opacity: 1; transform: translate(-14px, -14px) scale(1); }
.hero-pin:not(.show) { transform: translate(-14px, -6px) scale(0.85); }
.pin-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; border: 2px solid #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
  box-shadow: 0 0 0 6px rgba(220, 20, 60, 0.22), 0 2px 8px rgba(0, 0, 0, 0.5); flex: none;
}
.pin-label {
  background: var(--paper); color: var(--ink); font-weight: 650; font-size: 0.92rem; padding: 7px 11px;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); white-space: nowrap;
}
.hero-pin.left { flex-direction: row-reverse; transform: translate(calc(-100% + 14px), -14px); }
.hero-pin.left:not(.show) { transform: translate(calc(-100% + 14px), -6px) scale(0.85); }
.hero-pin.below { flex-direction: column; align-items: flex-start; gap: 8px; }
.hero-pin.below .pin-label { transform: translateX(var(--shift, 0)); }

/* ------------------------------------------------------------------ pasy treści */
.band { padding-block: clamp(72px, 9vw, 128px); }
.band.light { background: var(--paper); color: var(--ink); }
.band.dark { background: var(--ink); color: var(--paper); }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 4.5vw, 60px); }
.section-head h2 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); line-height: 1.04; letter-spacing: -0.02em; }
.section-head p { font-size: 1.15rem; color: var(--muted); margin: 16px 0 0; max-width: 38em; }
.band.dark .section-head p { color: var(--muted-on-ink); }

/* kroki 0–4 jak punkty trasy na linii lotu – ta sama numeracja co w aplikacji */
.steps-line {
  list-style: none; margin: 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px; position: relative;
}
.steps-line::before {
  content: ""; position: absolute; left: 22px; right: 0; top: 26px; border-top: 2px dashed #b9b1a5;
}
.steps-line li { position: relative; padding-top: 34px; }
.step-no {
  position: absolute; top: -22px; left: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 800; font-size: 1.25rem;
}
.steps-line li:last-child .step-no { background: var(--red); border-color: var(--red); color: #fff; }
.steps-line h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; }
.steps-line p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid #d3ccc1; background: #e8e4dd;
  box-shadow: 0 40px 70px -42px rgba(14, 18, 22, 0.6);
}
.shot figcaption { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.shot-app { margin-top: clamp(48px, 6vw, 80px); }

.pair { padding-top: 0; }
.pair-grid { display: flex; flex-direction: column; gap: clamp(64px, 8vw, 112px); }
.pair-item { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px);
  align-items: center; }
.pair-item:nth-child(2) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.pair-item:nth-child(2) .shot { order: 2; }
.pair-text h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.pair-text p { font-size: 1.12rem; color: var(--muted); max-width: 32em; margin: 16px 0 0; }
.shot-phone img { border-radius: 30px; border: 9px solid var(--ink); background: var(--ink); }

/* sprzęt – tabela jak w karcie katalogowej */
.spec { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.spec thead th {
  text-align: left; font-weight: 600; font-size: 0.95rem; color: var(--muted-on-ink); padding: 0 0 14px;
}
.spec tbody th, .spec tbody td {
  text-align: left; vertical-align: top; padding: 18px 0; border-top: 1px solid rgba(245, 243, 239, 0.14);
}
.spec tbody th { width: 34%; padding-right: 28px; font-weight: 700; font-size: 1.12rem; }
.spec tbody td { color: rgba(245, 243, 239, 0.8); line-height: 1.5; }

.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; margin: 0; }
.uses > div { border-top: 2px solid var(--ink); padding-top: 18px; }
.uses dt { font-family: var(--font-title); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.01em; }
.uses dd { margin: 10px 0 0; color: var(--muted); font-size: 1.07rem; max-width: 32em; }

/* prośba o dostęp */
.access { position: relative; overflow: hidden; }
.access-art { opacity: 0.55; }
.access::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 18, 22, 0.96) 0%, rgba(14, 18, 22, 0.82) 45%, rgba(14, 18, 22, 0.5) 100%);
}
.access-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(36px, 6vw, 96px); align-items: start; }
.access-text h2 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); line-height: 1.04; letter-spacing: -0.02em; }
.access-text p { font-size: 1.15rem; color: rgba(245, 243, 239, 0.82); max-width: 30em; margin: 18px 0 0; }
.access-text .access-login { font-size: 1rem; color: var(--muted-on-ink); margin-top: 28px; }
.access-login a, .site-foot a { color: var(--paper); text-underline-offset: 3px; }
.access-box { background: var(--paper); color: var(--ink); border-radius: 16px; padding: clamp(22px, 3vw, 32px); }
.form .field { margin: 0 0 14px; }
.form input, .form textarea { width: 100%; min-height: 46px; }
.form .btn { width: 100%; min-height: 50px; margin-top: 4px; }
.form-note { margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }
.request-done h3 { font-family: var(--font-title); font-weight: 800; font-size: 1.5rem; }
.request-done p { margin: 10px 0 0; color: var(--muted); font-size: 1.05rem; }

.site-foot { background: var(--ink); color: var(--muted-on-ink); padding: 36px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(245, 243, 239, 0.08); }
.foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; }
.foot-row img { display: block; height: 30px; width: auto; }
.foot-row p { margin: 0; font-size: 0.95rem; }
.foot-row .foot-legal { flex-basis: 100%; font-size: 0.8rem; line-height: 1.5; max-width: 78ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.foot-note { margin-top: 18px; font-size: 0.85rem; color: rgba(167, 176, 185, 0.75); }

/* ------------------------------------------------------------------ logowanie, pierwsze konto, zaproszenie */
.auth-page { min-height: 100vh; min-height: 100svh; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.auth-art {
  position: relative; overflow: hidden; background: var(--ink); color: var(--paper); display: flex;
  flex-direction: column; justify-content: space-between; padding: clamp(24px, 4vw, 48px);
  padding-top: max(clamp(24px, 4vw, 48px), env(safe-area-inset-top));
}
.auth-art::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 18, 22, 0.7) 0%, rgba(14, 18, 22, 0) 30%, rgba(14, 18, 22, 0) 62%,
    rgba(14, 18, 22, 0.9) 100%);
}
.auth-brand { position: relative; z-index: 2; display: inline-flex; align-self: flex-start; }
.auth-brand img { display: block; height: 40px; width: auto; }
.auth-tagline {
  position: relative; z-index: 2; font-family: var(--font-title); font-weight: 800; font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1.05; letter-spacing: -0.02em; max-width: 14ch; margin: 0 0 6px;
}
.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 64px) var(--gutter); }
.auth-panel { width: min(400px, 100%); }
.auth-panel h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1.05; letter-spacing: -0.02em; }
.auth-panel .lead { color: var(--muted); font-size: 1.05rem; margin: 12px 0 22px; }
.auth-panel form { margin-top: 22px; }
.auth-panel .field { margin: 0 0 14px; }
.auth-panel .field .hint { font-size: 0.85rem; margin: 2px 0 0; }
.auth-panel input { width: 100%; min-height: 46px; }
.auth-panel .btn { width: 100%; min-height: 50px; }
.auth-panel .error:not(:empty) { margin-bottom: 12px; }
.auth-aside {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.98rem;
}
.auth-aside p { margin: 6px 0; }
.auth-aside a { color: var(--ink); font-weight: 650; text-underline-offset: 3px; }
.auth-panel .check { margin: 4px 0 16px; font-size: 0.95rem; line-height: 1.45; }
.auth-panel .check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; }
.auth-panel .check a, .auth-legal a { color: var(--ink); text-underline-offset: 3px; }
.auth-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 28px 0 0; font-size: 0.88rem; color: var(--muted); }
.auth-legal a { color: var(--muted); }
.form-note a { color: var(--ink); text-underline-offset: 2px; }

/* ------------------------------------------------------------------ dokumenty: regulamin, polityka prywatności */
.doc-band { position: relative; overflow: hidden; background: var(--ink); color: var(--paper); }
.doc-art { opacity: 0.5; }
.doc-band::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 18, 22, 0.97) 0%, rgba(14, 18, 22, 0.88) 48%, rgba(14, 18, 22, 0.35) 100%);
}
.doc-band-body { position: relative; z-index: 2; padding-block: clamp(48px, 7vw, 92px) clamp(34px, 4.5vw, 52px); }
.doc-band h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); line-height: 1; letter-spacing: -0.025em; max-width: 14ch; }
.doc-lead { font-size: clamp(1.08rem, 1.4vw, 1.22rem); line-height: 1.5; color: rgba(245, 243, 239, 0.84);
  max-width: 36em; margin: 20px 0 0; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 24px 0 0; font-size: 0.95rem;
  color: var(--muted-on-ink); }
.doc-meta a, .doc-print { color: var(--paper); text-underline-offset: 3px; }
.doc-print { font: inherit; background: none; border: 0; padding: 4px 0; text-decoration: underline; cursor: pointer; }

.doc-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 112px); align-items: start; }
.doc-toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; }
.doc-toc ol, .doc-toc-small ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.doc-toc a, .doc-toc-small a {
  display: grid; grid-template-columns: 2.9em minmax(0, 1fr); gap: 2px; padding: 6px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 0.94rem; line-height: 1.35;
}
.doc-toc a:hover, .doc-toc-small a:hover { color: var(--ink); background: rgba(14, 18, 22, 0.05); }
.doc-toc a[aria-current="true"] { color: var(--ink); background: rgba(14, 18, 22, 0.07); font-weight: 650; }
.doc-toc-small { display: none; }

.doc-body { max-width: 44rem; }
.doc-body section { scroll-margin-top: 84px; }
.doc-body section + section { margin-top: clamp(30px, 4vw, 42px); }
.doc-body h2 { font-size: clamp(1.28rem, 2vw, 1.5rem); line-height: 1.2; margin: 0 0 14px; }
.doc-no { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 0.15em; }
.doc-body p, .doc-body li { font-size: 1.06rem; line-height: 1.65; }
.doc-body p { margin: 0 0 12px; }
.doc-body ol, .doc-body ul { margin: 0 0 12px; padding-left: 1.5em; }
.doc-body li { margin: 0 0 9px; padding-left: 0.25em; }
.doc-body li::marker { color: var(--muted); }
/* punkty w ustępach jak w polskich aktach: 1), 2), 3) */
.doc-body li > ol { list-style: none; counter-reset: pkt; margin: 8px 0 0; padding-left: 0.4em; }
.doc-body li > ol > li { counter-increment: pkt; position: relative; padding-left: 2em; margin-bottom: 6px; }
.doc-body li > ol > li::before { content: counter(pkt) ")"; position: absolute; left: 0; color: var(--muted); }
.doc-body a { color: var(--ink); text-underline-offset: 3px; }
.doc-body strong { font-weight: 700; }
.doc-table { margin: 6px 0 16px; border-top: 2px solid var(--ink); }
.doc-body table { width: 100%; border-collapse: collapse; }
.doc-body th { text-align: left; vertical-align: bottom; font-size: 0.9rem; font-weight: 650; color: var(--muted);
  padding: 12px 16px 10px 0; }
.doc-body td { vertical-align: top; font-size: 0.98rem; line-height: 1.5; padding: 14px 16px 14px 0;
  border-top: 1px solid var(--line); }
.doc-body td:first-child { font-weight: 650; }
.doc-body td:last-child, .doc-body th:last-child { padding-right: 0; }

/* ------------------------------------------------------------------ wąskie ekrany */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .steps-line { grid-template-columns: 1fr; gap: 26px; padding: 0 0 0 0; }
  .steps-line::before { left: 21px; right: auto; top: 22px; bottom: 22px; border-top: 0; border-left: 2px dashed #b9b1a5; }
  .steps-line li { padding: 0 0 0 66px; min-height: 44px; }
  .step-no { top: 0; }
  .pair-item, .pair-item:nth-child(2) { grid-template-columns: 1fr; }
  .pair-item:nth-child(2) .shot { order: 0; }
  .shot-phone { max-width: 280px; }
  .access-grid { grid-template-columns: 1fr; }
  .access-box { max-width: 520px; }
}
@media (max-width: 720px) {
  .nav-row { gap: 12px; min-height: 58px; }
  .nav-brand img { height: 30px; }
  .nav-request { display: none; }
  .hero { min-height: calc(100svh - 58px); }
  .hero::before {
    background: linear-gradient(180deg, rgba(14, 18, 22, 0.96) 0%, rgba(14, 18, 22, 0.9) 44%, rgba(14, 18, 22, 0.25) 66%,
      rgba(14, 18, 22, 0) 80%, rgba(14, 18, 22, 0.75) 100%);
  }
  .hero-body { padding-block: 40px 24px; }
  .hero-devices { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .spec thead { display: none; }
  .spec tbody th, .spec tbody td { display: block; width: auto; padding: 0; border: 0; }
  .spec tbody tr { display: block; padding: 18px 0; border-top: 1px solid rgba(245, 243, 239, 0.14); }
  .spec tbody td { margin-top: 6px; }
  .uses { grid-template-columns: 1fr; gap: 32px; }
  .foot-links { margin-left: 0; }
  .auth-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-art { min-height: 200px; }
  .auth-tagline { font-size: 1.45rem; }
  .auth-main { align-items: flex-start; padding-top: 32px; }
}

/* dokumenty na wąskim ekranie: spis treści zwinięty nad tekstem, tabele jako karty */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; padding-top: 28px; }
  .doc-toc { display: none; }
  .doc-toc-small { display: block; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .doc-toc-small summary { padding: 14px 16px; font-weight: 650; cursor: pointer; min-height: 48px; }
  .doc-toc-small ol { padding: 0 6px 10px; }
  .doc-body table, .doc-body tbody, .doc-body tr, .doc-body td { display: block; }
  .doc-body thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc-body tr { padding: 14px 0 12px; border-top: 1px solid var(--line); }
  .doc-body tr:first-child { border-top: 0; }
  .doc-body td { border: 0; padding: 0 0 2px; }
  .doc-body td::before { content: attr(data-label); display: block; margin-top: 8px; font-size: 0.84rem;
    font-weight: 400; color: var(--muted); }
  .doc-body td:first-child { font-size: 1.05rem; }
  .doc-body td:first-child::before { display: none; }
}

@page { margin: 18mm 16mm; }
@media print {
  .site-nav, .site-foot, .doc-toc, .doc-toc-small, .doc-print, .doc-meta a, .skip, .doc-art { display: none !important; }
  .site { background: #fff; }
  .wrap { width: auto; margin: 0; }
  .doc-band, .doc-band h1, .doc-lead, .doc-meta, .doc-meta a { background: none; color: #000; }
  .doc-band::before { display: none; }
  .doc-band-body { padding: 0 0 12pt; }
  .doc-grid { display: block; padding: 0; width: auto; }
  .doc-body { max-width: none; }
  .doc-body a { color: #000; text-decoration: none; }
  .doc-body section { break-inside: auto; }
  .doc-body h2 { break-after: avoid; }
}
