/* Self-gehostete Fonts (statt Google Fonts CDN – DSGVO/IP-Übertragung vermeiden) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-400-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-400.woff2') format('woff2');
}

.animate-on-scroll-hidden {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.animate-on-scroll-visible {
  opacity: 1;
  transform: translateY(0);
}
.faq-item-open .faq-icon-vertical {
  transform: rotate(90deg);
}
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
  color-scheme: light;
}

/* Kritische Basis-Styles – korrekte Darstellung auch vor Tailwind */
#app-root {
  background-color: rgb(255,255,255);
  color: #111111;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app-root a {
  color: inherit;
}

/* Schwere Animationen pausieren bis Sektion sichtbar (CPU-Schutz) */
.perf-pause-anim {
  animation-play-state: paused !important;
}

.perf-pause-anim.is-in-view {
  animation-play-state: running !important;
}

@media (prefers-reduced-motion: reduce) {
  #app-root *,
  #app-root *::before,
  #app-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.nav-link-active {
  color: rgb(224,49,33) !important;
}

/* Pricing cards – hover spotlight */
.pricing-grid {
  align-items: stretch;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}
.pricing-card__overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: linear-gradient(
    160deg,
    rgba(224,49,33, 0.14) 0%,
    transparent 55%
  );
}
.pricing-card__glow {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: -40%;
  height: 200px;
  width: 200px;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: rgba(224,49,33, 0.25);
  filter: blur(48px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

@media (hover: hover) and (min-width: 768px) {
  .pricing-grid:hover .pricing-card {
    opacity: 0.55;
    transform: scale(0.97);
  }
  .pricing-grid:hover .pricing-card:hover {
    opacity: 1;
    transform: scale(1.04);
    z-index: 10;
    border-color: rgba(224,49,33, 0.55);
    box-shadow: 0 8px 25px rgba(224,49,33, 0.3);
  }
  .pricing-grid:hover .pricing-card:hover .pricing-card__overlay {
    opacity: 1;
  }
  .pricing-grid:hover .pricing-card:hover .pricing-card__glow {
    opacity: 1;
  }
  .pricing-grid:not(:hover) .pricing-card--popular {
    opacity: 1;
    transform: scale(1.03);
    border-color: rgba(224,49,33, 0.45);
    box-shadow: 0 8px 25px rgba(224,49,33, 0.25);
  }
  .pricing-grid:not(:hover) .pricing-card--popular .pricing-card__overlay {
    opacity: 0.6;
  }
}

@media (max-width: 767px) {
  .pricing-card--popular {
    border-color: rgba(224,49,33, 0.45);
    box-shadow: 0 8px 25px rgba(224,49,33, 0.2);
  }
}

.pricing-card:focus-within {
  opacity: 1;
  transform: scale(1.02);
  border-color: rgba(224,49,33, 0.55);
  box-shadow: 0 8px 25px rgba(224,49,33, 0.3);
  outline: none;
}
.pricing-card:focus-within .pricing-card__overlay {
  opacity: 1;
}

/* Kontaktformular – Interesse Multi-Select (Checkbox-Cards) */
#app-root .interesse-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  #app-root .interesse-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#app-root .interesse-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #111111;
  background: rgb(245,245,246);
  border: 1px solid rgba(17,17,17,0.16);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

#app-root .interesse-option--wide {
  grid-column: 1 / -1;
}

#app-root .interesse-option:hover {
  border-color: rgba(224,49,33, 0.35);
  background: rgb(239,239,240);
}

#app-root .interesse-option:has(.interesse-option__input:focus-visible) {
  outline: 2px solid rgba(224,49,33, 0.6);
  outline-offset: 2px;
}

#app-root .interesse-option:has(.interesse-option__input:checked) {
  border-color: rgba(224,49,33, 0.55);
  background: linear-gradient(
    135deg,
    rgba(224,49,33, 0.14) 0%,
    rgba(224,49,33, 0.04) 100%
  );
  box-shadow: 0 4px 18px rgba(224,49,33, 0.12);
}

#app-root .interesse-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app-root .interesse-option__control {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 1px solid rgba(17,17,17,0.4);
  border-radius: 4px;
  background: rgb(255,255,255);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

#app-root .interesse-option__icon {
  width: 0.875rem;
  height: 0.875rem;
  color: transparent;
}

#app-root .interesse-option:has(.interesse-option__input:checked) .interesse-option__control {
  border-color: rgb(224,49,33);
  background: rgb(224,49,33);
}

#app-root .interesse-option:has(.interesse-option__input:checked) .interesse-option__icon {
  color: #ffffff;
}

#app-root .interesse-option__text {
  flex: 1;
  min-width: 0;
}

#app-root .interesse-picker.is-invalid {
  border-color: rgba(224,49,33, 0.45);
}

/* ── Mobile Header Bar ── */
#mobile-bar { display: none; }
@media (max-width: 767px) {
  #mobile-bar {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: rgb(255,255,255);
    border-bottom: 1px solid rgba(17,17,17,0.08);
    padding: 0 16px;
    z-index: 99;
  }
}

/* ── Pricing Cards ── */
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  border-color: rgba(224,49,33, 0.5);
  box-shadow: 0 0 32px rgba(224,49,33, 0.12);
}

.pricing-card--popular:hover {
  border-color: rgba(224,49,33, 0.9) !important;
  box-shadow: 0 0 56px rgba(224,49,33, 0.25) !important;
}

.pricing-card__glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  background: rgba(224,49,33, 0.1);
  filter: blur(48px);
  pointer-events: none;
  transition: background 0.3s ease;
}

.pricing-card:hover .pricing-card__glow {
  background: rgba(224,49,33, 0.2);
}

.pricing-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.pricing-grid {
  align-items: stretch;
}

.pricing-grid > article {
  display: flex;
  flex-direction: column;
}

.pricing-grid > article > div[style*="flex:1"] {
  flex: 1;
  display: flex;
  flex-direction: column;
}
