/* ===================================
   Bonjour Cafe — Tailwind Companion Stylesheet
   Only contains things Tailwind CDN cannot handle:
   background-images, keyframe animations, checkbox
   hack for hamburger, ::after pseudo-elements, etc.
   =================================== */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Background Images ---------- */
.hero-bg {
  background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.promo-bg {
  background: url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

/* ===================================
   NAVIGATION — Checkbox Hamburger Hack
   =================================== */

/* Hidden checkbox */
.nav-checkbox {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Hamburger icon — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 10;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Nav-link underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #d4a762;
  transition: width 0.3s ease;
}

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

/* ===================================
   MOBILE NAV (≤ 768px)
   =================================== */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: #1a1210;
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  }

  .nav-checkbox:checked ~ .nav-menu {
    right: 0;
  }

  /* Hamburger ➜ X animation */
  .nav-checkbox:checked ~ .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-checkbox:checked ~ .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-checkbox:checked ~ .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-link {
    font-size: 1.1rem;
  }
}

/* ===================================
   MASCOT — Clippy-style fixed corner
   =================================== */
.mascot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  cursor: pointer;

  /* Entrance with 3-second delay */
  opacity: 0;
  transform: translateY(60px) scale(0.6);
  animation: mascotEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 3s forwards;
}

@keyframes mascotEntrance {
  0%   { opacity: 0; transform: translateY(60px) scale(0.6); }
  60%  { opacity: 1; transform: translateY(-8px) scale(1.05); }
  80%  { transform: translateY(4px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.mascot__character {
  width: 90px;
  height: auto;
  animation: mascotBounce 3s ease-in-out infinite;
  animation-delay: 4s;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.mascot:hover .mascot__character {
  transform: scale(1.1) rotate(-4deg);
}

@keyframes mascotBounce {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-8px) rotate(2deg); }
  50%      { transform: translateY(-12px); }
  70%      { transform: translateY(-6px) rotate(-2deg); }
}

/* Steam animation */
.mascot__steam path {
  animation: steamRise 2.5s ease-in-out infinite;
}
.mascot__steam path:nth-child(2) { animation-delay: 0.4s; }
.mascot__steam path:nth-child(3) { animation-delay: 0.8s; }

@keyframes steamRise {
  0%   { opacity: 0; transform: translateY(4px); }
  50%  { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* Speech bubble — CSS-only hover */
.mascot__bubble {
  position: absolute;
  bottom: 110%;
  right: 0;
  width: 220px;
  background: #faf7f2;
  border: 2px solid #d4a762;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
  line-height: 1.45;
  color: #2c2420;

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
}

/* Speech bubble tail */
.mascot__bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 24px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #d4a762;
}

.mascot:hover .mascot__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mascot__bubble p {
  margin: 0;
}

/* Mascot — responsive (mobile) */
@media (max-width: 768px) {
  .mascot {
    bottom: 80px;
    right: 12px;
  }

  .mascot__character {
    width: 68px;
  }

  .mascot__bubble {
    width: 180px;
    font-size: 0.78rem;
    right: -8px;
  }
}
