/* Leaster QR — eigenständiges Stylesheet, Markentokens aus der leaster.it-Website
   übernommen (oklch, nativer Light/Dark-Mode). Kein Framework, keine externen Fonts. */

:root {
  color-scheme: light dark;
  --brand-h: 195;
  --accent-h: 45;

  --bg:        light-dark(oklch(0.991 0.004 230), oklch(0.165 0.018 245));
  --bg-subtle: light-dark(oklch(0.965 0.006 230), oklch(0.205 0.020 245));
  --surface:   light-dark(oklch(1    0     0  ), oklch(0.225 0.022 245));
  --border:    light-dark(oklch(0.90 0.010 230), oklch(0.30  0.024 245));
  --text:      light-dark(oklch(0.255 0.022 245), oklch(0.945 0.010 230));
  --text-muted:light-dark(oklch(0.475 0.022 245), oklch(0.735 0.018 235));

  --brand:     light-dark(oklch(0.55 0.115 var(--brand-h)), oklch(0.74 0.115 var(--brand-h)));
  --accent:    light-dark(oklch(0.62 0.150 var(--accent-h)), oklch(0.80 0.140 var(--accent-h)));
  --on-brand:  oklch(0.99 0.01 230);

  --font-sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 60rem;
  --shadow: 0 1px 2px oklch(0.2 0.02 245 / 0.06), 0 8px 24px -12px oklch(0.2 0.02 245 / 0.22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--brand); }
.wrap { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
}
.bar { display: flex; align-items: center; gap: 1rem; min-block-size: 3.6rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 720; text-decoration: none; color: var(--text); letter-spacing: -0.02em; }
.brand-mark { color: var(--brand); font-size: 1.05em; transform: translateY(-1px); }
.brand-sub { color: var(--brand); margin-inline-start: .15em; }
.nav { display: flex; gap: 1.1rem; margin-inline: auto; font-size: .95rem; }
.nav a { color: var(--text-muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.ghost { font-size: .85rem; color: var(--text-muted); text-decoration: none; }
.ghost:hover { color: var(--brand); }

/* Layout */
.content { padding-block: 2rem 3rem; }
.hero { text-align: center; margin-block: 1rem 2rem; }
.hero h1 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem); margin: 0 0 .5rem; letter-spacing: -0.02em; }
.lede { color: var(--text-muted); max-width: 42rem; margin-inline: auto; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 56rem) { .grid:has(.result) { grid-template-columns: 1.4fr 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 1rem; font-size: 1.15rem; }

/* Forms */
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: var(--text-muted); }
.input, textarea.input, select.input {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.input:focus { outline: 2px solid color-mix(in oklch, var(--brand) 55%, transparent); border-color: var(--brand); }
textarea.input { resize: vertical; }
.mono { font-family: var(--font-mono); font-size: .82rem; }
.row { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: .9rem; }
.field { flex: 1 1 9rem; }
.color { height: 2.6rem; padding: .2rem; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--text); margin-top: .4rem; }
.check input { width: auto; }
.check-field { display: flex; align-items: end; }
.hint { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--bg-subtle); color: var(--text-muted); font-size: .7rem; cursor: help; }
.mt { margin-top: 1rem; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--brand); color: var(--on-brand);
  font: inherit; font-weight: 650; padding: .65rem 1.2rem; border-radius: var(--radius-sm);
  margin-top: .4rem;
}
.btn:hover { filter: brightness(1.06); }
.error { color: oklch(0.6 0.2 25); margin-top: .8rem; font-size: .9rem; }
.error ul { margin: 0; padding-left: 1.1rem; }

/* Result */
.result .qr-preview { display: grid; place-items: center; padding: 1rem; border-radius: var(--radius-sm); background: var(--bg); }
.qr-preview img { max-width: 100%; height: auto; border-radius: 6px; }
.wallpaper { max-height: 70vh; box-shadow: var(--shadow); }
.checker {
  background-image:
    linear-gradient(45deg, var(--bg-subtle) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-subtle) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-subtle) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-subtle) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.download { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; }
.download .input { width: auto; }

/* API page */
.code { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .9rem 1rem; overflow-x: auto; font-family: var(--font-mono); font-size: .82rem; white-space: pre; }
.params { width: 100%; border-collapse: collapse; margin: .5rem 0 1.5rem; font-size: .9rem; }
.params th, .params td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.params code, p code, td code { font-family: var(--font-mono); font-size: .85em; background: var(--bg-subtle); padding: .1rem .35rem; border-radius: 5px; }
.card h2 + table, .card h2 { margin-top: 1.4rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 1.4rem; margin-top: 2rem; }
.site-footer .privacy { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: 0 0 .3rem; }
.site-footer .dot { color: oklch(0.72 0.17 150); font-size: .7rem; }
.muted { color: var(--text-muted); font-size: .85rem; margin: 0; }
