/*
 * store-redirects — gemeinsames Stylesheet fuer alle App-Landingpages.
 *
 * Reproduziert den Look der Referenz (get.rettertool.app) mit schlankem,
 * eigenem Code: zentrierte schmale Spalte, Icon, Headline, Store-Badges,
 * Footer. Kein Bootstrap, keine externen CDNs, keine Tracker.
 *
 * App-spezifische Werte (Hintergrund, Akzent-/Textfarbe, Schrift) kommen
 * ueber CSS-Variablen aus einem kleinen inline <style>-Block im <head>.
 * Diese Datei bleibt fuer alle Apps identisch und damit gut cachebar.
 */

/* --- Selbst gehostete Schrift: Quicksand (OFL, keine externe Quelle) --- */
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/quicksand-300.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/quicksand-400.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/quicksand-500.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/quicksand-600.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/quicksand-700.woff2") format("woff2");
}

/* --- Design-Tokens: Defaults, pro App im <head> ueberschreibbar --- */
:root {
  --sr-bg: #f8f9fa;
  --sr-fg: #1f2933;
  --sr-muted: #667085;
  --sr-accent: #1f2933;
  --sr-title: var(--sr-accent); /* Headline-Farbe, per App via headlineColor ueberschreibbar */
  --sr-font: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sr-max-width: 20.625rem; /* 330px, wie Referenz .form-signin */
  /* Getrennte Badge-Hoehen: die offiziellen Assets haben unterschiedlich viel
     Innenabstand -> Google groesser rendern, damit beide optisch gleich gross
     wirken (Verhaeltnis wie Referenz Apple 40 : Google 51). */
  --sr-badge-apple: 2.75rem;  /* 44px */
  --sr-badge-google: 3.5rem;  /* 56px */
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--sr-bg);
  color: var(--sr-fg);
  font-family: var(--sr-font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.landing {
  width: 100%;
  max-width: var(--sr-max-width);
  margin: auto;
  padding: 1rem;
  text-align: center;
}

/* Icon: nie verzerrt, weich skalierend, wie in der Referenz max. 300px */
.landing__icon {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto 0.75rem;
}

.landing__title {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sr-title);
  /* Lange App-Namen brechen sauber statt zu ueberlaufen */
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Store-Badges: konsistente Hoehe, zentriert, umbrechend auf schmalen Screens */
.landing__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin: 0 0 1rem;
}

.landing__store {
  display: inline-flex;
  border-radius: 0.5rem;
}

.landing__store img {
  display: block;
  width: auto;
}
.landing__store--apple img {
  height: var(--sr-badge-apple);
}
.landing__store--google img {
  height: var(--sr-badge-google);
}

/* Sekundaerer Website-/Fallback-Link */
.landing__website {
  display: inline-block;
  margin: 0.25rem 0 0.5rem;
  color: var(--sr-accent);
  font-weight: 500;
  text-decoration: none;
}
.landing__website:hover {
  text-decoration: underline;
}

/* Footer rechtsbuendig wie in der Referenz (text-end) */
.landing__footer-wrap {
  text-align: right;
}

.landing__footer {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--sr-muted);
}

.landing__footer a {
  color: inherit;
}

.landing__legal {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}
.landing__legal a {
  color: var(--sr-muted);
  text-decoration: none;
  margin: 0 0.4rem;
}
.landing__legal a:hover {
  text-decoration: underline;
}

/* Sichtbarer, klarer Fokuszustand fuer Tastaturbedienung */
a:focus-visible {
  outline: 2px solid var(--sr-accent);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

/* Dezente Einblend-Animation, respektiert reduzierte Bewegung */
@media (prefers-reduced-motion: no-preference) {
  .landing {
    animation: sr-fade-in 0.4s ease-out both;
  }
}
@keyframes sr-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Einfache Fehlerseite (404.html teilt sich dieses Stylesheet) */
.error-page .landing__title {
  color: var(--sr-fg);
}
