/* zujpg.de – Stylesheet
   Theme wechseln: in src/site.config.mjs "theme" auf frisch | lavendel | gezaehmt setzen.
   Dunkelmodus folgt automatisch der Systemeinstellung. */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}

/* ---------- Themes ---------- */
:root,
:root[data-theme="frisch"] {
  --bg: #ddf7e8;
  --ink: #10261c;
  --muted: #2f4a3e;
  --surface: #ffffff;
  --soft: #f2fbf6;
  --accent: #ff8cc6;
  --on-accent: #10261c;
  --ok-bg: #ddf7e8;
  --ok: #17663f;
  --err-bg: #ffe3e3;
  --err: #a1152b;
  --line: #10261c;
  --line-soft: #c4ddd0;
  --shadow-c: #10261c;
  --bw: 3px;
  --sh: 5px;
  --r: 14px;
  --r-lg: 26px;
  --tilt: 1;
}
:root[data-theme="lavendel"] {
  --bg: #eeebff;
  --ink: #1a1446;
  --muted: #3a3466;
  --soft: #fff4e8;
  --accent: #ff7a45;
  --on-accent: #1a1446;
  --ok-bg: #e3f7ea;
  --line: #1a1446;
  --line-soft: #d3cdf2;
  --shadow-c: #1a1446;
  --r: 999px;
}
:root[data-theme="gezaehmt"] {
  --bg: #f6f4ff;
  --ink: #1a1446;
  --muted: #3a3466;
  --soft: #fff6ef;
  --accent: #ff9a6b;
  --on-accent: #1a1446;
  --ok-bg: #e3f7ea;
  --line: #1a1446;
  --line-soft: #e3dff5;
  --shadow-c: #1a1446;
  --bw: 2px;
  --sh: 3px;
  --r: 12px;
  --r-lg: 20px;
  --tilt: 0;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme] {
    --bg: #0f1c16;
    --ink: #e8f6ee;
    --muted: #b8d0c3;
    --surface: #17291f;
    --soft: #12231a;
    --ok-bg: #173a28;
    --ok: #7fe0a9;
    --err-bg: #3d1820;
    --err: #ffaab5;
    --line: #e8f6ee;
    --line-soft: #2f4a3e;
    --shadow-c: var(--accent);
  }
  :root[data-theme="lavendel"],
  :root[data-theme="gezaehmt"] {
    --bg: #17123a;
    --ink: #eeebff;
    --muted: #c9c4ee;
    --surface: #241e52;
    --soft: #1d1846;
    --ok-bg: #1f3b33;
    --line: #eeebff;
    --line-soft: #3a336f;
  }
}

