/* ==========================================================================
   PakVisionAI - Light Luxury & Minimalist Design System
   High-end B2B executive aesthetic, refined typography, and whisper-soft shadows
   ========================================================================== */

:root {
  --luxury-canvas: #FAF9F6;
  --luxury-surface: #FFFFFF;
  --luxury-border: #E2E8F0;
  --luxury-border-soft: #F1F5F9;
  --luxury-dark: #0F172A;
  --luxury-charcoal: #1E293B;
  --luxury-muted: #64748B;
  --luxury-gold: #B45309;
  --luxury-accent: #0284C7;
  --luxury-emerald: #059669;
}

/* Crisp Executive Typography */
body {
  background-color: var(--luxury-canvas);
  color: var(--luxury-dark);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Minimalist Editorial Italic Accents */
.font-editorial {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  letter-spacing: -0.01em;
}

/* Light Luxury Cards with Micro-Gradients & Feathered Shadows */
.luxury-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 10px 25px -5px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 35px -8px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Gradient Borders for Luxury Accentuation */
.luxury-card-gradient {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF9F6 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.luxury-card-gradient:hover {
  border-color: #94A3B8;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.06);
}

/* Minimalist Interactive Tab Switcher */
.luxury-tab-btn {
  transition: all 0.2s ease-in-out;
}

.luxury-tab-btn[aria-selected="true"] {
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.luxury-tab-btn[aria-selected="false"] {
  background: #F1F5F9;
  color: #475569;
}

.luxury-tab-btn[aria-selected="false"]:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Subtle Hairline Grid Pattern */
.luxury-grid-subtle {
  background-size: 60px 60px;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

/* Refined Pill Badges */
.luxury-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #334155;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Waveform Bars Animation for Voice AI */
.waveform-bar {
  width: 3px;
  background-color: #0F172A;
  border-radius: 9999px;
  transition: height 0.15s ease;
}

.waveform-active .waveform-bar:nth-child(odd) {
  animation: pulseHeight 0.6s infinite ease-in-out alternate;
}

.waveform-active .waveform-bar:nth-child(even) {
  animation: pulseHeight 0.9s infinite ease-in-out alternate;
}

@keyframes pulseHeight {
  0% {
    height: 6px;
  }
  100% {
    height: 28px;
  }
}

/* Custom Minimalist Range Slider for ROI Calculator */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #E2E8F0;
  border-radius: 9999px;
}

input[type=range]::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #0F172A;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #0284C7;
}

/* Modal Backdrop & Blur */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Sleek Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #FAF9F6;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ==========================================================================
   Light Luxury Studio Consoles & Camera Viewport Simulation
   ========================================================================== */

/* Light Luxury Studio Console Frame */
.luxury-studio-console {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 30px -6px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

/* Studio Camera Viewport */
.camera-monitor-viewport {
  position: relative;
  background: linear-gradient(145deg, #0F172A 0%, #1E293B 100%);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Camera Scanline Effect */
.camera-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.8) 50%, transparent 100%);
  opacity: 0.7;
  animation: scanlineMove 3.5s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes scanlineMove {
  0% {
    top: 0%;
  }
  100% {
    top: 100%;
  }
}

/* Live Reticle Target Bounding Box */
.reticle-box {
  position: absolute;
  border: 2px solid #10B981;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.reticle-box::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #34D399;
  border-left: 2px solid #34D399;
}

.reticle-box::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid #34D399;
  border-right: 2px solid #34D399;
}

/* Audio Waveform Bars & Active Animation */
.waveform-bar {
  display: inline-block;
  width: 4px;
  border-radius: 9999px;
  transition: height 0.2s ease, transform 0.2s ease;
  transform-origin: bottom;
}

.waveform-active .waveform-bar {
  animation: waveformBounce 0.8s ease-in-out infinite alternate;
}

.waveform-active .waveform-bar:nth-child(1) { animation-delay: 0.05s; }
.waveform-active .waveform-bar:nth-child(2) { animation-delay: 0.2s; }
.waveform-active .waveform-bar:nth-child(3) { animation-delay: 0.35s; }
.waveform-active .waveform-bar:nth-child(4) { animation-delay: 0.15s; }
.waveform-active .waveform-bar:nth-child(5) { animation-delay: 0.4s; }
.waveform-active .waveform-bar:nth-child(6) { animation-delay: 0.1s; }
.waveform-active .waveform-bar:nth-child(7) { animation-delay: 0.3s; }
.waveform-active .waveform-bar:nth-child(8) { animation-delay: 0.45s; }
.waveform-active .waveform-bar:nth-child(9) { animation-delay: 0.25s; }
.waveform-active .waveform-bar:nth-child(10) { animation-delay: 0.15s; }
.waveform-active .waveform-bar:nth-child(11) { animation-delay: 0.35s; }
.waveform-active .waveform-bar:nth-child(12) { animation-delay: 0.1s; }
.waveform-active .waveform-bar:nth-child(13) { animation-delay: 0.25s; }

@keyframes waveformBounce {
  0% {
    transform: scaleY(0.3);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(2.2);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.7);
    opacity: 0.8;
  }
}

/* Sticky Executive Bottom Dock */
.sticky-exec-dock {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-exec-dock.visible {
  transform: translateX(-50%) translateY(0%);
}

/* ==========================================================================
   Light Luxury Hero Radiance & Interactive Flow Connectors
   ========================================================================== */

/* Ambient Radial Luminous Aura */
.luxury-ambient-aura {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

/* Shimmer Button Effect for Executive CTAs */
.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 20%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 80%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.75s ease-in-out;
}

.btn-shimmer:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* Animated Data Flow Pulse */
.flow-pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: flowPulse 2s infinite ease-in-out;
}

@keyframes flowPulse {
  0%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

/* Directional Arrow Pulse Connector */
.flow-arrow-animated {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-weight: 600;
  animation: arrowShift 1.8s infinite ease-in-out;
}

@keyframes arrowShift {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.6;
  }
  50% {
    transform: translateX(4px);
    opacity: 1;
    color: #0284C7;
  }
}

/* Executive Strategic Objective Cards */
.objective-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.objective-card:hover {
  border-color: #0284C7;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.02);
  transform: translateY(-3px);
}

.objective-card.active-objective {
  border-color: #0F172A;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  box-shadow: 0 0 0 2px #0F172A, 0 12px 28px -6px rgba(15, 23, 42, 0.12);
}

.objective-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.objective-card:hover::before {
  background: linear-gradient(90deg, #0284C7, #10B981);
}

.objective-card.active-objective::before {
  background: #0F172A;
}


/* ==========================================================================
   FIBONACCI DESIGN TOKENS + DARK STUDIO SYSTEM  v4.0
   Golden Ratio phi=1.618  |  All spatial decisions governed by Fn sequence
   ========================================================================== */

:root {
  /* Fibonacci Spacing (base 8px x Fibonacci) */
  --fib-1: 8px;    /* F2  */
  --fib-2: 13px;   /* F6  */
  --fib-3: 21px;   /* F7  */
  --fib-4: 34px;   /* F8  */
  --fib-5: 55px;   /* F9  */
  --fib-6: 89px;   /* F10 */
  --fib-7: 144px;  /* F11 */

  /* Fibonacci Border Radii */
  --fib-r1: 5px;
  --fib-r2: 8px;
  --fib-r3: 13px;
  --fib-r4: 21px;
  --fib-r5: 34px;

  /* Fibonacci Animation Durations (ms) */
  --fib-t1: 180ms;
  --fib-t2: 300ms;
  --fib-t3: 480ms;
  --fib-t4: 780ms;

  /* Dark Studio Design Tokens */
  --studio-bg:         #07101C;
  --studio-surface:    rgba(255,255,255,0.047);
  --studio-surface-2:  rgba(255,255,255,0.08);
  --studio-border:     rgba(255,255,255,0.089);
  --studio-border-2:   rgba(255,255,255,0.14);
  --studio-emerald:    #10B981;
  --studio-cyan:       #22D3EE;
  --studio-amber:      #F59E0B;
  --studio-text:       #F1F5F9;
  --studio-muted:      #64748B;
  --phi: 1.618;
  --phi-inv: 0.618;
}

/* Patch existing hover lifts to Fibonacci 3px */
.luxury-card:hover     { transform: translateY(-3px); }
.objective-card:hover  { transform: translateY(-3px); }
.luxury-grid-subtle    { background-size: 55px 55px; }  /* Fibonacci 55 */
.luxury-ambient-aura   { filter: blur(89px); }           /* Fibonacci 89 */

/* --- Dark Glassmorphism Cards -------------------------------------------- */
.fib-glass {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  backdrop-filter: blur(21px);
  -webkit-backdrop-filter: blur(21px);
  border-radius: var(--fib-r4);
  transition: all var(--fib-t2) cubic-bezier(0.16,1,0.3,1);
}
.fib-glass-bright {
  background: var(--studio-surface-2);
  border: 1px solid var(--studio-border-2);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
  border-radius: var(--fib-r4);
}

/* --- Scroll Reveal -------------------------------------------------------- */
.fib-reveal {
  opacity: 0;
  transform: translateY(21px);
  transition: opacity var(--fib-t3) ease-out,
              transform var(--fib-t3) cubic-bezier(0.16,1,0.3,1);
}
.fib-reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Studio Dark Scrollbar ------------------------------------------------ */
.studio-dark ::-webkit-scrollbar-track  { background: transparent; }
.studio-dark ::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.12); border-radius: 3px; }
.studio-dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* --- Navigation Pills ----------------------------------------------------- */
.fib-nav-pill { transition: all var(--fib-t1) ease; border-radius: 9999px; }
.fib-nav-pill.active {
  background: rgba(16,185,129,0.13);
  border-color: rgba(16,185,129,0.5) !important;
  color: var(--studio-emerald);
}
.fib-nav-pill.active .fib-dot {
  background: var(--studio-emerald);
  box-shadow: 0 0 13px rgba(16,185,129,0.5);
}

