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

:root {
  --primary-bg: #070c18;
  --secondary-bg: #0d1527;
  --card-bg: rgba(13, 22, 42, 0.75);
  --card-border: rgba(56, 189, 248, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --nav-bg: rgba(7, 12, 24, 0.85);
  --accent-blue: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
}

/* ==========================================================================
   LIGHT THEME (PERFECT CONTRAST & READABILITY)
   ========================================================================== */
html.light {
  --primary-bg: #f8fafc;
  --secondary-bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --nav-bg: rgba(255, 255, 255, 0.95);
}

* {
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scroll-behavior: smooth;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Background Gradients & Mesh (Dark Mode) */
.bg-mesh {
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.12) 0px, transparent 50%);
}

html.light .bg-mesh {
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.8) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
}

.bg-grid-pattern {
  background-size: 40px 40px;
  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);
}

html.light .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

/* Brand Title & Slogan High Contrast */
.brand-title {
  color: #ffffff;
}
html.light .brand-title {
  color: #070c18 !important;
}

.brand-slogan {
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
html.light .brand-slogan {
  color: #1d4ed8 !important; /* Deep vibrant cobalt blue */
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* Top Announcement Bar High Contrast */
.top-announcement-bar {
  background: linear-gradient(90deg, #0b152d, #0e2246, #0b152d);
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  color: #e2e8f0;
}
.top-announcement-bar a {
  color: #38bdf8;
}
.top-announcement-bar a:hover {
  color: #ffffff;
}

html.light .top-announcement-bar {
  background: #0f172a !important; /* Deep solid crisp navy slate for 100% readability in Light Mode */
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}
html.light .top-announcement-bar span strong {
  color: #38bdf8 !important;
}
html.light .top-announcement-bar a {
  color: #38bdf8 !important;
  font-weight: 700 !important;
}
html.light .top-announcement-bar .badge-normativa {
  background-color: rgba(6, 182, 212, 0.2) !important;
  color: #38bdf8 !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
}

/* Hero Taxcorp-Inspired Stage: 50/50 Cinematic Layout with Clean 3D Avatar on Right */
.hero-taxcorp-stage {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #070c18;
}

.hero-taxcorp-backdrop {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/avatar_cloud_clean.jpg');
  background-repeat: no-repeat;
  background-position: 85% center;
  background-size: 650px;
  pointer-events: none;
}

@media (min-width: 1280px) {
  .hero-taxcorp-backdrop {
    background-size: 750px;
    background-position: 90% center;
  }
}

@media (max-width: 1024px) {
  .hero-taxcorp-backdrop {
    background-position: center 20%;
    background-size: 480px;
    opacity: 0.35;
  }
}

/* Directional Gradient: Deep solid contrast on the left, clear view of artwork on the right */
.hero-taxcorp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #070c18 0%, rgba(7, 12, 24, 0.96) 42%, rgba(7, 12, 24, 0.6) 65%, rgba(7, 12, 24, 0.1) 85%, transparent 100%);
  pointer-events: none;
}

/* Futuristic Cyber-Bezel Screen Frame & Circuit Node Animations */
.hero-ecosystem-bezel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: rgba(7, 12, 24, 0.7);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 2rem;
  padding: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.35), inset 0 0 25px rgba(56, 189, 248, 0.1);
  animation: floatEcosystem 7s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-ecosystem-bezel:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 30px 60px -10px rgba(6, 182, 212, 0.5), inset 0 0 35px rgba(56, 189, 248, 0.2);
  transform: translateY(-4px);
}

html.light .hero-ecosystem-bezel {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 20px 45px -10px rgba(2, 132, 199, 0.25);
}

/* Pulsing Circuit Nodes */
.circuit-node-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.4);
  border: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}

.circuit-node-marker::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #38bdf8;
}

.circuit-node-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.8);
  animation: nodeRipple 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes nodeRipple {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Single-Line Metric Ticker Bar (Guaranteed Single-Row Fit) */
.hero-metric-single-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  white-space: nowrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@media (min-width: 1024px) {
  .hero-metric-single-line {
    gap: 0.85rem;
    font-size: 0.74rem;
  }
}

@media (min-width: 1440px) {
  .hero-metric-single-line {
    gap: 1.15rem;
    font-size: 0.8rem;
  }
}

html.light .hero-metric-single-line {
  border-color: rgba(148, 163, 184, 0.3);
}

@keyframes floatEcosystem {
  0%, 100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: translateY(-12px) rotateX(1.5deg) rotateY(-1.5deg);
  }
}

.hero-seamless-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 680px;
  border-radius: 1.5rem;
  overflow: hidden;
  /* Feathered radial / linear mask for seamless dissolution into background */
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 72%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 72%, rgba(0,0,0,0) 100%);
  filter: drop-shadow(0 20px 40px rgba(6, 182, 212, 0.25));
  transition: all 0.5s ease;
}

.hero-seamless-img-wrapper:hover {
  filter: drop-shadow(0 25px 50px rgba(6, 182, 212, 0.45));
}

