/* ==========================================================================
   Schrift: Inter (Variable Font, lokal eingebunden, SIL Open Font License)
   ========================================================================== */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #f7f7f4;
  --ink: #22221f;
  --ink-soft: #45443d;
  --ink-muted: #75746c;
  --line: rgba(34, 34, 31, 0.16);
  --focus: #4b493b;

  /* Logogrößen: kit-Höhe als Basis. Rechnerisch gleiche Fläche wäre 0.621 × kit-Höhe;
     da das massive kit-K optisch schwerer wirkt, bekommt Trusted AI Solutions etwas mehr Größe. */
  --kit-h: clamp(3.25rem, 1.6rem + 5.2vw, 7rem);
  --tas-ratio: 0.69;
  --brand-gap: clamp(2rem, 0.5rem + 5vw, 5.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --measure: 40rem;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "kern", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, opacity 0.2s ease;
}

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

/* ==========================================================================
   Typografie
   ========================================================================== */
h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.8vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.25rem, 1.08rem + 0.7vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.008em;
}

p,
address {
  margin: 0;
  max-width: 65ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  font-style: normal;
  line-height: 1.65;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Vertikaler Rhythmus im Fließtext */
.prose > * + * {
  margin-top: 1rem;
}

.prose > h2 {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.prose > h3 {
  margin-top: 2rem;
}

.prose > h2 + *,
.prose > h3 + * {
  margin-top: 0.625rem;
}

.prose > h2 + h3 {
  margin-top: 1.5rem;
}

.prose a {
  text-decoration-color: var(--line);
}

.prose a:hover {
  text-decoration-color: currentColor;
}

/* ==========================================================================
   Startseite
   ========================================================================== */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3rem, 2rem + 4vw, 5.5rem);
  padding: clamp(4rem, 3rem + 6vw, 8rem) clamp(1.5rem, 1rem + 3vw, 4rem) 2rem;
  text-align: center;
}

.brands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--brand-gap);
}

.brand {
  display: block;
  border-radius: 4px;
}

.brand img {
  width: auto;
  transition: transform 0.6s var(--ease-out), opacity 0.3s ease;
}

.brand--kit img {
  height: var(--kit-h);
}

.brand--tas img {
  height: calc(var(--kit-h) * var(--tas-ratio));
}

/* Trusted AI Solutions mit Bildmarke oben – exakt gleich hoch wie kit,
   Oberkante (Schildspitze / K) und Grundlinie (Schrift) liegen auf einer Linie */
.brand--tas-stacked img {
  height: var(--kit-h);
}

.brand:hover img {
  transform: scale(1.025);
}

.brands__divider {
  flex: none;
  width: 1px;
  height: calc(var(--kit-h) * 0.9);
  background: var(--line);
}

.headline {
  max-width: 18em;
}

.headline span {
  display: block;
  color: var(--ink-muted);
}

/* Gestapeltes Logo: schmalere Logozeile -> Überschrift proportional zur Logohöhe, damit sie nicht breiter als die Logos wird */
.page-home--stacked .headline {
  font-size: clamp(1.5rem, calc(var(--kit-h) * 0.34), 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
}

.page-home--stacked .stage {
  gap: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

/* Positionierungstext direkt unter der Überschrift */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 0.75rem + 1vw, 1.5rem);
}

.intro__text {
  max-width: 36rem;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  hyphens: manual;
  -webkit-hyphens: manual;
  text-wrap: balance;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  padding: 1.75rem clamp(1.5rem, 1rem + 3vw, 4rem) 2rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.site-footer a {
  text-decoration-color: transparent;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* ==========================================================================
   Textseite (Impressum)
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  max-width: calc(var(--measure) + 2 * clamp(1.5rem, 1rem + 3vw, 4rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
}

.site-header .brand img {
  height: clamp(1.625rem, 1.4rem + 0.8vw, 2.125rem);
}

.back-link {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  text-decoration-color: transparent;
  white-space: nowrap;
}

.back-link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--measure) + 2 * clamp(1.5rem, 1rem + 3vw, 4rem));
  margin: 0 auto;
  padding: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(1.5rem, 1rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 6rem);
}

.page h1 {
  margin-bottom: 1.25rem;
}

.lead {
  color: var(--ink-muted);
}

.notice {
  max-width: none;
  margin-top: 2rem;
  padding: 0.875rem 1.125rem;
  border-left: 2px solid var(--ink);
  background: rgba(34, 34, 31, 0.045);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Animation: Logos blenden nacheinander ein
   ========================================================================== */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes grow {
  from {
    opacity: 0;
    transform: scale(1, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes grow-x {
  from {
    opacity: 0;
    transform: scale(0, 1);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.brand--tas,
.brand--kit,
.page-home .headline {
  animation: reveal 1.4s var(--ease-out) both;
}

.brand--tas {
  animation-delay: 0.25s;
}

.brands__divider {
  animation: grow 1s var(--ease-out) 0.95s both;
}

.brand--kit {
  animation-delay: 1.25s;
}

.page-home .headline {
  animation-delay: 2.05s;
}

.page-home .intro__text {
  animation: reveal 1.4s var(--ease-out) 2.4s both;
}

.page-home .site-footer {
  animation: fade 1s ease 2.6s both;
}

.page-home--stacked .site-footer {
  animation-delay: 2.95s;
}

.page-text .page,
.page-text .site-header {
  animation: fade 0.6s ease both;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 40rem) {
  :root {
    --kit-h: clamp(3.25rem, 1rem + 12vw, 5rem);
    --brand-gap: 2.25rem;
  }

  .brands {
    flex-direction: column;
  }

  .brands__divider {
    width: 3rem;
    height: 1px;
    animation-name: grow-x;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
