/* ==========================================================================
   FI LOUNGE CLUB - CORE & LAYOUT STYLES (F1-CLUB.EU SEAMLESS AUDITED)
   ========================================================================== */

@import './variables.css';

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

html {
  font-size: 16px;
  background-color: var(--bg-deep);
  color: #E8E5DF;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  background-color: var(--bg-deep);
  color: #EFE6CE;
  overflow: visible !important;
  position: relative;
  min-height: 100vh;
  cursor: auto;
}

/* Official Lenis Smooth Scroll Viewport Single-Scroller Rules */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Single Custom Gold Scrollbar for the Page */
html::-webkit-scrollbar {
  width: 6px;
}

html::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  border-radius: 3px;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* Luxury Selection */
::selection {
  background: var(--gold-antique);
  color: var(--bg-deep);
}

/* ==========================================================================
   GOLDEN THREAD SVG RUNNING THROUGH PAGE (FROM F1-CLUB.EU)
   ========================================================================== */
.thread {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.65;
}

.thread svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 7px rgba(227, 190, 106, 0.55));
}

.thread path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

@media (max-width: 992px) {
  /* Move vertical Golden Thread animation to the side on mobile so it doesn't obstruct center content */
  .thread {
    left: auto !important;
    right: 6px !important;
    width: 48px !important;
    opacity: 0.85 !important;
  }
  .thread svg {
    filter: drop-shadow(0 0 8px rgba(227, 190, 106, 0.75));
  }
}

/* ==========================================================================
   CUSTOM LUXURY CURSOR (CRISP INSTANT HARDWARE ACCELERATED)
   ========================================================================== */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  mix-blend-mode: screen;
  box-shadow: 0 0 12px var(--gold-light);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(212, 175, 55, 0.75);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(1px);
}

.cursor-active .custom-cursor,
.cursor-active .cursor-follower {
  opacity: 1;
}

.cursor-hover .custom-cursor {
  transform: translate3d(-50%, -50%, 0) scale(1.6);
  background: #FFF;
}

.cursor-hover .cursor-follower {
  width: 50px;
  height: 50px;
  border-color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
}

@media (pointer: coarse), (max-width: 992px) {
  .custom-cursor, .cursor-follower {
    display: none !important;
  }
}

a, button, [role="button"], input[type="submit"] {
  cursor: pointer !important;
}

/* ==========================================================================
   TYPOGRAPHY & ORNAMENTS (EXACT MATCH F1-CLUB.EU)
   ========================================================================== */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif-body);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFF;
  line-height: 1.15;
}

.font-serif-display {
  font-family: var(--font-serif-display);
}

.gold-gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}

/* Authentic f1-club.eu Ornaments */
.ornament {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  width: 100%;
  max-width: 320px;
  margin: 28px auto;
  color: var(--gold-antique);
}

.ornament .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 155, 60, 0.55) 45%, rgba(198, 155, 60, 0.55) 55%, transparent);
}

.ornament .tip {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--gold-light);
  filter: drop-shadow(0 0 9px rgba(227, 190, 106, 0.85));
}

/* ==========================================================================
   BUTTONS & CTAS
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 0.95em 2.1em;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s var(--transition-smooth), box-shadow 0.45s var(--transition-smooth);
}

.btn-gold-primary {
  color: #120C02;
  background-image: var(--gold-gradient);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  border: none;
}

.btn-gold-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #FFF6DA, #D4AF37);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.btn-gold-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px -10px rgba(227, 190, 106, 0.75);
}

.btn-gold-primary:hover::after {
  opacity: 1;
}

.btn-gold-outline {
  color: var(--gold-light);
  background-color: rgba(6, 6, 6, 0.45);
  border: 1px solid rgba(198, 155, 60, 0.55);
  backdrop-filter: blur(8px);
}

.btn-gold-outline::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(227, 190, 106, 0.18), rgba(227, 190, 106, 0.05));
  opacity: 0;
  transition: opacity 0.45s ease;
}

.btn-gold-outline:hover {
  color: #FFF6DA;
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.btn-gold-outline:hover::after {
  opacity: 1;
}

/* ==========================================================================
   NAVIGATION BAR (SEAMLESS FLUSH INTEGRATION WITH HERO BANNER)
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: 72px;
  z-index: 100;
  transition: background-color 0.5s var(--transition-smooth), border-color 0.5s var(--transition-smooth), backdrop-filter 0.5s var(--transition-smooth), height 0.5s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
  box-sizing: border-box;
}

.site-header.scrolled {
  background-color: rgba(6, 6, 6, 0.94);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom-color: rgba(138, 100, 32, 0.35);
  height: 68px;
}

.nav-container {
  max-width: 1680px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 2.5rem);
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
  transition: opacity 0.4s ease;
}

.nav-brand:hover {
  opacity: 0.85;
}

.brand-emblem-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  border: 1px solid var(--gold-antique);
}

.brand-emblem-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title-group {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif-body);
  font-size: clamp(0.92rem, 1.1vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(239, 230, 206, 0.6);
  white-space: nowrap;
}

.nav-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-left: clamp(1.5rem, 3vw, 3.5rem);
  margin-right: auto;
  flex: 0 1 auto;
  min-width: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.85rem, 1.4vw, 1.8rem);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-link {
  position: relative;
  font-size: clamp(0.66rem, 0.78vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(239, 230, 206, 0.78);
  text-decoration: none;
  transition: color 0.35s ease;
  white-space: nowrap;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background-image: var(--gold-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--transition-smooth);
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--gold-light);
}

.nav-link:hover::after, .nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 14px);
  flex-shrink: 0;
}

/* Live Status Pill (Hidden to keep navbar clean and aligned) */
.status-pill {
  display: none !important;
}

