/* ═══════════════════════════════════════════════════════════════
   The CPA Suite — "Swiss Vault & Modern Ledger" Design System
   Phase 1 & 2: Foundation, Typography, and Hero Animations
   ═══════════════════════════════════════════════════════════════ */

/* ── Base Reset & Accessibility ──────────────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Custom Utilities ────────────────────────────────────────── */

/* Tactile Button (Hover diagonal shift) */
.btn-tactile {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

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

/* Hairline Borders for structural bento grids (Dark Theme) */
.hairline-border {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hairline-border-b {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Navbar Glassmorphism (Dark Theme) ─────────────────────── */
#navbar {
  background: transparent;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: rgba(11, 18, 33, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); 
}

/* ── High-End Animated Backgrounds (ThreeUI Style) ────────────── */

/* 1. Fluid Ambient Mesh (Aurora Glow) for Tab 1 */
.bg-pixels-1 {
  background: 
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
  background-size: 200% 200%;
  animation: auroraFlow 12s ease-in-out infinite alternate;
  will-change: background-position;
}
@keyframes auroraFlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 100%; }
}

/* 2. 3D Perspective Tron Grid for Tab 2 */
.bg-pixels-2 {
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background-image: 
    linear-gradient(rgba(200, 155, 60, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 155, 60, 0.15) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(60deg) scale(1.5);
  animation: grid3DMove 10s linear infinite;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 60%);
  will-change: transform;
}
@keyframes grid3DMove {
  0% { transform: perspective(600px) rotateX(60deg) scale(1.5) translateY(0); }
  100% { transform: perspective(600px) rotateX(60deg) scale(1.5) translateY(60px); } /* Match background-size */
}

/* 3. Data Stream Sweep (Scanner) for Tab 3 */
.bg-pixels-3 {
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  position: relative;
  overflow: hidden;
}
.bg-pixels-3::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15) 10%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.15) 90%, transparent);
  height: 200%;
  animation: radarScan 6s linear infinite;
  will-change: transform;
}
@keyframes radarScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(50%); }
}

/* ── Scroll Progress Bar ───────────────────────────────────── */
#scroll-progress {
  transition: none;
  will-change: transform;
}

/* ── Typography Modifiers ──────────────────────────────────── */
/* Editorial italic accents inside bold display headings */
.editorial-italic {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Audit/Ledger Monospace Tags */
.ledger-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Hero 4-Tab Interactive Showcase ───────────────────────── */
.progress-bar {
  transition: width 7s linear;
}
.progress-bar.no-transition {
  transition: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Dual-Row Marquee ────────────────────────────────────────── */
.marquee-wrapper {
  width: 100%;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
}

.track-left {
  animation: marqueeLeft 35s linear infinite;
}

.track-right {
  animation: marqueeRight 40s linear infinite;
}

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

.marquee-item {
  white-space: nowrap;
  flex-shrink: 0;
  will-change: transform;
}

@keyframes marqueeLeft {
  0% { transform: translateX(0%); }
  100% { transform: translateX(calc(-50% - 12px)); } /* -50% minus half the gap to loop perfectly */
}

@keyframes marqueeRight {
  0% { transform: translateX(calc(-50% - 12px)); }
  100% { transform: translateX(0%); }
}

/* ── Reduced Motion: Accessibility ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .progress-bar {
    transition: none !important;
  }
}

/* ── Spotlight Hover Effect (Antigravity Style) ────────────── */
.tilt-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(37, 99, 235, 0.12); /* Default Trust Blue Spotlight */
}

.tilt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y), 
    var(--spotlight-color), 
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

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

/* ── Custom Range Slider (Phase 6) ─────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #2563EB; /* Matches our brand Trust Blue */
  margin-top: -9px;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  cursor: grab;
  transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}

/* ── FAQ Laser Beam Hover Effect (Phase 7) ─────────────────── */
.faq-item {
  position: relative;
}
.faq-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2563EB, transparent);
  transition: none;
}
.faq-item:hover::after {
  left: 100%;
  transition: left 0.6s ease-in-out;
}



