/* ============================================
   24hr Cigar Lounge — Custom Styles
   ============================================ */

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

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

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

/* Selection color */
::selection {
  background-color: rgba(184, 84, 70, 0.2);
  color: inherit;
}

/* ============================================
   Animations
   ============================================ */

/* Hero entrance animations — above the fold, always visible */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 1.2s ease forwards;
}

/* Scroll reveal — below the fold only, progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
  
  .animate-fade-in-up,
  .animate-fade-in {
    animation: none;
    opacity: 1;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  img {
    transition: none;
  }
}

/* ============================================
   Navbar scroll state
   ============================================ */

#navbar.scrolled {
  background-color: rgba(252, 250, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .menu-line {
  background-color: #292524;
}

/* ============================================
   Mobile menu
   ============================================ */

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-btn.active .menu-line:nth-child(3) {
  width: 100%;
  transform: translateY(-4px) rotate(-45deg);
}

/* ============================================
   Form styles
   ============================================ */

input:focus,
textarea:focus {
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(232, 213, 188, 0.3);
}

/* ============================================
   Image hover wrapper
   ============================================ */

.overflow-hidden {
  position: relative;
}

.overflow-hidden::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0);
  transition: background 0.5s ease;
  pointer-events: none;
}

.overflow-hidden:hover::after {
  background: rgba(28, 25, 23, 0.08);
}

/* ============================================
   Vertical text (scroll indicator)
   ============================================ */

.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ============================================
   Responsive tweaks
   ============================================ */

@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }
}
