/* Seitenstil. Farben, Schriften und Radius kommen ausschließlich aus tokens.css (--dh-*).
   Pico (user-styles.css aus markdown-pages.js) wird bewusst nicht geladen. */

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

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

body {
  margin: 0;
  background: var(--dh-bg);
  color: var(--dh-text);
  font-family: var(--dh-font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--dh-link);
  text-underline-offset: 0.15em;
}

/* Sichtbarer Fokus für Tastaturbedienung */
:focus-visible {
  outline: 3px solid var(--dh-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Gemeinsame Inhaltsbreite für die drei Regionen von markdown-pages.js */
.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 40rem) {
  .site-header,
  main,
  .site-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Kopfzeile */
header {
  border-bottom: 1px solid var(--dh-border);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.brand {
  display: inline-block;
  line-height: 0;
}

.brand img {
  display: block;
  width: 188px;
  height: 40px;
}

/* Wortmarke passend zum Theme (data-theme setzt user-scripts.js) */
.wordmark-dark,
:root[data-theme="dark"] .wordmark-light {
  display: none !important;
}

:root[data-theme="dark"] .wordmark-dark {
  display: block !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: transparent;
  color: var(--dh-text);
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

/* Inhalt */
main {
  padding-top: 1rem;
  padding-bottom: 3.5rem;
}

main h1 {
  margin: 2.5rem 0 0;
  font-size: clamp(2rem, 6.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

main h2 {
  margin: 0;
  padding-top: 3.5rem;
  border-top: 1px solid var(--dh-border);
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

main h2 + p {
  margin: 0.75rem 0 0;
}

main p {
  max-width: 40rem;
}

/* Hero */
.hero {
  padding: 2rem 0 3.5rem;
}

.hero h1 {
  margin-top: 0;
}

.lead {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: 1.1875rem;
  color: var(--dh-text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--dh-radius);
  background: var(--dh-button-bg);
  color: var(--dh-button-text);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button-secondary {
  background: transparent;
  color: var(--dh-text-muted);
  border-color: var(--dh-border);
  cursor: default;
}

.button-secondary:hover {
  filter: none;
}

/* Eyebrow über Überschriften */
.eyebrow {
  margin: 0 0 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dh-text-muted);
}

/* Feature-Karten */
.features {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.25rem 1.375rem;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
}

.card h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.card p {
  margin: 0.375rem 0 0;
  color: var(--dh-text-muted);
}

/* Fußzeile */
footer {
  border-top: 1px solid var(--dh-border);
}

.site-footer {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  font-size: 0.9375rem;
  color: var(--dh-text-muted);
}

.footer-note {
  margin: 0;
}
