/* Google-Fonts-Import bewusst NICHT hier per @import — @import blockiert das Parsen
   des Rests dieser Datei, bis die importierte Font-CSS aufgelöst ist, und wird vom
   Browser-Preload-Scanner erst entdeckt, nachdem base.css selbst komplett geladen wurde
   (ein zusätzlicher, serialisierter Round-Trip statt parallelem Laden). Stattdessen als
   direktes <link> in dashboard/includes/head.php bzw. includes/public-header.php geladen,
   damit der Browser es sofort parallel zu den anderen Stylesheets abrufen kann — das war
   die Ursache für ein mehrsekündiges Flackern/verzögertes Rendering bei jedem Seitenaufruf. */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-bg);
}

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

body {
  position: relative;
  margin: 0;
  min-block-size: 100svh;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

.ambient-bg,
.site-header,
.nav-mobile,
main,
.site-footer {
  position: relative;
}

.ambient-bg {
  z-index: 0;
}

.site-header,
.nav-mobile,
main,
.site-footer {
  z-index: 1;
}

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

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-primary-light);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-block: 0;
}

h1 {
  font-size: var(--font-size-display);
  font-weight: 400;
  line-height: var(--line-height-display);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: 500;
}

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

p {
  margin-block: 0 1em;
}

p:last-child {
  margin-block-end: 0;
}

ul,
ol {
  margin: 0;
  padding-inline-start: 1.25em;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--space-sm);
  z-index: 9999;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  inset-block-start: var(--space-sm);
}

.container {
  width: min(100% - var(--space-gutter) * 2, var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - var(--space-gutter) * 2, var(--max-width-narrow));
}

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

.section--surface {
  background: linear-gradient(
    168deg,
    rgb(var(--color-surface-rgb) / 0.62) 0%,
    rgb(var(--color-surface-elevated-rgb) / 0.48) 100%
  );
  backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.15);
}

.section--depth {
  background: linear-gradient(
    165deg,
    rgb(var(--color-primary-rgb) / 0.06) 0%,
    transparent 42%,
    rgb(var(--color-primary-rgb) / 0.03) 100%
  );
  border-block: 1px solid transparent;
  border-image: linear-gradient(
    to right,
    transparent,
    var(--color-border-strong) 20%,
    var(--color-primary) 50%,
    var(--color-border-strong) 80%,
    transparent
  ) 1;
}

.section--depth:nth-of-type(even) {
  background: linear-gradient(
    195deg,
    transparent 0%,
    rgb(var(--color-primary-rgb) / 0.05) 38%,
    rgb(var(--color-primary-rgb) / 0.08) 100%
  );
}

.section--ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgb(var(--color-primary-rgb) / 0.06), transparent 55%),
    radial-gradient(ellipse 45% 40% at 85% 80%, rgb(var(--color-primary-rgb) / 0.04), transparent 50%);
  opacity: 0.85;
  animation: section-ambient-drift var(--duration-ambient) var(--ease-ambient) infinite alternate;
}

.section--ambient > .container {
  position: relative;
  z-index: 1;
}

@keyframes section-ambient-drift {
  0% {
    opacity: 0.65;
    transform: scale(1) translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: scale(1.03) translate(-1.5%, -1%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section--ambient::after {
    animation: none;
    opacity: 0.75;
  }
}

@media (prefers-contrast: more) {
  .section--ambient::after {
    display: none;
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-block-end: var(--space-sm);
}

.eyebrow::before {
  content: "";
  flex-shrink: 0;
  inline-size: 2rem;
  block-size: 1px;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent-muted));
}

.section-header--center .eyebrow {
  justify-content: center;
}

.section-header--center .eyebrow::before {
  display: none;
}

.section-header {
  margin-block-end: var(--space-xl);
  max-width: 38rem;
}

.section-header h2 {
  line-height: var(--line-height-display);
  margin-block-end: var(--space-sm);
}

.section-header p {
  line-height: 1.75;
  font-size: var(--font-size-lg);
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
  opacity: 0.88;
}

.text-gradient {
  background: linear-gradient(
    120deg,
    var(--color-primary-light) 0%,
    var(--color-primary) 45%,
    var(--color-primary-dark) 90%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-gradient-shift 8s var(--ease-ambient) infinite alternate;
}

@keyframes text-gradient-shift {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 100% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-gradient {
    animation: none;
    background-position: 0% center;
  }
}

.text-gold {
  color: var(--color-primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-footer-cta {
  text-align: center;
  margin-block-start: var(--space-xl);
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: var(--font-size-sm);
}

.empty-state {
  text-align: center;
  padding-block: var(--space-xl);
}

.form-error,
.field-error {
  color: #f87171;
}

.form-error {
  margin-block-end: var(--space-md);
}

.form-success {
  color: var(--color-success);
  margin-block-end: var(--space-md);
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
