/* flu.gs – Styles. Setzt tokens.css voraus (beide per <link> eingebunden).
   Gestaltungssystem aus der Bildmarke:
   - Treppe: drei Balken 144 : 80 : 32, rechte bzw. linke Kante mit 23,94° (--skew-ratio)
   - Radien: 19,5 % der Kante (Buttons), Karten --radius-lg
   - quadratischer Türkis-Punkt als Satzende von Überschriften und als Listenpunkt */

:root {
  /* ergänzende Tokens (nicht in tokens.css) */
  --header-h: 4.75rem;
  --bar-h: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem);   /* Höhe eines Hero-Balkens */
  --bar-gap: calc(var(--bar-h) * var(--bar-gap-ratio));
  --fs-display: clamp(2.75rem, 1.35rem + 6.2vw, 6.75rem);
  --radius-btn: 10px;                                  /* 19,5 % von 52 px Buttonhöhe */
  --stairs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 144 148.06'%3E%3Cpath d='M0 0H144L125.75 41.12H0Z'/%3E%3Cpath d='M0 53.48H80.17L61.92 94.6H0Z'/%3E%3Cpath d='M0 106.95H32.31L14.06 148.06H0Z'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: var(--lh-tight); text-wrap: balance; }
p { margin: 0; }
p + p { margin-top: 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: var(--fw-bold); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
::selection { background: var(--teal-200); color: var(--navy); }

.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.skip {
  position: absolute; left: var(--gutter); top: -10rem; z-index: 10;
  padding: .75rem 1rem; background: var(--teal); color: var(--navy);
  font-weight: var(--fw-bold); border-radius: var(--radius-btn); text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Quadratischer Logo-Punkt als Satzende (Text "." bleibt für Kopieren/Vorlesen erhalten) */
.dot {
  display: inline-block;
  width: .19em; height: .19em;
  margin-left: .06em;
  background: var(--teal);
  color: transparent;
  overflow: hidden;
  line-height: 1;
  vertical-align: baseline;
}

/* ------------------------------------------------------------ Typo-Bausteine */
.eyebrow {
  display: flex; align-items: center; gap: .75em;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: var(--space-5);
}
.eyebrow::before {
  content: ""; flex: none;
  width: 1.35em; height: 1.39em;
  background: var(--teal);
  -webkit-mask: var(--stairs) no-repeat 0 0 / contain;
          mask: var(--stairs) no-repeat 0 0 / contain;
}
.eyebrow--inv { color: var(--teal); }

.h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.012em;
}
.lead {
  margin-top: var(--space-5);
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 38rem;
}

/* ------------------------------------------------------------ Buttons & Links */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-7); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 3.25rem; padding: .8rem 1.5rem;
  font: inherit; font-weight: var(--fw-bold); line-height: 1.2;
  color: var(--btn-text); background: var(--btn-bg);
  border: 2px solid var(--btn-bg); border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn::after {
  /* Pfeilspitze in Logo-Schräge */
  content: ""; width: .5em; height: .75em; background: currentColor;
  clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 45% 50%);
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover { background: var(--teal-600); border-color: var(--teal-600); text-decoration: none; }
.btn:hover::after { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgb(255 255 255 / .35); }
.btn--ghost:hover { background: rgb(255 255 255 / .06); border-color: var(--teal); color: var(--white); }
.btn--block { width: 100%; }
@media (max-width: 30rem) { .actions .btn { flex: 1 1 100%; } }
:is(.hero, .page-head, .contact, .site-header, .site-footer) :focus-visible { outline-color: var(--focus-inv); }