/* ---------- Basis ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }

h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0; font-weight: 800; }
h1 { font-size: clamp(40px, 6.4vw, 80px); letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 23px; letter-spacing: -0.01em; }
p { margin: 0; }

/* ---------- Kopf ---------- */
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 20px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-size: 21px; font-weight: 800; color: var(--on-accent);
  background: var(--accent); border: var(--bw) solid var(--line); border-radius: var(--r);
  padding: 7px 16px; box-shadow: 4px 4px 0 var(--shadow-c);
}
.logo svg { width: 20px; height: 20px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 600; font-size: 17px; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 8px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 32px 40px; align-items: center; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.lead { margin-top: 22px; max-width: 600px; font-size: 21px; line-height: 1.5; color: var(--muted); }
.mark {
  background: var(--accent); color: var(--on-accent); padding: 0 10px; border-radius: 12px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font-size: 15px; font-weight: 700; background: var(--surface); border: 2px solid var(--line);
  border-radius: 999px; padding: 5px 14px;
}
.badge svg { width: 16px; height: 16px; }

.bubbles { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 8px 0; }
.bubble {
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: 26px;
  padding: 14px 22px; box-shadow: var(--sh) var(--sh) 0 var(--shadow-c); max-width: 100%;
}
.bubble small { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.bubble strong { display: block; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.bubble--a { align-self: flex-start; border-bottom-left-radius: 6px; transform: rotate(calc(-3deg * var(--tilt))); }
.bubble--b { align-self: flex-end; border-bottom-right-radius: 6px; transform: rotate(calc(2deg * var(--tilt))); }
.bubble--c { align-self: center; background: var(--accent); color: var(--on-accent); transform: rotate(calc(-1deg * var(--tilt))); }
.bubble--c small { color: var(--on-accent); }

/* ---------- Werkzeug-Karte ---------- */
.tool {
  margin-top: 44px; background: var(--surface); border: var(--bw) solid var(--line);
  border-radius: var(--r-lg); box-shadow: calc(var(--sh) + 3px) calc(var(--sh) + 3px) 0 var(--shadow-c);
  padding: 20px;
}
@media (max-width: 600px) { .tool { padding: 12px; margin-top: 32px; } }

.drop {
  position: relative; background: var(--soft); border: var(--bw) dashed var(--line);
  border-radius: calc(var(--r-lg) - 8px); padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  transition: background .15s, transform .15s;
}
.drop.is-over { background: var(--accent); color: var(--on-accent); transform: scale(1.01); }
.drop.is-over .drop-hint { color: var(--on-accent); }
.drop-title { font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.drop-hint { font-size: 16px; color: var(--muted); }
.drop svg { width: 56px; height: 56px; }
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Handys: Ziehen geht da nicht – also nur der Knopf */
.only-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .only-fine { display: none; }
  .only-touch { display: inline; }
  .drop { padding: 36px 16px; }
}
@media (max-width: 600px) { .bubbles { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--r);
  border: var(--bw) solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 17px; font-weight: 800; text-decoration: none; cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow-c); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-c); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 4px 4px 0 var(--shadow-c); }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--accent); color: var(--on-accent); font-size: 19px; min-height: 56px; padding: 12px 28px; }
.btn--dark { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: none; }
.btn--dark:hover, .btn--dark:active { box-shadow: none; }
.btn--small { min-height: 44px; padding: 6px 16px; font-size: 16px; box-shadow: none; }
.btn--small:hover, .btn--small:active { box-shadow: none; transform: none; }
.btn--link {
  background: none; border: 0; box-shadow: none; padding: 6px 4px; min-height: 44px;
  font-weight: 700; text-decoration: underline; color: var(--ink);
}
.btn--link:hover, .btn--link:active { box-shadow: none; transform: none; }

/* ---------- Optionen ---------- */
.options { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 20px 4px 4px; align-items: flex-end; }
.opt { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt legend, .opt-label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 8px; padding: 0; }
.seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 16px; font-size: 16px; font-weight: 600; min-height: 44px; cursor: pointer; }
.seg label + label span { border-left: 2px solid var(--line); }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -5px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; }
.num {
  width: 120px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--line);
  border-radius: 10px; background: var(--surface); font-weight: 600;
}
.num--wide { width: 280px; max-width: 100%; }
.range { display: flex; align-items: center; gap: 12px; }
.range input { width: 180px; accent-color: var(--ink); }
.range output { font-weight: 700; min-width: 3.5ch; }
.opt-note { font-size: 15px; color: var(--muted); margin-top: 6px; max-width: 520px; }

