/* ========================================
   Custom Styles - Alexander Hüsgen
   Dark background with white card accents
   ======================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

::selection {
  background-color: rgba(139, 92, 246, 0.3);
  color: #fff;
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-hero {
  background: linear-gradient(135deg, #c084fc, #818cf8, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---- Light Card (white on dark) ---- */
.light-card {
  background: #e4e7ed;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.light-card:hover {
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.12), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ---- Dark Card (for arbeitsweise section) ---- */
.dark-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.dark-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---- Navigation ---- */
.nav-transparent {
  background: transparent;
}

.nav-transparent .nav-link {
  color: rgba(255, 255, 255, 0.6);
}

.nav-transparent .nav-link:hover {
  color: #fff;
}

.nav-scrolled {
  background: rgba(8, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-scrolled .nav-link {
  color: rgba(255, 255, 255, 0.6);
}

.nav-scrolled .nav-link:hover {
  color: #fff;
}

/* ---- Hero Glow ---- */
.hero-glow {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124, 58, 237, 0.1) 0%, transparent 70%),
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.04) 0%, transparent 40%);
}

/* ---- 3D Pyramid (true triangular pyramid) ---- */
.pyr-scene {
  perspective: 1200px;
  perspective-origin: 50% 48%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 520px;
}

.pyr-scale {
  transform-style: preserve-3d;
}

.pyr-spinner {
  position: relative;
  width: 660px;
  height: 470px;
  transform-style: preserve-3d;
  animation: pyramidSpin 25s linear infinite;
}

@keyframes pyramidSpin {
  from { transform: rotateX(-15deg) rotateY(0deg); }
  to   { transform: rotateX(-15deg) rotateY(-360deg); }
}

.pyr-face-tri {
  backface-visibility: visible;
}

.pyr-band {
  border-bottom: 2px solid rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.pyr-band-label {
  color: #fff;
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  text-align: center;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .pyr-scale { transform: scale(0.55); }
  .pyr-scene { min-height: 320px; }
}

@media (max-width: 640px) {
  .pyr-scale { transform: scale(0.38); }
  .pyr-scene { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .pyr-spinner { animation: none; transform: rotateX(-15deg) rotateY(-30deg); }
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-fade-in-delay-1 { opacity: 0; animation: fadeIn 0.8s ease-out 0.15s forwards; }
.animate-fade-in-delay-2 { opacity: 0; animation: fadeIn 0.8s ease-out 0.3s forwards; }
.animate-fade-in-delay-3 { opacity: 0; animation: fadeIn 0.8s ease-out 0.5s forwards; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Service Cards ---- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ---- Project Cards ---- */
.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.project-card:hover::after {
  transform: scaleX(1);
}

/* ---- Form ---- */
#contact-form button[type="submit"] {
  position: relative;
  overflow: hidden;
}

#contact-form button[type="submit"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

#contact-form button[type="submit"]:active::after {
  width: 300px;
  height: 300px;
}

/* ---- Mobile Menu ---- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  display: block;
  max-height: 400px;
}

/* ---- General ---- */
a { transition: color 0.2s ease; }
img { max-width: 100%; height: auto; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #080e1a; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.4); }

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .animate-fade-in, .animate-fade-in-delay-1, .animate-fade-in-delay-2, .animate-fade-in-delay-3 {
    animation: none;
    opacity: 1;
  }
  .gradient-text-hero { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .service-card:hover { transform: none; }
  .service-card::before, .project-card::after { transition: none; }
}
