/* Gesundheitswerkstatt Lippe – mobile first, ohne externe Ressourcen */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e3b43;
  --ink-soft: #174e58;
  --teal: #0b7285;
  --teal-deep: #08586a;
  --mint: #d9f2ec;
  --ground: #f4faf8;
  --white: #ffffff;
  --yellow: #ffc53d;
  --yellow-deep: #e8aa14;
  --coral: #c8412a;
  --text: #123a41;
  --muted: #3c5a61;
  --line: rgba(14, 59, 67, 0.16);
  --focus: #0b7285;
  --field-border: #587a82; /* >= 3:1 auf Weiß und Grund (WCAG 1.4.11) */

  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.625rem, 1.4rem + 1vw, 2.25rem);
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  --step-4: clamp(2.375rem, 1.6rem + 3.8vw, 4.5rem);

  --gap: clamp(1rem, 0.7rem + 1.5vw, 2rem);
  --section: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --wrap: 72rem;
  --radius: 1.125rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
  max-width: 68ch;
  text-wrap: pretty;
}

a {
  color: var(--teal-deep);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--ink);
    text-decoration-thickness: 0.14em;
  }
}

/* Steuerelemente: sofortige Reaktion, kein Markieren beim langen Drücken */
button,
a,
summary,
select,
input[type="checkbox"] {
  touch-action: manipulation;
}
.btn,
.brand,
.main-nav a,
.footer-links a,
.faq summary,
button {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

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

.on-dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  /* Querformat: Inhalt bleibt aus Notch und Rundungen heraus */
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--mint);
  border-bottom: 1px solid rgba(217, 242, 236, 0.14);
  padding-top: env(safe-area-inset-top);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.1;
  min-height: 44px;
}
.brand:hover {
  color: var(--white);
}
.brand img,
.brand svg {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}
.brand span {
  font-size: 1rem;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--mint);
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* Kleine Handys (360 px und schmaler): Marke und Button müssen nebeneinander passen */
@media (max-width: 23rem) {
  .site-header .wrap {
    gap: 0.75rem;
  }
  .brand {
    gap: 0.55rem;
  }
  .brand span {
    font-size: 0.875rem;
  }
  .btn--small {
    padding-inline: 1rem;
  }
}
@media (max-width: 20.5rem) {
  .brand span {
    display: none; /* Logo bleibt, Name steht direkt darunter im Hero */
  }
}

.main-nav {
  display: none;
}

.main-nav a {
  color: var(--mint);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.main-nav a:active {
  background: rgba(217, 242, 236, 0.16);
}
@media (hover: hover) and (pointer: fine) {
  .main-nav a:hover {
    color: var(--white);
    background: rgba(217, 242, 236, 0.1);
  }
}

/* ---------- Buttons ---------- */

.btn {
  --bg: var(--yellow);
  --fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    --bg: #ffd366;
    color: var(--ink);
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  }
}
.btn:active {
  transform: scale(0.97);
  --bg: #ffd366;
}
.btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.btn--small {
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
  white-space: nowrap;
}

.split > .section-head {
  margin-bottom: 0;
}

.hide-sm {
  display: none;
}
@media (min-width: 30rem) {
  .hide-sm {
    display: inline;
  }
}

.btn--ghost {
  --bg: transparent;
  --fg: var(--white);
  border-color: rgba(217, 242, 236, 0.5);
}
.btn--ghost:active {
  --bg: rgba(217, 242, 236, 0.18);
}
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover {
    --bg: rgba(217, 242, 236, 0.12);
    color: var(--white);
    border-color: var(--mint);
    box-shadow: none;
  }
}

.btn--dark {
  --bg: var(--ink);
  --fg: var(--white);
}
.btn--dark:active {
  --bg: var(--ink-soft);
}
@media (hover: hover) and (pointer: fine) {
  .btn--dark:hover {
    --bg: var(--ink-soft);
    color: var(--white);
  }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--mint);
  padding-block: clamp(2rem, 1rem + 5vw, 5rem) 0;
  overflow: clip;
}

.hero .wrap {
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3rem);
}

.hero h1 {
  color: var(--white);
  font-size: var(--step-4);
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.hero-lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--mint);
  margin-top: 1.25rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-meta {
  margin: 1.5rem 0 0;
  font-size: var(--step--1);
  color: var(--mint);
  opacity: 0.9;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}
