/* Finwise Audit - Professional Tax & Audit Design System (Navy & Gold) */

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

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Finwise Brand Colors (from Logo) */
  --brand-navy: #15589B;
  --brand-navy-deep: #0D3B68;
  --brand-navy-light: #1E70C2;
  --brand-gold: #D4AF37;
  --brand-gold-hover: #C29D29;
  --brand-gold-light: #F3E5AB;

  /* Light Theme */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(226, 232, 240, 0.85);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --accent-color: #15589B;
  --accent-secondary: #D4AF37;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(21, 88, 155, 0.08);
  --shadow-lg: 0 12px 30px -4px rgba(21, 88, 155, 0.12);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.dark {
  /* Dark Theme */
  --bg-primary: #0A111F;
  --bg-secondary: #0F1A2E;
  --bg-tertiary: #16243D;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border-color: #1E2E4A;
  --card-bg: rgba(15, 26, 46, 0.9);
  --card-border: rgba(30, 46, 74, 0.85);
  --glass-bg: rgba(10, 17, 31, 0.88);
  --accent-color: #2D7CD1;
  --accent-secondary: #E5C058;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 4px 24px rgba(212, 175, 55, 0.2);
}

* {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #1E2E4A;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #2D4266;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
}

.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

/* Brand Gradient Text (Navy to Gold) */
.finwise-gradient-text {
  background: linear-gradient(135deg, #15589B 0%, #1E70C2 40%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.dark .finwise-gradient-text {
  background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 40%, #E5C058 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-text {
  background: linear-gradient(135deg, #D4AF37 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Grid Pattern Background */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(21, 88, 155, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 88, 155, 0.05) 1px, transparent 1px);
}
.dark .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Ambient Radial Glows (Navy and Gold) */
.glow-orb-navy {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(21, 88, 155, 0.14) 0%, transparent 70%);
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb-gold {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  border-radius: 9999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

/* Keyframe Animations */
@keyframes pulseSubtle {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

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

.animate-pulse-subtle {
  animation: pulseSubtle 3s ease-in-out infinite;
}

/* Card Hover */
.pro-card,
.subservice-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pro-card:hover,
.subservice-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(21, 88, 155, 0.1), 0 8px 10px -6px rgba(21, 88, 155, 0.05);
  border-color: rgba(21, 88, 155, 0.4);
}
.dark .pro-card:hover,
.dark .subservice-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

/* Hide scrollbar for clean horizontal pill scroll */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Custom Interactive Sliders (Navy & Gold) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 9999px;
  outline: none;
  transition: background 0.2s;
}
.dark input[type="range"] {
  background: #1E2E4A;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #15589B;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(21, 88, 155, 0.5);
  border: 3px solid #D4AF37;
  transition: transform 0.15s ease;
}
.dark input[type="range"]::-webkit-slider-thumb {
  background: #D4AF37;
  border: 3px solid #0F1A2E;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #15589B;
  cursor: pointer;
  border: 3px solid #D4AF37;
}

/* Live Badge & Ping */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #D4AF37;
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: #D4AF37;
  opacity: 0.6;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Font Mono Numbers */
.font-mono-num {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' on, 'lnum' on;
}

/* 3D Background Web Canvas */
#finwise-hero-web-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & SMALL DISPLAY HARDENING (Screen Width <= 480px)
   Prevents overlapping, text colliding, and modal overflow
   ========================================================================== */
@media (max-width: 480px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Prevent headings colliding on small devices */
  h1 { font-size: 1.65rem !important; line-height: 1.25 !important; }
  h2 { font-size: 1.35rem !important; line-height: 1.3 !important; }
  h3 { font-size: 1.15rem !important; line-height: 1.35 !important; }

  /* Compact card padding on mobile */
  .pro-card,
  .subservice-card {
    padding: 1.1rem !important;
  }

  /* Tax Comparison card numbers protection */
  #calc-old-tax, #calc-new-tax {
    font-size: 1.05rem !important;
    letter-spacing: -0.04em !important;
    line-height: 1.2 !important;
  }

  #calc-savings-amount {
    font-size: 1.35rem !important;
    letter-spacing: -0.03em !important;
  }

  /* Ensure inputs don't zoom iOS */
  input[type="text"],
  input[type="number"],
  input[type="tel"],
  input[type="email"],
  select,
  textarea {
    font-size: 14px !important;
  }

  /* Sticky Bottom Bar safe spacing */
  #mobile-sticky-action-bar a {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    font-size: 12px !important;
  }

  /* Modal responsive constraints */
  #consultation-modal .glass-panel,
  #blog-reader-modal .glass-panel {
    padding: 1.1rem !important;
    border-radius: 1.25rem !important;
    max-height: 90vh !important;
  }
}
