/* minipixel.de — Design System
   State-of-the-art, dependency-free, fast. */

:root {
  --navy: #0f1b33;
  --navy-2: #16243f;
  --blue: #2e6bb0;
  --blue-600: #2559a0;
  --accent: #ff6a2b;
  --accent-600: #ec5a1d;
  --ink: #1a2233;
  --ink-soft: #495267;
  --muted: #6b7488;
  --line: #e6eaf1;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-card: #ffffff;
  --ok: #16a06a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,27,51,.06), 0 2px 8px rgba(16,27,51,.05);
  --shadow: 0 8px 30px rgba(16,27,51,.10);
  --shadow-lg: 0 24px 60px rgba(16,27,51,.16);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eefa; --ink-soft: #b6c0d4; --muted: #8b93a7;
    --bg: #0d1424; --bg-soft: #111a2d; --bg-card: #15203a;
    --line: #243150; --navy: #0a1120; --navy-2: #0e1830;
  }
}

* { box-sizing: border-box; }
/* hidden-Attribut muss display aus .controls/.summary/… überstimmen */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--bg); line-height: 1.65; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); margin: 0 0 .4em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 1.8em 0 .5em; font-weight: 800; }
h3 { font-size: 1.2rem; margin: 1.5em 0 .4em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0; font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
.brand-mark { width: 30px; height: 30px; flex: none; margin-right: 9px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .94rem;
  padding: 8px 12px; border-radius: 9px;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }

/* Burger: nur auf schmalen Viewports sichtbar */
#burger { display: none; margin-left: auto; font-size: 1.25rem; line-height: 1; padding: 8px 13px; }
@media (max-width: 900px) {
  .nav { position: relative; }
  #burger { display: inline-flex; }
  .nav-links {
    display: none; margin-left: 0;
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
    flex-direction: column; gap: 2px; min-width: 230px;
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 13px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.22rem; color: var(--ink-soft); max-width: 640px; margin: 0 auto 1.4em; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 18px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--ok); flex: none; }

/* ---------- Tool ---------- */
.tool { margin: 26px auto 8px; max-width: 920px; }
.dropzone {
  border: 2.5px dashed color-mix(in srgb, var(--blue) 40%, var(--line));
  border-radius: var(--radius); background: var(--bg-card);
  padding: 48px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  box-shadow: var(--shadow);
}
.dropzone:hover { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 4%, var(--bg-card)); }
.dropzone.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--bg-card)); transform: scale(1.005); }
.dropzone .dz-icon { width: 56px; height: 56px; margin: 0 auto 14px; color: var(--blue); }
.dropzone h2 { margin: 0 0 6px; font-size: 1.35rem; }
.dropzone p { margin: 0; color: var(--muted); font-size: .95rem; }
.dz-btn { margin-top: 18px; }
.dz-formats { margin-top: 14px; font-size: .82rem; color: var(--muted); }

.controls {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 22px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
.field label { display: block; font-weight: 700; font-size: .86rem; margin-bottom: 7px; color: var(--ink); }
.field .hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.seg { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 7px;
  font-weight: 700; font-size: .88rem; color: var(--ink-soft); cursor: pointer; font-family: inherit;
}
.seg button.on { background: var(--bg-card); color: var(--blue); box-shadow: var(--shadow-sm); }
input[type="range"] { width: 100%; accent-color: var(--blue); }
select, input[type="number"], input[type="text"] {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg-card); color: var(--ink); font-family: inherit; font-size: .95rem;
}
.row-quality { display: flex; align-items: center; gap: 12px; }
.row-quality output { font-weight: 800; color: var(--blue); min-width: 44px; text-align: right; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  padding: 13px 26px; border-radius: 11px; border: 0; transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-600)); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-primary:hover { text-decoration: none; box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 46%, transparent); }
.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover { background: var(--blue-600); text-decoration: none; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-card); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 9px; }

.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* Results */
.results { margin-top: 22px; display: grid; gap: 14px; }
.summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--ok) 9%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line));
  border-radius: var(--radius-sm); padding: 14px 18px; font-weight: 600; color: var(--ink);
}
.summary strong { color: var(--ok); }
.card {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-sm); text-align: left;
}
.card .thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--line); }
.card .meta { min-width: 0; }
.card .meta .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta .sizes { font-size: .88rem; color: var(--muted); }
.card .meta .save { color: var(--ok); font-weight: 700; }
.card .bar { height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; margin-top: 6px; }
.card .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); }
.card .spin { font-size: .85rem; color: var(--muted); }
.card .thumb { background-size: cover; background-position: center; }
.card.busy { opacity: .7; }

/* Warteschlangen-Kopf + Entfernen-Button (Batch) */
.queue-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; font-weight: 700; color: var(--ink); font-size: .95rem;
}
.queue-head .hint { font-weight: 500; color: var(--muted); font-size: .85rem; }
.card-x {
  width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--muted); font-size: 1.25rem; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.card-x:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Sections / content ---------- */
section.block { padding: 30px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, var(--blue), var(--blue-600)); margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; font-size: .96rem; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; }
.step { position: relative; padding-left: 56px; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; background: linear-gradient(180deg, var(--accent), var(--accent-600));
}
.step h3 { margin: 4px 0 4px; }
.step p { margin: 0; font-size: .95rem; }

.prose { max-width: 760px; }
.prose ul { padding-left: 20px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }

/* FAQ */
.faq details {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 8px; margin: 0; }

/* Internal link cards */
.linkcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }
.linkcard {
  display: block; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .15s;
}
.linkcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.linkcard b { display: block; font-size: 1.02rem; }
.linkcard span { color: var(--muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cee0; margin-top: 48px; padding: 40px 0 28px; }
.site-footer a { color: #c3cee0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .92rem; }
.footer-note { text-align: center; margin-top: 30px; color: #c3cee0; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 18px; font-size: .85rem; color: #93a1bd; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 0; font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 8px; }
.footer-brand img { margin-right: 9px; }
.footer-brand .dot { color: var(--accent); }
/* schmale Themen-/Linkleiste direkt unter der Navigation (neutraler Klassenname) */
.quicklinks { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.quicklinks .container { padding-top: 9px; padding-bottom: 9px; font-size: .85rem; color: var(--ink-soft); line-height: 1.7; }
.quicklinks a { color: var(--ink-soft); }
.quicklinks a:hover { color: var(--blue); }

/* utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag { display:inline-block; font-size:.78rem; font-weight:700; color:var(--blue); background:color-mix(in srgb,var(--blue) 11%,transparent); padding:3px 10px; border-radius:999px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .card { grid-template-columns: 48px 1fr; }
  .card .thumb { width: 48px; height: 48px; }
  .card .dl { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }
