/* ==========================================================================
   Brew Haven — style.css
   Minimal custom CSS. Tailwind handles layout/utility classes;
   this file only covers: keyframe animations, the signature "pour" divider,
   and small component styles that are cleaner as reusable classes.
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

body {
  cursor: default;
}

::selection {
  background: #D4AF37;
  color: #0D0D0D;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0D0D0D; }
::-webkit-scrollbar-thumb { background: #6F4E37; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #C68B59; }

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #D4AF37;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
#navbar.scrolled #navInner {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

#navbar.scrolled {
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(248, 245, 242, 0.06);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 1px;
  background: #D4AF37;
  transition: width 0.35s ease;
}
.nav-link:hover {
  color: #F8F5F2;
}
.nav-link:hover::after {
  width: 100%;
}

.mobile-link {
  color: rgba(248, 245, 242, 0.75);
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.mobile-link:hover {
  color: #D4AF37;
  padding-left: 6px;
}

/* ==========================================================================
   Signature element: the "pour" divider
   A hand-poured gold line that runs between major sections —
   echoes "Every Cup Tells a Story" as a continuous thread down the page.
   ========================================================================== */
.pour-divider {
  position: relative;
  height: 90px;
  width: 100%;
  background:
    radial-gradient(ellipse at center, rgba(212,175,55,0.06) 0%, transparent 70%);
}
.pour-divider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #D4AF37 35%, #C68B59 65%, transparent);
  transform: translateX(-50%);
  opacity: 0.6;
}
.pour-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D4AF37;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px 2px rgba(212,175,55,0.6);
  animation: pourDrip 3.2s ease-in-out infinite;
}

@keyframes pourDrip {
  0%   { top: 10%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

/* ==========================================================================
   Floating / steam animations
   ========================================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-16px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50%      { transform: translateY(-10px) translateX(6px); }
}
.animate-float-slow { animation: floatSlow 7s ease-in-out infinite; }

.steam {
  display: block;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(248,245,242,0.5), transparent);
  animation: steamRise 2.4s ease-in-out infinite;
  filter: blur(1px);
}
.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.6s; }
.steam-3 { animation-delay: 1.2s; }

@keyframes steamRise {
  0%   { transform: translateY(0) scaleY(1); opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translateY(-34px) scaleY(1.6); opacity: 0; }
}

/* ==========================================================================
   Scroll reveal (driven by JS adding .in-view)
   ========================================================================== */
[data-anim] {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-anim="fade-up"] { transform: translateY(36px); }
[data-anim="zoom"]    { transform: scale(0.88); }
[data-anim].in-view   { opacity: 1; transform: translateY(0) scale(1); }

/* ==========================================================================
   Buttons — ripple effect
   ========================================================================== */
.btn-ripple { isolation: isolate; }
.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.65s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(2.6); opacity: 0; }
}

/* ==========================================================================
   Category cards
   ========================================================================== */
.cat-card {
  position: relative;
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  height: 280px;
  border: 1px solid rgba(248,245,242,0.08);
}
.cat-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.5s ease;
  filter: grayscale(35%) brightness(0.75);
}
.cat-card:hover img { transform: scale(1.08); filter: grayscale(0%) brightness(0.9); }
.cat-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.95) 10%, rgba(13,13,13,0.1) 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
}
.cat-card-overlay p {
  color: rgba(248,245,242,0.55);
  font-size: 0.82rem;
  font-weight: 300;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Menu tabs
   ========================================================================== */
.menu-tab {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(248,245,242,0.12);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(248,245,242,0.6);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.menu-tab:hover { border-color: rgba(212,175,55,0.5); color: #F8F5F2; }
.menu-tab.active {
  background: #D4AF37;
  border-color: #D4AF37;
  color: #0D0D0D;
  font-weight: 600;
}

/* ==========================================================================
   Product card
   ========================================================================== */
.product-card {
  background: #0D0D0D;
  border: 1px solid rgba(248,245,242,0.08);
  border-radius: 1.1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), border-color 0.45s ease, box-shadow 0.45s ease;
}
.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212,175,55,0.35);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
}
.product-card .img-wrap { position: relative; height: 200px; overflow: hidden; }
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.product-card:hover .img-wrap img { transform: scale(1.1); }

