/* ============================================
   LevOne — Page-Specific Styles
   Shared across all pages for Barba.js compatibility
   (inline <style> blocks don't transfer during transitions)
   ============================================ */

/* ============================================
   MENU PAGE
   ============================================ */

/* --- Menu Page Layout --- */
.menu-page-content {
  padding-top: 80px;
  min-height: 100vh;
  padding-bottom: var(--space-3xl);
}

/* --- Sticky Tabs Bar --- */
.menu-tabs-bar {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--bg-primary);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(212, 168, 67, 0.08);
}

.menu-tabs-bar .container {
  padding: 0;
}

.menu-tabs {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 var(--space-lg);
  -webkit-overflow-scrolling: touch;
}

.menu-tabs::-webkit-scrollbar {
  display: none;
}

.menu-tab {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 50px;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
  cursor: pointer;
}

.menu-tab:hover {
  color: var(--text-primary);
  border-color: rgba(212, 168, 67, 0.2);
}

.menu-tab.active {
  color: var(--bg-primary);
  background: var(--accent);
  border-color: var(--accent);
}

/* --- Dish Card hover glow --- */
.dish-card {
  position: relative;
  overflow: hidden;
}

.dish-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.dish-card:hover::before {
  opacity: 0.6;
}

/* --- Dish Cards Grid --- */
.dishes-container {
  padding-top: var(--space-xl);
}

.category-section {
  margin-bottom: var(--space-2xl);
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-title {
  font-family: var(--font-heading);
  color: var(--accent);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(212, 168, 67, 0.12);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.dishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
}

/* --- Dish Card --- */
.dish-card {
  cursor: default;
}

.dish-card .card-body {
  padding: var(--space-lg);
}

.dish-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.dish-price {
  font-variant-numeric: tabular-nums;
}

.dish-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  flex-shrink: 0;
}

.dish-tag--hit {
  background: var(--accent);
  color: var(--bg-primary);
}

.dish-tag--pp {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

/* --- Category transition --- */
.dishes-container {
  transition: opacity 0.3s ease;
}

.dishes-container.switching {
  opacity: 0;
}

@media (max-width: 480px) {
  .dishes-grid {
    grid-template-columns: 1fr;
  }

  .menu-tabs-bar {
    top: 56px;
  }

  .menu-page-content {
    padding-top: 72px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .dishes-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ============================================
   KBZHU PAGE
   ============================================ */

.nutrient-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.nutrient-row:last-child {
  margin-bottom: 0;
}

.nutrient-label {
  flex-shrink: 0;
  width: 80px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nutrient-row .progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.nutrient-value {
  flex-shrink: 0;
  width: 72px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.kbzhu-card h4 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.kbzhu-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kbzhu-card-head .allergen-badge {
  flex-shrink: 0;
}

.kbzhu-pending {
  text-align: center;
  padding: 1rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Disable CSS transition — GSAP owns width animation */
.kbzhu-card .progress-fill {
  transition: none;
  will-change: width;
}

.kbzhu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.kbzhu-search-section {
  margin-bottom: var(--space-2xl);
}

.kbzhu-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .kbzhu-grid {
    grid-template-columns: 1fr;
  }

  .nutrient-label {
    width: 70px;
    font-size: 0.75rem;
  }

  .nutrient-value {
    width: 64px;
    font-size: 0.75rem;
  }
}

/* ============================================
   ALLERGENS PAGE
   ============================================ */

/* --- Page Title --- */
.allergens-title {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.allergens-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-2xl);
}

/* --- Legend --- */
.allergen-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 168, 67, 0.08);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}

.legend-item:hover {
  border-color: rgba(212, 168, 67, 0.2);
  color: var(--text-primary);
}

.legend-icon {
  font-size: 1rem;
  line-height: 1;
}

/* --- Table Wrapper --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 168, 67, 0.08);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dark) var(--bg-secondary);
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-dark);
  border-radius: 3px;
}

/* --- Allergens Table --- */
.allergens-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.allergens-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.allergens-table th {
  background: var(--bg-card);
  padding: 0.6rem 0.4rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid rgba(212, 168, 67, 0.15);
  white-space: nowrap;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.allergens-table th:first-child {
  text-align: left;
  padding-left: var(--space-md);
  min-width: 180px;
  position: sticky;
  left: 0;
  z-index: 11;
}

.allergens-table th .th-icon {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 2px;
}

/* --- Table Body --- */
.allergens-table td {
  padding: 0.55rem 0.4rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: var(--bg-primary);
  transition: background var(--duration-fast) var(--ease-out);
}

.allergens-table td:first-child {
  text-align: left;
  padding-left: var(--space-md);
  font-weight: 400;
  color: var(--text-primary);
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-primary);
}

.allergens-table tbody tr:hover td {
  background: var(--bg-card);
}

.allergens-table tbody tr:hover td:first-child {
  background: var(--bg-card);
}

/* --- Category Header Row --- */
.category-row td {
  background: var(--bg-secondary) !important;
  padding: 0.65rem var(--space-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(212, 168, 67, 0.12);
}

/* --- Allergen Dot --- */
.allergen-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.4);
}

.allergen-empty {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

/* --- Allergen Dish Price (small, muted) --- */
.allergens-table .dish-price {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 300;
  margin-left: 0.4rem;
}

/* --- Scroll Hint (mobile) --- */
.scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: var(--space-md);
  animation: scrollHintPulse 2s ease-in-out infinite;
}

@keyframes scrollHintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 768px) {
  .scroll-hint {
    display: flex;
  }

  .allergen-legend {
    padding: var(--space-md);
    gap: var(--space-xs);
  }

  .legend-item {
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
  }

  .allergens-table th:first-child,
  .allergens-table td:first-child {
    min-width: 140px;
  }
}

