/*
 * Gestaltung der öffentlichen Projektwebsite.
 *
 * ALLE Farben, Radien und Glaswerte kommen aus tokens.css (@plexycare/design-
 * tokens). Hier stehen ausschliesslich Anordnung und Typografie — kein
 * hartkodierter Farbwert. Damit gilt für die Website dieselbe Regel wie für
 * die Anwendungen: ein Token-Wechsel schlägt überall durch, und es entsteht
 * keine zweite Designsprache (CLAUDE.md, UX-Bible-Regel).
 *
 * Warum eigenes CSS und nicht `packages/ui`: Jenes Paket sind
 * Angular-Komponenten. Die Website ist bewusst statisches HTML — die Website
 * Bible verlangt Suchmaschinentauglichkeit, und eine Single-Page-Anwendung
 * ohne Server-Rendering ist dafür die falsche Wahl. Die Glas-Anmutung ist
 * hier deshalb nachgebaut, aber aus denselben Tokens.
 */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-weight: var(--pc-font-weight-regular);
  color: var(--pc-color-text-base);
  background:
    radial-gradient(1200px 600px at 15% -5%, var(--pc-color-brand-sage-gradient-start), transparent),
    linear-gradient(
      160deg,
      var(--pc-color-background-gradient-eucalyptus-start),
      var(--pc-color-background-gradient-eucalyptus-end)
    );
  background-attachment: fixed;
  line-height: 1.6;
}

/* --- Glas ---------------------------------------------------------------- */

.glas {
  background: var(--pc-glass-background);
  backdrop-filter: blur(var(--pc-glass-blur)) saturate(var(--pc-glass-saturation));
  -webkit-backdrop-filter: blur(var(--pc-glass-blur)) saturate(var(--pc-glass-saturation));
  border: 1px solid var(--pc-glass-border);
  border-radius: var(--pc-glass-radius);
  box-shadow: var(--pc-glass-shadow);
  position: relative;
}

/* „Licht von oben" (UX Bible 2.10) — dezente Spiegelung, kein Glanz. */
.glas::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--pc-glass-radius) var(--pc-glass-radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--pc-glass-highlight), transparent);
}

/* --- Kopf und Navigation -------------------------------------------------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--pc-glass-background-strong);
  backdrop-filter: blur(var(--pc-glass-blur)) saturate(var(--pc-glass-saturation));
  -webkit-backdrop-filter: blur(var(--pc-glass-blur)) saturate(var(--pc-glass-saturation));
  border-bottom: 1px solid var(--pc-glass-border);
}

.kopf__marke {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--pc-color-text-base);
  font-weight: var(--pc-font-weight-semibold);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.kopf__marke img {
  width: 32px;
  height: 32px;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navigation a {
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  color: var(--pc-color-text-muted);
}

.navigation a:hover {
  background: var(--pc-glass-background);
  color: var(--pc-color-text-base);
}

.navigation a[aria-current='page'] {
  color: var(--pc-color-text-base);
  font-weight: var(--pc-font-weight-semibold);
  background: var(--pc-glass-background);
}

/* Untermenü „PlexyCare starten". Reines CSS und <details> — kein JavaScript
   für eine Aufklappliste. */
.starten {
  position: relative;
  margin-left: 8px;
}

.starten > summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: var(--pc-font-weight-semibold);
  color: var(--pc-color-primary-white);
  background: linear-gradient(
    135deg,
    var(--pc-color-brand-sage-gradient-start),
    var(--pc-color-brand-sage-gradient-end)
  );
}

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

.starten__liste {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  padding: 8px;
  background: var(--pc-glass-background-strong);
  backdrop-filter: blur(var(--pc-glass-blur));
  -webkit-backdrop-filter: blur(var(--pc-glass-blur));
  border: 1px solid var(--pc-glass-border);
  border-radius: 16px;
  box-shadow: var(--pc-glass-shadow);
}

.starten__eintrag {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--pc-color-text-base);
  font-size: 14px;
}

.starten__eintrag:hover {
  background: var(--pc-glass-background);
}

.starten__eintrag small {
  display: block;
  color: var(--pc-color-text-muted);
  font-size: 12px;
}

/* Nicht anklickbar, weil es die Umgebung noch nicht gibt. Ein toter Link wäre
   die unehrlichere Lösung. */
.starten__eintrag--kommt {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Inhalt --------------------------------------------------------------- */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) 96px;
}

.bereich {
  margin-bottom: clamp(32px, 6vw, 64px);
}

.karte {
  padding: clamp(20px, 3vw, 36px);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: var(--pc-font-weight-semibold);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: var(--pc-font-weight-semibold);
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: var(--pc-font-weight-semibold);
}

p {
  margin: 0 0 14px;
  font-size: 16px;
}

.blick {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--pc-color-text-muted);
  max-width: 62ch;
}

.gitter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.knopf {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: var(--pc-font-weight-semibold);
  text-decoration: none;
  color: var(--pc-color-primary-white);
  background: linear-gradient(
    135deg,
    var(--pc-color-brand-sage-gradient-start),
    var(--pc-color-brand-sage-gradient-end)
  );
  cursor: pointer;
}

.knopf--stiller {
  background: none;
  color: var(--pc-color-text-base);
  border: 1px solid var(--pc-glass-border);
}

/* --- Merker --------------------------------------------------------------- */

.merker {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: var(--pc-font-weight-semibold);
  border: 1px solid var(--pc-color-access-level-3);
  color: var(--pc-color-access-level-4);
  white-space: nowrap;
}

/* Für alles, was noch nicht existiert. Farbe allein trägt die Aussage nicht —
   der Text benennt sie (Barrierefreiheit). */
.merker--offen {
  border-color: var(--pc-color-text-muted);
  color: var(--pc-color-text-muted);
}

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

.fuss {
  padding: 28px clamp(16px, 4vw, 48px) 40px;
  border-top: 1px solid var(--pc-glass-border);
  background: var(--pc-glass-background);
  font-size: 13px;
  color: var(--pc-color-text-muted);
}

.fuss__zeile {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.fuss a {
  color: var(--pc-color-text-muted);
}

/* --- Willkommensseite ----------------------------------------------------- */

.willkommen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.willkommen__karte {
  width: min(520px, 100%);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
}

.willkommen__logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  display: block;
}

.willkommen__titel {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 10px;
}

.willkommen__satz {
  color: var(--pc-color-text-muted);
  margin-bottom: 28px;
}

.willkommen__feld {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--pc-glass-border);
  background: var(--pc-glass-background-strong);
  color: var(--pc-color-text-base);
  font-size: 15px;
  text-align: center;
}

.willkommen__fehler {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--pc-color-access-level-4);
  min-height: 1.4em;
}

.willkommen__fuss {
  margin-top: 24px;
  font-size: 12px;
  color: var(--pc-color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
