/* ===== Base & Utilities ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #d6c2e0;
  color: #3d1e40;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ===== Custom Button Styles ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6B3A6E 0%, #7d528e 100%);
  color: #ffffff;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(107, 58, 110, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7d528e 0%, #6B3A6E 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary span,
.btn-primary svg {
  position: relative;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 58, 110, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #6B3A6E;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid #d6c2e0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f5f0f7;
  border-color: #ba9cc8;
  transform: translateY(-2px);
}

/* ===== Navbar ===== */
.nav {
  background: rgba(253, 248, 244, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(214, 194, 224, 0.3);
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(253, 248, 244, 0.95);
  box-shadow: 0 4px 30px rgba(107, 58, 110, 0.08);
}

.nav.scrolled .nav-link {
  color: #6B3A6E;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #FDF8F4 0%, #F5F0F7 50%, #FDF6E3 100%);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 420px;
    gap: 2rem;
  }
}

.hero-content {
  max-width: 600px;
}

/* Hero blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blob-float 8s ease-in-out infinite;
}

.hero-blob-1 {
  width: 400px;
  height: 400px;
  background: #d6c2e0;
  top: 10%;
  left: -5%;
  animation-delay: 0s;
}

.hero-blob-2 {
  width: 300px;
  height: 300px;
  background: #f5d99a;
  bottom: 10%;
  right: 30%;
  animation-delay: -3s;
}

.hero-blob-3 {
  width: 200px;
  height: 200px;
  background: #d6c2e0;
  top: 50%;
  left: 40%;
  animation-delay: -5s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Hero floating card */
.hero-float-card {
  animation: float 6s ease-in-out infinite;
}

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

/* Hero image animations */
.hero-img-main {
  animation: hero-img-in 1s ease-out both;
}

.hero-img-secondary {
  animation: hero-img-in 1s ease-out 0.3s both;
}

@keyframes hero-img-in {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Scroll indicator */
.animate-scroll-indicator {
  animation: scroll-down 1.5s ease-in-out infinite;
}

@keyframes scroll-down {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* ===== Service Cards ===== */
.service-card {
  position: relative;
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Back to Top ===== */
.back-to-top {
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(107, 58, 110, 0.4);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
  transform: translateY(-10px);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.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.5rem;
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

select {
  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='%236B3A6E' stroke-width='2' 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 1rem center;
  padding-right: 2.5rem;
}

/* ===== 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 { opacity: 1; transform: none; }
}

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid #6B3A6E;
  outline-offset: 2px;
}

/* ===== Print ===== */
@media print {
  .nav, .back-to-top, .mobile-menu { display: none !important; }
  body { background: white; color: black; }
  .hero { min-height: auto; padding: 2rem 0; }
}