/* --- Summary Stats --- */
.allergen-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Footer note --- */
.allergen-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: var(--space-2xl);
  padding: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}

/* ============================================
   HUB PAGE — GLOBAL TOUR VIDEO (scroll-driven)
   Single continuous video tied to scroll progress
   ============================================ */

/* --- Global Tour Video Background --- */
.tour-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.tour-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-video-bg canvas {
  opacity: 0;
  transition: opacity 1.5s ease;
}

.tour-video-bg canvas.is-playing {
  opacity: 0.5;
}

/* --- Tour Video Overlay (vignette, JS controls opacity) --- */
.tour-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 15%, rgba(10, 10, 10, 0.55) 65%, rgba(10, 10, 10, 0.92) 100%);
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* --- Hero Tagline (cinematic typography) --- */
.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3.2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 30px rgba(212, 168, 67, 0.5), 0 0 60px rgba(212, 168, 67, 0.2), 0 2px 10px rgba(0, 0, 0, 0.8);
  background: linear-gradient(135deg, #ffffff, #d4a843);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

/* --- Hub Marquee Ticker (fixed bottom) --- */
.hub-marquee {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, transparent 100%);
  pointer-events: none;
}

.hub-marquee .marquee-track {
  display: inline-flex;
  animation: marquee-scroll 30s linear infinite;
  will-change: transform;
}

.hub-marquee .marquee-track span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: rgba(212, 168, 67, 0.8);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0 2.5rem;
}

.hub-marquee .marquee-track span::after {
  content: '\2022';
  margin-left: 2.5rem;
  color: rgba(212, 168, 67, 0.5);
}

/* --- Dessert Showcase Container --- */
.dessert-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

/* --- Phone Mockup --- */
.phone-mockup {
  position: relative;
  width: 220px;
  aspect-ratio: 9 / 19.5;
  border: 2px solid rgba(212, 168, 67, 0.35);
  border-radius: 36px;
  padding: 8px;
  background: #1a1a1a;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 168, 67, 0.06),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  transform: rotate(-3deg);
  will-change: transform;
}

.phone-mockup-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #0a0a0a;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

/* Dynamic island pill */
.phone-mockup-notch::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 10px;
  background: #1a1a1a;
  border-radius: 10px;
}

.phone-mockup-screen {
  border-radius: 28px;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

.phone-mockup-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.phone-mockup-screen video.is-playing {
  opacity: 1;
}

/* --- Phone mockup responsive --- */
@media (max-width: 480px) {
  .phone-mockup {
    width: 180px;
    border-radius: 30px;
    padding: 6px;
  }

  .phone-mockup-notch {
    width: 64px;
    height: 18px;
    top: 10px;
    border-radius: 0 0 11px 11px;
  }

  .phone-mockup-notch::after {
    width: 28px;
    height: 8px;
    top: 5px;
  }

  .phone-mockup-screen {
    border-radius: 24px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .tour-video-bg canvas,
  .phone-mockup-screen video {
    opacity: 1 !important;
    transition: none;
    transform: none;
  }

  .tour-video-overlay {
    transition: none;
  }

  .phone-mockup {
    transform: none;
  }
}
