@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --rot: #D40F14;
  --rot-dunkel: #A80B0F;
  --blau: #D2E7F1;
  --blau-hell: #EDF5F9;
  --ink: #1A1A18;
  --ink-soft: #45453F;
  --weiss: #FFFFFF;

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1080px;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--weiss);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

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

/* ---------- Große Überschriften ---------- */
.shout {
  font-weight: 800;
  color: var(--rot);
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 0;
}
.shout-sm { font-size: clamp(2rem, 7vw, 3.25rem); }
.shout-md { font-size: clamp(1.6rem, 5.4vw, 2.75rem); line-height: 1.05; }
.on-red { color: var(--weiss); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: .8em 1.5em;
  font-weight: 700; font-size: 1.0625rem; text-decoration: none;
  background: center / 100% 100% no-repeat;
  transition: transform .15s ease;
}
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
/* Leicht schiefe, handgeschnittene Formen wie die Wellen im Hintergrund */
.btn-primary {
  color: var(--weiss);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 7 Q50 0 99 3 L100 92 Q52 100 0 97 Z' fill='%23D40F14'/%3E%3C/svg%3E");
}
.btn-primary:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 7 Q50 0 99 3 L100 92 Q52 100 0 97 Z' fill='%23A80B0F'/%3E%3C/svg%3E");
}
.btn-ghost {
  color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 4 Q48 7 99 2 L98 96 Q50 92 1 98 Z' fill='%23FFFFFF' stroke='%231A1A18' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
.btn-ghost:hover {
  color: var(--weiss);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 4 Q48 7 99 2 L98 96 Q50 92 1 98 Z' fill='%231A1A18'/%3E%3C/svg%3E");
}
.btn:active { transform: scale(.98); }

/* ---------- Hero ---------- */
.hero {
  /* Alles skaliert auch mit der Fensterhöhe, damit der Hero genau einen Bildschirm hoch bleibt */
  --pad-top: clamp(16px, min(4vw, 4vh), 40px);
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  background: var(--weiss) url("assets/wellen.svg") center / cover no-repeat;
  padding: var(--pad-top) 0 clamp(20px, min(8vw, 6vh), 80px);
  overflow: hidden;
}
.hero > .wrap { display: flex; flex-direction: column; }
.logo { width: clamp(150px, min(42vw, 34vh), 330px); height: auto; }
.hero-text { margin: auto 0; padding-top: clamp(16px, 5vh, 64px); text-align: center; }
.hero h1 { margin: 0; }
.hero h1 img { width: min(100%, 860px, 110vh); height: auto; margin: 0 auto; }
.lead {
  margin: .6em auto 0;
  max-width: 22em;
  font-size: clamp(1.25rem, 2.2vw + .9rem, 2rem);
  line-height: 1.3;
  font-weight: 500;
  text-wrap: balance;
}
.hero-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: clamp(16px, 4vh, 48px);
}
.hero-actions .btn { flex: 1 1 220px; max-width: 300px; }

/* ---------- Hero-Auftritt ----------
   1. „Geschafft!“ wird gestempelt  2. Logo klappt von oben herein
   3. Text erscheint  4. Buttons kurz danach */
.hero > .wrap { perspective: 900px; perspective-origin: 50% 0; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 img {
    animation: stempel .62s .25s both;
  }
  .hero > .wrap {
    animation: aufprall .32s .54s both;
  }
  .logo {
    /* Drehachse ist die Oberkante des Browserfensters */
    transform-origin: 50% calc(-1 * var(--pad-top));
    animation: herabfallen 1.5s .95s both;
  }
  .lead { animation: auftauchen .6s 2.05s both; }
  .hero-actions { animation: auftauchen .6s 2.4s both; }
}

