/* ArrowNotes — gemeinsames Stylesheet für alle Seiten.
   Farben laufen über semantische Variablen: Hell ist die Vorgabe, Dunkel
   kommt entweder vom System (prefers-color-scheme) oder von der manuellen
   Auswahl (data-theme am <html>). Dadurch steht jede Regel nur einmal da. */

:root {
  color-scheme: light dark;

  --bg: #e9edf2;
  --surface: #ffffff;
  --surface-2: #dde4ed;
  --border: #c8d2df;
  --text: #0b1016;
  --muted: #47525f;
  --accent: #0b5fd0;
  --accent-soft: rgba(11, 95, 208, .12);
  --hero-tint: linear-gradient(180deg, rgba(11, 95, 208, .10), rgba(11, 95, 208, 0) 70%);
  --gold: #f5b301;
  --red: #e5342a;

  --radius: 16px;
  --radius-lg: 26px;
  --shadow: 0 12px 28px rgba(11, 22, 40, .12);
  --maxw: 1080px;
  --gap: clamp(18px, 2.2vw, 28px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101317;
    --surface: #181c22;
    --surface-2: #1f242b;
    --border: #2b323b;
    --text: #f2f4f7;
    --muted: #a8b2c0;
    --accent: #4ea3ff;
    --accent-soft: rgba(78, 163, 255, .16);
    --hero-tint: linear-gradient(180deg, rgba(78, 163, 255, .10), rgba(78, 163, 255, 0) 70%);
    --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  --bg: #101317;
  --surface: #181c22;
  --surface-2: #1f242b;
  --border: #2b323b;
  --text: #f2f4f7;
  --muted: #a8b2c0;
  --accent: #4ea3ff;
  --accent-soft: rgba(78, 163, 255, .16);
  --hero-tint: linear-gradient(180deg, rgba(78, 163, 255, .10), rgba(78, 163, 255, 0) 70%);
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
p:last-child, ul:last-child { margin-bottom: 0; }
:where(section, article) p { max-width: 68ch; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* ---------- Kopfleiste ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.switches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
}
.seg a, .seg button {
  font: inherit;
  font-size: .82rem;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.seg a:hover, .seg button:hover { color: var(--text); text-decoration: none; }
.seg .is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* ---------- Bausteine ---------- */

section { padding-block: clamp(30px, 4vw, 56px); }
section + section { padding-top: 0; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.lead { font-size: 1.15rem; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(11, 22, 40, .04);
}
.card h3 { margin-bottom: .35em; }
.card ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.card li { margin-bottom: .3em; }

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(26px, 3.4vw, 44px); padding-bottom: clamp(30px, 4vw, 52px); background: var(--hero-tint); }
.hero .wrap {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1.3fr .7fr;
  align-items: center;
}
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-actions img { height: 44px; width: auto; }

/* App-Store-Abzeichen: schwarz auf hellem, weiß auf dunklem Grund */
.badge-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-light { display: none; }
  :root:not([data-theme="light"]) .badge-dark { display: block; }
}
:root[data-theme="dark"] .badge-light { display: none; }
:root[data-theme="dark"] .badge-dark { display: block; }
:root[data-theme="light"] .badge-light { display: block; }
.hero-shot { justify-self: center; max-width: 248px; }
.hero-shot img {
  border-radius: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------- Funktionsabschnitte im Wechsel ---------- */

.feature {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1.35fr .65fr;
  align-items: center;
  padding-block: clamp(18px, 2.4vw, 30px);
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature-media { justify-self: center; max-width: 216px; }
.feature-media img {
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
/* Zählt nur die Artikel, nicht die Überschrift davor. Beim Seitenwechsel
   müssen auch die Spaltenbreiten tauschen, sonst steht der Text im schmalen
   Streifen. */
.feature:nth-of-type(even) { grid-template-columns: .65fr 1.35fr; }
.feature:nth-of-type(even) .feature-media { order: -1; }
.feature ul { color: var(--muted); padding-left: 1.1em; margin: 0; }
.feature li { margin-bottom: .35em; }

/* ---------- Galerie ---------- */

.gallery {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.gallery figure { margin: 0; }
.gallery img {
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.gallery figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center; }
.gallery.watch { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery.watch img { border-radius: 26px; }

/* ---------- Tabellenartige Daten ---------- */

.facts { display: grid; gap: 0; }
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.facts div:last-child { border-bottom: 0; }
.facts dt, .facts .k { color: var(--muted); }
.facts .v { text-align: right; }

/* ---------- Fließtext-Seiten (Handbuch, FAQ, Recht) ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose .updated { color: var(--muted); font-size: .9rem; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: .35em; break-inside: avoid; }

details.qa {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
}
details.qa summary { cursor: pointer; font-weight: 600; list-style: none; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::marker { content: ""; }
details.qa summary::after { content: "+"; float: right; color: var(--muted); }
details.qa[open] summary::after { content: "–"; }
details.qa p { margin: .8em 0 0; color: var(--muted); }

/* ---------- Fußzeile ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(30px, 4vw, 56px);
  padding-block: 32px;
  color: var(--muted);
  font-size: .92rem;
}
.site-footer .wrap { display: flex; gap: 14px 22px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer .spacer { margin-inline-start: auto; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 860px) {
  .hero .wrap, .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .hero-shot, .feature-media { max-width: 230px; }
  .site-nav { order: 3; width: 100%; margin-inline-start: 0; }
  .toc ul { columns: 1; }
}

@media (max-width: 560px) {
  /* Kopfleiste stapeln: Marke, Navigation, Umschalter — sonst schiebt die
     Zeile die Seite in die Breite. */
  /* Auf dem Telefon braucht die dreizeilige Leiste zu viel Höhe, deshalb
     scrollt sie hier mit statt zu kleben. */
  .site-header { position: static; }
  .site-header .wrap { row-gap: 6px; }
  .site-nav { order: 3; }
  .switches { order: 4; width: 100%; }
  .seg a, .seg button { padding: 7px 9px; }
  .hero-actions { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
