:root {
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: #0f172a;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

.font-mono-tech {
  font-family: var(--font-mono);
}

/* Light Tech Grid & Glassmorphism */
.bg-grid-pattern-light {
  background-size: 48px 48px;
  background-image:
    linear-gradient(to right, rgba(220, 38, 38, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(220, 38, 38, 0.04) 1px, transparent 1px);
}

.glass-light {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.card-elevated {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 36px -12px rgba(15, 23, 42, 0.08);
}

.text-gradient-brand {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 55%, #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer CTA Button */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-btn {
  background: linear-gradient(
    110deg,
    #b91c1c 0%,
    #dc2626 45%,
    #ef4444 50%,
    #dc2626 55%,
    #b91c1c 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3.5s infinite linear;
}

/* Floating & Pulse Animations */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

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

.animate-pulse-glow {
  animation: pulseGlow 5s ease-in-out infinite;
}

/* Infinite Marquee */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Scroll Reveal Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Dashboard Tilt */
.tilt-wrapper {
  perspective: 1200px;
}

.tilt-card {
  transition: transform 0.18s ease-out;
  transform-style: preserve-3d;
}

/* Spotlight Card Glow (Light Theme) */
.spotlight-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 20px 45px -15px rgba(220, 38, 38, 0.14);
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(220, 38, 38, 0.07),
    transparent 60%
  );
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Animated Bar Chart */
.chart-bar {
  height: 0%;
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Segment Card & Panel Transitions */
.segment-chip {
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.segment-panel {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.segment-panel.switching {
  opacity: 0;
  transform: translateY(6px);
}

/* High-Tech Solution Stage Effects */
@keyframes scanSweep {
  0% { transform: translateY(-100%); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(420%); opacity: 0; }
}

@keyframes orbitSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

.tech-stage-glow {
  position: relative;
  background: linear-gradient(120deg, rgba(220, 38, 38, 0.16), rgba(37, 99, 235, 0.14), rgba(16, 185, 129, 0.16));
  background-size: 200% 200%;
  animation: borderFlow 6s ease infinite;
  padding: 1.5px;
}

.tech-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(220, 38, 38, 0.06), transparent);
  animation: scanSweep 4.5s ease-in-out infinite;
  pointer-events: none;
}

.orbit-ring {
  animation: orbitSpin 18s linear infinite;
}

.sol-stage-body {
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.28s ease;
}

.sol-stage-body.switching {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  filter: blur(4px);
}

.sol-tab-btn {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.sol-tab-btn:hover {
  transform: translateX(4px);
}

.sol-progress-bar {
  transition: width 0.1s linear;
}

/* Top Scroll Progress Indicator */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(90deg, #dc2626, #ef4444, #2563eb, #10b981);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.55);
  transition: width 0.08s linear;
}

/* Organic Moving Mesh Blobs */
@keyframes blobFloatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -25px) scale(1.08); }
  66% { transform: translate(-25px, 20px) scale(0.95); }
}

@keyframes blobFloatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, -30px) scale(1.1); }
}

.animate-blob-a {
  animation: blobFloatA 12s ease-in-out infinite;
}

.animate-blob-b {
  animation: blobFloatB 15s ease-in-out infinite;
}

/* Enhanced Blur + Scale Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  filter: blur(4px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.7s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Floating Fiscal Pills */
@keyframes pillBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pill-float {
  animation: pillBob 3.6s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pill-float:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 24px -6px rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.45);
}

/* Magnetic & 3D Interactive Cards */
.magnetic-btn {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.card-3d {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d:hover {
  box-shadow: 0 24px 55px -15px rgba(15, 23, 42, 0.16);
}

/* Blinking Typewriter Cursor */
@keyframes blinkCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background-color: #dc2626;
  border-radius: 2px;
  animation: blinkCursor 0.85s infinite;
}

/* Refactored Segment Cards & Modal */
.seg-card-modern {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease,
              background-color 0.25s ease;
}

.seg-card-modern:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(220, 38, 38, 0.38);
  box-shadow: 0 18px 36px -12px rgba(220, 38, 38, 0.16);
}

#seg-modal {
  transition: opacity 0.25s ease;
}

#seg-modal-box {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

#seg-modal.hidden-modal {
  opacity: 0;
  pointer-events: none;
}

#seg-modal.hidden-modal #seg-modal-box {
  transform: scale(0.94) translateY(16px);
  opacity: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
