/* ===== CUSTOM STYLES ===== */

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

/* Fix for fixed header offset */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== HEADER ===== */
#site-header {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(125, 78, 148, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #af85c8, #f0a500);
  border-radius: 1px;
  transition: width 0.3s ease;
}

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

/* Mobile menu */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mobile-menu.open {
  display: block;
}

#mobile-menu.hidden {
  display: none;
}

.menu-line {
  display: block;
}

#mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.25rem;
}

/* ===== HERO FLOATING SHAPES ===== */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(175, 133, 200, 0.25), transparent 70%);
  top: 10%;
  right: -5%;
  animation-delay: 0s;
  animation-duration: 10s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.2), transparent 70%);
  bottom: 20%;
  left: 5%;
  animation-delay: -3s;
  animation-duration: 8s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(157, 97, 173, 0.2), transparent 70%);
  top: 30%;
  left: 10%;
  animation-delay: -5s;
  animation-duration: 12s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 219, 92, 0.3), transparent 70%);
  bottom: 30%;
  right: 15%;
  animation-delay: -2s;
  animation-duration: 9s;
}

.shape-5 {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(175, 133, 200, 0.3), transparent 70%);
  top: 60%;
  right: 30%;
  animation-delay: -7s;
  animation-duration: 11s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ===== SECTION LABELS ===== */
.section-label {
  position: relative;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #f0a500, #af85c8);
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 1px;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #af85c8, #f0a500);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 1;
}

/* ===== MOBILE NAV LINKS ===== */
.mobile-nav-link {
  position: relative;
  padding-left: 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, padding-left 0.2s;
}

.mobile-nav-link:hover {
  border-bottom-color: #e0d2ef;
  padding-left: 8px;
}

/* ===== REVEAL ANIMATIONS (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 768px) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: translate(0);
  }
}

/* ===== FORM STYLES ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d4e94' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== BUTTON HOVER GLOW ===== */
button[type="submit"]:hover {
  box-shadow: 0 8px 30px rgba(125, 78, 148, 0.3) !important;
}

/* ===== RESPONSIVE FINE-TUNING ===== */
@media (max-width: 639px) {
  .font-serif {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  section[id] {
    scroll-margin-top: 90px;
  }
}

/* ===== ACCESSIBILITY ===== */
@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;
  }
}

/* Focus visible for keyboard nav */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #af85c8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
  #site-header,
  .floating-shape,
  button {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
  }
}