/* Ambient Audio Visualizer Toggle */
.audio-toggle-btn {
  background: rgba(18, 14, 10, 0.6);
  border: 1px solid var(--border-gold-medium);
  border-radius: 20px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.audio-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-light);
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.audio-bar {
  width: 2px;
  background: var(--gold-light);
  border-radius: 1px;
  height: 3px;
}

.audio-playing .audio-bar:nth-child(1) { animation: soundBar 0.8s infinite alternate ease-in-out; }
.audio-playing .audio-bar:nth-child(2) { animation: soundBar 1.2s infinite alternate ease-in-out 0.2s; }
.audio-playing .audio-bar:nth-child(3) { animation: soundBar 0.6s infinite alternate ease-in-out 0.4s; }
.audio-playing .audio-bar:nth-child(4) { animation: soundBar 1.0s infinite alternate ease-in-out 0.1s; }

@keyframes soundBar {
  0% { height: 3px; }
  100% { height: 12px; }
}

.audio-label {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-btn-trailer {
  padding: 7px 14px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  flex-shrink: 0;
}

.nav-btn-vip {
  padding: 8px 16px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  flex-shrink: 0;
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
  display: none;
  background: rgba(18, 14, 10, 0.6);
  border: 1px solid var(--border-gold-medium);
  border-radius: 4px;
  color: var(--gold-light);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-light);
}

/* Responsive Navbar Rules */
@media (max-width: 1320px) {
  .brand-sub {
    display: none;
  }
  .nav-desktop {
    margin-left: clamp(1rem, 2vw, 2rem);
  }
  .nav-links {
    gap: clamp(0.75rem, 1.1vw, 1.25rem);
  }
  .nav-link {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 1140px) {
  .nav-btn-trailer {
    display: none;
  }
}

@media (max-width: 1040px) {
  .nav-desktop {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 64px;
  }
  .nav-container {
    padding: 0 1rem;
  }
  .brand-name {
    font-size: 0.88rem;
  }
  .brand-emblem-wrap {
    width: 32px;
    height: 32px;
  }
  .audio-label {
    display: none;
  }
  .audio-toggle-btn {
    padding: 6px 9px;
  }
  .nav-btn-vip {
    padding: 7px 11px;
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 500px) {
  .audio-toggle-btn {
    display: none;
  }
  .nav-container {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .nav-btn-vip {
    padding: 6px 9px;
    font-size: 0.6rem;
  }
  .mobile-menu-toggle {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 360px) {
  .nav-btn-vip {
    display: none;
  }
}

/* ==========================================================================
   FULLSCREEN LUXURY MOBILE MENU OVERLAY
   ========================================================================== */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(100% 80% at 50% 10%, #0d0b08 0%, #060606 85%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-dialog {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem clamp(1.2rem, 5vw, 2.5rem) 2.5rem;
  box-sizing: border-box;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(138, 100, 32, 0.3);
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-gold-medium);
  background: rgba(18, 14, 10, 0.6);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-nav-close:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-light);
  transform: rotate(90deg);
}

.mobile-nav-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 2.2rem 0;
  text-align: center;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

.mobile-nav-link {
  font-family: var(--font-serif-title);
  font-size: clamp(1.15rem, 3.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-warm-ivory);
  text-decoration: none;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
  display: block;
}

.mobile-nav-link:hover {
  color: var(--gold-light);
  letter-spacing: 0.16em;
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

.mobile-trailer-btn,
.mobile-vip-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.mobile-nav-date {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-top: 1rem;
}
