/* ============================================
   Nähstube & Änderungsschneiderei
   Premium Custom Styles — Enhanced UI/UX
   ============================================ */

/* ===== GLOBAL ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

*,
*::before,
*::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #C9A96E;
  color: white;
}

/* ===== CUSTOM CURSOR (desktop only) ===== */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid #C9A96E;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s,
                background 0.3s,
                opacity 0.3s;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    opacity: 0;
  }

  .custom-cursor.visible {
    opacity: 1;
  }

  .custom-cursor.hovering {
    width: 56px;
    height: 56px;
    background: rgba(201, 169, 110, 0.08);
    border-color: rgba(201, 169, 110, 0.6);
  }

  .custom-cursor.clicking {
    width: 24px;
    height: 24px;
    background: rgba(201, 169, 110, 0.2);
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #FEFCF9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #C9A96E, #B8944F);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #B8944F, #A07D3A);
}

/* ===== PAGE PRELOADER ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #FEFCF9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.6s;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #2C2C2C;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.preloader-logo span {
  color: #C9A96E;
}

.preloader-line {
  width: 120px;
  height: 1px;
  background: #F5F0EB;
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.preloader-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #C9A96E, #D4BA8A);
  border-radius: 1px;
  animation: preloaderSlide 1.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes preloaderSlide {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #C9A96E, #D4BA8A, #C9A96E);
  z-index: 9998;
  transition: width 0.05s linear;
}

/* ===== NAVBAR ===== */
.nav-link {
  position: relative;
  color: #2C2C2C;
  transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #C9A96E, transparent);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover {
  color: #C9A96E;
}

.nav-link:hover::after {
  width: 100%;
  left: 0%;
}

.nav-link.active {
  color: #C9A96E;
}

.nav-link.active::after {
  width: 100%;
  left: 0%;
}

/* Navbar scrolled state */
.navbar-scrolled {
  background: rgba(254, 252, 249, 0.80);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.05),
              0 0 0 1px rgba(201, 169, 110, 0.06);
}

/* Navbar CTA button shimmer */
.nav-cta {
  position: relative;
  overflow: hidden;
}

.nav-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s ease;
}

.nav-cta:hover::before {
  left: 100%;
}

/* ===== MOBILE MENU ===== */
.mobile-nav-link {
  color: #2C2C2C;
  opacity: 0;
  transform: translateY(30px) rotateX(-15deg);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: #C9A96E;
  transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
  width: 60%;
}

.mobile-menu-open .mobile-nav-link {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* Stagger in mobile nav items */
.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.17s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.24s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.31s; }
.mobile-menu-open .mobile-nav-link:nth-child(5) { transition-delay: 0.38s; }
.mobile-menu-open .mobile-nav-link:nth-child(6) { transition-delay: 0.45s; }

/* Hamburger animation */
.menu-open .menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  width: 1.75rem;
}

.menu-open .menu-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-open .menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.75rem;
}

/* ===== HERO ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceSlow {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(-10px) translateX(-50%); }
}

@keyframes scrollDot {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}

@keyframes revealText {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0% 0 0);
  }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(1deg); }
  66% { transform: translateY(6px) rotate(-0.5deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(10px) rotate(-1deg); }
  66% { transform: translateY(-8px) rotate(0.5deg); }
}

@keyframes goldShimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes rotateSlowly {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dashDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.3); }
  50% { box-shadow: 0 0 30px 8px rgba(201, 169, 110, 0.15); }
}

.animate-fade-in {
  animation: fadeIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-bounce-slow {
  animation: bounceSlow 3s ease-in-out infinite;
}

.animate-scroll-dot {
  animation: scrollDot 1.5s ease-in-out infinite;
}

.animate-float {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatReverse 7s ease-in-out infinite;
}

.animate-rotate-slow {
  animation: rotateSlowly 60s linear infinite;
}

.animation-delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animation-delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.animation-delay-600 {
  animation-delay: 0.6s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Gold shimmer text effect */
.gold-shimmer {
  background: linear-gradient(
    90deg,
    #C9A96E 0%,
    #E8D5A8 25%,
    #C9A96E 50%,
    #B8944F 75%,
    #C9A96E 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4s linear infinite;
}

/* ===== SCROLL-TRIGGERED ANIMATIONS ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scale-in variant */
[data-animate="scale"] {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate="scale"].is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Slide-left variant */
[data-animate="slide-left"] {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate="slide-left"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide-right variant */
[data-animate="slide-right"] {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate="slide-right"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children animation */
[data-animate]:nth-child(2) { transition-delay: 0.12s; }
[data-animate]:nth-child(3) { transition-delay: 0.24s; }
[data-animate]:nth-child(4) { transition-delay: 0.36s; }
[data-animate]:nth-child(5) { transition-delay: 0.48s; }
[data-animate]:nth-child(6) { transition-delay: 0.60s; }

/* ===== SECTION DECORATORS ===== */
.section-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C9A96E, transparent);
  margin: 0 auto 1rem;
}

.section-dot-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.section-dot-divider span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C9A96E;
  opacity: 0.4;
}