.hero-meta strong {
  color: var(--white);
}

.hero-art {
  margin: 0;
  align-self: end;
  justify-self: center;
  width: min(100%, 30rem);
}
.hero-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.section--tight {
  padding-top: 0;
}

.region-text {
  margin-top: 1rem;
}

.tool:nth-child(1) { --i: 0; }
.tool:nth-child(2) { --i: 1; }
.tool:nth-child(3) { --i: 2; }
.tool:nth-child(4) { --i: 3; }
.tool:nth-child(5) { --i: 4; }
.tool:nth-child(6) { --i: 5; }

.section-head {
  margin-bottom: clamp(1.75rem, 1rem + 3vw, 3rem);
}
.section-head h2 {
  font-size: var(--step-3);
  max-width: 20ch;
}
.section-head p {
  font-size: var(--step-1);
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.5;
}

.split {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}

/* Prinzipien */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.principles li {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.principles strong {
  display: block;
  font-size: var(--step-1);
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.principles span {
  color: var(--muted);
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--mint);
  color: var(--ink);
  font-size: var(--step--1);
  line-height: 1.5;
  max-width: 68ch;
}

/* Werkbänke (Lochwand) */

.pegboard {
  background-color: var(--mint);
  background-image: radial-gradient(circle at center, rgba(11, 114, 133, 0.28) 0 2.5px, transparent 3px);
  background-size: 28px 28px;
  color: var(--text);
}

.tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.tool {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem 1.5rem;
  box-shadow: 0 1px 0 rgba(14, 59, 67, 0.08), 0 14px 28px -16px rgba(14, 59, 67, 0.4);
  transform-origin: 50% 0.9rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* Haken */
.tool::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: -0.45rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--yellow);
}
.tool .icon {
  width: 3.5rem;
  height: 3.5rem;
  padding: 0.7rem;
  border-radius: 1rem;
  background: var(--yellow);
  color: var(--ink);
  margin-bottom: 1rem;
}
.tool h3 {
  font-size: var(--step-1);
  margin-bottom: 0.4rem;
}
.tool p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

@media (hover: hover) {
  .tool:hover {
    transform: rotate(-1.2deg) translateY(2px);
    box-shadow: 0 1px 0 rgba(14, 59, 67, 0.08), 0 22px 34px -18px rgba(14, 59, 67, 0.5);
  }
  .tool:nth-child(even):hover {
    transform: rotate(1.2deg) translateY(2px);
  }
}

/* Modell */