.fav-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(13,13,13,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(248,245,242,0.15);
  font-size: 0.95rem;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  color: rgba(248,245,242,0.7);
}
.fav-btn:hover { transform: scale(1.12); border-color: #D4AF37; }
.fav-btn.active { color: #D4AF37; border-color: #D4AF37; background: rgba(212,175,55,0.12); }

.badge-pill {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #D4AF37;
  color: #0D0D0D;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid rgba(248,245,242,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.qty-control button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: #F8F5F2;
  transition: background 0.25s ease, color 0.25s ease;
}
.qty-control button:hover { background: #D4AF37; color: #0D0D0D; }
.qty-control span { width: 26px; text-align: center; font-size: 0.85rem; }

.stars { color: #D4AF37; letter-spacing: 1px; font-size: 0.78rem; }

/* ==========================================================================
   Why choose us cards
   ========================================================================== */
.why-card {
  background: #0D0D0D;
  border: 1px solid rgba(248,245,242,0.08);
  border-radius: 1.1rem;
  padding: 2rem 1.6rem;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.why-card:hover { transform: translateY(-6px); border-color: rgba(212,175,55,0.35); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-item {
  position: relative;
  border-radius: 0.9rem;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.5s ease;
  filter: grayscale(25%);
}
.gallery-item::after {
  content: "🔍";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,13,13,0.45);
  opacity: 0;
  transition: opacity 0.4s ease;
  font-size: 1.3rem;
}
.gallery-item:hover img { transform: scale(1.12); filter: grayscale(0%); }
.gallery-item:hover::after { opacity: 1; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.testimonial-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.testimonial-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(248,245,242,0.2);
  transition: all 0.3s ease;
}
.testimonial-dot.active { background: #D4AF37; width: 24px; }

/* ==========================================================================
   Baristas
   ========================================================================== */
.barista-card {
  background: #171717;
  border: 1px solid rgba(248,245,242,0.08);
  border-radius: 1.1rem;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.barista-card:hover { transform: translateY(-6px); border-color: rgba(212,175,55,0.35); }
.barista-card img { width: 100%; height: 220px; object-fit: cover; filter: grayscale(40%); transition: filter 0.5s ease; }
.barista-card:hover img { filter: grayscale(0%); }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-item {
  border: 1px solid rgba(248,245,242,0.1);
  border-radius: 0.9rem;
  overflow: hidden;
  background: #171717;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.3rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.02rem;
  color: #F8F5F2;
}
.faq-icon {
  color: #D4AF37;
  font-size: 1.2rem;
  transition: transform 0.35s ease;
  margin-left: 1rem;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.45s ease;
  padding: 0 1.5rem;
}
.faq-answer p {
  color: rgba(248,245,242,0.55);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.7;
  padding-bottom: 1.3rem;
}
.faq-item.open .faq-answer { max-height: 220px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-input {
  width: 100%;
  background: #0D0D0D;
  border: 1px solid rgba(248,245,242,0.15);
  border-radius: 0.75rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  color: #F8F5F2;
  outline: none;
  transition: border-color 0.3s ease;
}
.form-input::placeholder { color: rgba(248,245,242,0.25); }
.form-input:focus { border-color: #D4AF37; }
.form-input.error { border-color: #c0564f; }
.form-error {
  color: #c0564f;
  font-size: 0.74rem;
  margin-top: 0.4rem;
  min-height: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.social-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid rgba(248,245,242,0.15);
  border-radius: 50%;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(248,245,242,0.6);
  transition: all 0.3s ease;
}
.social-icon:hover { border-color: #D4AF37; color: #D4AF37; transform: translateY(-3px); }

/* ==========================================================================
   Loader exit
   ========================================================================== */
#loader.loaded {
  opacity: 0;
  pointer-events: none;
}

/* Cart item enter */
.cart-item-row {
  animation: fadeUpIn 0.4s ease both;
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Toast / badge pulse on cart add */
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.pop { animation: pop 0.35s ease; }