/* ============================================
   Andee's Custom Blended Ice Cream
   Custom Styles — fresh, airy, pastel + coral
   ============================================ */

/* ---- Base & Typography ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #FFB4A2;
  color: #292524;
}

/* ---- Scroll Reveal (progressive enhancement) ---- */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal.is-hidden {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Floating Animation ---- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}
@keyframes float-medium {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}
@keyframes float-fast {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(-10px) rotate(5deg); }
}

.animate-float-slow   { animation: float-slow 6s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 4.5s ease-in-out infinite; }
.animate-float-fast   { animation: float-fast 3.5s ease-in-out infinite; }

/* ---- Scroll Indicator ---- */
@keyframes scroll-indicator {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(400%); }
}

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

/* ---- Nav Link Underline ---- */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #E86B4F;
  border-radius: 9999px;
  transition: width 0.25s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---- Mobile Menu ---- */
.mobile-nav-link {
  display: block;
}

/* ---- Navbar Shadow on Scroll ---- */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ---- Image Hover Tilt ---- */
.group img {
  will-change: transform;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FFFCFA;
}
::-webkit-scrollbar-thumb {
  background: #FFB4A2;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #E86B4F;
}

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #E86B4F;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- 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;
  }
}

/* ---- Subtle Pattern Overlay (for cream sections) ---- */
.bg-cream-50::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E86B4F' fill-opacity='1'%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

/* ---- Input Autofill ---- */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #FFF8F3 inset !important;
  -webkit-text-fill-color: #292524 !important;
  transition: background-color 5000s ease-in-out 0s;
}
