/* ==========================================================================
   AURUM / V. KESTREL — Quiet Luxury meets Cinematic WebGL
   Design System & Custom Stylesheet
   ========================================================================== */

:root {
  --bg-deep: #050508;
  --bg-obsidian: #0a0b0e;
  --bg-velvet: #0e0f14;
  --bg-surface: #14151b;
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-metallic: #e5c378;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --cyan-accent: #00e5ff;
  --cyan-glow: rgba(0, 229, 255, 0.2);
  --text-primary: #f5f5f7;
  --text-secondary: #9ba1a6;
  --text-muted: #5a6068;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.2);
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-display: 'Syne', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-deep);
}

::selection {
  background-color: var(--gold-primary);
  color: #050508;
}

/* Custom Film Grain Texture */
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Glassmorphism & Refraction Styles */
.glass-panel {
  background: rgba(14, 15, 20, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
}

.glass-panel-gold {
  background: rgba(14, 15, 20, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), inset 0 0 16px 0 rgba(212, 175, 55, 0.04);
}

.glass-tag {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Metallic Gold Gradient Text */
.gold-gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #f3e5ab 35%, #d4af37 70%, #aa820a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cyan-gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #80f0ff 50%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Interactive Cursor (Desktop) */
.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.1s ease;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background-color 0.3s ease,
              transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-cursor-follower.hovering {
  width: 64px;
  height: 64px;
  border-color: var(--gold-light);
  background-color: rgba(212, 175, 55, 0.08);
  backdrop-filter: blur(2px);
}

/* Magnetic Button Physics & Liquid Shimmer */
.magnetic-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.magnetic-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.35) 0%, transparent 70%);
  opacity: 0;
  transform: translate(var(--mouse-x, 0px), var(--mouse-y, 0px));
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.magnetic-btn:hover::before {
  opacity: 1;
}

/* Shimmer Line */
.gold-shimmer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.6) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmerFlow 6s infinite linear;
}

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

/* Subtle Pulsing Ambient Aura */
.ambient-gold-aura {
  background: radial-gradient(circle 600px at 50% 50%, rgba(212, 175, 55, 0.04), transparent 80%);
}

.ambient-cyan-aura {
  background: radial-gradient(circle 500px at 80% 20%, rgba(0, 229, 255, 0.03), transparent 70%);
}

/* Tactile Image Card 2.5D Parallax */
.vault-card {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.vault-card-inner {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.vault-card:hover .vault-card-inner {
  transform: translateY(-4px) scale(1.015);
}

.vault-image-container {
  overflow: hidden;
  position: relative;
}

.vault-image-container img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.vault-card:hover .vault-image-container img {
  transform: scale(1.06);
  filter: brightness(1.08) contrast(1.05);
}

/* Input Micro-Haptics */
.luxury-input-group {
  position: relative;
}

.luxury-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 1rem 0 0.75rem 0;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.luxury-input-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00e5ff 0%, #d4af37 50%, #f3e5ab 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-input:focus + .luxury-input-underline {
  width: 100%;
}

.luxury-input:focus {
  border-color: transparent;
}

.luxury-label {
  position: absolute;
  top: 1rem;
  left: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-input:focus ~ .luxury-label,
.luxury-input:not(:placeholder-shown) ~ .luxury-label {
  top: -0.5rem;
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Smooth Hide Scrollbars */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom Scrollbar for Luxury Desktop */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #050508;
}
::-webkit-scrollbar-thumb {
  background: #1e2029;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* WebGL Canvas Holder */
#webgl-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

#webgl-canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Content Container Above WebGL */
.content-wrapper {
  position: relative;
  z-index: 10;
}

/* Reveal Animations */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Sound Wave Animation */
.sound-bar {
  display: inline-block;
  width: 2px;
  background-color: var(--gold-primary);
  border-radius: 1px;
  transition: height 0.2s ease;
}

.sound-bar.playing {
  animation: soundBounce 1.2s infinite ease-in-out alternate;
}
.sound-bar:nth-child(1) { animation-delay: 0.1s; height: 6px; }
.sound-bar:nth-child(2) { animation-delay: 0.3s; height: 12px; }
.sound-bar:nth-child(3) { animation-delay: 0.2s; height: 16px; }
.sound-bar:nth-child(4) { animation-delay: 0.4s; height: 8px; }

@keyframes soundBounce {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.3); }
}

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

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-content-box {
  transform: scale(0.96) translateY(20px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s;
}

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