/* ===== Base & Utilities ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #f9cfd9;
  color: #800020;
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(254, 252, 248, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(128, 0, 32, 0.08), 0 4px 24px rgba(128, 0, 32, 0.06);
}

/* ===== Mobile Menu ===== */
#mobile-menu.show .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu.show .menu-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu.show .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Floating Card Animations ===== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-8px) translateX(4px); }
}

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

.floating-card-1 {
  animation: float-slow 4s ease-in-out infinite;
}

.floating-card-2 {
  animation: float-medium 5s ease-in-out infinite;
}

.floating-card-3 {
  animation: float-fast 3.5s ease-in-out infinite;
}

/* ===== 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, #800020, #ff7491);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.service-card:hover {
  transform: translateY(-4px);
}

/* ===== Scroll Reveal ===== */
.reveal {
  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);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Button Ripple ===== */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ===== Area Tags ===== */
.area-tag {
  position: relative;
  overflow: hidden;
}

.area-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.03), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.area-tag:hover::after {
  opacity: 1;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #fefcf8;
}

::-webkit-scrollbar-thumb {
  background: #f9cfd9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #f4a3b8;
}

/* ===== Form Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* ===== Selection highlight on hero text ===== */
h1::selection,
h2::selection {
  background: #f9cfd9;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
  .floating-card-3 {
    display: none;
  }

  .floating-card-1 {
    -left: 4px;
    top: -4px;
  }

  .floating-card-2 {
    -right: 4px;
    bottom: -2px;
  }
}

@media (min-width: 641px) and (max-width: 767px) {
  .floating-card-3 {
    display: none;
  }
}
