/* ============================================================
   DETAILED BY DALE — premium-features.css
   All new feature styles:
   - Scroll progress indicator
   - Custom gold cursor
   - Film grain overlay
   - Page transition
   - Stats counter section
   - Brand marquee ticker
   - Before / After slider
   - Horizontal drag gallery
   - Mobile sticky CTA bar
   ============================================================ */

/* ================================================================
   1. SCROLL PROGRESS INDICATOR
================================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-gold-dark), var(--clr-gold), #f0d070, var(--clr-gold));
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(201,168,76,0.7), 0 0 20px rgba(201,168,76,0.3);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ================================================================
   3. FILM GRAIN OVERLAY
================================================================ */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grainShift 0.15s steps(1) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-5%, -10%); }
  20%  { transform: translate(-15%, 5%); }
  30%  { transform: translate(7%, -25%); }
  40%  { transform: translate(-5%, 25%); }
  50%  { transform: translate(-15%, 10%); }
  60%  { transform: translate(15%, 0%); }
  70%  { transform: translate(0%, 15%); }
  80%  { transform: translate(3%, 35%); }
  90%  { transform: translate(-10%, 10%); }
  100% { transform: translate(0, 0); }
}

/* ================================================================
   4. PAGE TRANSITION OVERLAY
================================================================ */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  background: #ffffff;
  opacity: 1;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--clr-gold), transparent);
  animation: pageLineWipe 0.35s ease forwards;
}

@keyframes pageLineWipe {
  from { left: -100%; }
  to { left: 100%; }
}

.page-transition--out {
  opacity: 0;
}

/* ================================================================
   5. STATS COUNTER SECTION
================================================================ */
.stats-section {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-16);
}

.stats-section__bg {
  display: none;
}

.stats-section__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-block {
  text-align: center;
  padding: var(--sp-6) var(--sp-10);
  flex: 1;
  min-width: 160px;
}

.stat-block__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--clr-gold);
  text-shadow: 0 0 20px rgba(201,168,76,0.2);
  margin-bottom: var(--sp-2);
}

.stat-block__label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-mid-grey);
}

.stat-block__divider {
  width: 1px;
  height: 52px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  align-self: center;
}

/* ================================================================
   6. BRAND MARQUEE TICKER
================================================================ */
.marquee {
  overflow: hidden;
  background: #111111;
  padding-block: var(--sp-5);
  position: relative;
  z-index: 1;
}

/* Fade edges */
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, #111111, transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, #111111, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 28s linear infinite;
  width: max-content;
}

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

.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777777;
  padding: 0 var(--sp-5);
  transition: color 0.3s ease;
}

.marquee:hover .marquee__item {
  color: var(--clr-white);
}

.marquee__sep {
  color: var(--clr-gold);
  opacity: 0.5;
  font-size: 0.6rem;
  padding: 0 var(--sp-3);
}

/* ================================================================
   7. BEFORE / AFTER COMPARISON SLIDER
================================================================ */
.ba-section {
  padding-block: var(--sp-24);
}

.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}

.before-after-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: ew-resize;
  user-select: none;
  border: 1px solid var(--clr-border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 0 20px rgba(201,168,76,0.1);
}

.ba-before,
.ba-after {
  position: absolute;
  inset: 0;
}

.ba-after {
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0s;
}

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  width: 48px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: ew-resize;
  z-index: 10;
}

.ba-handle__line {
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--clr-gold), transparent);
  opacity: 0.8;
}

.ba-handle__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-gold);
  color: #0b0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(201,168,76,0.25), 0 8px 24px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.before-after-slider:hover .ba-handle__btn,
.ba-handle:focus .ba-handle__btn {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(201,168,76,0.3), 0 12px 30px rgba(0,0,0,0.3);
}

