/*
 * Leci Coś? - strona wizytówka (draft).
 * Styl spójny z aplikacją: spokojne slate, akcent bursztynowy, radarowa zieleń.
 * Bez zewnętrznych bibliotek. Mobile first. Tryb ciemny wg preferencji systemu.
 */

:root {
  --bg: #f1f5f9;
  --bg-soft: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --accent: #d97706;
  --accent-strong: #b45309;
  --accent-soft: #fffbeb;
  --accent-border: #fde68a;
  --radar: #15803d;
  --radar-soft: #dcfce7;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #060b14;
    --bg-soft: #0b1220;
    --surface: #0f1a2b;
    --surface-2: #132035;
    --border: #1e2d45;
    --text: #e8eef7;
    --text-muted: #a9b7cc;
    --text-faint: #7f8ea6;
    --accent: #fbbf24;
    --accent-strong: #fcd34d;
    --accent-soft: #231a07;
    --accent-border: #4a3a12;
    --radar: #34d399;
    --radar-soft: #0e2a22;
    --danger: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--radar);
  margin-bottom: 14px;
}

.lead { color: var(--text-muted); font-size: 1.12rem; }

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #1a1203;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

@media (prefers-color-scheme: dark) {
  .btn-primary { color: #1a1203; }
  .btn-primary:hover { color: #1a1203; background: var(--accent-strong); }
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }

.btn-sm { padding: 9px 16px; font-size: 0.92rem; }

/* Nagłówek */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 750;
  font-size: 1.08rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; color: var(--text-muted); font-weight: 550; font-size: 0.96rem; }
.nav a:hover { color: var(--text); }
.nav-links { display: flex; gap: 26px; }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* Hero */
.hero { padding: 80px 0 56px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 800; }
.hero p.lead { margin-top: 18px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-strong);
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 46ch;
}
@media (prefers-color-scheme: dark) {
  .hero-note { color: var(--accent); }
}
.hero-note b { color: inherit; }

/* Wizualizacja radaru w hero */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
}
.hero-visual .disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #16263f 0%, #060b14 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ring {
  position: absolute;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 50%;
  inset: 0;
  margin: auto;
}
.ring.r1 { width: 94%; height: 94%; }
.ring.r2 { width: 62%; height: 62%; }
.ring.r3 { width: 30%; height: 30%; }
.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(52, 211, 153, 0.42), rgba(52, 211, 153, 0) 42%);
  animation: spin 5.5s linear infinite;
}
.blip {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 7px rgba(239, 68, 68, 0.18);
  top: 30%; left: 66%;
  animation: pulse 2.4s ease-in-out infinite;
}
.me {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #34d399;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.18);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .sweep, .blip { animation: none; }
}

/* Karty i siatki */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }
.card .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--radar-soft);
  color: var(--radar);
  margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }

/* Po co to jest: duże zdanie + scenariusze */
.purpose-statement {
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0 0 18px;
}
.purpose-statement .hl { color: var(--radar); }
.purpose-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
@media (max-width: 860px) { .purpose-grid { grid-template-columns: 1fr; gap: 24px; } }
.purpose-grid .body { color: var(--text-muted); font-size: 1.05rem; }
.purpose-grid .body p { margin: 0 0 14px; }

.place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
@media (prefers-color-scheme: dark) { .place { color: var(--accent); } }
.place svg { width: 13px; height: 13px; }

.section-head { max-width: 58ch; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 780; }
.section-head p { color: var(--text-muted); margin-top: 12px; font-size: 1.05rem; }

/* Blok "czym jest" */
.whatis {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 28px;
}
.whatis .title { display: flex; gap: 10px; align-items: center; font-weight: 750; font-size: 1.15rem; color: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .whatis .title { color: var(--accent); } }
.whatis p { color: var(--text-muted); margin: 12px 0 0; }
.whatis strong { color: var(--text); }
.whatis .emergency { color: var(--danger); font-weight: 750; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 680px) { .two-col { grid-template-columns: 1fr; } }
.mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.mini h4 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.mini ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.95rem; }
.mini li { margin: 4px 0; }
.yes { color: var(--radar); }
.no { color: var(--danger); }

