/* =========================================================
   Julia Kastner Kosmetik — styles.css
   ========================================================= */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Grain / noise overlay */
.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Material Symbols defaults */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.fill {
  font-variation-settings: 'FILL' 1;
}

/* =========================================================
   SCROLL ANIMATIONS
   ========================================================= */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
[data-animate="slide-left"]  { transform: translateX(-36px); }
[data-animate="slide-right"] { transform: translateX(36px); }
[data-animate="pop"]         { transform: scale(0.9); }
[data-animate="fade"]        { transform: none; }

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

/* Stagger delays */
[data-delay="1"] { transition-delay: 0.10s; }
[data-delay="2"] { transition-delay: 0.20s; }
[data-delay="3"] { transition-delay: 0.30s; }
[data-delay="4"] { transition-delay: 0.40s; }
[data-delay="5"] { transition-delay: 0.50s; }
[data-delay="6"] { transition-delay: 0.60s; }

@media (prefers-reduced-motion: reduce) {
  [data-animate],
  [data-animate].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   HEADER SHRINK ON SCROLL
   ========================================================= */
header {
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
header.scrolled {
  box-shadow: 0 2px 20px rgba(44, 36, 32, 0.06);
}
header.scrolled .header-inner {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

/* =========================================================
   ACTIVE NAV LINKS
   ========================================================= */
nav a {
  position: relative;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: #7e5354;
  transition: width 0.3s ease;
}
nav a.active {
  color: #7e5354 !important;
}
nav a.active::after,
nav a:hover::after {
  width: 100%;
}

/* =========================================================
   LOGO
   ========================================================= */
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
/* Makes the white background of the PNG disappear on light surfaces */
.logo-multiply {
  mix-blend-mode: multiply;
}
.logo-img-footer {
  height: 28px;
  width: auto;
  /* Invert dark mark → white on dark footer, then screen blends black away */
  filter: invert(1) brightness(2);
  opacity: 0.85;
}


/* =========================================================
   MOBILE MENU
   ========================================================= */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(252, 249, 244, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open {
  transform: translateY(0);
}
#mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  font-weight: 300;
  color: #2C2420;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}
#mobile-menu a:hover { color: #7e5354; }
#mobile-menu .mobile-cta {
  margin-top: 1rem;
  padding: 0.875rem 2.5rem;
  background: #7e5354;
  color: #fff;
  border-radius: 0.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s;
}
#mobile-menu .mobile-cta:hover { background: #B87F7F; }

/* Hamburger icon bars */
#hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 50;
  position: relative;
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #735a3f;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
#hamburger-btn.open .hamburger-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#hamburger-btn.open .hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
#hamburger-btn.open .hamburger-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =========================================================
   TESTIMONIAL CAROUSEL
   ========================================================= */
.carousel-track {
  position: relative;
  min-height: 200px;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #D9D1C7;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s ease;
}
.carousel-dot.active {
  background: #7e5354;
  width: 20px;
}

/* =========================================================
   FORM VALIDATION
   ========================================================= */
.field-error {
  display: none;
  font-size: 11px;
  color: #ba1a1a;
  margin-top: 4px;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
}
.field-error.visible { display: block; }

.form-input.error   { border-color: #ba1a1a !important; }
.form-input.success { border-color: #496547 !important; }

#form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 3rem 2rem;
  animation: fadeUp 0.6s ease both;
}
#form-success.show { display: flex; }
#contact-form.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Submit button states */
#submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
#submit-btn.loading .btn-label  { display: none; }
#submit-btn.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   SERVICE CARD HOVER ACCENT
   ========================================================= */
.service-card {
  position: relative;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: #7e5354;
  border-radius: 0.75rem 0.75rem 0 0;
  transition: width 0.4s ease;
}
.service-card:hover::before { width: 100%; }

/* =========================================================
   BUTTON RIPPLE
   ========================================================= */
.btn-ripple { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-anim 0.65s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(5); opacity: 0; }
}

/* =========================================================
   CURSOR DOT (desktop only)
   ========================================================= */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #7e5354;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.3s ease, background 0.2s ease;
  opacity: 0;
}
#cursor-dot.expanded {
  width: 24px; height: 24px;
  background: rgba(126, 83, 84, 0.15);
}
@media (hover: none) { #cursor-dot { display: none; } }

/* =========================================================
   BACK TO TOP
   ========================================================= */
#back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #7e5354;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 20px rgba(126, 83, 84, 0.35);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover { background: #B87F7F; }