/* ---------- Warteschlange ---------- */
.queue { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.queue[hidden] { display: none; }
.queue-head {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center;
  font-size: 16px; font-weight: 700; padding: 4px 4px 2px;
}
.queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 16px;
}
.item.is-done { background: var(--ok-bg); }
.item.is-error { background: var(--err-bg); }
.item-main { flex: 999 1 220px; min-width: 0; }
.item-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.item-meta { font-size: 15px; color: var(--muted); margin-top: 2px; }
.item.is-error .item-meta { color: var(--err); font-weight: 600; }
.item-status { font-size: 15px; font-weight: 700; }
.item-actions { display: flex; gap: 8px; align-items: center; }
.bar { margin-top: 8px; height: 12px; background: var(--soft); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.bar.is-indeterminate > i { width: 35%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.queue-foot { display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: space-between; align-items: center; padding-top: 6px; }
.queue-foot p { font-size: 15px; color: var(--muted); }
.queue-foot .btns { display: flex; flex-wrap: wrap; gap: 12px; }

.found {
  margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
  font-size: 14px; font-weight: 700; background: var(--surface); border: 2px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
}
.chip--warn { background: var(--accent); color: var(--on-accent); }

.notice {
  margin-top: 16px; border: 2px solid var(--line); border-radius: var(--r); padding: 14px 18px;
  background: var(--soft); font-size: 16px;
}
.notice--err { background: var(--err-bg); color: var(--err); font-weight: 600; }

/* ---------- PDF ---------- */
.pdf-list .item-actions .btn--small { min-width: 44px; padding: 6px 10px; }
.pdf-list .pos { font-weight: 800; font-size: 20px; min-width: 2ch; text-align: right; }

/* ---------- Verpixeln ---------- */
.editor { margin-top: 18px; }
.editor[hidden] { display: none; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; padding: 0 4px 16px; }
.stage {
  position: relative; background: var(--soft); border: 2px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; justify-content: center; padding: 8px;
}
.stage canvas { touch-action: none; cursor: crosshair; width: auto; height: auto; max-width: 100%; max-height: 72vh; border-radius: 6px; }
.editor-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 16px; }
.editor-foot .btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Abschnitte ---------- */
.section { margin-top: 100px; }
@media (max-width: 600px) { .section { margin-top: 72px; } }
.section-lead { margin-top: 12px; max-width: 640px; font-size: 19px; color: var(--muted); }

.cards { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: 22px;
  padding: 26px; box-shadow: var(--sh) var(--sh) 0 var(--shadow-c);
}
.card:nth-child(3n+1) { transform: rotate(calc(-1deg * var(--tilt))); }
.card:nth-child(3n+2) { transform: rotate(calc(0.8deg * var(--tilt))); }
.card--accent { background: var(--accent); color: var(--on-accent); }
.card--accent p { color: var(--on-accent); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card-big { display: block; font-size: 48px; font-weight: 800; line-height: 1; margin-bottom: 8px; }

.tiles { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tile {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  background: var(--surface); border: var(--bw) solid var(--line); border-radius: 22px; padding: 24px;
  box-shadow: var(--sh) var(--sh) 0 var(--shadow-c); transition: transform .1s, box-shadow .1s;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 var(--shadow-c); }
.tile svg { width: 36px; height: 36px; }
.tile h3 { font-size: 24px; }
.tile p { color: var(--muted); font-size: 17px; }
.tile .go { margin-top: auto; font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tile--soon { box-shadow: none; border-style: dashed; }
.tile--soon:hover { transform: none; box-shadow: none; }

.pills { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  font-size: 17px; font-weight: 700; background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--r); padding: 10px 18px; text-decoration: none;
}
a.pill:hover { background: var(--accent); color: var(--on-accent); }

.prose { max-width: 760px; }
.prose h2 { margin-bottom: 20px; }
.prose h3 { margin: 32px 0 10px; }
.prose p + p { margin-top: 14px; }
.prose p, .prose li { color: var(--muted); font-size: 18px; }
.prose ol, .prose ul { padding-left: 24px; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); }
.prose code { font-size: 16px; background: var(--surface); border: 1px solid var(--line-soft); padding: 1px 6px; border-radius: 6px; }

.faq { max-width: 780px; }
.faq h2 { margin-bottom: 22px; }
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq details { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 20px; padding: 0; }
.faq summary {
  font-size: 20px; font-weight: 800; cursor: pointer; padding: 18px 22px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 22px 20px; color: var(--muted); }
.faq details > div p + p { margin-top: 10px; }

.legal { max-width: 780px; padding-top: 24px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 28px; }
.legal h2 { font-size: 26px; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal .todo { background: var(--accent); color: var(--on-accent); font-weight: 700; padding: 0 6px; border-radius: 6px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 16px; }
.legal th, .legal td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* ---------- Fuß ---------- */
.site-footer { margin-top: 110px; background: var(--ink); color: var(--bg); }
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-footer p { font-weight: 600; max-width: 420px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }
.site-footer a { color: var(--bg); padding: 6px 0; display: inline-block; }
.site-footer .small { font-size: 15px; opacity: .85; margin-top: 8px; font-weight: 500; }

noscript .notice { margin-top: 20px; }
