/* PflegefuerPflegen – Website
   Farben wie in der App: Tageslicht je Schichtart
   (Früh = Morgengold, Spät = Abendorange, Nacht = Nachtindigo, frei = Salbei),
   dazu Tinte und Nachtblau. Schrift: Figtree wie in der App, selbst gehostet
   (keine Anfrage an fremde Server). Lizenz: fonts/OFL.txt */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Farben und Maße ---------- */
:root {
  color-scheme: light dark;

  --paper: #f2f4f8;
  --ink: #18203a;
  --ink-2: #4a5570;
  --line: #d5dbe6;
  --line-strong: #7d879f;
  --action: #22305a;
  --action-hover: #16213e;
  --on-action: #ffffff;
  --link: #22305a;
  --focus: #22305a;

  /* Grafik: Schichtarten und Ruhe */
  --frueh: #fbcc60;
  --spaet: #f59a57;
  --on-shift: #18203a;
  --nacht: rgb(38 51 115 / 0.06);
  --nacht-ink: #263373;
  --ruhe: #bfe0d2;
  --ruhe-ink: #17473a;
  --hatch: rgb(24 32 58 / 0.6);

  /* Fußbereich: Nachtblau */
  --night: #16213e;
  --night-ink: #e7ebf4;
  --night-ink-2: #b4bdd3;
  --night-line: #34406a;

  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1020;
    --ink: #e7ebf4;
    --ink-2: #a9b3c9;
    --line: #262f48;
    --line-strong: #56627f;
    --action: #a3b3fa;
    --action-hover: #c2cdfc;
    --on-action: #0b1020;
    --link: #b9c5fb;
    --focus: #fbcc60;

    --frueh: #ecbd51;
    --spaet: #ea8a4b;
    --on-shift: #0b1020;
    --nacht: rgb(126 146 240 / 0.12);
    --nacht-ink: #b3c0f7;
    --ruhe: #24493d;
    --ruhe-ink: #c9eedf;
    --hatch: rgb(231 235 244 / 0.55);

    --night: #121a30;
    --night-ink: #e7ebf4;
    --night-ink-2: #a9b3c9;
    --night-line: #2c3654;
  }
}

