/* Fader Bridge — wspólne style strony sklepu */

:root {
  color-scheme: light;
  --bg: #e8ebec;
  --surface: #f6f7f7;
  --panel: #dde2e4;
  --ink: #121518;
  --muted: #545e67;
  --line: #c3cacf;
  --accent: #c23a2b;
  --accent-ink: #ffffff;
  --meter: #2f9150;
  --amber: #b8860b;
  --focus: #1f6fd1;

  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.5rem, 6vw, 4.25rem);

  --wrap: 72rem;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1215;
    --surface: #171c20;
    --panel: #1e252a;
    --ink: #e6e9eb;
    --muted: #98a2ab;
    --line: #2b333a;
    --accent: #e0513f;
    --accent-ink: #ffffff;
    --meter: #4cc06f;
    --amber: #e3b43a;
    --focus: #6aa8ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1215;
  --surface: #171c20;
  --panel: #1e252a;
  --ink: #e6e9eb;
  --muted: #98a2ab;
  --line: #2b333a;
  --accent: #e0513f;
  --accent-ink: #ffffff;
  --meter: #4cc06f;
  --amber: #e3b43a;
  --focus: #6aa8ff;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
}

img, :not(svg) > svg { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); text-transform: uppercase; }
h2 { font-size: var(--step-3); text-transform: uppercase; }
h3 { font-size: var(--step-2); font-weight: 600; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font: 500 var(--step--1)/1.3 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- nagłówek ---------- */
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.5rem;
}
.brand {
  font: 700 1.375rem/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--accent);
}
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.9375rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav { display: none; } .top .btn { margin-left: auto; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 600 1rem/1 var(--f-body);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-sm { padding: 0.55rem 0.9rem; font-size: 0.9375rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); filter: none; }

/* ---------- sekcje ---------- */
section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 2.25rem; max-width: 44rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-copy { display: grid; gap: 1.5rem; }
.hero h1 .dim { color: var(--muted); }
.lede { font-size: var(--step-1); max-width: 36rem; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.price {
  font: 700 var(--step-3)/1 var(--f-display);
  font-variant-numeric: tabular-nums;
}
.price small { font: 400 var(--step--1)/1.3 var(--f-body); color: var(--muted); display: block; margin-top: 0.3rem; }
.fine { font-size: var(--step--1); color: var(--muted); }

.device-stage {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.device-stage > svg { width: min(100%, 340px); filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.28)); }

/* ---------- tor sygnału ---------- */
.chain {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin-top: 2.5rem;
  font-family: var(--f-mono);
}
.chain-node {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.chain-node.is-ours { border-color: var(--accent); }
.chain-node strong { font: 600 var(--step-1)/1.2 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; }
.chain-node span { font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
.chain-link {
  display: grid;
  place-items: center;
  padding-inline: 0.75rem;
  font-size: var(--step--1);
  color: var(--muted);
  text-align: center;
  min-width: 4.5rem;
}
.chain-link::before {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 10px);
  margin-bottom: 0.35rem;
}
@media (max-width: 760px) {
  .chain { grid-template-columns: 1fr; }
  .chain-link { padding-block: 0.6rem; }
  .chain-link::before { width: 2px; height: 1.5rem; margin: 0 auto 0.35rem; background: repeating-linear-gradient(180deg, var(--muted) 0 6px, transparent 6px 10px); }
}

/* ---------- tabele ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 500 var(--step--1)/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
td.ctl { font-family: var(--f-mono); white-space: nowrap; }
td.num { font-variant-numeric: tabular-nums; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- ekrany ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}
.screen { display: grid; gap: 0.6rem; margin: 0; }
.screen-img {
  aspect-ratio: 414.6 / 720;
  max-width: 100%;
  border-radius: 4px;
  background-image: url("img/ekran.png");
  background-size: 500% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 6px #121416, 0 0 0 7px var(--line);
  margin: 7px;
}
.screen:nth-child(1) .screen-img { background-position: 0% 0; }
.screen:nth-child(2) .screen-img { background-position: 25% 0; }
.screen:nth-child(3) .screen-img { background-position: 50% 0; }
.screen:nth-child(4) .screen-img { background-position: 75% 0; }
.screen:nth-child(5) .screen-img { background-position: 100% 0; }
.screen figcaption { font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
.screen figcaption b { display: block; color: var(--ink); font-family: var(--f-mono); font-weight: 500; }
@media (max-width: 860px) { .screens { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- listy ---------- */
.spec { display: grid; gap: 0; margin: 0; }
.spec div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding-block: 0.65rem; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: 0.9375rem; }
.spec dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .spec div { grid-template-columns: 1fr; gap: 0.1rem; } }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checks li { padding-left: 1.4rem; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 0.55rem; height: 0.55rem; border-radius: 1px; background: var(--meter);
}
.checks li.no::before { background: var(--muted); }

.inside {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  gap: 1rem;
}
.inside p { color: var(--muted); }
.inside p strong { color: var(--ink); }

.warn {
  border-left: 3px solid var(--amber);
  padding: 0.25rem 0 0.25rem 1rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9375rem;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding-block: 1rem;
  font-weight: 600;
  list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 1rem; color: var(--muted); max-width: 42rem; }

/* ---------- kup ---------- */
.buy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: 1.5rem 3rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.buy-box ul { margin: 0.75rem 0 0; }
@media (max-width: 760px) { .buy-box { grid-template-columns: 1fr; } }

/* ---------- stopka ---------- */
footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: 0.9375rem; color: var(--muted); }
footer .wrap { display: grid; gap: 1.5rem; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.3rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.tm { font-size: var(--step--1); max-width: 60rem; }

/* ---------- strony dokumentów ---------- */
.doc { padding-block: clamp(2rem, 6vw, 4rem); }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: var(--step-3); margin-bottom: 0.5rem; }
.doc h2 { font-size: var(--step-2); margin: 2.25rem 0 0.75rem; }
.doc p, .doc li { margin-bottom: 0.6rem; }
.doc ol, .doc ul { padding-left: 1.3rem; }
.doc .meta { color: var(--muted); font-size: var(--step--1); margin-bottom: 2rem; }
.fill { background: color-mix(in srgb, var(--amber) 22%, transparent); padding: 0 0.2em; border-radius: 2px; }
.form-lines p { border-bottom: 1px dotted var(--muted); padding-bottom: 1.3rem; }

/* ---------- kreator przypisywania ---------- */
.learn {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.learn p { color: var(--muted); max-width: 46rem; }
@media (max-width: 760px) { .learn { grid-template-columns: 1fr; } }
code {
  font: 500 0.875em/1 var(--f-mono);
  background: var(--panel);
  color: var(--ink);
  padding: 0.15em 0.35em;
  border-radius: 3px;
  white-space: nowrap;
}
.checks b { font-weight: 600; }

/* ---------- formularz zamówienia ---------- */
.order { display: grid; gap: 0.6rem; min-width: 0; width: min(100%, 26rem); }
.order label { font-weight: 600; font-size: 0.9375rem; }
.point-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.point-row input {
  flex: 1 1 9rem; min-width: 0;
  font: 500 1rem/1.2 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.point-row input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.order .btn[type="submit"] { justify-self: start; }
.order .btn[disabled] { opacity: 0.7; cursor: progress; }
#order-err { color: var(--accent); }
.map { height: 26rem; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.map inpost-geowidget { display: block; height: 100%; }
