/* ═══════════════════════════════════════════════════════
   SCAFA IMMOBILIEN GMBH — Dark Luxe Stylesheet
   Matching design system with scafa-investments.com
   Accent: Gold/Amber instead of Teal
   ═══════════════════════════════════════════════════════ */

/* ─── Base Reset & Globals ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #FBBF24 #0A0E17;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0E17; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FBBF24, #D97706);
  border-radius: 4px;
}

::selection {
  background: rgba(251, 191, 36, 0.3);
  color: #fff;
}


/* ─── Noise Texture Overlay ─── */
.noise-overlay {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}


/* ─── Hero Grid Background ─── */
.hero-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-grid::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(rgba(251, 191, 36, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 191, 36, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  animation: gridScroll 20s linear infinite;
}

.hero-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, transparent 0%, #0A0E17 70%);
}

@keyframes gridScroll {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}


/* ─── Animated Shimmer Text ─── */
.shimmer-text {
  background: linear-gradient(
    90deg,
    #FBBF24 0%,
    #4AEADC 30%,
    #6DC424 60%,
    #FBBF24 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerGradient 6s ease-in-out infinite;
}

@keyframes shimmerGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ─── Floating Particles ─── */
.particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #FBBF24;
  opacity: 0;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.4), 0 0 12px rgba(251, 191, 36, 0.15);
  animation: particleFloat var(--duration) ease-in-out var(--delay) infinite;
}

.particle--light {
  background: #FDE68A;
  box-shadow: 0 0 6px rgba(253, 230, 138, 0.4), 0 0 12px rgba(253, 230, 138, 0.15);
}

.particle--warm {
  background: #FCD34D;
  box-shadow: 0 0 6px rgba(252, 211, 77, 0.4), 0 0 12px rgba(252, 211, 77, 0.15);
}

@keyframes particleFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% { opacity: 0.35; }
  50% {
    opacity: 0.15;
    transform: translateY(-40px) scale(1);
  }
  80% { opacity: 0.35; }
}


/* ─── Buttons ─── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #FBBF24, #D97706);
  color: #0A0E17;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(251, 191, 36, 0.3),
    0 12px 32px rgba(251, 191, 36, 0.1);
}

.btn-gold:focus-visible { outline: 2px solid #FCD34D; outline-offset: 3px; }
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: transparent;
  color: #FBBF24;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.05);
  transform: translateY(-2px);
}

.btn-ghost:focus-visible { outline: 2px solid #FCD34D; outline-offset: 3px; }
.btn-ghost:active { transform: translateY(0); }


/* ─── Navigation ─── */
#nav {
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}

#nav.scrolled {
  background: rgba(10, 14, 23, 0.92);
  border-bottom-color: rgba(251, 191, 36, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: #FBBF24;
  transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

/* Hamburger */
.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.hamburger-lines span {
  display: block;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.hamburger-lines.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-lines.active span:nth-child(2) { opacity: 0; }
.hamburger-lines.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
  pointer-events: all;
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.mobile-nav-link {
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

.mobile-nav-link:hover { color: #FBBF24; }


/* ─── Scroll Indicator ─── */
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
  100% { transform: translateY(0); opacity: 1; }
}

.animate-scroll-dot { animation: scrollDot 2s ease-in-out infinite; }

.scroll-indicator { animation: fadeInUp 1s ease 1.2s both; }


/* ─── Glass Cards ─── */
.glass-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow:
    0 4px 8px rgba(251, 191, 36, 0.04),
    0 16px 40px rgba(0, 0, 0, 0.3);
}


/* ─── Tilt Card ─── */
.tilt-card {
  display: block;
  text-decoration: none;
  perspective: 600px;
}

.tilt-card .glass-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.tilt-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(251, 191, 36, 0.06), transparent 60%);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.tilt-card:hover .tilt-glow { opacity: 1; }


/* ─── Property Cards ─── */
.prop-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.4s ease, transform 0.4s ease;
}

.prop-card:hover {
  border-color: rgba(251, 191, 36, 0.2);
  transform: translateY(-4px);
}

.prop-card .prop-img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.prop-card:hover .prop-img {
  transform: scale(1.06);
}

.prop-card .prop-overlay {
  background: linear-gradient(to top, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.4) 50%, rgba(10, 14, 23, 0.05) 100%);
  transition: opacity 0.5s ease;
}