/* Link mit Balken-Unterstreichung (Schräge wie Logo) */
.site-nav a, .site-footer a, .arrow {
  position: relative; text-decoration: none;
}
.site-nav a::after, .site-footer a::after, .arrow::after {
  content: ""; position: absolute; left: 0; bottom: -.3em;
  width: 100%; height: .3em;
  background: var(--teal);
  clip-path: polygon(0 0, 100% 0, calc(100% - .133em) 100%, 0 100%);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav a:hover::after, .site-footer a:hover::after, .arrow:hover::after { transform: scaleX(1); }

.arrow { font-weight: var(--fw-bold); color: var(--teal-ink); }
.arrow::before {
  content: "→"; display: inline-block; margin-right: .45em;
  transition: transform var(--dur-base) var(--ease-out);
}
.arrow--out::before { content: "↗"; }
.arrow:hover::before { transform: translateX(3px); }
.arrow--out:hover::before { transform: translate(2px, -2px); }

/* ------------------------------------------------------------ Header */
.site-header { background: var(--navy); color: var(--white); position: relative; z-index: 2; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-3) var(--space-6);
  padding-block: var(--space-4);
}
.brand { display: block; border-radius: 6px; }
.brand img { width: 7.25rem; height: auto; }
.site-nav ul { display: flex; list-style: none; gap: var(--space-5); }
.site-nav a {
  display: inline-block; padding-block: .35rem;
  color: var(--white); font-weight: var(--fw-semibold); font-size: var(--fs-sm);
}
@media (max-width: 40rem) {
  .site-nav { flex-basis: 100%; border-top: 1px solid var(--navy-600); padding-top: var(--space-2); }
  .site-nav ul { justify-content: space-between; gap: var(--space-3); }
}
@media (min-width: 40.01rem) {
  .brand img { width: 8.4rem; }
  .site-header__inner { padding-block: var(--space-5); }
}

/* ------------------------------------------------------------ Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  --bar-h: clamp(2.1rem, 1rem + 4.4vw, 5.5rem);
  --motif-h: calc(3 * var(--bar-h) + 2 * var(--bar-gap));
  padding-block: clamp(2.5rem, 1rem + 6vw, 7rem) calc(var(--motif-h) + var(--space-7));
}
@media (min-width: 60rem) {
  .hero { padding-bottom: clamp(6rem, 3rem + 4vw, 8rem); }
}
.hero__inner { position: relative; z-index: 1; }
.hero__title {
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  letter-spacing: -0.018em;
  line-height: .98;
  max-width: 12ch;
}
.hero__lead {
  margin-top: var(--space-6);
  max-width: 34rem;
  font-size: var(--fs-lg); line-height: 1.5;
  color: var(--text-muted-inv);
}

/* Treppe: drei Balken, rechts angeschnitten, Längen 144 : 80 : 32 */
.hero__motif, .page-head__motif {
  --len: clamp(17rem, 47vw, 50rem);
  position: absolute; right: 0; bottom: 0;
  display: grid; justify-items: end; gap: var(--bar-gap);
  width: var(--len);
}
.hero__motif span, .page-head__motif span {
  display: block; height: var(--bar-h); width: 100%;
  background: var(--navy-700);
  clip-path: polygon(calc(var(--bar-h) * var(--skew-ratio)) 0, 100% 0, 100% 100%, 0 100%);
}
.hero__motif span:nth-child(2), .page-head__motif span:nth-child(2) { width: calc(100% * 80 / 144); }
.hero__motif span:nth-child(3), .page-head__motif span:nth-child(3) { width: calc(100% * 32 / 144); background: var(--teal); }

@media (prefers-reduced-motion: no-preference) {
  .hero__motif span { animation: bar-in 900ms var(--ease-out) both; }
  .hero__motif span:nth-child(2) { animation-delay: 90ms; }
  .hero__motif span:nth-child(3) { animation-delay: 180ms; }
}
@keyframes bar-in { from { transform: translateX(35%); opacity: 0; } }

/* ------------------------------------------------------------ Sektionen */
.section { padding-block: var(--space-section); }
.section--white { background: var(--surface); }
.section__head { max-width: 44rem; margin-bottom: var(--space-8); }

/* Der eigentliche Job */
.job__title {
  font-size: clamp(2.1rem, 1.1rem + 4.1vw, 4.9rem);
  font-weight: var(--fw-black);
  letter-spacing: -0.018em;
  line-height: 1.02;
  max-width: 17ch;
}
.job__muted { color: var(--line-strong); }
.job__text { margin-top: var(--space-6); font-size: var(--fs-lg); color: var(--text-muted); max-width: 36rem; }