.ba-handle__label {
  position: absolute;
  bottom: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.ba-handle__label--before {
  right: 100%;
  margin-right: 8px;
}

.ba-handle__label--after {
  left: 100%;
  margin-left: 8px;
}

.ba-tag {
  position: absolute;
  top: 16px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}

.ba-tag--before {
  left: 16px;
  background: rgba(0,0,0,0.65);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
}

.ba-tag--after {
  right: 16px;
  background: rgba(201,168,76,0.95);
  color: #0b0d10;
  border: 1px solid rgba(201,168,76,0.5);
}

/* ================================================================
   8. HORIZONTAL DRAG GALLERY
================================================================ */
.h-gallery {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  padding-bottom: var(--sp-4);
}

.h-gallery::-webkit-scrollbar { display: none; }

.h-gallery.is-dragging,
.h-gallery__track.is-dragging {
  cursor: grabbing;
}

.h-gallery__track {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-8);
  width: max-content;
}

.h-gallery__item {
  flex-shrink: 0;
  width: 360px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.h-gallery__item:hover {
  border-color: var(--clr-gold);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08), 0 0 25px rgba(201,168,76,0.12);
  transform: translateY(-4px);
}

.h-gallery__img {
  width: 100%;
  height: 260px;
  transition: transform var(--transition-slow);
}

.h-gallery__item:hover .h-gallery__img {
  transform: scale(1.04);
}

.h-gallery__caption {
  padding: var(--sp-5) var(--sp-6);
  background: transparent;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.h-gallery__caption-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-gold-dark);
}

.h-gallery__caption-name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--clr-white);
  letter-spacing: -0.01em;
}

.h-gallery__drag-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-mid-grey);
  animation: hintFade 2s ease-in-out 1.5s forwards;
  opacity: 0;
}

@keyframes hintFade {
  0% { opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

.h-gallery__drag-hint svg {
  color: var(--clr-gold);
}

/* ================================================================
   9. STICKY MOBILE CTA BAR
================================================================ */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9980;
  display: none;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--clr-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.mobile-cta-bar--visible {
  transform: translateY(0);
}

.mobile-cta-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: var(--sp-4) var(--sp-6);
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
}

.mobile-cta-bar__btn--call {
  color: var(--clr-black);
  border-right: 1px solid var(--clr-border-light);
}

.mobile-cta-bar__btn--call:hover,
.mobile-cta-bar__btn--call:active {
  background: rgba(0,0,0,0.04);
  color: var(--clr-black);
}

.mobile-cta-bar__btn--book {
  color: var(--clr-gold-dark);
}

.mobile-cta-bar__btn--book:hover,
.mobile-cta-bar__btn--book:active {
  background: rgba(201,168,76,0.1);
  color: var(--clr-gold-dark);
}

/* Only show on mobile */
@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex;
  }

  /* Prevent content from being hidden behind mobile CTA */
  body {
    padding-bottom: 62px;
  }
}

/* ================================================================
   10. TILT SHINE ELEMENT (injected by JS)
================================================================ */
.tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  transition: background 0.1s;
}

/* ================================================================
   11. RESPONSIVE ADJUSTMENTS
================================================================ */
@media (max-width: 1024px) {
  .ba-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .stat-block { padding: var(--sp-5) var(--sp-6); }
  .h-gallery__item { width: 300px; }
  .h-gallery__img { height: 220px; }
}

@media (max-width: 768px) {
  .stats-section { padding-block: var(--sp-10); }
  .stat-block__divider { display: none; }
  .stats-section__inner { gap: var(--sp-4); }
  .stat-block { min-width: 45%; padding: var(--sp-4); }
  .stat-block__number { font-size: clamp(2.2rem, 10vw, 3rem); }
  .h-gallery__item { width: 260px; }
  .h-gallery__img { height: 190px; }
  .ba-grid { grid-template-columns: 1fr; }
  .before-after-slider { aspect-ratio: 3 / 2; }
  .marquee__item { font-size: 0.85rem; }

  .film-grain { display: none; } /* Save perf on mobile */
}

@media (max-width: 480px) {
  .h-gallery__track { padding: var(--sp-3) var(--sp-4); }
  .h-gallery__item { width: 220px; }
  .h-gallery__img { height: 165px; }
  .stat-block { min-width: 40%; }
}