/* Źródła */
.sources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 680px) { .sources { grid-template-columns: 1fr; } }
.source {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.source-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source h3 { font-size: 1.1rem; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--radar);
  background: var(--radar-soft);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.source p { color: var(--text-muted); font-size: 0.95rem; margin: 10px 0 0; }
.source a.doc { display: inline-block; margin-top: 12px; color: var(--accent-strong); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
@media (prefers-color-scheme: dark) { .source a.doc { color: var(--accent); } }
.source a.doc:hover { text-decoration: underline; }
.sources-note { margin-top: 20px; color: var(--text-faint); font-size: 0.92rem; }

/* Instalacja */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.step .num {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #1a1203;
  font-weight: 800;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.install-foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.platform-note { color: var(--text-faint); font-size: 0.9rem; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 20px;
}
details[open] { box-shadow: var(--shadow); }
summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--text-faint);
  font-weight: 400;
}
details[open] summary::after { content: "\00d7"; }
details p { color: var(--text-muted); margin: 0 0 18px; font-size: 0.98rem; }

/* Stopka */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 44px 0 56px;
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-brand { max-width: 36ch; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; margin: 10px 0 0; }
.footer-meta { font-size: 0.9rem; color: var(--text-faint); }
.footer-meta .ver { font-weight: 700; color: var(--text); }
.footer-emergency {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--danger);
  font-weight: 650;
}
.footer-changelog { color: var(--text-muted); font-size: 0.92rem; margin-top: 8px; max-width: 48ch; }

.draft-flag {
  background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 12px, transparent 12px, transparent 24px);
  border: 1px dashed var(--accent-border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--accent-strong);
  margin-top: 16px;
}
@media (prefers-color-scheme: dark) { .draft-flag { color: var(--accent); } }

/* Co widać: podgląd (zrzuty) + legenda kolorów */
.shots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  margin-bottom: 48px;
}
.shot { text-align: center; max-width: 240px; margin: 0; }
.shot figcaption { margin-top: 16px; color: var(--text-muted); font-size: 0.92rem; }
.phone {
  position: relative;
  width: 240px;
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  background: #0b1220;
  border: 9px solid #1b2740;
  border-radius: 36px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.phone-notch {
  position: absolute;
  top: 9px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 18px;
  background: #1b2740;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 820px; margin: 0 auto; }
@media (max-width: 620px) { .legend { grid-template-columns: 1fr; } }
.lvl {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.lvl .dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; margin-top: 4px; }
.lvl b { display: block; font-size: 1rem; }
.lvl p { margin: 3px 0 0; color: var(--text-muted); font-size: 0.93rem; }

/* Uprawnienia APK */
.apk-meta {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 22px;
  box-shadow: var(--shadow);
}
.apk-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.apk-row:last-child { border-bottom: none; }
@media (max-width: 600px) { .apk-row { grid-template-columns: 1fr; gap: 4px; } }
.apk-row .k { font-weight: 650; font-size: 0.95rem; }
.apk-row .v { color: var(--text-muted); font-size: 0.95rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 0.88rem; }

/* Stopka: linki i kontakt */
.footer-contact { margin-top: 14px; color: var(--text-muted); font-size: 0.92rem; }
.footer-contact a { color: var(--accent-strong); text-decoration: none; font-weight: 600; }
@media (prefers-color-scheme: dark) { .footer-contact a { color: var(--accent); } }
.footer-contact a:hover { text-decoration: underline; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-faint); font-size: 0.88rem; }

/* Strony prawne (polityka prywatności, regulamin) */
.legal { padding: 56px 0 80px; }
.legal .back { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); text-decoration: none; font-size: 0.93rem; font-weight: 550; margin-bottom: 28px; }
.legal .back:hover { color: var(--text); }
.legal h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 800; }
.legal .updated { color: var(--text-faint); font-size: 0.92rem; margin-top: 10px; }
.legal h2 { font-size: 1.3rem; margin-top: 40px; font-weight: 720; }
.legal h3 { font-size: 1.05rem; margin-top: 24px; font-weight: 680; }
.legal p, .legal li { color: var(--text-muted); font-size: 1rem; }
.legal ul { padding-left: 20px; }
.legal li { margin: 7px 0; }
.legal a { color: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .legal a { color: var(--accent); } }
.legal .note {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 24px;
}
