/* =====================================================================
   core. Consulting & Coaching
   ---------------------------------------------------------------------
   Farben   Dunkelgrau #374145 · Hellgrau #dddfe0
   Schrift  Roboto (variabel 100–900, lokal gehostet, keine Google-Abfrage)
   Skala    Faktor √2 – h1 7.993rem … small 0.707rem, xs 0.5rem
            Überschriften fluid per clamp(): Minimum bei 360 px Viewport,
            Endwert (Vorgabe) ab 1600 px Viewport.
   ===================================================================== */

@font-face {
  font-family: "Roboto";
  src: url("/assets/fonts/roboto-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Metrik-angepasster Fallback, damit beim Laden nichts springt */
@font-face {
  font-family: "Roboto Fallback";
  src: local("Arial");
  ascent-override: 92.77%;
  descent-override: 24.41%;
  line-gap-override: 0%;
  size-adjust: 100.3%;
}

:root {
  /* Farben */
  --ink: #374145;
  --paper: #dddfe0;

  /* Typo-Skala (√2) – fluid zwischen 22.5rem (360 px) und 100rem (1600 px) */
  --fs-h1: clamp(2.986rem, 1.532rem + 6.461vw, 7.993rem);
  --fs-h2: clamp(2.488rem, 1.569rem + 4.084vw, 5.653rem);
  --fs-h3: clamp(2.074rem, 1.515rem + 2.483vw, 3.998rem);
  --fs-h4: clamp(1.728rem, 1.409rem + 1.418vw, 2.827rem);
  --fs-h5: clamp(1.44rem, 1.278rem + 0.721vw, 1.999rem);
  --fs-h6: clamp(1.2rem, 1.138rem + 0.276vw, 1.414rem);
  --fs-p: 1rem;
  --fs-small: 0.707rem;
  --fs-xs: 0.5rem;

  /* Abstände auf derselben Skala */
  --s-2: 0.5rem;
  --s-1: 0.707rem;
  --s0: 1rem;
  --s1: 1.414rem;
  --s2: 1.999rem;
  --s3: 2.827rem;
  --s4: 3.998rem;
  --s5: 5.653rem;
  --s6: 7.993rem;

  --page-pad: clamp(1rem, 4.5vw, 4.5rem);
  --max-width: 100rem;

  --font: "Roboto", "Roboto Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Basis ---------- */

*,
*::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: var(--fs-p);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6, p, address {
  margin: 0;
}

address {
  font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

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

/* ---------- Typo-Skala ---------- */

h1, .h1 { font-size: var(--fs-h1); font-weight: 300; line-height: 0.96; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 300; line-height: 1;    letter-spacing: -0.025em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 300; line-height: 1.06; letter-spacing: -0.02em; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 400; line-height: 1.12; letter-spacing: -0.015em; }
h5, .h5 { font-size: var(--fs-h5); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
h6, .h6 { font-size: var(--fs-h6); font-weight: 400; line-height: 1.4; }
.p      { font-size: var(--fs-p); line-height: 1.5; }
small, .small { font-size: var(--fs-small); line-height: 1.5; letter-spacing: 0.01em; }
.xs     { font-size: var(--fs-xs); line-height: 1.5; }

/* ---------- Hilfsklassen ---------- */

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

.skip-link {
  position: absolute;
  top: -10rem;
  left: var(--page-pad);
  z-index: 10;
  padding: var(--s-1) var(--s0);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-2);
}

/* ---------- Kopf ---------- */

.screen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1);
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--s1) var(--page-pad);
}

.site-header__logo {
  display: block;
  width: clamp(8.75rem, 6.6rem + 6vw, 12.5rem);
}

.site-header__logo img {
  width: 100%;
}

.lang {
  display: flex;
  gap: var(--s-2);
  margin-right: calc(var(--s-2) * -1);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.lang a {
  padding: var(--s-2);
  text-decoration: none;
}

.lang a:hover,
.lang a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* ---------- Startseite: Hero ---------- */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--s2) var(--page-pad) 0;
  overflow: clip; /* clip statt hidden – sonst funktioniert das „sticky“ Porträt nicht */
}

/* h1-Skala wie vorgegeben; zusätzlich an die Bildschirmhöhe gekoppelt (damit
   Claim und Fokuszeile in den ersten Bildschirm passen) und unter 360 px
   an die Breite (damit „mit Substanz.“ nicht überläuft) */
.hero__claim {
  font-size: var(--fs-h1);
  font-size: min(var(--fs-h1), 13.4svh, 13vw);
  overflow-wrap: normal;
}