.section-dot-divider span:nth-child(2) {
  width: 6px;
  height: 6px;
  opacity: 0.7;
}

/* ===== MAGNETIC BUTTON ===== */
.magnetic-btn {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.magnetic-btn::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.3), transparent, rgba(201, 169, 110, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(8px);
}

.magnetic-btn:hover::after {
  opacity: 1;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #C9A96E, transparent);
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(201, 169, 110, 0.06) 0%,
    transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover::after {
  opacity: 1;
}

/* ===== PRICING CARDS ===== */
.pricing-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

.pricing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(201, 169, 110, 0.05) 0%,
    transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.pricing-card:hover::after {
  opacity: 1;
}

/* Featured pricing card glow */
.pricing-card-featured {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  line-height: 1;
  color: rgba(201, 169, 110, 0.06);
  pointer-events: none;
  transition: color 0.5s ease;
}

.testimonial-card:hover::before {
  color: rgba(201, 169, 110, 0.12);
}

/* ===== GALLERY ITEMS ===== */
.gallery-item {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.6s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  z-index: 2;
}

/* ===== TRUST ITEMS ===== */
.trust-item {
  position: relative;
}

.trust-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201, 169, 110, 0.2), transparent);
}

.trust-item:last-child::after {
  display: none;
}

/* ===== PROCESS SECTION ===== */
.process-step {
  position: relative;
}

.process-connector {
  position: absolute;
  top: 2rem;
  left: calc(100% - 1rem);
  width: calc(100% - 6rem);
  height: 1px;
  background: linear-gradient(90deg, #C9A96E, rgba(201, 169, 110, 0.2));
}

@media (max-width: 768px) {
  .process-connector {
    display: none;
  }
}

/* ===== FORM FOCUS STATES ===== */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.08);
}

/* Floating label effect */
.form-group {
  position: relative;
}

.form-group label {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Form error state */
.input-error {
  border-color: #EF4444 !important;
  animation: headShake 0.5s ease;
}

@keyframes headShake {
  0% { transform: translateX(0); }
  12.5% { transform: translateX(-6px); }
  37.5% { transform: translateX(5px); }
  62.5% { transform: translateX(-3px); }
  87.5% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

.input-error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

/* ===== WHATSAPP BUTTON PULSE ===== */
.whatsapp-btn {
  position: relative;
  z-index: 50;
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.3);
  animation: whatsappPulse 2s ease-in-out infinite;
  z-index: -1;
}

/* WhatsApp tooltip */
.whatsapp-btn .whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  background: #2C2C2C;
  color: white;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.whatsapp-btn .whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #2C2C2C;
}

.whatsapp-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@keyframes whatsappPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 0; }
}

/* ===== PARALLAX ===== */
.parallax-hero {
  will-change: transform;
}

/* ===== HERO DECORATIVE ELEMENTS ===== */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
}

.hero-orb-1 {
  top: 10%;
  right: 5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.08), transparent 70%);
  animation: floatSlow 10s ease-in-out infinite;
}

.hero-orb-2 {
  bottom: 10%;
  left: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.06), transparent 70%);
  animation: floatReverse 12s ease-in-out infinite;
}

.hero-orb-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.04), transparent 70%);
  animation: floatSlow 15s ease-in-out infinite;
}

/* Hero thread decoration */
.hero-thread {
  position: absolute;
  width: 200px;
  height: 200px;
  opacity: 0.06;
  animation: rotateSlowly 80s linear infinite;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: goldShimmer 6s linear infinite;
}

/* ===== RESPONSIVE FINE-TUNING ===== */
@media (max-width: 640px) {
  .font-heading {
    word-break: break-word;
  }

  .custom-cursor {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .trust-item::after {
    display: none;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }

  .custom-cursor {
    display: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .whatsapp-btn,
  #back-to-top,
  #navbar,
  .preloader,
  .scroll-progress,
  .custom-cursor {
    display: none !important;
  }
}

/* ====== Pilz SECTION ====== */
.pilz {
    padding: 80px 0;
}

.pilz-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.pilz-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pilz-logo {
  background-color: #04416a;
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.pilz-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.pilz-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.pilz-benefits {
    list-style: none;
    padding: 0;
}

.pilz-benefits li {
    padding: 0.8rem 0;
    color: var(--text-light);
    font-weight: 500;
    border-bottom: 1px solid var(--light-bg);
}

.pilz-benefits li:last-child {
    border-bottom: none;
}

.pilz-benefits li::before {
    content: '';
    color: var(--primary-color);
}