/* alligkeit Landingpage — Tokens 1:1 aus docs/DESIGN_TOKENS.md.
   Keine neuen Hex-Werte ohne Token-Tabelle. */

/* ---------- Fonts (self-hosted, kein CDN — DSGVO-Linie wie App #207) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Tiefe (Dark) */
  --tiefe-bg: #0F0A1F;
  --tiefe-surface: #1A1428;
  --tiefe-surface-high: #221B35;
  --tiefe-on: #E8E2F0;
  --tiefe-on-muted: #A89DB5;
  --tiefe-outline: #3A3245;
  --lilac: #7F62BF;
  --lilac-soft: #C896DC;
  --dawn-amber: #E8A878;
  /* Daemmerung (Light) */
  --cream: #F4ECE4;
  --cream-surface: #ECDEE4;
  --cream-on: #2B2333;
  --cream-on-muted: #5A4A5F;
  --cream-outline: #D0BECB;
  --purple: #6E4F9C;
  --copper: #A86538;
  --copper-text: #7E4A26; /* dunkleres Copper nur fuer Text auf hellem Scrim — WCAG AA (Review #225) */
  /* Spacing/Radius/Animation (DESIGN_TOKENS.md) */
  --sp-md: 12px; --sp-lg: 16px; --sp-xl: 24px; --sp-x2l: 32px; --sp-x3l: 48px;
  --r-lg: 16px; --r-xl: 20px; --r-full: 999px;
  --dur-normal: 250ms; --dur-slow: 400ms; --dur-gentle: 600ms; --dur-breathe: 2000ms;
}

/* ---------- Basis + Tagesphasen-Gradient ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background-color: var(--tiefe-bg); }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tiefe-on);
  /* Tagesphasen-Bogen (Abend → Nacht → Morgen) lebt in den Sektions-
     Hintergruenden mit farbgleichen Grenzen — positionsunabhaengig statt
     Prozent-Stops ueber die Dokumenthoehe (Review-Critical: WCAG).
     html-Background stoppt Canvas-Propagation (Overscroll bleibt dunkel). */
  background-color: var(--tiefe-bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--lilac-soft); outline-offset: 2px; }
/* Auf hellen Sektionen braucht der Ring 3:1 (WCAG 1.4.11): purple statt lilac-soft. */
.on-light a:focus-visible,
footer a:focus-visible { outline-color: var(--purple); }

section { padding: var(--sp-x3l) var(--sp-xl); }
.wrap { max-width: 960px; margin: 0 auto; }
.on-light { color: var(--cream-on); }
.on-light .muted { color: var(--cream-on-muted); }
.muted { color: var(--tiefe-on-muted); }

h1, h2, .serif {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #2B2333 0%, var(--tiefe-surface) 100%);
}
.hero .wrap { width: 100%; }
.lede { max-width: 34em; margin: var(--sp-lg) auto 0; }
.loop { background: linear-gradient(180deg, var(--tiefe-surface) 0%, var(--tiefe-bg) 100%); }

.orb {
  width: 96px;
  height: 96px;
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-xl);
  background: radial-gradient(circle at 35% 35%, var(--lilac-soft), var(--lilac));
  box-shadow: 0 0 48px rgba(127, 98, 191, 0.55);
  animation: breathe var(--dur-breathe) ease-in-out infinite alternate;
}
@keyframes breathe {
  from { transform: scale(1); box-shadow: 0 0 40px rgba(127, 98, 191, 0.45); }
  to   { transform: scale(1.05); box-shadow: 0 0 64px rgba(127, 98, 191, 0.65); }
}

.store-hint {
  display: inline-block;
  margin-top: var(--sp-x2l);
  padding: 14px var(--sp-xl);
  border: 1px solid var(--tiefe-outline);
  border-radius: var(--r-lg);
  background: var(--tiefe-surface);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Sterne (Memorial-Sterne-Anklang) ---------- */
.stars { position: absolute; inset: 0; pointer-events: none; }
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--tiefe-on);
  animation: twinkle 5s ease-in-out infinite;
}
.star:nth-child(1) { top: 18%; left: 12%; }
.star:nth-child(2) { top: 32%; left: 78%; animation-duration: 6.4s; animation-delay: 1.2s; background: var(--lilac-soft); }
.star:nth-child(3) { top: 12%; left: 55%; animation-duration: 7.3s; animation-delay: 0.6s; }
.star:nth-child(4) { top: 48%; left: 22%; animation-duration: 5.8s; animation-delay: 2.1s; background: var(--lilac); }
.star:nth-child(5) { top: 24%; left: 90%; animation-duration: 6.9s; animation-delay: 3.4s; }
.star:nth-child(6) { top: 58%; left: 68%; animation-duration: 5.4s; animation-delay: 1.8s; background: var(--lilac-soft); }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.85; }
}

