/* ============================================================
   GPX → Google Maps — design system
   Styl: exaggerated minimalism · paleta: sky/petrol + adventure orange
   ============================================================ */

:root {
  /* kolory */
  --bg: #F2F7FA;
  --bg-deep: #E4EDF3;
  --card: #FFFFFF;
  --ink: #0E2A3A;         /* ~13:1 na --bg */
  --muted: #46626F;       /* ~5.6:1 na --card */
  --line: #D3E0E8;
  --line-strong: #9FB6C4;
  --accent: #F97316;      /* CTA — z ciemnym tekstem */
  --accent-deep: #EA580C;
  --accent-ink: #B23A0A;  /* tekst/ikony pomarańczowe na jasnym tle, ≥4.5:1 */
  --accent-soft: #FFF1E6;
  --petrol: #0E7490;
  --ok: #15803D;
  --focus: #0C4A6E;
  --warn-bg: #FEF6E4;
  --warn-line: #EBD8A4;
  --warn-ink: #6E5416;
  --info-bg: #E9F3F9;
  --info-line: #C2DCEB;
  --info-ink: #1D4E68;
  --err-bg: #FBEAEA;
  --err-line: #E3B6B6;
  --err-ink: #8A2C2C;

  /* typografia i rytm */
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(14, 42, 58, .05), 0 10px 30px -14px rgba(14, 42, 58, .18);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

::selection { background: var(--accent); color: #1C0E02; }

/* ---------- utilities ---------- */

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.container--narrow { max-width: 780px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink); color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.section { padding-block: clamp(56px, 10vw, 110px); }
.section--alt { background: var(--bg-deep); }

.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 10px;
}

.section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: clamp(24px, 4vw, 44px);
}

/* ---------- header ---------- */

.site-head { border-bottom: 1px solid var(--line); }
.site-head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.01em;
}
.brand__mark { width: 26px; height: 26px; color: var(--accent-deep); flex: none; }
.brand__arrow { color: var(--accent-ink); }

.lang { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  min-height: 32px;
  cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- hero ---------- */

/* overflow: clip (nie hidden) — nie tworzy scroll containera,
   więc position: sticky na mapie działa */
.hero { position: relative; overflow: clip; padding-top: clamp(36px, 6vw, 80px); }

.hero__deco {
  position: absolute;
  right: -60px; top: -30px;
  width: min(46vw, 430px);
  color: var(--line-strong);
  opacity: .55;
  pointer-events: none;
  z-index: -1;
}

.hero__intro { position: relative; max-width: 820px; }

.hero__title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin-bottom: 14px;
}
.hero__arrow { color: var(--accent-deep); }

.hero__tagline {
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}

.hero__sub {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: clamp(22px, 4vw, 36px);
}

/* drop zone */

.drop {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: center;
  background: var(--card);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 52px) 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.drop:hover, .drop:focus-visible, .drop.is-over {
  border-color: var(--accent-deep);
  background: #FFFBF7;
}
.drop.is-over { border-style: solid; }

.drop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.drop__icon svg { width: 26px; height: 26px; }

.drop__big {
  display: block;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 6px;
}
.drop__hint { display: block; font-size: 13.5px; color: var(--muted); }

#fileInput { display: none; }

.privacy-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.privacy-chip svg { width: 17px; height: 17px; color: var(--ok); flex: none; }

/* error */

.err {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  background: var(--err-bg);
  border: 1px solid var(--err-line);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--err-ink);
}
.err svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* ---------- workspace ---------- */

.ws__grid { display: grid; gap: 18px; }
.ws__side { display: grid; gap: 18px; align-content: start; }

