/* ==========================================================================
   VELOURA DENTAL ATELIER — Crafted by Zeyvaro Digital Agency
   Bespoke Luxury Styling & Micro-Interactions
   ========================================================================== */

:root {
  --bg-ivory: #FAF8F5;
  --bg-stone: #F2EFE9;
  --bg-forest: #12221C;
  --bg-obsidian: #0E1210;
  --text-primary: #141816;
  --text-secondary: #5A625E;
  --accent-gold: #C5A059;
  --accent-gold-light: #E5D1A7;
  --accent-sage: #1E3A2F;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-ivory);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-serif-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-mono-clinical {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-ivory);
}
::-webkit-scrollbar-thumb {
  background: #D5CFC4;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Subtle Grain Texture Overlay */
.bg-luxury-grain {
  background-image: radial-gradient(rgba(197, 160, 89, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
}

/* Glassmorphism Cards */
.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(20, 24, 22, 0.08);
}

.glass-panel-dark {
  background: rgba(18, 34, 28, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Before / After Comparison Slider */
.ba-slider-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.ba-before-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.45);
  z-index: 20;
  cursor: ew-resize;
}

.ba-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #12221C;
  border: 2px solid #C5A059;
  color: #FAF8F5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.ba-slider-container:hover .ba-handle-button,
.ba-slider-container:active .ba-handle-button {
  transform: translate(-50%, -50%) scale(1.1);
  background: #C5A059;
  color: #12221C;
}

/* Interactive Dental Arch SVG Tooth Styling */
.arch-tooth {
  fill: #F5F2EB;
  stroke: #B8B0A2;
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.arch-tooth:hover {
  fill: #E5D1A7;
  stroke: #C5A059;
  transform: translateY(-2px);
}

.arch-tooth.selected {
  fill: #C5A059;
  stroke: #12221C;
  stroke-width: 1.8;
  filter: drop-shadow(0 4px 10px rgba(197, 160, 89, 0.45));
}

.arch-tooth-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  fill: #6E6A63;
  pointer-events: none;
  user-select: none;
}

.arch-tooth.selected + .arch-tooth-label {
  fill: #12221C;
  font-weight: 700;
}

/* Custom Range Input */
input[type="range"].luxury-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E2DDD3;
  border-radius: 999px;
  outline: none;
}

input[type="range"].luxury-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #12221C;
  border: 2px solid #C5A059;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

input[type="range"].luxury-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Smooth Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.animate-float-slow {
  animation: floatSlow 5s ease-in-out infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(197, 160, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.pulse-gold {
  animation: pulseRing 2.5s infinite;
}

/* Modal Transitions */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-content {
  transform: translateY(0) scale(1);
}
