/* ============================================
   Dany's Bakery & Grocery — Custom Styles
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  overflow-x: hidden;
}

/* ---- NAV ---- */
.nav {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(15, 15, 20, 0.95) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E86A4A;
  transition: width 0.25s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #E86A4A !important;
}

/* ---- HERO ---- */
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(15, 15, 20, 0.88) 0%,
    rgba(28, 28, 36, 0.75) 50%,
    rgba(15, 15, 20, 0.85) 100%
  );
}

/* ---- GEO SHAPES ---- */
.geo {
  animation: float 6s ease-in-out infinite;
}

.geo-2 { animation-delay: -1s; animation-duration: 8s; }
.geo-3 { animation-delay: -2s; animation-duration: 5s; }
.geo-5 { animation-delay: -3s; animation-duration: 7s; }
.geo-7 { animation-delay: -1.5s; animation-duration: 9s; }
.geo-9 { animation-delay: -2s; animation-duration: 10s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-18px) rotate(var(--rotate, 0deg)); }
}

.geo-2, .geo-7, .geo-11 { --rotate: 12deg; }
.geo-5 { --rotate: 45deg; }

/* ---- BUTTONS ---- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  position: relative;
  overflow: hidden;
}

/* ---- CARDS ---- */
.reveal-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reveal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ---- GALLERY ---- */
.gallery-img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- SCROLL REVEAL (progressive enhancement) ---- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-up.revealed,
  .reveal-left.revealed,
  .reveal-right.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ---- MOBILE MENU ---- */
.mobile-link {
  transition: color 0.2s ease;
}

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

::-webkit-scrollbar-track {
  background: #1C1C24;
}

::-webkit-scrollbar-thumb {
  background: #3F3F46;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #E86A4A;
}

/* ---- SELECTION ---- */
::selection {
  background: rgba(232, 106, 74, 0.3);
  color: #FFF0EC;
}

/* ---- FOCUS VISIBLE ---- */
:focus-visible {
  outline: 2px solid #E86A4A;
  outline-offset: 2px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .nav {
    background: rgba(15, 15, 20, 0.95);
  }

  h1 {
    font-size: 3.2rem !important;
  }

  .geo {
    display: none;
  }

  .geo-1, .geo-4 {
    display: block;
    position: absolute;
  }
}

@media (min-width: 641px) and (max-width: 767px) {
  h1 {
    font-size: 4.5rem !important;
  }
}
