/* Plantonom-Website, aufgebaut wie der Ladebildschirm der App (08.11.2026):
   - hinter jeder Seite eine Aquarell-Welt über den ganzen Bildschirm (`--welt`, hochkant `--welt-hoch` am `body`),
   - oben Logo und Navigation als Kapsel aus Milchglas,
   - darunter genau eine Karte (`.sheet`); die Seite selbst scrollt nie, nur der Inhalt der Karte, mit weichem Auslauf
     oben und unten wie in den Infokarten.
   Immer hell, Knöpfe schwarz (nie Waldgrün), Asimovian für Überschriften. */
@font-face {
  font-family: "Asimovian";
  src: url("/assets/Asimovian-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f4ead0;
  --glass: rgba(251, 246, 230, 0.84);
  --tile: rgba(255, 252, 242, 0.85);
  --ink: #1f2a1c;
  --muted: #5d6656;
  --line: rgba(120, 100, 50, 0.16);
  --leaf: #3f8f2a;
  --leaf-deep: #2c6b1d;
  --link: #8a6416;
  --link-hover: #6b4c0e;
  --mark: #fff3a8;
  --shadow: 0 10px 30px rgba(70, 60, 20, 0.12);
  --fade: 28px;
  --gutter: 16px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* Die Welt. Schmaler als das Bild (3:2): füllt die Höhe, der Horizont liegt immer bei gut 40 %. Breiter: oben bündig,
   damit der Papierhimmel oben bleibt. Hochkant: die hohe Fassung. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) var(--welt) center bottom / cover no-repeat;
  /* Etwas dunkler als im Original: Karte und Kapsel heben sich klarer ab (Nutzer 08.11.2026). */
  filter: brightness(0.86) saturate(1.05);
}
@media (min-aspect-ratio: 3/2) { body::before { background-position: center top; } }
@media (max-aspect-ratio: 4/5) { body::before { background-image: var(--welt-hoch, var(--welt)); } }

/* Links in gedecktem Gold wie Plus (Nutzer 08.11.2026, statt Grün). */
a { color: var(--link); text-decoration-color: rgba(138, 100, 22, 0.45); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
/* Die Support-Mail bleibt Blattgrün (Nutzer 08.11.2026), Links zu Rechtlichem sind Gold. */
a[href^="mailto:"] { color: var(--leaf-deep); text-decoration-color: rgba(44, 107, 29, 0.45); }
a[href^="mailto:"]:hover { color: #1f5214; text-decoration-color: currentColor; }

/* Gerüst: ein Bildschirm hoch, Kopf oben, die Karte füllt den Rest. */
.app {
  height: 100vh;
  height: 100dvh;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
}

header.top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 16px 0 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Asimovian", -apple-system, sans-serif;
  font-size: 24px;
}
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 3px 6px rgba(40, 70, 10, 0.18)); }

nav.links {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 4px;
  font-size: 15px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 4px 14px rgba(70, 60, 20, 0.08);
}
nav.links { position: relative; }
nav.links a { position: relative; z-index: 1; color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 999px; transition: color 0.2s ease; -webkit-tap-highlight-color: transparent; }
nav.links a:hover { color: var(--ink); }
nav.links a[aria-current="page"] { color: #fff; background: #111; }

/* Mit `nav.js`: eine eigene Markierung, die man zu einem anderen Link schieben kann. */
nav.links.js { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
nav.links.js a[aria-current="page"] { background: none; color: var(--muted); }
nav.links.js a.on, nav.links.js a.on:hover { color: #fff; }
nav.links.js.dragging { cursor: grabbing; }
nav.links .pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: #111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), width 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease;
}

/* Die eine Karte. */
.sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  overflow: hidden;
}

.sheet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--fade) 28px var(--fade);
  outline: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.sheet-scroll > main > :first-child { margin-top: 0; }

h1, h2 { font-family: "Asimovian", -apple-system, sans-serif; font-weight: normal; line-height: 1.2; }
h1 { font-size: 36px; margin: 24px 0 8px; }
h2 { font-size: 23px; margin: 36px 0 8px; }
h3 { font-size: 17px; margin: 22px 0 4px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Platzhalter, die vor dem Veröffentlichen ersetzt werden müssen. */
.todo { background: var(--mark); padding: 0 4px; border-radius: 4px; }

/* Kachel in der Karte. */
.card {
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 18px 0;
}

/* Häufige Fragen zum Aufklappen. */
.faq {
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 10px 0;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s ease;
}
.faq[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: var(--link); }
.faq .answer { padding: 0 18px 4px; color: #2e3a2a; }
.faq .answer p { margin: 0 0 14px; }

@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete;
  }
  .faq[open]::details-content { block-size: auto; }
}

