/* ==========================================================================
   tasko – Startseite
   Eigene Datei, damit style.css (Rechtsseiten, 404) unverändert bleibt.
   Werte 1:1 aus der abgestimmten Vorlage.
   ========================================================================== */

/* Schriften (selbst gehostet, keine Verbindung zu Google) */
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0A0A0B;
  --bg-alt: #111115;
  --line-alt: #1E1E25;
  --card: #16161B;
  --card-line: #26262E;
  --muted-card: #131317;
  --muted-card-line: #22222A;
  --accent: #F5C518;
  --accent-hover: #FFD84D;
  --text: #F2F2F5;
  --body: #B9B9C6;
  --body-light: #D6D6DE;
  --caption: #E6E6EC;
  --secondary: #A9A9B6;
  --dimmed: #9A9AA8;
  --small: #8E8E9C;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

img { max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: translateY(0); }
.skip-link:hover { color: var(--bg); }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow--sm { font-size: 13px; }
.eyebrow--grey { color: var(--small); }

.h-section {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hl { color: var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 24px;
}
.btn:hover { background: var(--accent-hover); color: var(--bg); }
.btn:focus-visible { border-radius: 999px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
}
.card--muted {
  background: var(--muted-card);
  border-color: var(--muted-card-line);
}
.card--accent { border-color: var(--accent); }

.band {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-alt);
  border-bottom: 1px solid var(--line-alt);
}

/* 1. Kopfzeile: siehe header.css (gemeinsam mit den Unterseiten) */

/* ---------- 2. Wie alles anfing ---------- */
.story {
  padding-top: 72px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}
.story__text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.story__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.story__body {
  font-size: 19px;
  line-height: 1.65;
  color: var(--body);
  max-width: 560px;
}
.story__punch {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  color: var(--accent);
  max-width: 560px;
}
.story__media {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.story__photos { display: flex; gap: 16px; }
.story__photos picture { flex: 1 1 0; min-width: 0; display: block; }
.story__photos picture:last-child { margin-top: 40px; }
.story__photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 245 / 358;
  object-fit: cover;
  border-radius: 18px;
}

