/* WLAN-Optimizer – Download-Seite. Farben und Schriften aus der App (siehe DESIGN.md). */
:root {
  color-scheme: dark;
  --c-main: #0E1726;
  --c-surface: #192333;
  --c-line: #2C3442;
  --c-ink: #8FA6C1;
  --c-second: #8FA6C1;
  --c-muted: #9AA0AB;
  --c-bright: #E3EAF2;
  --c-accent: #C8FF2E;
  --c-on-accent: #111111;
  --c-accent-edge: #C8FF2E;
  --c-accent-ink: #C8FF2E;
  --c-accent-hover: #D6FF63;
  --c-code: #0E1726;
  --c-shadow: 0 1px 2px rgb(0 0 0 / .25), 0 24px 48px -20px rgb(0 0 0 / .6);

  --font-display: "Clash Grotesk", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --r: 14px;
  --r-s: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 10vw, 128px);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --c-main: #EEF2F6;
    --c-surface: #FFFFFF;
    --c-line: #D3DBE5;
    --c-ink: #1E2D40;
    --c-second: #2F4A68;
    --c-muted: #55606E;
    --c-bright: #0E1726;
    --c-accent-edge: #4F6B00;
    --c-accent-ink: #4F6B00;
    --c-accent-hover: #D6FF63;
    --c-code: #EEF2F6;
    --c-shadow: 0 1px 2px rgb(14 23 38 / .06), 0 24px 48px -24px rgb(14 23 38 / .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--c-main);
  color: var(--c-ink);
  font: 400 16px/1.6 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { color: var(--c-bright); margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(38px, 7vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; }
h3 { font: 600 19px/1.35 var(--font-body); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--c-bright); text-decoration-color: var(--c-accent-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: color 150ms ease, text-decoration-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--c-accent-ink); } }
:focus-visible { outline: 3px solid var(--c-accent-edge); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 20; background: var(--c-accent); color: var(--c-on-accent); padding: 12px 16px; border-radius: var(--r-s); font-weight: 600; }
.skip:focus { top: 12px; }

/* Kopfzeile */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--c-main) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--c-bright); text-decoration: none; font: 600 20px/1 var(--font-display); }
.brand svg { color: var(--c-accent-ink); }
.top nav { display: flex; gap: 4px; }
.top nav a { display: none; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-s); color: var(--c-ink); text-decoration: none; font-weight: 500; }
.top nav a.nav-gh { display: inline-flex; }
@media (hover: hover) and (pointer: fine) { .top nav a:hover { color: var(--c-bright); background: var(--c-surface); } }
@media (min-width: 720px) { .top nav a { display: inline-flex; } }

