/* Basis: Reset, Typografie, Fokus, Hilfsklassen, Bewegung */

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

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

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  hyphens: auto;
}

h1 {
  hyphens: manual;
}

h2 {
  font-size: var(--step-4);
  font-weight: 500;
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--step-2);
}

h4 {
  font-size: var(--step-1);
}

p,
ul,
ol,
dl,
dd,
address {
  margin: 0;
}

p {
  text-wrap: pretty;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

abbr[title] {
  text-decoration: none;
  cursor: help;
}

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

[id] {
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

/* Fokus: kräftig, eckig, nie entfernt */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.demo-bar :focus-visible,
.section--dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-focus-on-dark);
}

/* Skip-Link */
.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0 var(--space-m);
  background: var(--color-ink);
  color: var(--color-paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Wiederkehrende Elemente */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.kicker {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Achsmarke nach Art eines Konstruktionsrasters */
.kicker__axis {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: var(--rule-strong);
  border-radius: 50%;
  letter-spacing: 0;
}

.kicker::after {
  content: "";
  flex: 1;
  max-width: 6rem;
  height: 1px;
  background: linear-gradient(to right, var(--color-red) 0 1.25rem, var(--color-line) 1.25rem);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--color-ink-soft);
}

/* Schaltflächen: rechtwinklig wie ein Planrahmen */
.button {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-s);
  min-height: var(--target-min);
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--color-ink);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.button__label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button__value {
  overflow-wrap: anywhere;
}

.button--primary {
  border-color: var(--color-red);
  background: var(--color-red);
  color: var(--color-paper);
}

.button--primary:hover {
  border-color: var(--color-red-deep);
  background: var(--color-red-deep);
}

.button--secondary {
  background: var(--color-paper);
  color: var(--color-ink);
}

.button--secondary:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}

.button--compact {
  padding: 0.55rem 0.9rem;
  font-size: var(--step--1);
}

.button--compact:hover {
  background: var(--color-ink);
  color: var(--color-paper);
}

/* Bewegung nur, wenn erwünscht */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.75rem);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes draw {
    from {
      transform: scaleX(0);
    }

    to {
      transform: scaleX(1);
    }
  }

  .hero__eyebrow,
  .hero__logo,
  .hero__value,
  .hero__lead,
  .hero__actions {
    animation: rise 700ms var(--ease) both;
  }

  .hero__logo { animation-delay: 60ms; }
  .hero__value:nth-child(1) { animation-delay: 140ms; }
  .hero__value:nth-child(2) { animation-delay: 200ms; }
  .hero__value:nth-child(3) { animation-delay: 260ms; }
  .hero__lead { animation-delay: 340ms; }
  .hero__actions { animation-delay: 400ms; }

  .hero::after {
    transform-origin: left;
    animation: draw 1100ms var(--ease) 200ms both;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}