@media (min-width: 760px) {
  :root { --gutter: 40px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { font-weight: 700; letter-spacing: -0.005em; }

.nobr { white-space: nowrap; }

h1 { font-size: clamp(2.25rem, 1.2rem + 3.2vw, 3.75rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: 1.3125rem; line-height: 1.3; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--action);
  color: var(--on-action);
  font-weight: 700;
  font-size: 1rem;
}
.skip:focus { top: 12px; }

/* ---------- Kopf ---------- */
.site-header { padding-block: 18px 8px; }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg { flex: none; width: 36px; height: 36px; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding-block: 10px;
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

@media (min-width: 760px) {
  .nav ul { gap: 0 28px; }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: 72px; border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .section { padding-block: 96px; }
}

.intro { max-width: 40rem; margin-top: 16px; color: var(--ink-2); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--action);
  color: var(--on-action);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: var(--action-hover); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}
.actions-alt { font-size: 1rem; color: var(--ink-2); }
.actions-alt a { overflow-wrap: anywhere; }

@media (max-width: 759.98px) {
  .button { width: 100%; }
}

/* ---------- Einstieg ---------- */
.hero { padding-block: 40px 72px; }

.hero-grid { display: grid; gap: 24px; }
.hero h1 { max-width: 12em; }
.lead { max-width: 34em; font-size: 1.3125rem; line-height: 1.5; }

@media (min-width: 1120px) {
  .hero { padding-block: 64px 96px; }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .hero h1 { margin-top: -4px; }
}

/* ---------- Grafik: knapper Dienstwechsel ---------- */
.dw { margin: 56px 0 0; }

.dw-field {
  position: relative;
  font-size: 1rem;
  line-height: 1.5;
}
.dw-field > * { position: absolute; }

.dw-day { font-weight: 700; white-space: nowrap; }

.dw-night { border-radius: 4px; background: var(--nacht); }
.dw-night span { position: absolute; color: var(--nacht-ink); font-weight: 700; }

.dw-midnight { z-index: 1; border: 0 dashed var(--line-strong); }

.dw-shift {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0 0.3em;
  padding: 0 14px;
  white-space: nowrap;
  border-radius: 6px;
  color: var(--on-shift);
}
.dw-shift--spaet { justify-content: flex-end; background: var(--spaet); }
.dw-shift--frueh { justify-content: flex-start; background: var(--frueh); }

.dw-soll { z-index: 2; border: 2px solid var(--ink); border-radius: 8px; }

.dw-ruhe {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0 0.3em;
  border-radius: 8px 0 0 8px;
  color: var(--ruhe-ink);
  white-space: nowrap;
}

.dw-fehlt { z-index: 1; border-radius: 0 8px 8px 0; }

/* Flächen als eigene Ebene, damit sie beim Laden wachsen können */
.dw-ruhe::before,
.dw-fehlt::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.dw-ruhe::before { background: var(--ruhe); }
.dw-fehlt::before { background: repeating-linear-gradient(-45deg, var(--hatch) 0 2px, transparent 2px 8px); }

.dw-note { z-index: 3; line-height: 1.35; }
.dw-note-head { display: block; font-size: 1.3125rem; font-weight: 700; }

.dw-axis { border: 0 solid var(--line-strong); }
.dw-tick { color: var(--ink-2); white-space: nowrap; }

.dw figcaption {
  max-width: 44rem;
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 1rem;
}

/* Breit: Zeit läuft von links nach rechts */
@media (min-width: 760px) {
  .dw { --from: 12; --span: 28; }
  .dw-field { height: 236px; }

  .dw-range {
    left: calc((var(--a) - var(--from)) / var(--span) * 100%);
    width: calc((var(--b) - var(--a)) / var(--span) * 100%);
  }
  .dw-point { left: calc((var(--t) - var(--from)) / var(--span) * 100%); }

  .dw-day { top: 0; }
  .dw-day--mo { left: 0; }
  .dw-day--di { margin-left: 12px; }

  .dw-night { top: 36px; height: 148px; }
  .dw-night span { top: 24px; left: 50%; transform: translateX(-50%); }

  .dw-midnight { top: 2px; height: 194px; margin-left: -1px; border-left-width: 2px; }

  .dw-shift { top: 44px; height: 56px; }

  .dw-soll, .dw-ruhe, .dw-fehlt { top: 120px; height: 56px; }

  .dw-note { top: 112px; margin-left: 18px; white-space: nowrap; }

  .dw-axis {
    top: 196px;
    left: 0;
    right: 0;
    height: 8px;
    border-top-width: 2px;
    background: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(100% / var(--span)));
  }
  .dw-tick { top: 206px; transform: translateX(-50%); }
}

/* Schmal: Zeit läuft von oben nach unten, wie in einer Tagesansicht */
@media (max-width: 759.98px) {
  .dw { --from: 13; --span: 26; --hour: 16px; margin-top: 48px; }
  .dw-field { height: calc(var(--span) * var(--hour)); margin-top: 36px; }

  .dw-range {
    top: calc((var(--a) - var(--from)) * var(--hour));
    height: calc((var(--b) - var(--a)) * var(--hour));
  }
  .dw-point { top: calc((var(--t) - var(--from)) * var(--hour)); }

  .dw-day--mo { top: -34px; left: 64px; }
  .dw-day--di { left: 76px; margin-top: 6px; }

  .dw-night { left: 58px; right: 0; }
  .dw-night span { bottom: 6px; left: 18px; }

  .dw-midnight { left: 58px; right: 0; height: 0; margin-top: -1px; border-top-width: 2px; }

  .dw-shift {
    left: 64px;
    width: calc((100% - 76px) * 0.42);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px 12px;
  }
  .dw-shift--frueh { justify-content: flex-start; }

  .dw-soll, .dw-ruhe, .dw-fehlt, .dw-note { right: 0; width: calc((100% - 76px) * 0.58); }
  .dw-ruhe { border-radius: 8px 8px 0 0; flex-direction: column; }
  .dw-fehlt { border-radius: 0 0 8px 8px; }

  .dw-note { margin-top: 10px; }
  .dw-note-head { font-size: 1.125rem; }

  .dw-axis {
    top: 0;
    bottom: 0;
    left: 50px;
    width: 8px;
    border-left-width: 2px;
    background: repeating-linear-gradient(to bottom, var(--line-strong) 0 1px, transparent 1px var(--hour));
  }
  .dw-tick { left: 0; width: 44px; text-align: right; transform: translateY(-50%); }
}

/* Ein einziger Moment Bewegung: Die Ruhe läuft bis 6:00, dann wird die Lücke sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  .dw-ruhe > * { animation: dw-fade 300ms ease-out 1300ms both; }
  .dw-note { animation: dw-fade 400ms ease-out 2000ms both; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 760px) {
  .dw-ruhe::before { animation: dw-grow-x 1200ms cubic-bezier(0.25, 0.8, 0.25, 1) 400ms both; }
  .dw-fehlt::before { animation: dw-grow-x 450ms ease-out 1650ms both; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 759.98px) {
  .dw-ruhe::before { animation: dw-grow-y 1200ms cubic-bezier(0.25, 0.8, 0.25, 1) 400ms both; }
  .dw-fehlt::before { animation: dw-grow-y 450ms ease-out 1650ms both; }
}
@keyframes dw-grow-x { from { width: 0; } }
@keyframes dw-grow-y { from { height: 0; } }
@keyframes dw-fade { from { opacity: 0; } }

/* ---------- So läuft der Check ---------- */
.steps {
  display: grid;
  gap: 36px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-content: start;
  column-gap: 12px;
}
.steps a { overflow-wrap: anywhere; }
.steps > li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  color: var(--action);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.steps h3 { padding-top: 4px; }
.steps p { margin-top: 8px; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .steps > li { position: relative; grid-template-columns: 1fr; }
  .steps > li::before { grid-row: auto; margin-bottom: 20px; }
  .steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 24px;
    left: 56px;
    right: -32px;
    border-top: 2px solid var(--line);
  }
}

