/* ============================================
   LevOne — Premium Animation Effects
   Cursor, transitions, marquee, outline text,
   morph buttons, cascading fade-in, image reveal,
   preloader, booking modal
   ============================================ */

/* --- Transition Overlay (Barba.js) --- */
.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--bg-primary);
  clip-path: inset(100% 0 0 0);
  pointer-events: none;
}

/* --- Custom Cursor --- */
.custom-cursor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 100001;
  mix-blend-mode: difference;
  will-change: transform;
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              margin 0.3s var(--ease-out),
              background 0.3s var(--ease-out),
              border 0.3s var(--ease-out);
}

.custom-cursor.cursor-hover {
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.5);
}

.custom-cursor.cursor-click {
  transform: scale(0.8);
}

/* Hide default cursor when custom cursor is active */
.cursor-active,
.cursor-active a,
.cursor-active button,
.cursor-active input,
.cursor-active [role="tab"] {
  cursor: none !important;
}

/* --- Enhanced Preloader with % --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-logo {
  max-width: 180px;
  opacity: 0;
  transform: scale(0.85);
}

.preloader-counter {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  opacity: 0;
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background: rgba(212, 168, 67, 0.15);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
}

.preloader-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
}

/* --- Outline Typography --- */
.outline-text {
  font-family: var(--font-heading);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(212, 168, 67, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: absolute;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* --- Marquee / Infinite Scroll Text --- */
.marquee-band {
  overflow: hidden;
  white-space: nowrap;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(212, 168, 67, 0.06);
  border-bottom: 1px solid rgba(212, 168, 67, 0.06);
  position: relative;
}

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

.marquee-track span {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0 2rem;
  opacity: 0.5;
}

.marquee-track span::after {
  content: '\2022';
  margin-left: 2rem;
  color: var(--accent);
  opacity: 0.3;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Cascading Fade-In --- */
.g-fadein {
  opacity: 0;
  transform: translateY(40px);
}

.g-fadein.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.dt-100 { transition-delay: 0.1s; }
.dt-200 { transition-delay: 0.2s; }
.dt-300 { transition-delay: 0.3s; }
.dt-400 { transition-delay: 0.4s; }
.dt-500 { transition-delay: 0.5s; }
.dt-600 { transition-delay: 0.6s; }

/* --- Image Reveal (clip-path) --- */
.img-reveal {
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}

.img-reveal.is-revealed {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Morph Buttons --- */
.btn-morph {
  position: relative;
  overflow: hidden;
  transition:
    border-radius 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background 0.3s var(--ease-out);
}

.btn-morph:hover {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.3);
}

.btn-morph:active {
  transform: scale(0.97);
  border-radius: 50%;
}

/* Morph variant for menu cards on hub */
.menu-card.btn-morph:hover {
  border-radius: 20% 80% 60% 40% / 40% 20% 80% 60%;
}

/* --- Parallax container helper --- */
.parallax-container {
  overflow: hidden;
  position: relative;
}

.parallax-container img,
.parallax-container video {
  will-change: transform;
}

/* --- Booking Modal --- */
.booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.booking-overlay.active {
  opacity: 1;
  visibility: visible;
}

.booking-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 99991;
  width: 90%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out);
}

.booking-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.booking-modal h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.booking-modal .booking-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-xl);
}

.booking-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
  transition: all 0.2s var(--ease-out);
}

.booking-close:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(212, 168, 67, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s var(--ease-out);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.booking-submit {
  margin-top: var(--space-sm);
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
}

.booking-success {
  display: none;
  text-align: center;
  padding: var(--space-xl) 0;
}

.booking-success.show {
  display: block;
}

.booking-success svg {
  width: 56px;
  height: 56px;
  color: #5cb85c;
  margin-bottom: var(--space-md);
}

.booking-success h4 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.booking-success p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .booking-modal {
    padding: var(--space-xl) var(--space-lg);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .g-fadein { opacity: 1; transform: none; }
  .img-reveal { clip-path: none; }
  .custom-cursor { display: none !important; }
  .transition-overlay { transition: none; }
  .btn-morph { transition: none; }
  .btn-morph:hover { border-radius: inherit; transform: none; }
}