.prop-card .prop-detail {
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.prop-card:hover .prop-detail {
  transform: none;
  opacity: 1;
}


/* ─── Service Cards ─── */
.svc-card {
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.svc-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.svc-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(251, 191, 36, 0.12);
  transition: color 0.4s ease;
}

.svc-card:hover .svc-num {
  color: rgba(251, 191, 36, 0.25);
}


/* ─── Partner Cards ─── */
.partner-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #FBBF24;
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.partner-card:hover {
  border-left-color: #FCD34D;
  transform: translateY(-4px);
}

.partner-card--teal { border-left-color: #4AEADC; }
.partner-card--teal:hover { border-left-color: #7EF4E8; }

.partner-card--green { border-left-color: #6DC424; }
.partner-card--green:hover { border-left-color: #8AE040; }

/* Partner Card Tilt Support */
.tilt-card .partner-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* Partner Card Tilt Glow – Color Variants */
.tilt-glow--amber {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(251, 191, 36, 0.1), transparent 60%);
}

.tilt-glow--teal {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(74, 234, 220, 0.1), transparent 60%);
}

.tilt-glow--green {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(109, 196, 36, 0.1), transparent 60%);
}


/* ─── Form Inputs ─── */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #1A2332;
  border: 1px solid #2D3748;
  border-radius: 0.75rem;
  color: #E2E8F0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: #64748B; }

.form-input:focus {
  border-color: #FBBF24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

select.form-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select.form-input option {
  background: #1A2332;
  color: #E2E8F0;
}


/* ─── Reveal Animations ─── */
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

#hero .reveal-item {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) both;
}

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


/* ─── Section Glow Divider ─── */
.section-glow {
  width: 100%;
  height: 1px;
  position: relative;
  overflow: hidden;
}

.section-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #FBBF24 15%,
    #FCD34D 40%,
    #D97706 65%,
    #FBBF24 85%,
    transparent 100%
  );
  animation: sectionGlowSlide 8s linear infinite;
}

@keyframes sectionGlowSlide {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}


/* ─── Counter Glow ─── */
.counter-glow {
  animation: counterGlowPulse 1s ease-out;
}

@keyframes counterGlowPulse {
  0% { text-shadow: 0 0 12px rgba(251, 191, 36, 0.8), 0 0 30px rgba(251, 191, 36, 0.4), 0 0 60px rgba(251, 191, 36, 0.15); }
  50% { text-shadow: 0 0 6px rgba(251, 191, 36, 0.3), 0 0 15px rgba(251, 191, 36, 0.1); }
  100% { text-shadow: none; }
}


/* ─── Stat Card Animated Glow Border ─── */
.stat-card-animated {
  position: relative;
  overflow: hidden;
}

.stat-card-animated::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    rgba(251, 191, 36, 0.5) 8%,
    rgba(252, 211, 77, 0.85) 15%,
    rgba(251, 191, 36, 0.5) 22%,
    transparent 35%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderRotate 4s linear infinite;
  animation-delay: var(--anim-delay, 0s);
  pointer-events: none;
  z-index: 1;
}

@keyframes borderRotate {
  to { --border-angle: 360deg; }
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ─── Floating Animation ─── */
.stat-float {
  animation: statFloat 3.5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

@keyframes statFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ─── Stat Number Idle Glow ─── */
.stat-number-glow {
  animation: statNumberPulse 3s ease-in-out infinite;
  animation-delay: var(--glow-delay, 0s);
}

@keyframes statNumberPulse {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 25px rgba(251, 191, 36, 0.3), 0 0 50px rgba(251, 191, 36, 0.12), 0 0 80px rgba(251, 191, 36, 0.05); }
}

/* ─── Stat Label Shimmer ─── */
.stat-label-shimmer {
  background: linear-gradient(
    110deg,
    #94A3B8 0%,
    #94A3B8 35%,
    #FBBF24 50%,
    #94A3B8 65%,
    #94A3B8 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: labelShimmer 3.5s ease-in-out infinite;
  animation-delay: var(--shimmer-delay, 0s);
}

@keyframes labelShimmer {
  0%, 80%, 100% { background-position: 200% 50%; }
  40% { background-position: -50% 50%; }
}

/* ─── Stat Icon Pulse ─── */
.stat-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FBBF24;
  animation: iconDotPulse 1.8s ease-in-out infinite;
  animation-delay: var(--dot-delay, 0s);
}

@keyframes iconDotPulse {
  0%, 100% { opacity: 0.2; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); transform: scale(0.8); }
  50% { opacity: 1; box-shadow: 0 0 12px 5px rgba(251, 191, 36, 0.4), 0 0 25px 8px rgba(251, 191, 36, 0.1); transform: scale(1.3); }
}


/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal-item { opacity: 1; transform: none; }
  .particle { display: none; }
  .hero-grid::before { animation: none; }
  .shimmer-text { animation: none; background-position: 0% 50%; }
  .section-glow::before { animation: none; transform: translateX(-25%); }
  .counter-glow { animation: none; }
}


/* ─── Responsive ─── */
@media (max-width: 767px) {
  .partner-card { padding: 1.5rem; }
  .glass-card { padding: 1.5rem; }
}
