/* ===== Load animations (hero — on page load) ===== */

.load-fade-up {
  opacity: 0;
  animation: loadFadeUp 0.8s ease forwards;
}

.load-fade-up[data-delay="2"] { animation-delay: 0.25s; }
.load-fade-up[data-delay="3"] { animation-delay: 0.5s; }
.load-fade-up[data-delay="4"] { animation-delay: 0.75s; }

@keyframes loadFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Scroll-triggered animations ===== */

[data-animate] {
  opacity: 0;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: none !important;
}

[data-animate="fade-up"]    { transform: translateY(44px); }
[data-animate="fade-left"]  { transform: translateX(-44px); }
[data-animate="fade-right"] { transform: translateX(44px); }
[data-animate="fade-in"]    { transform: translateY(0); }

[data-delay="1"] { transition-delay: 0.05s; }
[data-delay="2"] { transition-delay: 0.15s; }
[data-delay="3"] { transition-delay: 0.25s; }
[data-delay="4"] { transition-delay: 0.35s; }
[data-delay="5"] { transition-delay: 0.45s; }
[data-delay="6"] { transition-delay: 0.55s; }

/* ===== Scroll indicator ===== */

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--primary-color);
  font-size: 2.4rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 13;
  opacity: 0;
  animation: scrollIndicatorIn 0.6s ease 1.4s forwards;
}

.scroll-indicator i {
  animation: iconBounce 2s ease 2s infinite;
}

@keyframes scrollIndicatorIn {
  to { opacity: 0.6; }
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(10px); }
}

/* ===== Section header ===== */

.section-header {
  width: 100%;
  text-align: center;
  padding-top: 4rem;
}

.section-header .big-header-text {
  margin-bottom: 0;
}

.section-line {
  width: 48px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  margin: 0.8rem auto 2.5rem;
}

/* ===== Background settings panel ===== */

.bg-settings-wrap {
  position: fixed;
  bottom: 2.6rem;
  left: 1.6rem;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.bg-settings-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--sidebar-color);
  color: var(--text-color);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: all 0.2s ease;
  opacity: 0.5;
}

.bg-settings-toggle:hover {
  opacity: 1;
  color: var(--primary-color);
}

.bg-settings-panel {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--sidebar-color);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.8rem;
  padding: 0.8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
  min-width: 130px;
  margin-bottom: 0.3rem;
}

.bg-settings-panel.open {
  display: flex;
}

.bg-particle-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

body.dark .bg-particle-controls {
  border-top-color: rgba(255,255,255,0.07);
}

.bg-particle-controls.hidden {
  display: none;
}

.bg-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bg-slider-label {
  font-size: 0.72rem;
  color: var(--text-color);
  min-width: 36px;
}

.bg-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--toggle-color);
  outline: none;
  cursor: pointer;
}

.bg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.bg-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.bg-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  cursor: pointer;
}

.bg-settings-hint {
  font-size: 0.68rem;
  color: var(--text-color);
  opacity: 0.7;
  line-height: 1.4;
  padding: 0 0.2rem 0.4rem;
}

.bg-settings-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-color);
  opacity: 0.5;
  margin-bottom: 0.2rem;
  padding: 0 0.2rem;
}

.bg-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  text-align: left;
}

.bg-option:hover {
  background: var(--primary-color-light);
  color: var(--primary-color);
}

.bg-option.active {
  background: var(--primary-color-light);
  color: var(--primary-color);
  font-weight: 600;
}

/* ===== Typing animation ===== */

.typing-cursor {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 300;
  animation: cursorBlink 0.75s step-end infinite;
  margin-left: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== Foto Tilt-Effekt ===== */

.image-box img {
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* ===== Respect reduced motion ===== */

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  .load-fade-up,
  .scroll-indicator,
  .scroll-indicator i,
  .typing-cursor {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
