/* Shared Components für die Sub-Pages (leistungen, ueber-uns, kontakt).
 * Wird von jeder Sub-Page via <link rel="stylesheet" href="assets/css/pages.css"> geladen.
 * index.html und stage.html nutzen den Inline-Style-Block (kein Refactoring im Bestand). */

/* ---------- Root + page-transition ---------- */
html { background-color: var(--bg-page); }
body { background-color: var(--bg-page); color: #fff; }

/* Lange Wörter (DE-Komposita wie „Weiterentwicklung") auf schmalen Screens umbrechen statt überlaufen */
h1, h2, h3 { overflow-wrap: break-word; }

#page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-page);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ---------- Section-Content Scroll-Reveal ---------- */
.section-content {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-content.in-view {
  opacity: 1;
  transform: translateY(0);
}
.section-content.delay-1 { transition-delay: 0.1s; }
.section-content.delay-2 { transition-delay: 0.2s; }
.section-content.delay-3 { transition-delay: 0.3s; }
.section-content.delay-4 { transition-delay: 0.4s; }
.section-content.delay-5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .section-content {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Surface — Pills, Badges, Cards, Frames ---------- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ---------- Interactive Surface — Buttons, Icon-Wrapper ---------- */
.liquid-glass-strong {
  background: rgba(20, 20, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 24px -6px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

button.liquid-glass-strong:hover,
a.liquid-glass-strong:hover,
label.liquid-glass-strong:hover {
  background: rgba(28, 28, 30, 0.78);
  border-color: rgba(255, 255, 255, 0.2);
}

button.liquid-glass-strong:active,
a.liquid-glass-strong:active {
  background: rgba(16, 16, 18, 0.85);
}

button.liquid-glass-strong:focus-visible,
a.liquid-glass-strong:focus-visible,
label.liquid-glass-strong:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

/* ---------- Spotlight-Card (Mouse-Tracking) ---------- */
.card-spotlight {
  position: relative;
  border: 1px solid var(--border-card);
  background-color: var(--bg-card);
  overflow: hidden;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(255, 255, 255, 0.25);
}
.card-spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 80%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.card-spotlight:hover::before,
.card-spotlight:focus-within::before {
  opacity: 0.6;
}
.card-spotlight > * {
  position: relative;
  z-index: 1;
}

/* ---------- Page-Circuit-Board ----------
 * Wird per JS (assets/js/page-circuit.js) mit einem Canvas befüllt, das das
 * gleiche PCB-Layout wie auf index.html zeigt (animierte Pulses entlang
 * Manhattan-Routings). prefers-reduced-motion → statisches Gradient. */
#page-circuit {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
