/* ROBIK AI – Basis: Reset, Typografie, Raster, Bausteine */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* kein grauer Blitz beim Tippen; Rückmeldung kommt über :active */
  scroll-behavior: smooth;
}

/* Sofortiges Tippen ohne Doppeltipp-Verzögerung */
a,
button,
summary {
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1 {
  font-size: var(--size-h1);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 0.96;
  letter-spacing: -0.012em;
}

h2 {
  font-size: var(--size-h2);
  font-weight: 760;
  font-stretch: 82%;
  line-height: 1;
  letter-spacing: -0.012em;
}

h3 {
  font-size: var(--size-h3);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}

:focus-visible {
  outline: 3px solid var(--stempel);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
}

.lead {
  font-size: var(--size-lead);
  line-height: 1.4;
  max-width: 34em;
}

.muted {
  color: var(--schiefer);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--tinte);
  color: var(--weiss);
  border-radius: var(--radius-button);
}

.skip:focus {
  top: 0.75rem;
}

/* Schaltflächen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none; /* langes Drücken markiert keinen Schaltflächentext */
  user-select: none;
  transition: transform 100ms ease-out, background-color 100ms ease-out;
  gap: 0.6rem;
}

/* Rückmeldung beim Drücken, für Maus und Finger */
.btn:active {
  transform: scale(0.97);
}

.btn-cta {
  background: var(--stempel);
  color: var(--weiss);
}

/* Das eine Haupt-CTA: größer und kräftiger (nicht die kleine Version in der Kopfzeile) */
.btn-cta:not(.btn-small) {
  min-height: 3.5rem;
  padding-inline: 1.75rem;
  font-size: 1.1875rem;
  font-weight: 700;
}

.btn-pfeil {
  flex: none;
  transition: transform 150ms ease-out;
}

.btn-line {
  background: transparent;
  border-color: var(--tinte);
  color: var(--tinte);
}

.btn-white {
  background: var(--weiss);
  color: var(--tinte);
}

.btn-cta:active {
  background: #1F30C0;
}

.btn-line:active {
  background: rgba(14, 23, 48, 0.08);
}

.btn-white:active {
  background: var(--papier);
}

/* Hover nur bei Maus/Trackpad, damit er auf Touch nicht hängen bleibt */
@media (hover: hover) and (pointer: fine) {
  .btn-cta:hover {
    background: #1F30C0;
  }

  .btn-line:hover {
    background: var(--tinte);
    color: var(--weiss);
  }

  .btn-white:hover {
    background: var(--papier);
  }

  .site-nav a:hover {
    text-decoration: underline;
  }

  .btn:hover .btn-pfeil {
    transform: translateX(3px);
  }

  .menu-btn:hover {
    background: rgba(14, 23, 48, 0.06);
  }
}

.btn-small {
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  font-size: var(--size-small);
}

/* Markierung für offene Fakten – nur in der Prüfversion */
.offen {
  display: inline-block;
  padding: 0.05em 0.5em;
  border: 1.5px dashed #9A6500;
  border-radius: 4px;
  background: #FFF3D1;
  color: #5C3D00;
  font-family: var(--font-text);
  font-size: 0.92em;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0;
  line-height: 1.45;
}

/* Kopfzeile */
.site-header {
  position: relative;
  z-index: 2; /* über dem Farbschein des Hero, der unter die Kopfzeile reicht */
  padding-block: 1.25rem;
}

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

.header-aktionen {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Menü-Symbol: nur unter 62rem sichtbar */
.menu-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem; /* Symbol optisch an der Kante, Tippfläche bleibt 44 px */
  padding: 0;
  border: 0;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--tinte);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 100ms ease-out;
}

.menu-btn:active {
  background: rgba(14, 23, 48, 0.08);
}

a.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* Unter 62rem: Navigation als Popover unter der Kopfzeile.
   Öffnen über das Menü-Symbol; Esc und Tippen außerhalb schließen (Popover-API, ohne Paket). */
.site-nav {
  position: fixed;
  inset: 4.75rem var(--gutter) auto;
  width: auto;
  max-height: calc(100dvh - 6rem);
  margin: 0;
  padding: 0.5rem;
  overflow: auto;
  border: 1px solid var(--linie);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: var(--tinte);
  box-shadow:
    0 1px 2px rgba(14, 23, 48, 0.06),
    0 12px 24px -12px rgba(14, 23, 48, 0.18),
    0 40px 80px -40px rgba(14, 23, 48, 0.35);
  opacity: 1;
  transform: none;
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

@starting-style {
  .site-nav:popover-open {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.site-nav::backdrop {
  background: rgba(14, 23, 48, 0.18);
}

.site-nav ul {
  display: grid;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding-inline: 1rem;
  border-radius: var(--radius-button);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:active {
  background: rgba(14, 23, 48, 0.06);
}

@media (prefers-reduced-transparency: reduce) {
  .site-nav {
    background: var(--weiss);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Kopfzeile bleibt einzeilig: CTA bricht nicht um, Menü-Symbol wird nicht gestaucht */
.header-aktionen > * {
  flex: none;
}

.site-header .btn-small {
  white-space: nowrap;
}

/* Sehr schmal (360 px): CTA in der Kopfzeile etwas enger */
@media (max-width: 24rem) {
  .site-header .wrap {
    gap: 0.75rem;
  }

  .site-header .btn-small {
    padding-inline: 0.625rem;
    font-size: 0.875rem;
  }
}

/* Kleinste Handys (320 px) */
@media (max-width: 21rem) {
  .site-header .wordmark {
    font-size: 1.25rem;
  }

  .site-header .btn-small {
    padding-inline: 0.5rem;
  }
}

/* Ab 62rem: Navigation normal in der Kopfzeile, Menü-Symbol weg */
@media (min-width: 62rem) {
  .menu-btn {
    display: none;
  }

  .site-nav[popover] {
    display: block;
    position: static;
    inset: auto;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    color: inherit;
  }

  .site-nav ul {
    display: flex;
    gap: 2rem;
  }

  .site-nav a {
    min-height: 2.75rem;
    padding-inline: 0;
    font-size: 1rem;
    font-weight: 550;
  }
}

/* Fußzeile */
.site-footer {
  padding-block: 3.5rem;
  background: var(--tinte);
  color: var(--weiss);
  font-size: 1rem;
}

.site-footer :focus-visible {
  outline-color: var(--weiss);
}

.site-footer .wrap {
  display: grid;
  gap: 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
}

/* Tippfläche mindestens 44 px */
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.site-footer .muted {
  color: var(--schiefer-hell);
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

/* Einfache Textseiten (Impressum, Datenschutz, Funnel) */
.page {
  padding-block: clamp(3rem, 8vw, 6rem) var(--section);
}

.page h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  max-width: 14em;
}

.page .lead {
  margin-top: 1.5rem;
}

.page-body {
  margin-top: 3rem;
  max-width: 40rem;
  display: grid;
  gap: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