.ecosystem-scanbeam {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.2) 20%, #38bdf8 50%, rgba(16, 185, 129, 0.8) 80%, transparent 100%);
  box-shadow: 0 0 15px #38bdf8, 0 0 30px #06b6d4;
  animation: scanbeamMove 4s linear infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes scanbeamMove {
  0% {
    top: 0%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

html.light .hero-seamless-img-wrapper {
  filter: drop-shadow(0 15px 35px rgba(2, 132, 199, 0.2));
}

html.light .hero-taxcorp-stage {
  background-color: #f8fafc;
}

html.light .hero-taxcorp-overlay {
  background: linear-gradient(90deg, #f8fafc 0%, rgba(248, 250, 252, 0.96) 42%, rgba(248, 250, 252, 0.65) 65%, rgba(248, 250, 252, 0.15) 85%, transparent 100%);
}

html.light .hero-taxcorp-stage h1 span:first-child {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html.light .hero-taxcorp-stage p {
  color: #334155 !important;
}

html.light .hero-taxcorp-stage .border-t {
  border-color: #cbd5e1 !important;
}

html.light .hero-taxcorp-stage .text-slate-300 {
  color: #1e293b !important;
}

/* Taxcorp-Style Action Buttons */
.btn-taxcorp-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  background: #ffffff;
  color: #070c18;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-taxcorp-primary:hover {
  transform: translateY(-2px);
  background: #38bdf8;
  color: #ffffff;
  box-shadow: 0 15px 30px -5px rgba(56, 189, 248, 0.5);
}

html.light .btn-taxcorp-primary {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3);
}

html.light .btn-taxcorp-primary:hover {
  background: #0369a1;
  color: #ffffff;
}

.btn-taxcorp-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.btn-taxcorp-secondary:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

html.light .btn-taxcorp-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0369a1;
}

.btn-taxcorp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #94a3b8;
  transition: all 0.2s ease;
}

.btn-taxcorp-link:hover {
  color: #38bdf8;
  transform: translateX(3px);
}

html.light .btn-taxcorp-link {
  color: #475569;
}

html.light .btn-taxcorp-link:hover {
  color: #0284c7;
}

/* Symmetrical Header Controls */
.btn-header-control {
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.75rem !important; /* 12px */
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  transition: all 0.2s ease-in-out !important;
}

/* Symmetrical Hero Action Buttons */
.hero-btn-symmetric {
  height: 52px !important;
  min-width: 220px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.625rem !important;
  border-radius: 9999px !important;
  font-size: 0.875rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

/* Symmetrical Ambient Glow Pills */
.pill-symmetric {
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  padding: 0 1rem !important;
  border-radius: 9999px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

/* Glassmorphism & Panel Styles */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.glass-panel-glow {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: 0 0 30px -5px rgba(37, 99, 235, 0.25);
}

html.light .glass-panel, 
html.light .glass-panel-glow {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03) !important;
}

.glass-pill {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

html.light .glass-pill {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   LIGHT THEME TEXT CONTRAST OVERRIDES
   ========================================================================== */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6,
html.light .text-white,
html.light .text-slate-100,
html.light .text-slate-200 {
  color: #0f172a !important;
}

html.light p,
html.light .text-slate-300 {
  color: #334155 !important;
}

html.light .text-slate-400 {
  color: #475569 !important;
}

html.light .text-cyan-300,
html.light .text-cyan-200 {
  color: #0284c7 !important;
}

html.light .text-emerald-300,
html.light .text-emerald-200 {
  color: #059669 !important;
}

html.light .text-purple-300 {
  color: #7c3aed !important;
}

html.light .text-amber-300 {
  color: #d97706 !important;
}

html.light .bg-slate-900,
html.light .bg-slate-950,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/90,
html.light .bg-slate-800,
html.light .bg-slate-800\/80,
html.light .bg-slate-800\/60,
html.light .bg-slate-800\/50,
html.light .bg-slate-950\/60,
html.light .bg-slate-950\/70,
html.light .bg-slate-950\/40 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light header.glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.light footer.bg-slate-950 {
  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

html.light input,
html.light textarea,
html.light select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light #demoModal > div,
html.light #adminArticlesModal > div,
html.light #articleReaderModal > div {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .solution-panel ul li span {
  color: #1e293b !important;
}

html.light .solution-panel ul li span strong {
  color: #0f172a !important;
}

/* Glowing Buttons & Badges */
.btn-glow-primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff !important;
}

.btn-glow-primary:hover {
  box-shadow: 0 0 35px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
}

.btn-glow-emerald {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
  color: #ffffff !important;
}

.btn-glow-emerald:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

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

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

@keyframes scanline {
  0% { top: 0%; }
  100% { top: 100%; }
}

.scanline {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, transparent);
  animation: scanline 3s linear infinite;
}

/* Image Hologram Glow Effect */
.holo-image-container {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 50px -10px rgba(6, 182, 212, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

html.light .holo-image-container {
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.12);
  border: 1px solid #cbd5e1;
}

.holo-image-container img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.holo-image-container:hover img {
  transform: scale(1.04);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--primary-bg);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Language Switcher Pill */
.lang-switcher-btn {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Print Styles for Brochure */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .no-print, .print-hidden {
    display: none !important;
  }
  .page-break {
    page-break-after: always;
    break-after: page;
  }
  .glass-panel, .glass-panel-glow {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    color: #0f172a !important;
  }
  .text-white, .text-slate-100, .text-slate-200 {
    color: #0f172a !important;
  }
  .text-slate-300, .text-slate-400 {
    color: #475569 !important;
  }
}