.note {
  max-width: 44rem;
  margin-top: 48px;
  padding: 2px 0 2px 20px;
  border-left: 4px solid var(--action);
}
.note p + p { margin-top: 8px; color: var(--ink-2); }

.section .actions { margin-top: 40px; }

/* ---------- Die App ---------- */
.features {
  display: grid;
  gap: 44px;
  margin-top: 48px;
}
@media (min-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; gap: 56px 72px; }
}
.feature { padding-top: 20px; border-top: 2px solid var(--ink); }
.feature p, .feature ul { margin-top: 10px; }

.rules { margin: 0; padding: 0; list-style: none; }
.rules li { position: relative; padding-left: 28px; }
.rules li + li { margin-top: 6px; }
.rules li::before {
  content: "";
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 14px;
  height: 6px;
  border-radius: 3px;
  background: var(--action);
}

/* ---------- Pilot ---------- */
.pilot-grid { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .pilot-grid { grid-template-columns: 5fr 6fr; gap: 72px; align-items: start; }
}

.facts { margin: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; }

/* ---------- Über mich ---------- */
.about p { max-width: 40rem; }
.about .lead { margin-top: 24px; }
.about .lead + p { margin-top: 16px; }

/* ---------- Fuß mit Kontakt ---------- */
.site-footer {
  --focus: #fbcc60;
  padding-block: 72px 40px;
  background: var(--night);
  color: var(--night-ink);
}
.site-footer a { color: var(--night-ink); }

.contact {
  display: grid;
  gap: 24px;
  margin: 32px 0 0;
}
@media (min-width: 900px) {
  .contact { grid-template-columns: repeat(3, auto); justify-content: start; gap: 72px; }
}
.contact dt { color: var(--night-ink-2); font-size: 1rem; }
.contact dd {
  margin: 4px 0 0;
  font-size: 1.3125rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--night-line);
  color: var(--night-ink-2);
  font-size: 1rem;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-links a { display: inline-block; padding-block: 10px; }
.footer-bottom p { padding-block: 10px; }

/* ---------- Rechtliche Seiten ---------- */
.legal { padding-block: 40px 96px; }
.legal-body { max-width: 44rem; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.legal h2 { margin-top: 44px; font-size: 1.3125rem; line-height: 1.3; }
.legal h1 + p { margin-top: 20px; color: var(--ink-2); }
.legal h2 + p, .legal h2 + address, .legal h2 + ul { margin-top: 10px; }
.legal p + ul, .legal ul + p { margin-top: 1em; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.25em; }
.legal li + li { margin-top: 4px; }
.legal .stand { margin-top: 56px; color: var(--ink-2); }
