/* ===== Custom Styles for Coast to Coast Body Art Studio ===== */

/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

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

::-webkit-scrollbar-track {
  background: #0a0f0d;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #059669, #047857);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #10b981, #059669);
}

/* ===== Navigation ===== */
#navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
  background: rgba(10, 15, 13, 0.92);
  border-bottom: 1px solid rgba(52, 211, 153, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar:not(.scrolled) {
  background: rgba(10, 15, 13, 0.6);
}

/* Mobile menu animation */
#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

.menu-line:nth-child(1) {
  transform-origin: center;
}

.menu-line:nth-child(2) {
  transform-origin: center;
}

.menu-line:nth-child(3) {
  transform-origin: center;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile link animation */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* ===== Hero Floating Cards ===== */
@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

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

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

@keyframes float4 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-0.5deg); }
}

.card-float-1 {
  animation: float1 5s ease-in-out infinite;
}

.card-float-2 {
  animation: float2 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.card-float-3 {
  animation: float3 4.5s ease-in-out infinite;
  animation-delay: 1s;
}

.card-float-4 {
  animation: float4 5.5s ease-in-out infinite;
  animation-delay: 0.3s;
}

/* ===== Service Cards ===== */
.service-card {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              box-shadow 0.5s ease,
              border-color 0.5s ease;
}

.service-card:hover {
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.1);
}

/* ===== Gallery Items ===== */
.gallery-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  border-color: rgba(52, 211, 153, 0.4);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* Respect reduced motion preference */
@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-hidden {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== Button Ripple Effect ===== */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* ===== Selection Color ===== */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #fdfcfa;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
  .font-display {
    word-break: keep-all;
  }
}

@media (min-width: 768px) {
  /* Subtle parallax-like effect on scroll for hero */
  #hero {
    will-change: transform;
  }
}

/* ===== Utility: Gradient Text Fallback ===== */
.text-transparent.bg-clip-text {
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Loading State for Form ===== */
button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== Focus Visible for Accessibility ===== */
:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* ===== Image Loading Placeholder ===== */
img {
  background: linear-gradient(135deg, #111a14 0%, #162019 100%);
  min-height: 4rem;
}
