/* Linkseite klartag.app – im Look der App (Theme „Standard“, Aufbau „Puls“): dieselben Farben, Schriften, Karten und Knöpfe.
   Werte 1:1 aus der App (src/theme/themes.ts, src/theme/apply.ts, src/index.css: .card, .dash-pulse-hero, .dash-quick, .dash-cta,
   .eyebrow, .serif) – dieselben Werte wie im Markenbuch (marke.css). Nie eigene Farben erfinden.
   Schriften liegen lokal neben dieser Datei (linkpage/build.mjs ersetzt fraunces-7f9d191d.woff2 / inter-3100e775.woff2 durch die Dateinamen). */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./inter-3100e775.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fraunces-7f9d191d.woff2') format('woff2-variations');
}

:root {
  /* Theme „Standard“ */
  --k-bg: #0f1623;
  --k-bg2: #1a2538;
  --k-surface: #151d2c;
  --k-surface2: #1b2536;
  --k-border: #2c3a52;
  --k-text: #eef2f8;
  --k-muted: #a9b4c6;
  --k-accent: #4d8dff;
  --k-on-accent: #06122b;
  --k-keep: #86c5ff;
  --k-accent-2: #67a6ff; /* = Blau 55 % + Hellblau – Ende des Hauptkarten-Verlaufs */

  /* Formen und Abstände (Fensterform „rounded“, Dichte „luftig“) */
  --k-radius: 18px;
  --k-radius-sm: 11px;
  --k-radius-hero: 26px;
  --k-gap: 20px;
  --k-pad: 24px;
  --k-shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px -18px rgb(0 0 0 / 0.7);
  --k-hero-shadow: 0 18px 40px -22px rgb(77 141 255 / 0.7);

  --font-sans: 'Inter Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Fraunces Variable', ui-serif, Georgia, serif;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--k-bg);
}

/* Seite: Nachtblau mit blauem Schein oben rechts + feine Punkte (Hintergrund „glow“ der App).
   Die Ebenen hängen an der ganzen Seite (absolute) statt am Fenster – so bleibt der Verlauf auch auf langen Seiten ohne Kante. */
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--k-bg);
  color: var(--k-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(60vmax 45vmax at 78% 8%, rgb(77 141 255 / 0.38), transparent 70%),
    radial-gradient(50vmax 40vmax at 10% 95%, rgb(134 197 255 / 0.22), transparent 70%),
    linear-gradient(180deg, var(--k-bg2), var(--k-bg) 60%);
}

body::after {
  opacity: 0.45;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--k-accent), transparent),
    radial-gradient(1px 1px at 28% 72%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 34%, var(--k-keep), transparent),
    radial-gradient(1px 1px at 63% 81%, #fff, transparent),
    radial-gradient(2px 2px at 78% 22%, #fff, transparent),
    radial-gradient(1px 1px at 88% 58%, #6aa9ff, transparent),
    radial-gradient(1px 1px at 6% 88%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 52% 52%, #fff, transparent);
  background-size: 420px 420px;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--k-accent);
  outline-offset: 2px;
  border-radius: var(--k-radius-sm);
}

svg {
  flex: none;
}

.nb {
  white-space: nowrap;
}

/* ── Kopfleiste wie in der App: Zeichen + „Klartag“ links, leiser Knopf rechts ─────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--k-text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* App-Zeichen genau wie oben links in der App (AppLogo, flach, ohne Rand oder Leuchten) */
.mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 25%;
}

/* leiser Knopf (wie „Design“ in der App) */
.lang,
.back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius-sm);
  background: var(--k-surface2);
  color: var(--k-text);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.lang svg,
.back svg {
  width: 18px;
  height: 18px;
  color: var(--k-accent);
}

.lang:hover,
.back a:hover {
  border-color: var(--k-accent);
}

/* ── Startseite ─────────────────────────────────────────────────────────────────────────────── */

.home {
  flex: 1;
  display: grid;
  gap: 32px;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 16px var(--gutter) 28px;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}

/* Hauptkarte wie „Guten Morgen.“ im Dashboard (Aufbau „Puls“) */
.held {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(20px, 5.4vw, 32px);
  border-radius: var(--k-radius-hero);
  color: var(--k-on-accent);
  background: linear-gradient(135deg, var(--k-accent), var(--k-accent-2));
  box-shadow: var(--k-hero-shadow);
}

.held::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle, rgb(6 18 43 / 0.18), transparent 65%);
}