/* Werkstatt: Kopf links, Prinzipien rechts */
.split { display: grid; gap: var(--space-7); }
@media (min-width: 60rem) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--space-9); align-items: start; }
  .split__head { position: sticky; top: var(--space-6); }
}
.principles { list-style: none; border-top: 1px solid var(--line); }
.principle {
  display: grid; grid-template-columns: 4.25rem 1fr; gap: var(--space-4);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.principle__num {
  /* Aufzählungszeichen: ein Logo-Balken mit Nummer */
  --h: 1.75rem;
  align-self: start;
  display: flex; align-items: center;
  width: 3.4rem; height: var(--h); margin-top: .05rem;
  padding-left: .55rem;
  background: var(--teal); color: var(--navy);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--h) * var(--skew-ratio)) 100%, 0 100%);
  font-size: var(--fs-sm); font-weight: var(--fw-heavy); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.principle h3 { font-size: var(--fs-xl); font-weight: var(--fw-heavy); letter-spacing: -0.015em; }
.principle p { margin-top: var(--space-2); color: var(--text-muted); max-width: 34rem; }

/* Vertrauen */
.trust {
  list-style: none;
  display: grid; gap: var(--space-7) var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.trust__item {
  position: relative;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-strong);
}
.trust__item::before {
  /* quadratischer Logo-Punkt auf der Linie */
  content: ""; position: absolute; left: 0; top: -.4rem;
  width: .8rem; height: .8rem; background: var(--teal);
}
.trust__item h3 { font-size: var(--fs-lg); font-weight: var(--fw-heavy); letter-spacing: -0.01em; }
.trust__item p { margin-top: var(--space-3); color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.55; hyphens: auto; }

.fits {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5);
  margin-top: var(--space-8);
}
.fits__title {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted);
}
.fits__list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.fits__list li {
  padding: .45rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
}

/* Produkte */
.products { display: grid; gap: var(--space-5); }
@media (min-width: 52rem) { .products { grid-template-columns: 1fr 1fr; } }
.product {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.product__field {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted);
}
.product__name {
  margin-top: var(--space-6);
  font-size: var(--fs-3xl); font-weight: var(--fw-black); letter-spacing: -0.015em;
}
.product__by { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--teal-ink); font-weight: var(--fw-semibold); }
.product__text { margin-top: var(--space-5); font-size: var(--fs-lg); line-height: 1.5; }
.ticks { list-style: none; margin-top: var(--space-5); display: grid; gap: var(--space-2); color: var(--text-muted); }
.ticks li { position: relative; padding-left: 1.6em; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 1em; height: .45em; background: var(--teal);
  clip-path: polygon(0 0, 100% 0, calc(100% - .2em) 100%, 0 100%);
}
.product__link { margin-top: auto; padding-top: var(--space-6); }
.products__note { margin-top: var(--space-6); color: var(--text-muted); font-size: var(--fs-sm); }

/* Kontakt */
.contact { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.contact .wrap { position: relative; z-index: 1; }
.contact__motif { display: none; }
@media (min-width: 60rem) {
  .contact__motif {
    --bar-h: clamp(1.6rem, .5rem + 2.2vw, 3rem);
    --len: 34vw;
    position: absolute; left: 0; bottom: 0;
    display: grid; gap: var(--bar-gap); width: var(--len);
  }
  .contact__motif span {
    display: block; height: var(--bar-h); background: var(--navy-700);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--bar-h) * var(--skew-ratio)) 100%, 0 100%);
  }
  .contact__motif span:nth-child(2) { width: calc(100% * 80 / 144); }
  .contact__motif span:nth-child(3) { width: calc(100% * 32 / 144); background: var(--teal); }
}
.contact .lead { color: var(--text-muted-inv); }
.contact__grid { display: grid; gap: var(--space-7); }
@media (min-width: 60rem) { .contact__grid { grid-template-columns: 6fr 5fr; gap: var(--space-9); align-items: start; } }
.contact__mail { margin-top: var(--space-7); }
.contact__mail a {
  font-size: var(--fs-2xl); font-weight: var(--fw-heavy); letter-spacing: -0.02em;
  color: var(--white); text-decoration: underline; text-decoration-color: var(--teal);
  text-decoration-thickness: .12em; text-underline-offset: .2em;
}
.contact__mail a:hover { color: var(--teal); }
.contact__note { margin-top: var(--space-3); color: var(--text-muted-inv); font-size: var(--fs-sm); }

