/* LEVIAPAY Website — Button (EINE Quelle für Landing und Unterseiten).
   Spezifikation: Developer-Handoff V-2, 00-foundations/LeviaPay-Design-System.md §5.1 (Button-Komponentensatz),
   Hover/Druck: LeviaPay-Motion-Spec.md §5.2. Braucht nur die Tokens aus css/tokens.css.

   Aufbau (vier Props wie in Figma):
     hierarchy  .btn--primary | .btn--secondary | .btn--tertiary
     theme      .btn--light (auf Weiß/Lila/hellen Fotos) | .btn--dark (auf #1E1436 und dunklen CTA-Karten)
     size       .btn--lg (62) | .btn--md (56) | .btn--sm (44)
     icon       optional: <svg class="btn__icon">…</svg> als LETZTES Kind (Standard arrow-right, siehe unten)
   Mobil (≤ 767 px) zusätzlich:
     .btn--mobile-md   Größe md statt der Desktop-Größe
     .btn--mobile-full volle Breite (Mobil-Heros, Regel 4)
   Regeln (§5.1): ein Primary je Gruppe; neben einem Primary trägt der Secondary KEIN Icon; Tertiary behält immer den
   Pfeil; <a> für Navigation, <button> für Aktionen.
   Beispiel:
     <a class="btn btn--primary btn--light btn--lg btn--mobile-md btn--mobile-full" href="#contact">Demo buchen</a>
     <button class="btn btn--primary btn--light btn--lg" type="submit">Senden <svg class="btn__icon" …>…</svg></button>
   Pfeil (Untitled UI arrow-right, 24er Raster):
     <svg class="btn__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M5 12h14m0 0-7-7m7 7-7 7"/></svg>
   Laden: .btn--loading (Spinner statt Icon, Beschriftung bleibt). */

.btn {
  position: relative; overflow: hidden; /* overflow: Glanz (.hero__shine) bleibt in der Pille */
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 24px; /* ohne Größenklasse = md */
  border: 0; border-radius: var(--radius-pill);
  font: 600 16px/24px var(--font-sans);
  white-space: nowrap; cursor: pointer; text-decoration: none;
  /* §5.2: Hover 150 ms ease-out, Druck scale .98 in 100 ms */
  transition: background-color 0.15s ease-out, color 0.15s ease-out, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-primary-600); outline-offset: 3px; }
.btn--dark:focus-visible { outline-color: var(--color-lime-300); }
.btn[disabled], .btn[aria-disabled="true"], .btn--disabled { opacity: 0.4; pointer-events: none; }

/* Größen */
.btn--lg { height: 62px; padding: 0 30px; font-size: 18px; line-height: 28px; }
.btn--md { height: 56px; padding: 0 24px; font-size: 16px; line-height: 24px; }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; line-height: 20px; gap: 6px; }
.btn--tertiary { height: auto; padding: 0; background: none; }

/* Farben je Hierarchie · Thema */
.btn--primary.btn--light { background: var(--color-primary-600); color: var(--color-white); }
.btn--primary.btn--light:hover { background: var(--color-primary-700); }
.btn--primary.btn--dark { background: var(--color-lime-300); color: var(--color-primary-950); }
.btn--primary.btn--dark:hover { background: var(--color-white); }
.btn--secondary.btn--light { background: var(--color-primary-100); color: var(--color-primary-950); }
.btn--secondary.btn--light:hover { background: var(--color-primary-200); }
.btn--secondary.btn--dark {
  background: var(--color-white-a10); color: var(--color-white);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.btn--secondary.btn--dark:hover { background: var(--color-white-a20); }
.btn--tertiary.btn--light { color: var(--color-primary-600); }
.btn--tertiary.btn--light:hover { color: var(--color-primary-800); text-decoration: underline; }
.btn--tertiary.btn--dark { color: var(--color-lime-300); }
.btn--tertiary.btn--dark:hover { color: var(--color-white); }

/* Icon */
.btn__icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm .btn__icon { width: 18px; height: 18px; }

/* Laden: Spinner ersetzt das Icon */
.btn--loading .btn__icon { display: none; }
.btn--loading::after {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: btn-spin 0.8s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Mobil */
@media (max-width: 767px) {
  .btn--mobile-md { height: 56px; padding: 0 24px; font-size: 16px; line-height: 24px; gap: 8px; }
  .btn--mobile-full { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn--loading::after { animation-duration: 2s; }
}
