/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #e2e5eb;
  --text: #12161f;
  --text-muted: #5b6472;
  --accent: #0e8f74;
  --accent-dark: #076952;
  --accent-soft: #e3f5f0;
  --danger: #c0392b;
  --danger-soft: #fbeae8;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", var(--sans);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #2a313c;
    --text: #eef1f5;
    --text-muted: #98a2b3;
    --accent: #2fd3a8;
    --accent-dark: #1fae87;
    --accent-soft: #123329;
    --danger: #ff6b5e;
    --danger-soft: #3a1a17;
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; font-family: var(--display); }
::selection { background: var(--accent-soft); color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem;
  background: var(--text); color: var(--bg); z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); margin-bottom: .75rem; }
.subtitle { color: var(--text-muted); font-size: 1.05rem; margin-top: .5rem; }
.prose { color: var(--text); }
.prose p { margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem; border-radius: var(--radius-sm); font-weight: 600;
  transition: transform .15s var(--ease-out), background .15s var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn--download { background: var(--accent); color: #fff; width: 100%; font-size: 1rem; }
.btn--download:hover { background: var(--accent-dark); }
.btn--map { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.btn--map:hover { background: color-mix(in srgb, var(--danger-soft) 70%, var(--danger) 10%); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* =============================================================
   6. Sections
   ============================================================= */
.site-header { padding: 1.1rem 0; }
.site-header__inner { display: flex; align-items: center; gap: .6rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.logo__mark { width: 30px; height: 30px; flex: none; }
.lang-switch {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted, #8a8f98);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .3rem .7rem;
  opacity: .75;
  text-decoration: none;
}
.lang-switch:hover { opacity: 1; }

.hero { padding: 1rem 0 .5rem; text-align: center; }
.hero .subtitle { max-width: 46ch; margin-inline: auto; }

/* --- Tool card --- */
.tool-card { margin-top: 1.75rem; padding: 1.5rem; box-shadow: var(--shadow); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  text-align: center; border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2.25rem 1.25rem; cursor: pointer; transition: border-color .15s var(--ease-out), background .15s var(--ease-out);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__icon { width: 42px; height: 42px; color: var(--accent); }
.dropzone__title { font-weight: 700; font-size: 1.05rem; }
.dropzone__hint { color: var(--text-muted); font-size: .9rem; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.privacy-badge {
  display: flex; align-items: flex-start; gap: .6rem; margin-top: 1.1rem; padding: .85rem 1rem;
  background: var(--accent-soft); border-radius: var(--radius-sm); font-size: .92rem; color: var(--accent-dark);
}
.privacy-badge svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.limits-note { margin-top: .6rem; font-size: .82rem; color: var(--text-muted); text-align: center; }

.file-list { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.file-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem; background: var(--surface); }
.file-row__head { display: flex; justify-content: space-between; gap: .75rem; font-size: .92rem; margin-bottom: .6rem; }
.file-row__name { font-weight: 600; word-break: break-all; }
.file-row__size { color: var(--text-muted); flex: none; }
.file-row__body { font-size: .92rem; }
.file-row__error { color: var(--danger); }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--border);
  border-top-color: var(--accent); display: inline-block; vertical-align: middle; margin-right: .5rem;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.strip-status { display: flex; align-items: center; gap: .3rem; color: var(--text-muted); margin-top: .5rem; }

.meta-preview { display: flex; flex-direction: column; gap: .6rem; }
.meta-gps { padding: .7rem .85rem; border-radius: var(--radius-sm); }
.meta-gps--found { background: var(--danger-soft); color: var(--danger); }
.meta-gps--found p { font-weight: 600; margin-bottom: .5rem; }
.meta-gps--clean { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.meta-list { list-style: none; display: flex; flex-direction: column; gap: .3rem; color: var(--text-muted); font-size: .88rem; }
.meta-note { color: var(--text-muted); font-size: .88rem; }
.result-block { margin-top: .75rem; display: flex; flex-direction: column; gap: .6rem; }
.result-verify { font-size: .88rem; color: var(--accent-dark); font-weight: 600; }

/* --- Ad slots --- */
.ad-slot {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; margin-block: 2rem;
}

/* --- Content sections --- */
.section { padding-block: 1rem; }
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
.step { display: flex; gap: .85rem; }
.step__num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem;
}
.step__title { font-weight: 700; margin-bottom: .2rem; }
.step__body { color: var(--text-muted); font-size: .92rem; }

.faq-item { border-bottom: 1px solid var(--border); padding-block: .9rem; }
.faq-item summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item div { color: var(--text-muted); margin-top: .6rem; font-size: .93rem; }

.site-footer { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-block: 1.5rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text-muted); }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a:hover { color: var(--accent); }
.credits { font-size: .78rem; color: var(--text-muted); margin-top: .75rem; }

.legal-page .prose h2 { margin-top: 1.75rem; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.4s; }
}
