/* ========================================
   Kaiser Health Plan A & B Pharmacy
   Custom Styles
======================================== */

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

/* Base text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
  background-color: #D4C4DF;
  color: #2D1737;
}

/* ========================================
   Floating Card Animations
======================================== */
.floating-card-1 {
  animation: float1 4s ease-in-out infinite;
}

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

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

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

/* ========================================
   Scroll Reveal (progressive enhancement)
   Default state: visible. JS adds animation.
======================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.revealed {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

  /* Staggered delays for grid children */
  .reveal:nth-child(1) { transition-delay: 0ms; }
  .reveal:nth-child(2) { transition-delay: 80ms; }
  .reveal:nth-child(3) { transition-delay: 160ms; }
  .reveal:nth-child(4) { transition-delay: 240ms; }
  .reveal:nth-child(5) { transition-delay: 320ms; }
  .reveal:nth-child(6) { transition-delay: 400ms; }
}

/* Fallback: always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   Navbar
======================================== */
.nav-scrolled {
  box-shadow: 0 1px 0 rgba(91, 44, 111, 0.06);
}

/* ========================================
   Mobile Menu
======================================== */
#mobileMenu {
  animation: slideDown 0.25s ease;
}

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

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #E8DFEF;
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========================================
   Image hover zoom
======================================== */
.aspect-\[4\/5\] img {
  transition: transform 0.6s ease;
}

.aspect-\[4\/5\]:hover img {
  transform: scale(1.03);
}

/* ========================================
   Subtle line decorations
======================================== */
.w-\[1px\] {
  background: linear-gradient(to bottom, transparent, rgba(91, 44, 111, 0.15), transparent);
}

/* ========================================
   Input autofill styling
======================================== */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* ========================================
   Focus visible for accessibility
======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7D4E9C;
  outline-offset: 2px;
  border-radius: 4px;
}

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