@keyframes stempel {
  0%   { opacity: 0; transform: scale(3.4) rotate(-7deg); filter: blur(8px); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  47%  { opacity: 1; transform: scale(1.13, 1.04) rotate(-1.5deg); filter: blur(0); animation-timing-function: ease-out; }
  62%  { transform: scale(1.1) rotate(-1deg); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes aufprall {
  0%, 100% { transform: none; }
  20% { transform: translate(0, 6px); }
  45% { transform: translate(-3px, -2px); }
  70% { transform: translate(2px, 1px); }
}
@keyframes herabfallen {
  0%   { opacity: 0; transform: rotateX(-95deg); animation-timing-function: cubic-bezier(.5, 0, .9, .5); }
  8%   { opacity: 1; }
  38%  { transform: rotateX(16deg); animation-timing-function: ease-in-out; }
  58%  { transform: rotateX(-9deg); animation-timing-function: ease-in-out; }
  76%  { transform: rotateX(4deg); animation-timing-function: ease-in-out; }
  90%  { transform: rotateX(-1.5deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes auftauchen {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Sektionen ---------- */
section { padding: clamp(56px, 10vw, 120px) 0; }
h2 {
  font-size: clamp(1.6rem, 3vw + 1rem, 2.5rem);
  line-height: 1.15;
  margin: 0 0 .6em;
  letter-spacing: -.015em;
}
.big { font-size: 1.2em; line-height: 1.45; font-weight: 500; }

/* Team */
.team-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 760px) { .team-grid { grid-template-columns: 1.1fr 1fr; } }
.team-photo { margin: 0; }
.team-photo img,
.photo-placeholder {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transform: rotate(-1.5deg);
}
/* Foto wird schief zugeschnitten wie der Platzhalter */
.team-photo img { clip-path: polygon(0 2%, 98% 0, 100% 97%, 2% 100%); }
.photo-placeholder {
  display: grid; place-items: center;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 3 Q50 1 98 1 L99 97 Q50 99 2 99 Z' fill='%23EDF5F9' stroke='%239CC3D6' stroke-width='2' stroke-dasharray='7 6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  color: var(--ink-soft); font-weight: 600;
}
.team h2 { color: var(--rot); }

/* Foto fährt von links, Text von rechts herein (nur mit JS, siehe .reinfahren in index.html) */
.team { overflow: hidden; overflow: clip; }
@media (prefers-reduced-motion: no-preference) {
  .js .team .team-photo,
  .js .team .team-text {
    opacity: 0;
    transition: opacity .7s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
  }
  .js .team .team-photo { transform: translateX(-80px) rotate(-4deg); }
  .js .team .team-text { transform: translateX(80px); transition-delay: .15s; }
  .js .team.ist-sichtbar .team-photo,
  .js .team.ist-sichtbar .team-text { opacity: 1; transform: none; }
}

/* Richtig hier */
.richtig { background: var(--blau-hell); }
.richtig h2 { color: var(--rot); }
.gruppen {
  list-style: none; margin: 1.2em 0 1.4em; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 760px) { .gruppen { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.gruppen li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 12px 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 2 Q50 0 99 1 L100 97 Q50 100 0 99 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  text-align: center; font-weight: 700; line-height: 1.25;
}
/* Jede Karte leicht anders geschnitten */
.gruppen li:nth-child(2) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 1 Q48 3 100 0 L99 99 Q52 97 1 100 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.gruppen li:nth-child(3) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M2 0 Q50 2 100 2 L98 100 Q48 98 0 98 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.gruppen li:nth-child(4) { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 3 Q52 0 98 0 L100 98 Q50 100 2 100 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.gruppen li:nth-child(odd) { transform: rotate(-1deg); }
.gruppen li:nth-child(even) { transform: rotate(1deg); }
@media (prefers-reduced-motion: no-preference) {
  /* Karten blenden kurz nacheinander ein; translate statt transform, damit die Schräglage bleibt */
  .js .gruppen li {
    opacity: 0; translate: 0 18px;
    transition: opacity .6s ease, translate .7s cubic-bezier(.2, .8, .2, 1);
  }
  .js .gruppen li:nth-child(2) { transition-delay: .08s; }
  .js .gruppen li:nth-child(3) { transition-delay: .16s; }
  .js .gruppen li:nth-child(4) { transition-delay: .24s; }
  .js .gruppen.ist-sichtbar li { opacity: 1; translate: none; }
}

/* Strichmännchen */
.figur { width: 100%; max-width: 140px; height: auto; overflow: visible; }
.figur circle, .figur path {
  fill: none; stroke: var(--ink); stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.figur circle { fill: var(--weiss); }
.figur .fein { stroke-width: 2.2; }
.figur .boden { fill: var(--blau); stroke: none; }
.figur .akzent { fill: var(--rot); stroke: none; }
.figur .akzent-linie { stroke: var(--ink-soft); stroke-width: 1.6; }
.figur .pfeil { stroke: var(--rot); stroke-width: 3.2; }
.figur .kopfhoerer { stroke-width: 2.6; }
.figur .handy { fill: var(--ink); stroke: none; }
.figur .blase { fill: var(--blau); stroke: none; }
.figur .frage { font-weight: 900; font-size: 22px; fill: var(--rot); }

/* Versprechen */
.versprechen { text-align: center; }
.promise {
  font-weight: 800;
  letter-spacing: -.025em;
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
.promise::before {
  content: ""; display: block;
  width: 56px; height: 56px; margin: 0 auto 20px;
  background: var(--rot);
  -webkit-mask: url("assets/schloss.svg") center / contain no-repeat;
          mask: url("assets/schloss.svg") center / contain no-repeat;
}

/* Kontakt */
.kontakt {
  background: var(--rot);
  color: var(--weiss);
  text-align: center;
}
.kontakt-intro {
  max-width: 30em; margin: 1em auto 0;
  font-size: 1.2em; line-height: 1.45; font-weight: 500;
  text-wrap: balance;
}
.wege {
  list-style: none; padding: 0;
  margin: clamp(32px, 5vw, 56px) 0;
  display: grid; gap: 14px;
}
@media (min-width: 760px) { .wege { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.weg {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 26px 20px 24px;
  color: var(--ink);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 2 Q50 0 100 1 L99 98 Q50 100 1 99 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  text-decoration: none;
  transition: transform .15s ease;
}
.wege li:nth-child(2) .weg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M1 0 Q50 3 99 1 L100 100 Q48 97 0 99 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
.wege li:nth-child(3) .weg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 1 Q52 0 100 3 L98 99 Q50 100 1 100 Z' fill='%23FFFFFF'/%3E%3C/svg%3E"); }
a.weg:hover { transform: translateY(-3px) rotate(-.5deg); }
.weg svg { width: 38px; height: 38px; fill: var(--rot); margin-bottom: 6px; }
.weg-label { font-weight: 800; color: var(--rot); font-size: 1.25rem; }
.weg-value { font-weight: 600; font-size: 1.125rem; line-height: 1.35; overflow-wrap: anywhere; }
a.weg .weg-value { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--blau); }
.closing { max-width: 16em; margin: 0 auto; text-wrap: balance; }

/* Mehr */
.links { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--blau); }
.links a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 14px 4px;
  border-bottom: 2px solid var(--blau);
  font-weight: 600; text-decoration: none;
}
.links small { font-weight: 400; color: var(--ink-soft); margin-left: .3em; }
.links svg { width: 24px; height: 24px; flex: none; fill: var(--rot); transition: transform .15s ease; }
.links a:hover svg { transform: translateX(4px); }
.links a:hover > span { color: var(--rot); }

/* Footer */
.footer {
  background: var(--ink); color: #E8E8E3;
  padding: 48px 0 calc(48px + env(safe-area-inset-bottom));
  font-size: .9375rem;
}
.footer-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; } }
.legal { display: flex; gap: 24px; margin-top: 1.2em; }
.legal a { color: var(--weiss); text-underline-offset: 3px; }
.glueck { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--weiss); font-weight: 600; line-height: 1.35; }
.glueck img { width: 96px; height: auto; transition: transform .2s ease; }
.glueck:hover img { transform: rotate(-8deg) scale(1.05); }

/* Mobile Anruf-Leiste */
.callbar { display: none; }
@media (max-width: 759px) {
  .callbar {
    display: flex; align-items: center; justify-content: center; gap: .6em;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 56px;
    color: var(--weiss);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 5 Q50 0 100 4 L99 95 Q50 100 1 98 Z' fill='%23D40F14'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    font-weight: 700; text-decoration: none;
    transform: translateY(150%);
    transition: transform .25s ease;
    z-index: 10;
  }
  .callbar svg { width: 1.2em; height: 1.2em; fill: currentColor; }
  .callbar.is-shown { transform: none; }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
