/* AutarkDarts – Homepage. Farben wie in der App (frontend/src/routes/+layout.svelte).
   Keine Schriften, Skripte oder Bilder von fremden Servern. */

:root {
  color-scheme: dark light;
  --bg: #05080a;
  --panel: #0c1216;
  --panel-soft: #131c22;
  --line: #1d2b33;
  --text: #e8f4f6;
  --muted: #8ea5af;
  --accent: #1fd6c4;
  --accent-text: #1fd6c4;
  --accent-schwach: #145c56;
  --on-accent: #02201d;
  --warn: #d8a33a;
  --scheibe: #5a5c5a;
  --radius: 14px;
  --breite: 1080px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Liberation Sans", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f9fa;
    --panel: #ffffff;
    --panel-soft: #eaf1f3;
    --line: #d3dfe3;
    --text: #0b1418;
    --muted: #4f6670;
    --accent: #1fd6c4;
    --accent-text: #0b7c71;
    --accent-schwach: #c6f1ec;
    --on-accent: #02201d;
    --warn: #8a5d00;
    --scheibe: #6b6e6b;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--schrift);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: 16px; top: 12px; z-index: 10; background: var(--panel); padding: 8px 12px; }

.rahmen { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .rahmen { padding: 0 28px; } }

/* Kopf */
.kopf { border-bottom: 1px solid var(--line); background: var(--bg); }
.kopf .rahmen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding-top: 12px; padding-bottom: 12px;
}
.marke {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem;
}
.marke img { width: 38px; height: 38px; }
.marke b { color: var(--accent-text); font-weight: 700; }
.navi { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .96rem; }
.navi a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.navi a:hover, .navi a[aria-current="page"] { color: var(--text); }
.navi a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }

/* Startbild */
.start {
  position: relative; overflow: hidden; color: #e8f4f6;
  background: #05080a url("bilder/hintergrund.jpg") center / cover no-repeat;
}
.start::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,8,10,.94) 0%, rgba(5,8,10,.78) 55%, rgba(5,8,10,.45) 100%);
}
.start .rahmen {
  position: relative; display: grid; gap: 28px; align-items: center;
  padding-top: 56px; padding-bottom: 56px;
}
@media (min-width: 820px) {
  .start .rahmen { grid-template-columns: 1.35fr 1fr; padding-top: 88px; padding-bottom: 88px; }
}
.start h1 b { color: #1fd6c4; font-weight: inherit; }
.start .bald {
  display: inline-block; margin: 0 0 18px; padding: 5px 16px; border-radius: 999px;
  background: rgba(31,214,196,.14); border: 1px solid #1fd6c4; color: #1fd6c4;
  font-weight: 700; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase;
}
.start p.leit { font-size: 1.15rem; color: #c3d6db; max-width: 36em; }
.start .bild { justify-self: center; width: min(300px, 70vw); }
.start .bild img { width: 100%; filter: drop-shadow(0 0 40px rgba(31,214,196,.25)); }
.merk { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; padding: 0; list-style: none; }
.merk li {
  border: 1px solid rgba(31,214,196,.35); color: #c3eee9; border-radius: 999px;
  padding: 3px 12px; font-size: .9rem;
}

.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.knopf {
  display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--accent);
}
.knopf.voll { background: #1fd6c4; color: #02201d; }
.knopf.leer { color: #1fd6c4; }
.knopf:hover { filter: brightness(1.08); }

/* Abschnitte */
.abschnitt { padding: 56px 0; }
.abschnitt + .abschnitt { border-top: 1px solid var(--line); }
.abschnitt .einleitung { color: var(--muted); max-width: 40em; margin-bottom: 28px; }
.seitenkopf { padding: 48px 0 8px; }
.seitenkopf p { color: var(--muted); max-width: 42em; }
.seitenkopf + .abschnitt { padding-top: 20px; }

.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.karte {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 8px;
}
.karte h3 { display: flex; align-items: center; gap: 10px; }
.karte h3 svg { width: 22px; height: 22px; flex: none; color: var(--accent-text); }
.karte p { color: var(--muted); font-size: .97rem; }

/* Schema */
.schema-kasten { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .schema-kasten { grid-template-columns: 1.2fr 1fr; } }
.schema { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.schema svg { width: 100%; }
.schema .s-linie { stroke: var(--scheibe); }
.schema .s-akzent { stroke: var(--accent); }
.schema .s-fuell { fill: var(--panel-soft); }
.schema .s-text { fill: var(--muted); font: 13px var(--schrift); }
.schema .s-text-hell { fill: var(--text); font: 600 13px var(--schrift); }
.schema .s-klein { font-size: 12px; }
.schema .s-zahl { fill: var(--accent-text); font: 700 22px var(--schrift); }
@media (max-width: 600px) {
  .schema { padding: 8px; }
  .schema .s-text, .schema .s-text-hell { font-size: 22px; }
  .schema .s-klein { font-size: 19px; }
  .schema .s-zahl { font-size: 34px; }
  .schema .s-detail { display: none; }
  .start .bild { width: min(190px, 50vw); }
}

ol.schritte { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
ol.schritte > li { counter-increment: s; position: relative; padding-left: 48px; }
ol.schritte > li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-schwach); color: var(--accent-text); font-weight: 700;
}
@media (prefers-color-scheme: dark) { ol.schritte > li::before { color: #bff5ef; } }
ol.schritte h3 { margin-bottom: .25em; }
ol.schritte p { color: var(--muted); margin: 0; }

/* Tabellen */
.tabelle { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
tr:last-child > * { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
thead th { background: var(--panel-soft); }
td small { color: var(--muted); display: block; margin-top: 2px; }
.etikett {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-schwach); color: var(--accent-text); vertical-align: 1px; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .etikett { color: #bff5ef; } }
.etikett.grau { background: var(--panel-soft); color: var(--muted); }
table.liste th[scope="row"] { width: 34%; }
table.liste th .etikett { margin-left: 6px; }
@media (max-width: 600px) {
  table.liste thead { display: none; }
  table.liste tr, table.liste th, table.liste td { display: block; width: auto; }
  table.liste th[scope="row"] { width: auto; padding-bottom: 0; border-bottom: 0; color: var(--text); }
  table.liste td { padding-top: 4px; }
}
dl.werte { margin: 0 0 12px; font-size: .95rem; }
dl.werte dt { color: var(--muted); font-size: .85rem; margin-top: 10px; }
dl.werte dd { margin: 0; }

.hinweis {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--panel);
  border-radius: 10px; padding: 14px 18px; margin: 20px 0; color: var(--muted);
}
.hinweis strong { color: var(--text); }
.hinweis.warn { border-left-color: var(--warn); }

code, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--panel-soft); padding: 1px 6px; border-radius: 6px; }
pre {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* Kauf */
.kauf {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: grid; gap: 20px;
}
@media (min-width: 820px) { .kauf { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.kauf ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.kauf .knoepfe .knopf.leer { color: var(--accent-text); border-color: var(--accent-text); }

/* Rechtstexte */
.text > * { max-width: 46em; }
.text h2 { font-size: 1.3rem; margin-top: 2em; }
.text h3 { font-size: 1.05rem; margin-top: 1.6em; }
.text ul { padding-left: 1.2em; }
.text li { margin-bottom: .5em; }
.text ol.buchst { list-style: none; padding-left: 0; }
.text ol.buchst > li { margin-bottom: 1em; }
.text .fassung { color: var(--muted); }
.text address { font-style: normal; margin-bottom: 1em; }

/* Fuss */
.fuss { border-top: 1px solid var(--line); margin-top: 24px; padding: 28px 0 40px; color: var(--muted); font-size: .92rem; }
.fuss .rahmen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fuss a { color: var(--muted); }
.fuss a:hover { color: var(--text); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Öffentliche Startseite: nur Logo und Coming Soon (der Rest liegt unter /intern/) */
.start.mitte .rahmen { display: block; text-align: center; min-height: 68vh; padding-top: 56px; padding-bottom: 56px; }
.start.mitte .gross { width: min(220px, 52vw); margin: 0 auto 18px; filter: drop-shadow(0 0 40px rgba(31,214,196,.25)); }
.start.mitte h1 { margin-bottom: .3em; }
.start.mitte .leit { margin: 0 auto 22px; }
.start.mitte .knoepfe { justify-content: center; margin-top: 8px; }
.start.mitte .klein { color: #8ea5af; font-size: .9rem; margin-top: 14px; }
