/*
 * MeshUp – Landingpage
 * Reines CSS, keine externen Ressourcen. Farben wie in der App (ui/theme/Theme.kt):
 * 3DNS-Blau #0078D4 (hell) bzw. #4DA6FF (dunkel), Hintergrund dunkel #0B141A.
 * Hell/Dunkel folgt prefers-color-scheme; der Schalter setzt data-theme auf <html>.
 */

/* ---------- Farben ---------- */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --text: #111b21;
  --muted: #4b5b66;
  --border: #d9e2ea;
  --accent: #0078d4;
  --accent-text: #0063b1;
  --accent-soft: #e6f2ff;
  --accent-ring: rgba(0, 120, 212, 0.35);
  --on-accent: #ffffff;
  --warn-bg: #fff4d6;
  --warn-text: #5c4400;
  --todo-bg: #ffe2e6;
  --todo-text: #8a0021;
  --bezel: #1d2328;
  --bezel-edge: #3a4248;
  --glow: rgba(0, 120, 212, 0.18);
  --shadow-sm: 0 1px 2px rgba(17, 27, 33, 0.06), 0 1px 1px rgba(17, 27, 33, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(17, 27, 33, 0.28), 0 8px 16px -8px rgba(17, 27, 33, 0.12);
  --mesh-line: rgba(0, 120, 212, 0.22);
  --mesh-node: rgba(0, 120, 212, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b141a;
    --bg-soft: #0f1a21;
    --surface: #111b21;
    --surface-2: #1a2125;
    --text: #e9edef;
    --muted: #a3b0b8;
    --border: #25313a;
    --accent: #4da6ff;
    --accent-text: #80bfff;
    --accent-soft: #0e2a44;
    --accent-ring: rgba(77, 166, 255, 0.45);
    --on-accent: #002640;
    --warn-bg: #3a3418;
    --warn-text: #ffe08a;
    --todo-bg: #4a1622;
    --todo-text: #ffc2cc;
    --bezel: #05080a;
    --bezel-edge: #2c353b;
    --glow: rgba(77, 166, 255, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7), 0 8px 16px -8px rgba(0, 0, 0, 0.5);
    --mesh-line: rgba(77, 166, 255, 0.2);
    --mesh-node: rgba(77, 166, 255, 0.55);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b141a;
  --bg-soft: #0f1a21;
  --surface: #111b21;
  --surface-2: #1a2125;
  --text: #e9edef;
  --muted: #a3b0b8;
  --border: #25313a;
  --accent: #4da6ff;
  --accent-text: #80bfff;
  --accent-soft: #0e2a44;
  --accent-ring: rgba(77, 166, 255, 0.45);
  --on-accent: #002640;
  --warn-bg: #3a3418;
  --warn-text: #ffe08a;
  --todo-bg: #4a1622;
  --todo-text: #ffc2cc;
  --bezel: #05080a;
  --bezel-edge: #2c353b;
  --glow: rgba(77, 166, 255, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7), 0 8px 16px -8px rgba(0, 0, 0, 0.5);
  --mesh-line: rgba(77, 166, 255, 0.2);
  --mesh-node: rgba(77, 166, 255, 0.55);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
  hyphens: manual;
}

h1 {
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

/* hidden gilt immer – auch für Knöpfe mit eigenem display (Design-Schalter ohne JS, Web-Client) */
[hidden] {
  display: none !important;
}

/* Strich-Symbole (Inline-SVG, 24er Raster) */
.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i .dot {
  fill: currentColor;
  stroke: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 400px) {
  .container {
    padding-inline: 16px;
  }
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Seiten ohne Navigation (Rechtstexte, 404): Werkzeuge trotzdem rechts */
.brand + .header-tools {
  margin-left: auto;
}

.icon-btn,
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.icon-btn {
  padding: 0;
  width: 2.6rem;
}

.icon-btn:hover,
.lang-link:hover {
  background: var(--surface-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Sonne im Dunkeln, Mond im Hellen */
.theme-icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

.menu {
  position: relative;
  display: none;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 13rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.menu-panel a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.menu-panel a:hover {
  background: var(--surface-2);
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }
  .header-tools {
    margin-left: auto;
  }
  .menu {
    display: block;
  }
}

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 20px -8px var(--accent-ring);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px var(--accent-ring);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-ghost {
  color: var(--accent-text);
  padding-inline: 0.6rem;
}

.btn-ghost:hover {
  text-decoration: underline;
}

.btn small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* ---------- Abschnitte ---------- */
.section {
  padding-block: clamp(4rem, 3rem + 4vw, 6.5rem);
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(3.5rem, 2rem + 5vw, 6rem);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 70rem;
  height: 70rem;
  max-width: 140vw;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  z-index: -1;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  /* hinter dem Text nur angedeutet, rechts beim Bild voll */
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 40%, #000 70%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 40%, #000 70%);
}

.hero-mesh line {
  stroke: var(--mesh-line);
  stroke-width: 1.2;
}

.hero-mesh circle {
  fill: var(--mesh-node);
}

.hero-mesh .pulse {
  fill: var(--accent);
  opacity: 0;
  animation: mesh-pulse 6s ease-in-out infinite;
}

.hero-mesh .pulse:nth-of-type(2) {
  animation-delay: 2s;
}

.hero-mesh .pulse:nth-of-type(3) {
  animation-delay: 4s;
}

@keyframes mesh-pulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.9;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
}

.hero-copy .lead {
  max-width: 36rem;
  margin-bottom: 1.8rem;
}

.hero h1 .accent {
  display: block;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-facts svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 20rem;
}

.hero-visual .device--phone {
  width: min(300px, 70vw);
}

.hero-visual .device--back {
  position: absolute;
  width: min(250px, 56vw);
  transform: translate(58%, -6%) rotate(6deg);
  opacity: 0.96;
  z-index: 0;
}

.hero-visual .device--front {
  position: relative;
  z-index: 1;
  transform: translateX(-14%);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-visual {
    margin-top: 1rem;
  }
  .hero-mesh {
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.25) 45%, #000 75%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.25) 45%, #000 75%);
  }
}

@media (max-width: 520px) {
  .hero-visual .device--back {
    display: none;
  }
  .hero-visual .device--front {
    transform: none;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- Geräterahmen ---------- */
.device {
  margin: 0;
}

.device img {
  width: 100%;
  background: var(--surface-2);
}

.device--phone {
  position: relative;
  padding: 9px;
  border-radius: 46px;
  background: var(--bezel);
  box-shadow: inset 0 0 0 1.5px var(--bezel-edge), var(--shadow-lg);
}

.device--phone::before {
  /* Kamera-Loch */
  content: "";
  position: absolute;
  top: 19px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #05080a;
  box-shadow: inset 0 0 0 2px #1b2329;
  z-index: 2;
}

.device--phone img {
  border-radius: 37px;
}

.device--phone img:not([width]) {
  aspect-ratio: 1080 / 2400;
  object-fit: cover;
  object-position: top;
}

.device--desktop {
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.4rem;
  padding: 0 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.window-bar img {
  width: 18px;
  height: 18px;
  background: none;
}

.window-controls {
  display: flex;
  gap: 0.9rem;
  margin-left: auto;
}

.window-controls span {
  display: block;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.7;
}

.window-controls span:first-child {
  height: 0;
  border-width: 1.5px 0 0;
  margin-top: 5px;
  border-radius: 0;
}

.window-controls span:last-child {
  border: 0;
  position: relative;
}

.window-controls span:last-child::before,
.window-controls span:last-child::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 4px;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}

.window-controls span:last-child::after {
  transform: rotate(-45deg);
}

.device--desktop img {
  border-radius: 0;
}

.device--desktop img:not([width]) {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}

/* ---------- Karten ---------- */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

/* Breit: drei oben, zwei mittig darunter */
@media (min-width: 1000px) {
  .promise-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .promise-grid > * {
    grid-column: span 2;
  }
  .promise-grid > :nth-child(4) {
    grid-column: 2 / span 2;
  }
}

.card {
  position: relative;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-top: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  hyphens: auto;
}

.card p + p {
  margin-top: 0.6rem;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.feature-grid .card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.chips-title {
  margin: 2.5rem 0 0;
  font-weight: 700;
}

.chips-title + .chips {
  margin-top: 0.9rem;
}

/* ---------- Am Computer ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

.split:not(:has(.device)) {
  grid-template-columns: minmax(0, 1fr);
}

.check-list {
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.6rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--accent-soft);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.52em;
  width: 0.35rem;
  height: 0.62rem;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Einblicke (Galerie) ---------- */
.gallery-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  border-radius: 18px;
}

.gallery {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  width: max-content;
  margin: 0;
  padding: 0.75rem 0.5rem 1.5rem;
  list-style: none;
}

.gallery > li {
  flex: 0 0 auto;
  width: min(230px, 62vw);
  scroll-snap-align: start;
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.gallery figcaption strong {
  display: block;
  color: var(--text);
}

.gallery > li.wide {
  width: min(520px, 80vw);
}

/* ---------- So funktioniert's ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.how-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.how-card svg {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--bg-soft);
}

.how-card figcaption h3 {
  margin-top: 0.25rem;
}

.how-card figcaption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  hyphens: auto;
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 0.9rem;
}

/* Grafik-Klassen (Inline-SVG, Farben aus den Variablen) */
.d-device {
  fill: var(--surface);
  stroke: var(--text);
  stroke-width: 2;
}

.d-screen {
  fill: var(--accent-soft);
}

.d-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.d-dash {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
  animation: dash-flow 1.6s linear infinite;
}

.d-dash-rev {
  animation-direction: reverse;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -18;
  }
}

.d-muted {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.d-fill-accent {
  fill: var(--accent);
}

.d-fill-bg {
  fill: var(--bg-soft);
}

.d-fill-surface {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}

.d-envelope {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}

.d-text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.d-text-strong {
  fill: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.d-on-accent {
  fill: var(--on-accent);
}

.d-lock-shackle {
  fill: none;
  stroke: var(--on-accent);
}

.d-tunnel {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 16;
  stroke-linecap: round;
  opacity: 0.9;
}

.note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.note p {
  margin: 0;
  color: var(--muted);
}

.note .icon-tile {
  flex-shrink: 0;
}

.spec {
  display: grid;
  grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.spec dt {
  font-weight: 700;
}

.spec dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .spec {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
  .spec dd {
    margin-bottom: 0.7rem;
  }
}

.details-box {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.details-box summary {
  cursor: pointer;
  font-weight: 700;
}

/* ---------- Datenschutz ---------- */
.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 1.5rem;
  align-items: start;
}

.privacy-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.honest {
  padding: 1.6rem;
  border-radius: 22px;
  background: var(--warn-bg);
  color: var(--warn-text);
}

.honest h3 {
  color: inherit;
}

.honest ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}

.honest li {
  margin-bottom: 0.6rem;
  hyphens: auto;
}

.honest a {
  color: inherit;
  font-weight: 700;
}

@media (max-width: 900px) {
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Download ---------- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}

.download-card {
  display: flex;
  flex-direction: column;
}

.download-card .btn {
  margin-top: 1.25rem;
  align-self: flex-start;
}

.download-card.primary {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm);
}

.download-card ol {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.download-card .grow {
  flex-grow: 1;
}

.download-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
  color: var(--muted);
}

.download-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.download-more svg {
  width: 20px;
  height: 20px;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 50rem;
  margin-inline: auto;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  position: relative;
  padding: 1.15rem 2.5rem 1.15rem 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.08rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: -0.45rem;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -0.1rem;
}

.faq details > div {
  padding: 0 0 1.25rem;
  color: var(--muted);
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  padding-block: 3rem 2.5rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-grid p {
  max-width: 26rem;
  margin: 0.75rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Rechtstexte ---------- */
.legal {
  max-width: 46rem;
  padding-block: 3rem 5rem;
}

.legal h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem);
}

.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  letter-spacing: -0.01em;
}

.legal h3 {
  margin-top: 1.5rem;
}

.legal address {
  font-style: normal;
  margin-bottom: 1rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

/* Inhaltsverzeichnis langer Rechtstexte */
.legal-toc {
  margin: 1.75rem 0 0.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-soft);
}

.legal-toc-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.legal-toc li {
  margin-bottom: 0.2rem;
}

/* Platzhalter, die der Betreiber vor der Veröffentlichung ausfüllen muss */
.todo {
  display: inline;
  padding: 0.05em 0.35em;
  border-radius: 6px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-weight: 700;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.todo-box {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--todo-bg);
  color: var(--todo-text);
}

.todo-box p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: 4rem;
}

.notfound .code {
  font-size: clamp(4rem, 3rem + 6vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.notfound .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ---------- Lightbox für die Bildschirmfotos (assets/js/site.js) ---------- */
.zoomable {
  cursor: zoom-in;
}
.zoomable:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
html.lightbox-open {
  overflow: hidden;
}
.lightbox {
  /* Volle Fläche, das Bild in der Mitte; der dunkle Rand schließt beim Antippen. */
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e9edef;
  overflow: hidden;
  display: none;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center;
}
.lightbox[open] {
  display: grid;
  animation: lightbox-in 0.18s ease-out;
}
.lightbox::backdrop {
  background: rgba(5, 10, 14, 0.9);
}
.lightbox-stage {
  grid-column: 2;
  grid-row: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0.5rem 0.5rem;
  touch-action: pan-y;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 9.5rem);
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img--wide {
  border-radius: 10px;
}
.lightbox-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
  justify-content: center;
  padding: 0.6rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.lightbox-caption {
  margin: 0;
  max-width: 60ch;
  font-size: 0.95rem;
  line-height: 1.4;
}
.lightbox-count {
  flex: none;
  font-size: 0.85rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.lightbox-btn:focus-visible {
  outline: 3px solid #4da6ff;
  outline-offset: 2px;
}
.lightbox-btn svg {
  width: 22px;
  height: 22px;
}
.lightbox-btn[hidden] {
  display: none;
}
.lightbox-prev {
  grid-column: 1;
  grid-row: 1;
}
.lightbox-next {
  grid-column: 3;
  grid-row: 1;
}
.lightbox-close {
  position: absolute;
  top: calc(0.6rem + env(safe-area-inset-top, 0px));
  right: 0.4rem;
  z-index: 1;
}
@media (max-width: 640px) {
  /* Schmal: Pfeile über dem Bild am unteren Rand, gewischt wird ohnehin. */
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px));
    margin: 0;
  }
  .lightbox-prev {
    left: 0.8rem;
  }
  .lightbox-next {
    right: 0.8rem;
  }
  .lightbox-stage {
    grid-column: 1 / -1;
  }
}
@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-mesh .pulse {
    display: none;
  }
  .btn-primary:hover {
    transform: none;
  }
}

/* ---------- Druck ---------- */
@media print {
  .site-header,
  .hero-mesh,
  .hero-visual,
  .menu {
    display: none !important;
  }
  .section {
    padding-block: 1.5rem;
  }
}
