/* Kandela - die Farben und die Ruhe der App, nur breiter.
 *
 * Zwei Arten Seite teilen sich diese Datei:
 *
 *   body.deck   die Werbeseiten, von tool/make_site.py erzeugt. Jede
 *               Abteilung ist eine eigene Tafel in Bildschirmhoehe.
 *               Sie kleben oben fest, also schiebt sich beim Scrollen
 *               jede neue Tafel ueber die vorige - die Seite wandert
 *               nicht weg, sie wird zugedeckt.
 *
 *   body        die Rechtsseiten, privacy.html und terms.html. Die
 *               bleiben ein durchgehender Text. Wer eine
 *               Datenschutzerklaerung liest, will scrollen koennen,
 *               nicht blaettern.
 */

:root {
  --ground: #F7F6F3;
  --surface: #FFFFFF;
  --ink: #16191C;
  --ink-muted: #4B5359;
  --ink-faint: #7C868D;
  --line: #E3E1DC;
  --accent: #2E7D63;
  --accent-soft: #DCEFE7;
  --deep: #10201B;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0F12;
    --surface: #141A1E;
    --ink: #F2F4F5;
    --ink-muted: #B3BCC2;
    --ink-faint: #7F8A91;
    --line: #242D33;
    --accent: #6FD3AC;
    --accent-soft: #16302A;
    --deep: #06100D;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0 24px 80px;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Outfit, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a { color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===================================================================
   Die Werbeseiten: Tafeln, die sich uebereinander schieben
   =================================================================== */

body.deck {
  padding: 0;
  background: var(--deep);
}

/* Die Tafeln rasten ein. "proximity" und nicht "mandatory": Ist eine
   Tafel laenger als der Bildschirm - die acht Punkte auf einem Telefon
   sind es -, laesst proximity sie frei scrollen, statt den Leser
   zurueckzuziehen. */
body.deck {
  scroll-snap-type: y proximity;
}

.deck-main { display: block; }

.panel {
  position: sticky;
  top: 0;
  min-height: 100svh;
  scroll-snap-align: start;
  display: grid;
  align-content: center;
  padding: clamp(72px, 12vh, 132px) 24px clamp(56px, 10vh, 96px);
  background: var(--ground);
  /* Ohne eigenen Grund scheint die darunterliegende Tafel durch. */
  border-top: 1px solid var(--line);
}

.panel > .inner {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
}

/* Jede zweite Tafel etwas heller, damit der Wechsel beim Schieben
   sichtbar ist und nicht nur geahnt wird. */
.panel:nth-child(even) { background: var(--surface); }

/* Die erste Tafel traegt den dunklen Grund und keine Linie. */
.panel.hero {
  background:
    radial-gradient(120% 80% at 18% 0%, rgba(111, 211, 172, .16), transparent 62%),
    var(--deep);
  color: #F4F7F6;
  border-top: 0;
}

/* Die letzte bleibt stehen und traegt den Fuss. */
.panel.outro { background: var(--deep); color: #F4F7F6; }

/* Der Inhalt kommt herein, wenn die Tafel an der Reihe ist. */
.panel .inner > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .62s cubic-bezier(.16, .84, .32, 1),
              transform .62s cubic-bezier(.16, .84, .32, 1);
}

.panel.seen .inner > * { opacity: 1; transform: none; }

/* Gestaffelt, damit es liest wie ein Satz und nicht wie ein Schlag. */
.panel.seen .inner > :nth-child(2) { transition-delay: .07s; }
.panel.seen .inner > :nth-child(3) { transition-delay: .14s; }
.panel.seen .inner > :nth-child(4) { transition-delay: .21s; }

/* Wo der Browser es kann, verliert die abziehende Tafel an Licht -
   dann wirkt das Schieben nach Tiefe und nicht nach Papier. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .panel {
      animation: abtreten linear both;
      animation-timeline: view();
      animation-range: exit -10% exit 90%;
    }
    @keyframes abtreten {
      to { filter: brightness(.82); transform: scale(.975); }
    }
  }
}

/* Wer Bewegung abbestellt hat, bekommt eine ruhige lange Seite. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.deck { scroll-snap-type: none; }
  .panel { position: static; animation: none; }
  .panel .inner > * { opacity: 1; transform: none; transition: none; }
}

/* Kopf der ersten Tafel ---------------------------------------------- */

.mark {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 0 24px;
  border-radius: 13px;
}

.panel.hero h1 {
  font-size: clamp(44px, 10vw, 76px);
  margin: 0 0 18px;
  color: #FFFFFF;
}

.panel.hero .claim {
  font-size: clamp(19px, 2.6vw, 25px);
  line-height: 1.45;
  color: #BFD6CD;
  margin: 0;
  max-width: 28rem;
}

.panel.hero .intro {
  margin: 20px 0 0;
  color: #93AFA6;
  max-width: 30rem;
}

/* Die Aussagetafeln -------------------------------------------------- */

.eyebrow {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
}

.panel.hero .eyebrow,
.panel.outro .eyebrow { color: #6FD3AC; }

/* Der Satz steht gross. Das ist der ganze Zweck einer eigenen Tafel:
   eine Aussage, die man nicht ueberliest. */
.statement {
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  max-width: 24ch;
}

.panel.outro .statement { color: #F4F7F6; }

/* Was den grossen Satz erklaert. Ruhig, schmal, lesbar. */
.support {
  margin: 20px 0 0;
  max-width: 34rem;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.62;
}

/* Tafeln ohne grossen Satz - die Aufzaehlung der Sprachen. Dort traegt
   die Ueberschrift, und der Text darf etwas groesser stehen. */
.support.wide {
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 38rem;
}

.panel.outro .support { color: #A9C4BB; }

/* Die Punkte --------------------------------------------------------- */

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

@media (min-width: 760px) {
  .points { grid-template-columns: 1fr 1fr; }
}

.points li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.5;
}

.panel:nth-child(even) .points li { background: var(--ground); }

.points strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Der Weg zur App ---------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 18px;
  margin: 34px 0 0;
}

/* Knopf und die Zeile darunter gehoeren zusammen - sonst stehen sie
   beim Umbruch auseinander und die Geraete landen unter dem falschen
   Laden. */
.choice { display: grid; justify-items: start; gap: 8px; }

/* Wer "Android" nicht als Wort kennt, erkennt seine Marke. */
.fits {
  margin: 0;
  padding-left: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: #8AA69C;
  max-width: 22rem;
}

/* Die Fassung steht unter den Geraeten, nicht daneben: Wer die Marke
   sucht, liest die erste Zeile und ist fertig. Die Zahl ist fuer die,
   die weiterlesen. */
.fits .os {
  display: block;
  color: #6E8780;
}

/* Beide Laeden wiegen gleich schwer.
   
   Bis zum 6. November 2026 gab es die App nur bei Apple - darum trug
   der Apple-Knopf die Farbe und der Google-Knopf nur einen Rand. Das
   galt aber auch auf einem Windows-Rechner, und dort war es schlicht
   falsch: Die Seite empfahl einen Laden, zu dem das Geraet des Lesers
   gar nicht passt.
   
   Jetzt sind beide zu haben. Hervorgehoben wird nur noch der Laden,
   aus dem *dieses* Geraet laedt. Erkennt die Seite es nicht - auf dem
   Rechner, im eingebauten Browser einer Nachrichten-App, in einem
   Vorschaubild -, bleiben beide gleich. Das ist die ehrliche
   Voreinstellung: keine Empfehlung ist besser als die falsche. */
.store {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: transparent;
  color: #BFD6CD;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(191, 214, 205, .32);
}

a.store:hover { opacity: .88; }

/* Der Laden, der zum Geraet passt: volle Farbe. Die Farbe ist
   Kandelas eigene, nicht die eines Ladens. */
html[data-os="ios"] .store.apple,
html[data-os="android"] .store.play {
  background: var(--accent);
  color: #06241B;
  border-color: transparent;
  font-weight: 600;
}

/* Und er steht vorn, nicht hinten. */
html[data-os="android"] .choice.play { order: -1; }

/* Falls je wieder ein Laden fehlt - ein Hinweis statt eines Knopfes. */
.store.soon { color: #7E968D; cursor: default; border-color: transparent; }

html[data-os="android"] .store.play.soon {
  background: rgba(111, 211, 172, .16);
  color: #BFD6CD;
}

/* Fortschritt und Punkte am Rand ------------------------------------- */

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 40;
  pointer-events: none;
}

.dots {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 11px;
  z-index: 40;
}

.dots a {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  color: var(--ink-faint);
  opacity: .42;
  transition: opacity .25s, transform .25s;
}

.dots a.on { opacity: 1; color: var(--accent); transform: scale(1.5); }

@media (max-width: 759px), (prefers-reduced-motion: reduce) {
  .dots { display: none; }
}

/* Sprachwahl --------------------------------------------------------- */

.lang {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 50;
  margin: 0;
}

body:not(.deck) .lang {
  position: static;
  max-width: 42rem;
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.lang button {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

html[data-lang="de"] [lang="en"],
html[data-lang="en"] [lang="de"] { display: none; }

.langselect select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-muted);
  padding: 7px 30px 7px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.langselect select:hover { color: var(--ink); }

/* Auf den Tafeln steht die Wahl auf dunklem Grund. */
body.deck .langselect select {
  background-color: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  color: #D7E4DF;
  backdrop-filter: blur(8px);
}

/* Fuss --------------------------------------------------------------- */

.mail { margin: 30px 0 0; }

.mail a { color: #6FD3AC; font-weight: 600; text-decoration: none; }
.mail a:hover { text-decoration: underline; }

body.deck footer {
  margin: 44px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #7E968D;
  font-size: 14px;
}

body.deck footer a { color: #A9C4BB; }

.stamp { color: inherit; opacity: .7; font-size: 14px; }

/* ===================================================================
   Die Rechtsseiten: ein durchgehender Text
   =================================================================== */

body:not(.deck) header {
  max-width: 42rem;
  margin: 0 auto;
  padding: 48px 0 8px;
}

body:not(.deck) header.slim { padding-top: 24px; }

body:not(.deck) h1 {
  font-size: clamp(40px, 9vw, 58px);
  margin: 0 0 14px;
}

body:not(.deck) .mark {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 10px;
}

.back { margin: 0 0 22px; font-size: 14px; }
.back a { text-decoration: none; color: var(--ink-faint); }

main.prose {
  max-width: 42rem;
  margin: 0 auto;
}

main.prose section { padding-top: 44px; }

main.prose h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}

main.prose p { margin: 0 0 16px; color: var(--ink-muted); }

.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

details:first-of-type { border-top: 1px solid var(--line); }

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

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

summary::after {
  content: '+';
  float: right;
  color: var(--ink-faint);
  font-weight: 500;
}

details[open] summary::after { content: '–'; }

details p { margin: 12px 0 4px; color: var(--ink-muted); }

body:not(.deck) footer {
  max-width: 42rem;
  margin: 76px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 14px;
}

body:not(.deck) footer p { margin: 0 0 6px; }