/* ---------- Scroll-Reveals (Home-Entrance-Muster der App) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-gentle) ease-out, transform var(--dur-gentle) ease-out;
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Ohne JS bleibt alles sichtbar: */
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Kernloop-Schritte ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-x2l);
}
.step { text-align: center; }
.step .phone { margin: 0 auto var(--sp-md); }
.step h3 { font-size: 16px; font-weight: 600; }
.step p { font-size: 14px; }
/* Stagger-Delays leben im CSS statt in style=-Attributen — die CSP
   (style-src 'self', ohne unsafe-inline) blockt Inline-Styles. */
.steps .step:nth-child(1) { --d: 0ms; }
.steps .step:nth-child(2) { --d: 120ms; }
.steps .step:nth-child(3) { --d: 240ms; }
.steps .step:nth-child(4) { --d: 420ms; }
.steps .step:nth-child(5) { --d: 540ms; }

.step--accent .phone {
  border-color: var(--lilac-soft);
  box-shadow: 0 0 32px rgba(200, 150, 220, 0.35);
}
.step--accent h3 { color: var(--lilac-soft); }

/* ---------- Phone-Mockup (Platzhalter bis Simulator-Screenshots da sind) ---------- */
.phone {
  width: 150px;
  aspect-ratio: 9 / 19.5;
  border: 2px solid var(--tiefe-outline);
  border-radius: var(--r-xl);
  background: var(--tiefe-surface-high);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone--lg { width: 200px; }
.phone-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: radial-gradient(circle at 35% 35%, var(--lilac-soft), var(--lilac));
  opacity: 0.8;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sleep / Wake ---------- */
.tape { text-align: center; position: relative; padding-top: 72px; padding-bottom: 72px; background: var(--tiefe-bg); }
.tape .phone { margin: var(--sp-xl) auto 0; }
/* #5C3A4E = Blend Nacht->Copper, einzige Nicht-Token-Farbe (dokumentiert) */
.tape.wake {
  background: linear-gradient(180deg, var(--tiefe-bg) 0%, #5C3A4E 40%, var(--copper) 72%, var(--dawn-amber) 100%);
}
/* Scrim-Karte: garantiert AA-Kontrast unabhaengig von der Gradient-Position
   (rgba-Basis = --cream #F4ECE4) */
.wake .wrap {
  background: rgba(244, 236, 228, 0.88);
  border-radius: var(--r-xl);
  padding: var(--sp-x2l) var(--sp-xl);
  max-width: 720px;
}
/* Copper-Eyebrow als Wake-Akzent, jetzt AA-konform: --copper-text statt des
   helleren Deko-Copper. >=4.81:1 auf der Scrim ueber dem gesamten Wake-Gradient
   inkl. dunkelstem tiefe-bg-Top (0%); --copper bleibt fuer den dekorativen
   Gradient-Stop (Review #225 + Re-Review). */
.wake .eyebrow { color: var(--copper-text); }
.wake h2 { color: var(--cream-on); }
.wake .muted { color: var(--cream-on-muted); }

/* ---------- Privacy-Karten ---------- */
.privacy { background: linear-gradient(180deg, var(--dawn-amber) 0%, var(--cream) 100%); }
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-lg);
  margin-top: var(--sp-x2l);
}
.privacy-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--cream-outline);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  color: var(--cream-on);
  font-size: 14px;
}
.privacy-card strong { display: block; margin-bottom: 6px; font-size: 15px; }
.privacy-grid .privacy-card:nth-child(1) { --d: 0ms; }
.privacy-grid .privacy-card:nth-child(2) { --d: 120ms; }
.privacy-grid .privacy-card:nth-child(3) { --d: 240ms; }
.privacy-grid .privacy-card:nth-child(4) { --d: 360ms; }

/* ---------- CTA + Footer ---------- */
.cta { text-align: center; background: var(--cream); }
.cta .store-hint {
  border-color: var(--cream-outline);
  background: rgba(255, 255, 255, 0.6);
  color: var(--cream-on);
}
.smallprint { font-size: 12px; margin-top: var(--sp-xl); }

footer {
  padding: var(--sp-x2l) var(--sp-xl);
  border-top: 1px solid var(--cream-outline);
  font-size: 13px;
  color: var(--cream-on-muted);
  background: var(--cream-surface);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  justify-content: center;
  align-items: center;
}
footer a { color: var(--cream-on-muted); }
.lang-switch { font-weight: 600; }

/* ---------- Reduced Motion: alles ruhig stellen (wie die App) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .star { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