/* --- Camera / Voice / Model card states ----------------------------------- */
.fib-cam-btn  { transition: all var(--fib-t1) ease; }
.fib-cam-btn.active  { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); }
.fib-voice-btn { transition: all var(--fib-t2) ease; }
.fib-voice-btn.active { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.35); }
.fib-model-card { transition: all var(--fib-t2) ease; cursor: pointer; }
.fib-model-card.active { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); }
.fib-model-card:not(.active):hover { background: rgba(255,255,255,0.05); }

/* --- CSS Waveform Bars (Voice Section) ------------------------------------ */
.fib-wave-bar {
  width: 3px;
  height: 3px;
  background: linear-gradient(to top, var(--studio-emerald), var(--studio-cyan));
  border-radius: 2px;
  transform-origin: center bottom;
  transition: height 0.08s ease;
  display: inline-block;
}
.fib-wave-bar.playing {
  animation: fibWavePulse var(--dur, 0.6s) ease-in-out infinite alternate;
}
@keyframes fibWavePulse {
  from { height: 3px; }
  to   { height: var(--peak, 34px); }
}

/* --- SVG Gauge Ring ------------------------------------------------------- */
.fib-gauge-ring {
  transition: stroke-dashoffset var(--fib-t4) cubic-bezier(0.4,0,0.2,1);
}

/* --- Terminal Blinking Cursor --------------------------------------------- */
.fib-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--studio-emerald);
  vertical-align: text-bottom;
  animation: fibBlink 0.85s step-end infinite;
  margin-left: 2px;
}
@keyframes fibBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* --- Urdu Nastaliq Text --------------------------------------------------- */
.fib-urdu {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  direction: rtl;
  line-height: 2.2;
  letter-spacing: 0;
}

/* --- Overlays ------------------------------------------------------------- */
.fib-scanlines {
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}
.fib-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 55px 55px;
}

/* --- Preset chip hover ---------------------------------------------------- */
.fib-preset-chip { transition: all var(--fib-t1) ease; }
.fib-preset-chip:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }

/* --- Responsive studio nav ------------------------------------------------ */
@media (max-width: 1023px) {
  .studio-sidebar     { display: none !important; }
  .studio-mobile-nav  { display: flex !important; }
}
@media (min-width: 1024px) {
  .studio-mobile-nav  { display: none !important; }
  .studio-sidebar     { display: flex !important; }
}