ul { padding-left: 22px; }
li { margin: 4px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Fußzeile am Ende des Karteninhalts. */
footer.bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
footer.bottom a { color: var(--muted); }

/* Startseite: Logo und Name im Papierhimmel, die Karte unten über der Landschaft wie auf dem Ladebildschirm. Alle
   Größen hängen an der Bildschirmhöhe. */
.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(0px, 1svh, 12px) 0 clamp(12px, 3svh, 32px);
}
.hero img { width: clamp(64px, 13svh, 132px); height: clamp(64px, 13svh, 132px); filter: drop-shadow(0 14px 22px rgba(40, 70, 10, 0.25)); }
.hero h1 { font-size: clamp(34px, 5.6svh, 56px); margin: clamp(4px, 1.4svh, 14px) 0 clamp(2px, 0.6svh, 6px); }
.hero p { font-size: clamp(15px, 2.1svh, 19px); color: var(--muted); margin: 0 auto; max-width: 520px; }

/* Wie die Knöpfe in der App: schwarz, ganz rund. */
.badge {
  display: inline-block;
  margin-top: clamp(10px, 2.6svh, 26px);
  padding: 12px 22px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.home .sheet { flex: 0 1 auto; max-height: 36svh; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.features .card { margin: 0; }
.features h3 { margin: 0 0 4px; font-family: "Asimovian", -apple-system, sans-serif; font-weight: normal; font-size: 20px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

/* Nicht gefunden: nur die Karte, mittig. */
.page main.hero { padding: 24px 0; }

@media (max-width: 560px) {
  :root { --gutter: 12px; --fade: 22px; }
  header.top { flex-direction: column; align-items: flex-start; padding: 12px 0 10px; }
  /* Fünf Punkte in einer Zeile über die volle Breite, sonst bräche die Kapsel um. */
  nav.links { align-self: stretch; font-size: 13.5px; }
  nav.links a { flex: 1 1 auto; text-align: center; padding: 9px 6px; white-space: nowrap; }
  h1 { font-size: 30px; }
  .sheet { border-radius: 22px; }
  .sheet-scroll { padding-left: 18px; padding-right: 18px; }
  .home .sheet { max-height: 40svh; }
}

/* Seitenwechsel wie in der App (Nutzer 08.11.2026): Die Welten blenden ineinander, der Kopf bleibt stehen, die Karte
   gleitet auf ihre neue Größe, und die schwarze Markierung der Navigation gleitet zum neuen Link. Browser ohne View
   Transitions (z. B. Firefox) wechseln einfach ohne Übergang. */
@view-transition { navigation: auto; }

header.top { view-transition-name: kopf; }
.sheet { view-transition-name: karte; }
/* Nur ohne `nav.js` (volles Laden der Seite): Die Markierung gleitet im Übergang. Mit dem Skript gleitet sie live. */
nav.links:not(.js) a[aria-current="page"] { view-transition-name: markierung; }

/* Die Übergangsschicht fängt sonst alle Klicks ab, bis sie fertig ist: Man musste warten (Nutzer 09.11.2026). */
::view-transition { pointer-events: none; }

::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1); }
/* Die Welten blenden langsam und weich ineinander (Nutzer 08.11.2026: vorher zu schnell, blitzte kurz). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.7s; animation-timing-function: ease-in-out; }
::view-transition-old(karte), ::view-transition-new(karte) { animation-duration: 0.45s; }
/* Der Inhalt der Karte blendet über, ohne sich zu verzerren. */
::view-transition-old(karte), ::view-transition-new(karte) { height: 100%; object-fit: none; object-position: top; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Sehr schmal (iPhone SE der 1. Generation, 320 pt): Kapsel noch etwas kleiner, damit „Impressum“ hineinpasst. */
@media (max-width: 359px) {
  nav.links { font-size: 12px; }
  nav.links a { padding: 9px 3px; }
}

/* Wechsel ohne Neuladen (`nav.js`): neue Welt als Ebene, die einblendet; der neue Inhalt blendet kurz ein. */
.welt-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--paper) var(--welt) center bottom / cover no-repeat;
  filter: brightness(0.86) saturate(1.05);
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}
.welt-layer.show { opacity: 1; }
@media (min-aspect-ratio: 3/2) { .welt-layer { background-position: center top; } }
@media (max-aspect-ratio: 4/5) { .welt-layer { background-image: var(--welt-hoch, var(--welt)); } }
.app > .neu { animation: einblenden 0.35s ease both; }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