/* Hero */
.hero { padding-block: clamp(32px, 6vw, 72px) var(--section); }
.hero-text { display: grid; gap: 24px; }
.lead { font-size: 18px; line-height: 1.6; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { margin-top: 18px; font-size: 15px; color: var(--c-muted); max-width: 56ch; }
.note a { color: var(--c-ink); }
@media (min-width: 900px) {
  .hero-text { grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
}
.hero-shot { margin-top: clamp(40px, 6vw, 64px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-s);
  font: 600 16px/1.2 var(--font-body); text-decoration: none; text-align: center;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(.97); }
.btn-main { background: var(--c-accent); color: var(--c-on-accent); border: 2px solid var(--c-accent-edge); }
.btn-quiet { color: var(--c-bright); border: 1px solid var(--c-line); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-main:hover { background: var(--c-accent-hover); color: var(--c-on-accent); }
  .btn-quiet:hover { background: var(--c-surface); color: var(--c-bright); border-color: var(--c-second); }
}
@media (max-width: 599px) { .actions .btn { width: 100%; } }

/* Screenshots */
.shot img { border-radius: var(--r); border: 1px solid var(--c-line); box-shadow: var(--c-shadow); }
@media (max-width: 599px) {
  .hero-shot img { aspect-ratio: 780 / 1100; object-fit: cover; object-position: top; }
}

/* Abschnitte */
main > section { padding-block: var(--section); }
main > section.hero { padding-top: clamp(32px, 6vw, 72px); }
.band { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.band .shot img { box-shadow: none; }
.split { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.intro { margin-top: 16px; max-width: 56ch; }

/* Ablauf: echte Reihenfolge, Schritte 3–5 als Schleife markiert */
.steps { list-style: none; counter-reset: s; margin: 36px 0 0; padding: 0; display: grid; gap: 4px; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 56px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 10px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-main);
  color: var(--c-bright); font: 600 16px/1 var(--font-body);
}
.steps li.loop-start::after, .steps li.loop::after, .steps li.loop-end::after {
  content: ""; position: absolute; left: 17px; width: 2px; background: var(--c-accent-ink); z-index: -1;
}
.steps { isolation: isolate; }
.steps li.loop-start::after { top: 30px; bottom: 0; }
.steps li.loop::after { top: 0; bottom: 0; }
.steps li.loop-end::after { top: 0; height: 30px; }
.steps li.loop-start::before, .steps li.loop::before, .steps li.loop-end::before { border-color: var(--c-accent-ink); }
.steps p { margin-top: 4px; max-width: 52ch; }
.stop { margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--c-accent-ink); background: var(--c-main); border-radius: 0 var(--r-s) var(--r-s) 0; max-width: 60ch; }
@media (min-width: 960px) { #ablauf .shot { position: sticky; top: 104px; } }

/* Was es ändert */
.scope { margin: 32px 0 0; display: grid; gap: 24px; }
.scope div { border-top: 1px solid var(--c-line); padding-top: 16px; }
.scope dt { color: var(--c-bright); font-weight: 600; font-size: 17px; }
.scope dd { margin: 6px 0 0; max-width: 52ch; }
.ki { display: grid; gap: 16px; }
.ki p { max-width: 58ch; }
.ki .shot { margin-top: 8px; }

/* Installation */
.needs { margin-top: 32px; max-width: 72ch; }
.needs ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.needs li::marker { color: var(--c-accent-ink); }
.os { margin-top: 40px; display: grid; gap: 20px; }
@media (min-width: 900px) { .os { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; } }
.card { background: var(--c-main); border: 1px solid var(--c-line); border-radius: var(--r); padding: clamp(20px, 3vw, 32px); min-width: 0; }
.card h3 { font: 600 26px/1.1 var(--font-display); }
.card ol { margin: 20px 0 0; padding-left: 22px; display: grid; gap: 14px; }
.card li { min-width: 0; }
.card li::marker { color: var(--c-muted); font-weight: 600; }
.code { position: relative; margin-top: 10px; }
.code pre {
  margin: 0; padding: 14px 16px; padding-right: 104px; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-s);
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--c-bright);
}
.copy {
  position: absolute; top: 6px; right: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-main); color: var(--c-bright);
  font: 500 14px/1 var(--font-body); cursor: pointer;
  transition: transform 140ms var(--ease-out), border-color 150ms ease;
}
.copy:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .copy:hover { border-color: var(--c-second); } }

/* FAQ */
.faq-wrap { display: grid; gap: 32px; }
@media (min-width: 960px) { .faq-wrap { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; } }
.faq details { border-bottom: 1px solid var(--c-line); }
.faq details:first-child { border-top: 1px solid var(--c-line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 0; color: var(--c-bright); font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 2px solid var(--c-ink); border-bottom: 2px solid var(--c-ink);
  transform: translateY(-3px) rotate(45deg); transition: transform 180ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--c-accent-ink); } }
.faq details p { padding: 0 0 20px; max-width: 64ch; }

/* Footer */
.foot { border-top: 1px solid var(--c-line); padding-block: 40px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.foot-brand { font: 600 18px/1 var(--font-display); color: var(--c-bright); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-ink); }
.legal { flex-basis: 100%; font-size: 14px; color: var(--c-muted); }

/* Einmaliger Hero-Auftritt */
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter 420ms var(--ease-out) both; }
  .hero-side .enter:nth-child(1) { animation-delay: 60ms; }
  .hero-side .enter:nth-child(2) { animation-delay: 120ms; }
  .hero-side .enter:nth-child(3) { animation-delay: 180ms; }
  .hero-shot.enter { animation-delay: 220ms; animation-duration: 600ms; }
  @keyframes enter { from { opacity: 0; transform: translateY(10px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}

/* Schmale Screens: Kopieren-Button unter den Code statt darüber */
@media (max-width: 599px) {
  .code { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .code pre { width: 100%; padding-right: 16px; }
  .copy { position: static; }
}
