/* ============================================
   Pearls In the Pines — Custom Styles
   ============================================ */

/* Base resets and custom properties */
:root {
  --color-charcoal-900: #1A1D20;
  --color-charcoal-800: #2C3035;
  --color-charcoal-700: #3D4249;
  --color-charcoal-600: #5A6069;
  --color-coral: #E06050;
  --color-coral-light: #F4A89A;
  --color-coral-dark: #C44D3F;
}

/* Smooth transitions for all interactive elements */
a, button, .group {
  transition: all 0.2s ease-out;
}

/* Selection color */
::selection {
  background-color: var(--color-coral);
  color: #ffffff;
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
  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; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Navbar scroll state */
.navbar-scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Custom image loading placeholder */
img {
  background-color: var(--color-charcoal-800);
}

/* Subtle hover lift for cards */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Coral accent line animation */
.accent-line {
  position: relative;
  display: inline-block;
}

.accent-line::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-coral);
  transition: width 0.3s ease;
}

.accent-line:hover::after {
  width: 100%;
}

/* Hero image gradient overlay */
.hero-image-overlay {
  position: relative;
}

.hero-image-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(224, 96, 80, 0.1) 100%);
  pointer-events: none;
}

/* Form styles */
input, textarea {
  background-color: var(--color-charcoal-800);
  border: 1px solid var(--color-charcoal-700);
  color: var(--color-white);
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-coral);
  box-shadow: 0 0 0 3px rgba(224, 96, 80, 0.2);
}

input::placeholder, textarea::placeholder {
  color: var(--color-charcoal-600);
}

/* Success message */
.success-message {
  display: none;
  background-color: rgba(224, 96, 80, 0.1);
  border: 1px solid var(--color-coral);
  color: var(--color-coral-light);
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 16px;
  font-weight: 500;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

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

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

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

#mobile-menu.hidden {
  animation: slideUp 0.2s ease-in;
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 500px;
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}