.form {
  display: grid; gap: var(--space-5);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-lg);
}
.form :focus-visible { outline-color: var(--focus); }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: .8rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field textarea:hover { border-color: var(--navy); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--navy); }
.form__hint { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }
.form__status {
  padding: var(--space-4); border-radius: var(--radius-md);
  background: var(--teal-50); font-weight: var(--fw-semibold);
}

/* ------------------------------------------------------------ Seitenkopf (Rechtliches, 404) */
.page-head {
  position: relative; overflow: hidden;
  background: var(--navy); color: var(--white);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(6.5rem, 4rem + 8vw, 10rem);
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head__title {
  font-size: var(--fs-4xl); font-weight: var(--fw-black); letter-spacing: -0.018em;
  hyphens: manual; overflow-wrap: break-word;
}
.page-head__motif { --len: clamp(11rem, 34vw, 30rem); --bar-h: clamp(1.1rem, .7rem + 1.6vw, 2.4rem); }
.page-head--404 { padding-bottom: clamp(9rem, 6rem + 10vw, 14rem); }

/* ------------------------------------------------------------ Lesetext */
.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  display: flex; gap: .5em; align-items: baseline;
  margin-top: 2.4em; padding-top: 1.2em;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xl); font-weight: var(--fw-heavy); letter-spacing: -0.015em;
  scroll-margin-top: var(--space-5);
}
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 .num { color: var(--teal-ink); font-variant-numeric: tabular-nums; }
.prose h3 { margin-top: 2em; font-size: var(--fs-lg); font-weight: var(--fw-heavy); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--teal-600); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em 1.5em; }
.prose hr + p { font-size: var(--fs-sm); color: var(--text-muted); }
.prose a { overflow-wrap: anywhere; }
.provider { margin-block: 1.5em; }
.provider img { width: min(100%, 12.5rem); height: auto; }

.legal { display: grid; gap: var(--space-7); }
@media (min-width: 64rem) {
  .legal--toc { grid-template-columns: minmax(0, 42rem) minmax(0, 18rem); justify-content: space-between; align-items: start; }
  .legal--toc .legal__aside { grid-column: 2; grid-row: 1; position: sticky; top: var(--space-6); }
  .legal--toc .toc ol { columns: 1; }
}
.toc {
  font-size: var(--fs-sm);
  padding: var(--space-5) var(--space-6);
  background: var(--bg); border-radius: var(--radius-lg);
}
.toc h2 {
  margin: 0 0 .75em; padding: 0; border: 0;
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-muted);
}
.toc ol { padding-left: 1.6em; columns: 2 14rem; column-gap: var(--space-6); }
.toc li { break-inside: avoid; }
.toc li + li { margin-top: .35em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc li::marker { color: var(--teal-ink); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Footer */
.site-footer {
  background: var(--navy-900); color: var(--text-muted-inv);
  padding-block: var(--space-8) var(--space-6);
  font-size: var(--fs-sm);
}
.site-footer__grid { display: grid; gap: var(--space-7) var(--space-6); grid-template-columns: repeat(2, 1fr); }
.site-footer__brand { grid-column: 1 / -1; }
@media (min-width: 60rem) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .site-footer__brand { grid-column: auto; }
}
.site-footer__brand img { width: 7.5rem; height: auto; }
.site-footer__brand p { margin-top: var(--space-5); max-width: 22rem; line-height: 1.55; }
.site-footer h2 {
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--white); margin-bottom: var(--space-4);
}
.site-footer ul { list-style: none; display: grid; gap: var(--space-2); }
.site-footer a { color: var(--text-muted-inv); }
.site-footer a:hover { color: var(--white); }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5);
  margin-top: var(--space-8); padding-top: var(--space-5);
  border-top: 1px solid var(--navy-600);
  font-size: var(--fs-xs);
}
.site-footer__base p + p { margin-top: 0; }

@media print {
  .site-header, .site-footer, .hero__motif, .page-head__motif, .form, .skip { display: none; }
  .hero, .page-head, .contact { background: none; color: #000; }
  .page-head { padding-block: 0 1.5rem; }
  .eyebrow--inv { color: var(--teal-ink); }
  .legal-wrap { padding-block: 0; }
  .provider img { break-inside: avoid; }
}