.roles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.roles li {
  display: grid;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.roles h3 {
  font-size: var(--step-1);
}
.roles p {
  margin: 0;
  color: var(--muted);
}
.roles .earn {
  color: var(--ink);
  font-size: 1rem;
}
.roles .earn b {
  color: var(--teal-deep);
}

/* Region */

.region {
  background: var(--ink);
  color: var(--mint);
}
.region h2 {
  color: var(--white);
  font-size: var(--step-3);
  max-width: 18ch;
}
.region p {
  color: var(--mint);
}
.region-art {
  margin: 0;
}
.region-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.towns {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.towns li {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(217, 242, 236, 0.4);
  font-size: 0.95rem;
  color: var(--white);
}

/* Paket */

.package {
  background: var(--white);
  border-radius: calc(var(--radius) + 0.5rem);
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  box-shadow: 0 1px 0 rgba(14, 59, 67, 0.06), 0 30px 60px -36px rgba(14, 59, 67, 0.45);
  display: grid;
  gap: 2rem;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.checklist li {
  position: relative;
  padding-left: 2.25rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--yellow)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e3b43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 0.95rem no-repeat;
}
.checklist strong {
  color: var(--ink);
}
.price {
  align-self: start;
  background: var(--ink);
  color: var(--mint);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.price h3 {
  color: var(--white);
  font-size: var(--step-2);
}
.price p {
  margin: 0.75rem 0 1.25rem;
  font-size: 1rem;
}

/* FAQ */

.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 2.5rem 1.1rem 0;
  font-weight: 700;
  color: var(--ink);
  font-size: var(--step-1);
  line-height: 1.3;
  position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin-top: -0.55rem;
  border-right: 3px solid var(--teal);
  border-bottom: 3px solid var(--teal);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -0.2rem;
}
.faq details > div {
  padding: 0 0 1.25rem;
  color: var(--muted);
}
.faq details > div p:last-child {
  margin-bottom: 0;
}

/* ---------- Formular ---------- */

.contact {
  background: var(--mint);
}
.form {
  display: grid;
  gap: 1.25rem;
  background: var(--white);
  border-radius: calc(var(--radius) + 0.5rem);
  padding: clamp(1.25rem, 1rem + 2.5vw, 2.5rem);
  box-shadow: 0 1px 0 rgba(14, 59, 67, 0.06), 0 30px 60px -36px rgba(14, 59, 67, 0.45);
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label,
.field legend {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}
.field .opt {
  font-weight: 400;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem; /* verhindert Zoom auf iOS */
  color: var(--text);
  background: var(--ground);
  border: 2px solid var(--field-border);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  min-height: 3rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  caret-color: var(--teal);
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
@media (hover: hover) and (pointer: fine) {
  .field input:hover,
  .field select:hover,
  .field textarea:hover {
    border-color: var(--teal);
  }
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(11, 114, 133, 0.25);
}
.field [aria-invalid="true"] {
  border-color: var(--coral);
}
.field .hint {
  font-size: 0.9rem;
  color: var(--muted);
}
.field .error {
  font-size: 0.95rem;
  color: var(--coral);
  font-weight: 700;
  min-height: 0;
}
.field .error:empty {
  display: none;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 1rem;
}
.check input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--teal);
}
.check label {
  font-weight: 400;
  color: var(--text);
}

.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
}
.form-status:empty {
  display: none;
}
.form-status.is-ok {
  background: #d6f5e3;
  color: #0b4a2a;
}
.form-status.is-error {
  background: #fde4de;
  color: #7a1f10;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--mint);
  padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom));
  font-size: 1rem;
}
.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}
.site-footer a {
  color: var(--white);
}
@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover {
    color: var(--yellow);
  }
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer p {
  margin: 0;
  max-width: 48ch;
  opacity: 0.9;
}

/* ---------- Rechtstexte ---------- */

.legal {
  padding-block: clamp(2rem, 1rem + 4vw, 4.5rem);
}
.legal h1 {
  font-size: var(--step-3);
  margin-bottom: 1.5rem;
}
.legal h2 {
  font-size: var(--step-1);
  margin: 2.25rem 0 0.6rem;
}
.legal ul {
  padding-left: 1.2rem;
  max-width: 68ch;
}
.legal address {
  font-style: normal;
}

/* ---------- Bewegung: eine inszenierte Bewegung (Werkzeuge hängen sich ein) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .tool[data-reveal] {
    opacity: 0;
    transform: translateY(-14px) rotate(-3deg);
  }
  .js .tool[data-reveal]:nth-child(even) {
    transform: translateY(-14px) rotate(3deg);
  }
  .js .tool[data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  @media (hover: hover) {
    .js .tool[data-reveal].is-in:hover {
      transition-delay: 0ms;
      transition-duration: 0.35s;
      transform: rotate(-1.2deg) translateY(2px);
    }
    .js .tool[data-reveal].is-in:nth-child(even):hover {
      transform: rotate(1.2deg) translateY(2px);
    }
  }
}

/* Reduzierte Bewegung: kein Einhängen, kein sanftes Scrollen, kein Kippen beim Hover.
   Zustandswechsel (Farbe, Fokus, Aufklappen) bleiben erhalten. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .tool,
  .tool:hover,
  .tool:nth-child(even):hover {
    transform: none;
    transition: none;
  }
  .btn:active {
    transform: none;
  }
}

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 40rem) {
  .tools {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-actions .btn {
    min-width: 11rem;
  }
}

@media (min-width: 48rem) {
  .main-nav {
    display: flex;
    gap: 0.25rem;
  }
  .roles li {
    grid-template-columns: 1fr 1.4fr;
    gap: 2rem;
  }
  .roles li > div:last-child {
    display: grid;
    gap: 0.5rem;
  }
  .form--two {
    grid-template-columns: 1fr 1fr;
  }
  .form--two .field--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
  .hero-art {
    justify-self: end;
    align-self: end;
  }
  .split {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
  .split--flip {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
  .tools {
    grid-template-columns: repeat(3, 1fr);
  }
  /* leicht versetzte Haken, damit die Wand lebt */
  .tool:nth-child(3n + 2) {
    margin-top: 1.5rem;
  }
  .package {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: start;
  }
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