.hero__claim > span {
  display: block;
}

/* Fokus: Zielgruppe direkt unter dem Claim */
.hero__focus {
  max-width: 17em;
  margin-top: var(--s2);
  font-size: var(--fs-h4);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* Fließtext der Startseite in h6-Größe, damit er neben dem großen Claim trägt */
.hero__body,
.hero__offer,
.hero__cta {
  max-width: 34rem;
  font-size: var(--fs-h6);
  line-height: 1.55;
}

.hero__body {
  margin-top: var(--s4);
  hyphens: auto;
}

.hero__body p + p {
  margin-top: var(--s1);
}

.hero__offer {
  margin-top: var(--s4);
}

.hero__offer-title {
  margin-bottom: var(--s-1);
  font-size: var(--fs-h5);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero__cta {
  margin-top: var(--s3);
}

.hero__cta .button {
  margin-top: var(--s1);
}

.hero__portrait {
  justify-self: end;
  width: min(88%, 28rem);
  margin-top: var(--s3);
}

.hero__portrait img {
  width: 100%;
}

@media (min-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s3);
    align-content: stretch;
    padding-top: 0;
  }

  .hero__text {
    align-self: start;
    padding-block: var(--s-1) var(--s5);
  }

  /* Porträt bleibt beim Lesen unten im Bild stehen und landet am Ende
     des Textes auf dem Kontaktband */
  .hero__portrait {
    position: sticky;
    bottom: 0;
    align-self: end;
    width: 100%;
    margin-top: 0;
  }

  .hero__portrait img {
    max-height: calc(100svh - 7.5rem);
    object-fit: contain;
    object-position: right bottom;
  }
}

/* Ein einziger, ruhiger Auftakt: Claim blendet ein, das Porträt steigt aus dem Kontaktband */
@media (prefers-reduced-motion: no-preference) {
  .hero__claim > span {
    animation: claim-in 0.9s var(--ease) both;
  }

  .hero__claim > span + span {
    animation-delay: 0.15s;
  }

  .hero__portrait img {
    animation: portrait-rise 1.2s var(--ease) both;
  }
}

@keyframes claim-in {
  from {
    opacity: 0;
    transform: translateY(0.12em);
  }
}

@keyframes portrait-rise {
  from {
    transform: translateY(6%);
  }
}

/* ---------- Button ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 var(--s2);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-p);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.button:hover {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

/* ---------- Fuß: Kontaktband ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
}

.site-footer__inner {
  display: grid;
  gap: var(--s5);
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--s4) var(--page-pad) var(--s2);
}

.contact {
  display: grid;
  gap: var(--s1);
  font-size: var(--fs-h6);
  line-height: 1.45;
}

.contact a {
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s1) var(--s2);
}

/* Ab Tablet: Kontaktband im selben Raster wie der Hero (7 : 5) */
@media (min-width: 48rem) {
  .contact,
  .site-footer__base {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s3);
  }

  .contact__address {
    grid-row: span 2;
  }

  .contact__social {
    grid-column: 2;
  }

  .site-footer__base .legal-nav {
    grid-column: 2;
  }
}

@media (min-width: 64rem) {
  .site-footer__inner {
    padding-top: var(--s5);
  }
}

.site-footer__logo {
  display: block;
  width: clamp(7.5rem, 6.3rem + 4vw, 10rem);
}

.site-footer__logo img {
  width: 100%;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s1);
}

.legal-nav a {
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  text-decoration: underline;
}

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

.legal {
  display: grid;
  gap: var(--s3);
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--s3) var(--page-pad) var(--s5);
}

.legal__body {
  max-width: 40rem;
  hyphens: auto;
}

.legal__body > * + * {
  margin-top: var(--s1);
}

.legal__body > h2 + * {
  margin-top: var(--s2);
}

.legal__body > h3 {
  margin-top: var(--s3);
  font-size: var(--fs-h6);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

.legal__body > h3 + p {
  margin-top: var(--s-2);
}

.legal__label {
  font-weight: 500;
}

.legal__body > .legal__note {
  margin-top: var(--s4);
}

@media (min-width: 64rem) {
  .legal {
    padding-top: var(--s4);
  }
}

/* Ab 1280 px: Textspalte im selben 7 : 5-Raster wie Porträt und Kontaktdaten */
@media (min-width: 80rem) {
  .legal {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s3);
  }

  .legal__title {
    grid-column: 1 / -1;
  }

  .legal__body {
    grid-column: 2;
  }
}