@media (min-width: 980px) {
  .ws__grid { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .panel--map { position: sticky; top: 20px; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 22px);
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.panel__icon { width: 18px; height: 18px; color: var(--accent-ink); flex: none; }
.panel__chip {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
  color: var(--info-ink);
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* map */

.panel--map { padding: 10px; }
.map {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 6px);
  background: var(--bg-deep);
}

.map-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 12px 10px 6px;
}
.map-meta__item { display: flex; gap: 6px; font-size: 13px; min-width: 0; }
.map-meta dt { color: var(--muted); }
.map-meta dt::after { content: ":"; }
.map-meta dd {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* controls */

.ctl { margin-bottom: 20px; }
.ctl__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.ctl__row label { font-size: 14.5px; font-weight: 700; }
.ctl__row output {
  font-weight: 800;
  font-size: 17px;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 28px;
  accent-color: var(--accent-deep);
  cursor: pointer;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.check input {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-deep);
  cursor: pointer;
  flex: none;
}
.check:has(input:disabled) { cursor: not-allowed; color: var(--muted); }
.check input:disabled { cursor: not-allowed; }
.check__meta { color: var(--muted); font-weight: 600; }

.note {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 8px;
}
.note--edu {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 16px;
}
.note--edu svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--petrol); }

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--accent); color: #1C0E02; }
.btn--primary:hover { background: var(--accent-deep); }

.btn--outline { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { background: var(--bg); }
.btn--outline.is-done { border-color: var(--ok); color: var(--ok); }

.btn--ghost { background: none; color: var(--muted); padding-inline: 10px; }
.btn--ghost:hover { color: var(--ink); background: var(--bg); }

.btn--block { width: 100%; margin-top: 4px; }

/* stages */

.stages { list-style: none; display: grid; gap: 12px; }

.stage {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stage__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.stage__dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(14, 42, 58, .25);
  flex: none;
}
.stage__title { font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.stage__dist {
  margin-left: auto;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stage__info {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.stage__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stage__actions .btn { flex: 1 1 auto; }

/* warnings */

.warn {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border-radius: var(--radius-s);
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.warn svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.warn--amber { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.warn--info { background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-ink); }

/* ---------- how it works ---------- */

.steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 24px;
  overflow: hidden;
}
.step__no {
  position: absolute;
  top: -18px; right: 6px;
  font-size: 108px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--bg-deep);
  user-select: none;
}
.step__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.step__icon svg { width: 22px; height: 22px; }
.step__title { position: relative; font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.step__desc { position: relative; font-size: 14.5px; color: var(--muted); }

.privacy-strip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: clamp(24px, 4vw, 40px);
  background: var(--ink);
  color: #E8F1F6;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 14.5px;
  line-height: 1.6;
}
.privacy-strip strong { color: #fff; }
.privacy-strip svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: #7BD88F; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line-strong); }

.faq__item { border-bottom: 1px solid var(--line-strong); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  padding: 18px 2px;
  font-size: clamp(15px, 2.2vw, 17px);
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-ink); }

.faq__chev { width: 18px; height: 18px; flex: none; color: var(--muted); }
.faq__item[open] .faq__chev { transform: rotate(180deg); }

.faq__item > p {
  padding: 0 2px 20px;
  color: var(--muted);
  font-size: 15px;
  max-width: 68ch;
}

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--line); background: var(--card); }
.site-foot__in {
  padding-block: 32px;
  display: grid;
  gap: 6px;
  justify-items: start;
}
.site-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
}
.site-foot__brand svg { width: 18px; height: 18px; color: var(--accent-deep); }
.site-foot__note { font-size: 13.5px; color: var(--muted); }
.site-foot__author { font-size: 13.5px; color: var(--muted); }
.site-foot a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-foot a:hover { color: var(--accent-ink); }

/* ---------- motion (tylko gdy użytkownik nie ogranicza animacji) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .drop { transition: border-color .18s ease, background-color .18s ease; }
  .btn { transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
  .lang__btn { transition: background-color .18s ease, color .18s ease; }
  .faq__item summary { transition: color .15s ease; }
  .site-foot a { transition: color .15s ease; }
  .faq__chev { transition: transform .2s ease; }
  .stage, .panel { transition: border-color .18s ease; }
}