.today {
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.today > .eyebrow { width: 100%; }
.today__person { flex: 1 1 180px; }
.today__name {
  margin-bottom: 4px;
  color: var(--accent);
  font-weight: 600;
  font-size: 17px;
}
.today__degree {
  margin-bottom: 10px;
  color: var(--body-light);
  font-size: 15px;
  line-height: 1.45;
}
.today__degree a {
  color: var(--body-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.today__degree a:hover { color: var(--text); }
.today__role {
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.55;
}
.today__together {
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--card-line);
  color: var(--caption);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- 3. Zitat ---------- */
.quote {
  max-width: 1000px;
  margin: 0 auto;
  padding: 112px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.quote__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.quote__body {
  font-size: 19px;
  line-height: 1.65;
  color: var(--body);
  max-width: 680px;
}

/* ---------- Screens (App, Geld) ---------- */
.screens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.screen img {
  display: block;
  width: 100%;
  height: auto;
}
.screen figcaption {
  font-weight: 600;
  font-size: 16px;
  color: var(--caption);
  text-align: center;
}

/* ---------- 4. Die App ---------- */
.app {
  padding-top: 112px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.app__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}
.app .screens { gap: 28px; }
.app .screen { flex: 1 1 220px; max-width: 260px; }

/* ---------- 5. Geld verstehen ---------- */
.money {
  padding-top: 64px;
  padding-bottom: 112px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}
.money__text {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.money__text .h-section { line-height: 1.1; }
.money__body {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
}
.money__body strong { color: var(--text); }
.money__note { font-size: 14px; color: var(--small); }
.money .screens { flex: 2 1 560px; min-width: 0; gap: 24px; }
.money .screen { flex: 1 1 180px; max-width: 240px; }

/* ---------- 6. Safety by Design ---------- */
.safety {
  padding-bottom: 112px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.safety__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
}
.compare { display: flex; flex-wrap: wrap; gap: 20px; }
.compare__card {
  flex: 1 1 360px;
  min-width: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare__card h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 24px;
}
.compare__card p { font-size: 17px; line-height: 1.6; }
.compare__card.card--muted h3,
.compare__card.card--muted p { color: var(--dimmed); }
.compare__card.card--accent { border-width: 1.5px; }
.compare__card.card--accent h3 { color: var(--accent); }
.compare__card.card--accent p { color: var(--caption); }

.checks { display: flex; flex-direction: column; gap: 16px; }
.checks__intro { font-size: 17px; line-height: 1.6; color: var(--body); }
.checks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.check {
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check__num {
  color: var(--accent);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
}
.check h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
}
.check__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--secondary);
  flex: 1 1 auto;
}
.check__law { margin-top: 6px; font-size: 13px; color: var(--small); }
.checks__note { font-size: 13px; color: var(--small); }

/* ---------- 7. Was wir vorhaben ---------- */
.plan {
  padding-top: 112px;
  padding-bottom: 112px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.plan__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 820px;
}
.plan__intro {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--body);
  max-width: 820px;
}
.phases { display: flex; flex-wrap: wrap; gap: 20px; }
.phase {
  flex: 1 1 280px;
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}
.phase p:last-child { font-size: 16px; line-height: 1.6; color: var(--body); }

/* ---------- 8. Mach mit ---------- */
.contact {
  padding-top: 112px;
  padding-bottom: 112px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}
.contact__main {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact__main .h-section { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.contact__text { font-size: 18px; line-height: 1.65; color: var(--body); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__card {
  flex: 1 1 320px;
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.contact__card h3 { font-family: var(--font-head); font-weight: 600; font-size: 22px; }
.contact__card p { font-size: 16px; line-height: 1.6; color: var(--body); }
.contact__card a { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- 9. Footer ---------- */
.footer { border-top: 1px solid var(--line-alt); }
.footer__inner {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--small);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer__links a { color: var(--small); }
.footer__links a:hover { color: var(--text); }

/* ---------- Handy: Screens zu zweit nebeneinander ---------- */
@media (max-width: 599px) {
  .app .screens,
  .money .screens { gap: 24px 16px; }
  .app .screen,
  .money .screen { flex: 0 1 calc(50% - 8px); max-width: none; }
}

/* ==========================================================================
   Animationen (nur CSS)
   Alles steht in prefers-reduced-motion: no-preference. Bei „reduce“ gibt
   es weder Animationen noch Übergänge. Einblenden läuft über `translate`,
   Hover über `transform`, damit sich beides nicht gegenseitig überschreibt.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; translate: 0 16px; }
    to   { opacity: 1; translate: 0 0; }
  }

  /* Einstieg beim Laden, leicht versetzt */
  .story__text > *,
  .story__photos img {
    animation: rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .story__text > :nth-child(1) { animation-delay: 0ms; }
  .story__text > :nth-child(2) { animation-delay: 90ms; }
  .story__text > :nth-child(3) { animation-delay: 180ms; }
  .story__text > :nth-child(4) { animation-delay: 270ms; }
  .story__photos picture:nth-child(1) img { animation-delay: 220ms; }
  .story__photos picture:nth-child(2) img { animation-delay: 340ms; }

  /* Hover: dezent anheben, Rahmen etwas heller */
  .btn,
  .card,
  .screen {
    transition:
      transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
      background-color 220ms ease,
      border-color 220ms ease;
  }
  @media (hover: hover) {
    .btn:hover { transform: translateY(-2px); }
    .card:hover { transform: translateY(-3px); border-color: #34343E; }
    .card--muted:hover { border-color: #30303A; }
    .card--accent:hover { border-color: var(--accent-hover); }
    .screen:hover { transform: translateY(-4px); }
  }
}

/* Beim Scrollen: nur mit Browser-Unterstützung, sonst ist alles sofort sichtbar.
   Bereiche mit `cover` statt `entry`, damit der Versatz in Rastern deutlich wird. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes rise-lg {
      from { opacity: 0; translate: 0 32px; }
      to   { opacity: 1; translate: 0 0; }
    }
    @keyframes screen-in {
      from { opacity: 0; translate: 0 40px; scale: 0.94; }
      to   { opacity: 1; translate: 0 0; scale: 1; }
    }
    @keyframes fade {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    /* Überschriften und einzelne Karten */
    .app__head > .eyebrow,
    .safety__head > .eyebrow,
    .plan__head > .eyebrow,
    .contact__main > .eyebrow,
    .h-section,
    .card {
      animation: rise both cubic-bezier(0.22, 1, 0.36, 1);
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    /* Zitat: Überschrift langsam, der gelbe Teil kurz danach */
    .quote__title {
      animation: rise both cubic-bezier(0.22, 1, 0.36, 1);
      animation-timeline: view();
      animation-range: cover 0% cover 32%;
    }
    .quote__title .hl {
      animation: fade both ease-out;
      animation-timeline: view();
      animation-range: cover 24% cover 42%;
    }

    /* Prüfschritte und Phasen: mehr Bewegung, deutlich versetzt */
    .checks__grid > .card,
    .phases > .card {
      animation-name: rise-lg;
      animation-range: cover 0% cover 22%;
    }
    .checks__grid > :nth-child(2),
    .phases > :nth-child(2) { animation-range: cover 6% cover 28%; }
    .checks__grid > :nth-child(3),
    .phases > :nth-child(3) { animation-range: cover 12% cover 34%; }
    .checks__grid > :nth-child(4) { animation-range: cover 18% cover 40%; }

    /* App-Screens: von unten mit leichtem Skalieren, stärker versetzt */
    .screen {
      animation: screen-in both cubic-bezier(0.22, 1, 0.36, 1);
      animation-timeline: view();
      animation-range: cover 0% cover 20%;
    }
    .screens > :nth-child(2) { animation-range: cover 7% cover 27%; }
    .screens > :nth-child(3) { animation-range: cover 14% cover 34%; }
    .screens > :nth-child(4) { animation-range: cover 21% cover 41%; }
  }
}
