/* ============================================
   Mocca Cafe — Custom Styles
   ============================================ */

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: color-mix(in srgb, #3d8b3d 30%, transparent);
  color: #1c451c;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
  background: #b8d4b8;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8fbd8f;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #fdf9ee 0%, #f0f5f0 50%, #faf8f5 100%);
  min-height: 100vh;
}

/* Card breathe animation */
.card-breathe {
  transform: translateY(0);
}
.card-breathe:hover {
  transform: translateY(-4px);
}

/* Nav scroll state */
.nav-scrolled {
  box-shadow: 0 1px 20px rgba(28, 69, 28, 0.06);
}

/* Mobile menu */
.mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Reveal animations — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #3d8b3d;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth image loading */
img {
  background-color: color-mix(in srgb, #d9e8d9 30%, transparent);
}

/* Subtle pattern overlay for hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, #3d8b3d 5%, transparent) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.4;
  pointer-events: none;
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

/* Button ripple effect */
button, a {
  position: relative;
  overflow: visible;
}

/* Print styles */
@media print {
  .nav-scrolled, .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
}
