/* ============================================================
   leichte.ch — gemeinsames Stylesheet
   Hell, übersichtlich, am ursprünglichen Google-Such-Design orientiert.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f6f8f6;
  --raised:    #fbfcfa;
  --ink:       #1b241f;
  --muted:     #5f6b62;
  --line:      #e3e8e3;
  --leaf:      #2e7d5b;
  --leaf-deep: #1f5b41;
  --marigold:  #d98e22;
  --danger:    #b3261e;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(27,36,31,.04), 0 8px 28px rgba(27,36,31,.06);
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--leaf-deep); }
a:hover { color: var(--leaf); }

/* Tastatur-Sichtbarkeit für alle interaktiven Elemente */
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sprung-Link für Screenreader / Tastatur */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---- Kopfzeile ---- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: .92rem;
}
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a:hover { color: var(--ink); }

/* ---- Wortmarke ---- */
.wordmark {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dot { color: var(--leaf); }
.topbar .wordmark { font-size: 1.3rem; }

/* ---- Buttons ---- */
.btn {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  transition: background .15s ease, transform .05s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--leaf-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--leaf-deep);
  border: 1px solid var(--line);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }

/* ---- Inhaltsbreite ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Info-Abschnitte ---- */
section.band { padding: 46px 0; border-top: 1px solid var(--line); }
section.band:first-of-type { border-top: none; }
.band h1,
.band h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.band .lead { color: var(--muted); margin: 0 0 22px; max-width: 60ch; }

/* ---- Eigenschaften-Raster ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2,
.card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.02rem;
  margin: 0 0 6px;
}
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---- Preis-Box ---- */
.price {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
}
.price .amount {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
}
.price .amount small { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.price .cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Lauftext (Rechtsseiten) ---- */
.prose { max-width: 70ch; padding: 40px 0 10px; }
.prose h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  margin: 0 0 8px;
}
.prose h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.15rem;
  margin: 30px 0 6px;
}
/* Abschnitts-Titel innerhalb von Prose (z. B. VDP), gross wie ein h1, aber als h2 in der Hierarchie. */
.prose h2.policy-title {
  font-weight: 800;
  font-size: 1.9rem;
  margin: 0 0 8px;
}
.prose h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.15rem;
  margin: 30px 0 6px;
}
.prose p, .prose li { color: var(--ink); }
.prose .muted { color: var(--muted); }
.prose code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .9em;
}
.todo {
  background: #fff4e0;
  border: 1px solid var(--marigold);
  color: #6b4a08;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: .92em;
}

/* ---- Fußzeile ---- */
/* Luft zwischen Inhalt und (abgesetztem) Footer. Bewusst aufs Hauptelement statt
   auf den Footer, damit dessen margin-top:auto (Sticky-Footer) erhalten bleibt. */
main { padding-bottom: clamp(48px, 8vh, 96px); }

footer.site {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .85rem;
}
footer.site .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.site nav a { color: var(--muted); text-decoration: none; }
footer.site nav a:hover { color: var(--ink); text-decoration: underline; }
footer.site .note { max-width: 46ch; line-height: 1.55; }
footer.site strong { color: var(--ink); }

@media (max-width: 820px) {
  body { font-size: 17px; }
}

/* ============================================================
   Übersetzer (index.php und lokal.php)
   ============================================================ */
.hero { text-align: center; padding: 50px 24px 26px; }
.hero .wordmark { font-size: clamp(2.4rem, 7vw, 3.6rem); }
.hero .tagline { font-size: 1.15rem; margin: 14px auto 4px; max-width: 38ch; }
.hero .subtag { color: var(--muted); margin: 0 auto; max-width: 44ch; font-size: .98rem; }

.loader {
  margin: 22px auto 0;
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 10px;
}
select {
  font-family: inherit; font-size: .9rem;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  max-width: 300px;
}
.status { font-size: .85rem; color: var(--muted); }
.status.busy  { color: var(--leaf-deep); }
.status.ready { color: var(--leaf); font-weight: 700; }
.status.error { color: var(--danger); font-weight: 700; }
.bar {
  height: 6px; width: 180px;
  background: var(--line); border-radius: 99px;
  overflow: hidden; display: none;
}
.bar.show { display: block; }
.bar > span {
  display: block; height: 100%; width: 0%;
  background: var(--leaf); transition: width .2s ease;
}

.gpu-warn, .notice {
  max-width: 760px; margin: 18px auto 0;
  border-radius: 10px; padding: 12px 16px; font-size: .92rem;
}
.gpu-warn {
  background: #fff4e0; border: 1px solid var(--marigold); color: #6b4a08;
  display: none;
}
.gpu-warn.show { display: block; }
.notice { background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); }
.notice a { font-weight: 700; }

.work {
  max-width: var(--maxw); margin: 24px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.panel {
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 15px 20px 6px;
}
.panel-head h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: .95rem; margin: 0; text-transform: uppercase; letter-spacing: .06em;
}
.panel-head .eyebrow { font-size: .72rem; color: var(--muted); }
textarea {
  flex: 1; min-height: 300px; resize: vertical;
  border: none; background: transparent; color: var(--ink);
  font-family: inherit; font-size: 1.05rem; line-height: 1.65;
  padding: 8px 20px 16px;
}
/* Tastatur-Fokus auf dem Textfeld sichtbar lassen – globales :focus-visible (oben) greift. */
.output {
  flex: 1; min-height: 300px; padding: 8px 20px 16px;
  font-size: 1.1rem; line-height: 1.8;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.output.placeholder { color: var(--muted); font-style: italic; }
.output .caret {
  display: inline-block; width: 9px; height: 1.1em;
  background: var(--leaf); vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 0%,50%{opacity:1} 50.01%,100%{opacity:0} }
.panel-foot {
  border-top: 1px solid var(--line); padding: 12px 20px;
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
}
.panel-foot .count { margin-right: auto; font-size: .78rem; color: var(--muted); }

@media (max-width: 820px) {
  .work { grid-template-columns: 1fr; }
  .loader { width: 100%; }
  select { flex: 1; max-width: none; }
}

/* ============================================================
   Formulare (Anmelden / Registrieren / Konto)
   ============================================================ */
.form-card {
  max-width: 420px; margin: 48px auto; padding: 28px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-card h1 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: 1.5rem; margin: 0 0 16px;
}
.form-row { margin: 0 0 14px; }
.form-row label { display: block; font-size: .9rem; margin: 0 0 5px; color: var(--muted); }
.form-row input {
  width: 100%; font-family: inherit; font-size: 1rem;
  padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--ink);
}
.form-card .btn { width: 100%; margin-top: 6px; }
.form-foot { margin-top: 16px; font-size: .9rem; color: var(--muted); text-align: center; }

.alert { border-radius: 10px; padding: 11px 14px; margin: 0 0 16px; font-size: .92rem; }
.alert-error { background: #fdecea; border: 1px solid #f3c2bd; color: #8a1c12; }
.alert-ok    { background: #e9f6ef; border: 1px solid #b9e0cd; color: #1f5b41; }

.badge {
  display: inline-block; border-radius: 99px; padding: 2px 10px;
  font-size: .8rem; font-weight: 700;
}
.badge-free { background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }
.badge-paid { background: #e9f6ef; border: 1px solid #b9e0cd; color: var(--leaf-deep); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