.held-eyebrow {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.held h1 {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.1rem, 9vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.held h1 span {
  display: block;
}

.held-lead {
  margin: 16px 0 0;
  max-width: 30rem;
  font-size: 16px;
  line-height: 24px;
}

.held-lead + .held-lead {
  margin-top: 6px;
}

/* drei Kacheln wie die Schnell-Kacheln (Einnahme · Ausgabe · +1 Glas) */
.kacheln {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  padding: 14px 6px 12px;
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  background: var(--k-surface);
  text-align: center;
}

.kachel svg {
  width: 24px;
  height: 24px;
  margin-bottom: 6px;
  color: var(--k-accent);
}

.kachel strong {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.kachel span {
  font-size: 12.5px;
  line-height: 16px;
  color: var(--k-muted);
  text-wrap: balance;
}

/* Haupt-Knopf wie „Alles klar“ in der App: Blau, dunkle Schrift, Pille */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--k-accent);
  color: var(--k-on-accent);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--k-hero-shadow);
}

.cta:hover {
  filter: brightness(1.1);
}

.cta:focus-visible {
  outline: 3px solid var(--k-keep);
  outline-offset: 3px;
  border-radius: 999px;
}

.cta svg {
  width: 20px;
  height: 20px;
}

.cta-note {
  margin: -4px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--k-muted);
}

.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--k-border);
  border-radius: 999px;
  background: var(--k-surface2);
  font-size: 14px;
  text-decoration: none;
}

/* echter App-Bildschirm im Handy-Rahmen */
.phone {
  margin: 4px auto 0;
  width: min(78vw, 300px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-frame {
  position: relative;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--k-border);
  border-radius: 34px;
  background: #0a0f19;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.06) inset,
    0 30px 60px -30px rgb(0 0 0 / 0.85),
    0 24px 80px -36px rgb(77 141 255 / 0.55);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 25px; /* klein genug, dass „Dashboard“ unten links ganz bleibt */
}

.phone figcaption {
  font-size: 13px;
  color: var(--k-muted);
  text-align: center;
}

/* ── Fußzeile ───────────────────────────────────────────────────────────────────────────────── */

.foot {
  padding: 16px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: var(--k-muted);
}

.foot nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  color: var(--k-text);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot p {
  margin: 2px 0 0;
  font-size: 12px;
}

/* ── Rechtstexte (wie Impressum/Datenschutz in der App: Seitenkopf + eine Karte) ────────────── */

.doc {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 24px var(--gutter) 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--k-muted);
}

.doc h1 {
  margin: 0 0 var(--k-gap);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.karte {
  position: relative;
  background: var(--k-surface);
  border: 1px solid var(--k-border);
  border-radius: var(--k-radius);
  box-shadow: var(--k-shadow);
  padding: clamp(16px, 4.2vw, var(--k-pad));
}

.doc .karte {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 14px;
  line-height: 1.625;
}

.doc section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
}

.doc p {
  margin: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  /* nur lange Wörter trennen („Verbraucherschlichtungsstelle“), nie „ei-ner“ */
  hyphenate-limit-chars: 12 5 5;
}

.doc p.lines {
  line-height: 1.7;
}

.doc section a {
  color: var(--k-accent);
  text-underline-offset: 3px;
}

.back {
  margin: var(--k-gap) 0 0;
}

.back a {
  color: var(--k-text);
}

/* 404: eine Karte in der Mitte */
.doc--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf {
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nf h1 {
  margin: 0;
}

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

.nf .cta {
  margin-top: 12px;
}

.nf .cta-note {
  margin: 0;
}

.nf .cta-note a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--k-text);
}

/* ── Größere Bildschirme ────────────────────────────────────────────────────────────────────── */

/* Rechtstexte: Kopfleiste genau so breit wie die Karte darunter */
.top--doc {
  max-width: 46rem;
}

@media (min-width: 720px) {
  .top {
    padding-top: calc(24px + env(safe-area-inset-top));
    padding-inline: 40px;
  }

  .top--doc {
    padding-inline: var(--gutter);
  }

  .doc {
    padding-top: 40px;
  }

  .doc h1 {
    font-size: 2.25rem;
  }

  .kacheln {
    gap: 12px;
  }
}

@media (min-width: 960px) {
  .home {
    grid-template-columns: minmax(0, 34rem) 300px;
    justify-content: center;
    align-items: center;
    column-gap: clamp(56px, 8vw, 120px);
    padding: 8px 40px 16px;
  }

  .home-main {
    margin: 0;
  }

  /* Kopfleiste so breit wie Text + Handy darunter */
  .top--home {
    max-width: calc(34rem + clamp(56px, 8vw, 120px) + 300px + 80px);
  }

  .phone {
    margin: 0;
    width: 300px;
  }
}
