/* =========================================================================
   Strona po pobraniu programu.
   Bazę (kontener, .section, .btn, .site-header, .site-footer) daje
   ../style.css. Tutaj tylko to, czego tam nie ma.
   ========================================================================= */

/* --- pas z informacją o pobieraniu --- */
.inst-hero {
  background: var(--ink);
  color: var(--ink-text);
  position: relative;
  overflow: hidden;
  padding: 44px 0 48px;
}
.inst-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Kolejność warstw jak w hero strony głównej: poświaty (1) i siatka
     sześciokątów (.hex-bg-hero, też 1) pod treścią (2). Bez tego hex_bg.js
     wrzuciłby sześciokąty na wierzch napisów. */
  z-index: 1;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(29,78,216,.22), transparent 60%),
    radial-gradient(500px 400px at 0% 100%, rgba(56,182,240,.10), transparent 60%);
  pointer-events: none;
}
.inst-hero-inner { position: relative; z-index: 2; max-width: 760px; }

.inst-stamp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
/* Kropka pulsuje, dopóki trwa pobieranie — sygnał, że coś się dzieje,
   nawet jeśli przeglądarka nie pokazała jeszcze okna zapisu. */
.inst-stamp::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
}
@media (prefers-reduced-motion: no-preference) {
  .inst-stamp::before { animation: instPulse 1.8s ease-out infinite; }
}
@keyframes instPulse {
  70%  { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.inst-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.03em;
  color: #fff;
}
.inst-ver {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--cyan, #6FD3FF);
  font-variant-numeric: tabular-nums;
}

.inst-lead {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-text);
}
.inst-lead code {
  font-family: var(--mono);
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,.10);
  border: 1px solid var(--ink-line);
}

/* --- pasek postępu pobierania ---
   Cztery stany na jednym bloku, przełączane atrybutem data-state:
   manual (bez JS — sam przycisk), countdown, started, again (po odświeżeniu). */
.inst-dl { margin-top: 22px; max-width: 540px; }

.inst-dl-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.inst-dl[data-state="manual"] .inst-dl-track { display: none; }

.inst-dl-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-2, #38B6F0), #22c55e);
}
.inst-dl[data-state="again"] .inst-dl-fill { background: rgba(255,255,255,.26); }

.inst-dl-msg {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-text);
  /* Treść zmienia się co sekundę i bywa dwuwierszowa — stała wysokość
     minimalna trzyma przycisk w miejscu zamiast szarpać układem. */
  min-height: 2.6em;
}
.inst-dl-actions { margin: 14px 0 0; }

.inst-warn {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192,138,60,.45);
  background: rgba(192,138,60,.12);
  font-size: 14px;
  color: #f3e2c4;
}
.inst-warn a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* --- kroki instalacji --- */
.inst-steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.inst-step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.inst-step-no {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
}
.inst-step h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.inst-step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 68ch;
}
.inst-step p + p { margin-top: 8px; }

.inst-step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.inst-step-links a {
  font-size: 13.5px;
  color: var(--brand);
  text-decoration: none;
}
.inst-step-links a::before { content: "→ "; color: var(--muted-2); }
.inst-step-links a:hover { text-decoration: underline; }

/* --- specyfikacja pod krokami --- */
.inst-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 22px 0 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.inst-specs > div { padding: 18px 22px; border-right: 1px solid var(--line); }
.inst-specs > div:last-child { border-right: none; }
.inst-specs dt {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.inst-specs dd { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }

/* --- kontakt do serwisu --- */
.inst-help {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.inst-help-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.inst-help-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(10,22,40,.10);
  text-decoration: none;
}
.inst-help-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.inst-help-item strong {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}
.inst-help-note { font-size: 13px; color: var(--muted); }

/* --- zamówienie usługi --- */
.inst-order {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 26px;
  margin-top: 22px;
  padding: 28px 30px;
  background: var(--ink);
  color: var(--ink-text);
  border-radius: var(--radius-lg);
}
.inst-order h3 { margin: 0 0 6px; font-size: 20px; color: #fff; letter-spacing: -.02em; }
.inst-order p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); max-width: 62ch; }
.inst-order-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inst-order-actions .btn-ghost { color: #fff; border-color: var(--ink-line-2); }
.inst-order-actions .btn-ghost:hover { background: rgba(255,255,255,.08); }

/* --- stopka --- */
.inst-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
}
.inst-foot p { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-muted); }
.inst-foot-links { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; }
.inst-foot-links a { font-size: 13.5px; color: var(--ink-muted); text-decoration: none; }
.inst-foot-links a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 900px) {
  .inst-specs { grid-template-columns: repeat(2, 1fr); }
  .inst-specs > div:nth-child(2) { border-right: none; }
  .inst-specs > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .inst-help { grid-template-columns: 1fr; }
  .inst-order { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .inst-specs { grid-template-columns: 1fr; }
  .inst-specs > div { border-right: none; border-bottom: 1px solid var(--line); }
  .inst-specs > div:last-child { border-bottom: none; }
  .inst-step { grid-template-columns: 1fr; gap: 12px; padding: 20px 20px; }
}
