@import url('https://fonts.googleapis.com/css2?family=Spline+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-sans: 'Spline Sans', sans-serif;
  --font-display: 'Spline Sans', sans-serif;
  --font-mono: 'Spline Sans', sans-serif;
  
  --bg-light: #fed7aa;
  --panel-bg: #ffffff;
  --panel-border: rgba(249, 115, 22, 0.2);
  --panel-highlight: inset 0 1px 0 rgba(255, 255, 255, 1);
  
  --orange-primary: #f97316;
  --orange-dark: #ea580c;
  --orange-glow: rgba(249, 115, 22, 0.25);
  --emerald-mint: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --ruby-red: #f43f5e;
  --ruby-glow: rgba(244, 63, 94, 0.15);
}

*, *::before, *::after, body, button, input, select, textarea, code, pre, kbd, samp, .font-mono, .font-display, .font-sans {
  font-family: 'Spline Sans', sans-serif !important;
}

body {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 45%, #fdba74 100%);
  background-attachment: fixed;
  color: #0f172a;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Lights - Delicate Warm Sunlit Highlights */
.ambient-glow-1 {
  position: fixed;
  top: -120px;
  left: 15%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
}

.ambient-glow-2 {
  position: fixed;
  bottom: -150px;
  right: 15%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.10) 0%, rgba(251, 146, 60, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* Elevated Surface Utilities */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 25px -5px rgba(194, 65, 12, 0.08), 0 8px 10px -6px rgba(194, 65, 12, 0.05);
}

.glass-card {
  background: #ffffff;
  border: 1px solid rgba(249, 115, 22, 0.2);
  box-shadow: 0 4px 6px -1px rgba(194, 65, 12, 0.06), 0 10px 20px -3px rgba(194, 65, 12, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: #ffffff;
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 14px 28px -4px rgba(249, 115, 22, 0.18), 0 10px 10px -5px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.glass-modal {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 35px rgba(249, 115, 22, 0.1);
}

.glass-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.glass-input:focus {
  outline: none;
  border-color: var(--orange-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--orange-primary);
}

/* Animated Pulse Rings */
.pulse-emerald {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==============================================================================
   Page Transitions & View Transitions API
   ============================================================================== */

@view-transition {
  navigation: auto;
}

/* Stable Persistent App Shell - Elements stay pinned with ZERO flicker */
#desktop-sidebar {
  view-transition-name: lsd-sidebar;
}

#top-navbar {
  view-transition-name: lsd-navbar;
}

#mobile-bottom-bar {
  view-transition-name: lsd-bottom-bar;
}

#page-content-area {
  view-transition-name: lsd-main-content;
}

/* View Transitions Keyframes */
::view-transition-old(lsd-main-content) {
  animation: 140ms cubic-bezier(0.4, 0, 1, 1) both lsdPageFadeOut;
}

::view-transition-new(lsd-main-content) {
  animation: 240ms cubic-bezier(0.16, 1, 0.3, 1) 40ms both lsdPageFadeIn;
}

@keyframes lsdPageFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.995);
  }
}

@keyframes lsdPageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback & Universal In-Page Transition Classes */
.page-entering {
  animation: lsdContentGlideIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-leaving {
  opacity: 0 !important;
  transform: translateY(-6px) scale(0.995) !important;
  transition: opacity 120ms ease-in, transform 120ms ease-in !important;
}

@keyframes lsdContentGlideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sleek Top Navigation Progress Bar */
#page-loader-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, #f97316, #fb923c, #f59e0b, #ea580c);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.6), 0 0 4px rgba(251, 146, 60, 0.8);
  z-index: 99999;
  transition: width 220ms cubic-bezier(0.1, 0.7, 0.1, 1), opacity 250ms ease;
  pointer-events: none;
  opacity: 0;
}

#page-loader-bar.loading {
  opacity: 1;
}

/* Staggered Element Reveals */
.animate-fade-in-up {
  animation: lsdElementReveal 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-1 {
  animation-delay: 40ms;
}

.stagger-2 {
  animation-delay: 80ms;
}

.stagger-3 {
  animation-delay: 130ms;
}

.stagger-4 {
  animation-delay: 180ms;
}

@keyframes lsdElementReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Interactive Card & Button Polish */
.interactive-hover {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.interactive-hover:hover {
  transform: translateY(-2px);
}

.interactive-hover:active {
  transform: translateY(0) scale(0.985);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(*), ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

