: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%,
    #dc2626 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);
}

/* 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 {
  width: min(32rem, calc(100% - 32px));
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  color: #0f172a;
  background: #fff;
  overflow-y: auto;
  box-shadow: 0 24px 64px -20px #0f172a66;
}
#seg-modal::backdrop { background: #0f172a99; }
#seg-modal[open] { animation: fadeInUp 300ms ease-out; }
.solution-autoplay { min-height: 44px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 10px; color: #475569; font-size: 12px; text-align: center; }
.solution-autoplay[aria-pressed="true"] { border-color: #b91c1c; color: #b91c1c; background: #fef2f2; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-160%); z-index: 100; padding: 12px 20px; background: #fff; color: #991b1b; border: 2px solid currentColor; border-radius: 8px; }
.skip-link:focus { transform: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #b91c1c; outline-offset: 4px; }
section[id], main[id] { scroll-margin-top: 110px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #seg-modal[open] { animation: none; }
  .sol-stage-body, .sol-progress-bar { transition: none; }
}

/* 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;
}

[data-cat-btn] { min-height: 44px; }
#sol-interactive-container .solution-actions { flex-wrap: wrap; }

.solution-autoplay:disabled { color: #64748b; cursor: default; background: #f8fafc; }


.product-showcase { padding: 88px 0; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.product-showcase [hidden] { display: none; }
.product-intro { max-width: 760px; margin-bottom: 28px; }
.product-intro h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; margin-bottom: 16px; text-wrap: balance; }
.product-intro p { color: #475569; line-height: 1.7; max-width: 58ch; }
.product-system-picker { display: inline-flex; padding: 5px; gap: 5px; background: #e2e8f0; border-radius: 12px; margin-bottom: 32px; }
.product-system-picker button { min-height: 48px; padding: 10px 28px; border-radius: 8px; font-size: 16px; font-weight: 700; color: #475569; transition: color 180ms ease, background-color 180ms ease; }
.product-system-picker button[aria-pressed="true"] { color: #fff; background: #b91c1c; }
.product-system { min-width: 0; }
.product-system + .product-system { margin-top: 48px; }
.products-ready .product-system + .product-system { margin-top: 0; }
.product-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.product-heading h3 { font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.product-heading p { color: #475569; font-size: 14px; line-height: 1.6; }
.product-modules { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.product-modules button { min-height: 44px; padding: 10px 18px; color: #475569; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-weight: 600; background: #fff; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
.product-modules button[aria-pressed="true"] { color: #fff; border-color: #0f172a; background: #0f172a; }
.product-preview { display: block; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; }
.product-screen-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 18px; border-bottom: 1px solid #e2e8f0; font-size: 13px; font-weight: 600; color: #475569; }
.product-enlarge { display: inline-flex; gap: 8px; align-items: center; color: #b91c1c; flex-shrink: 0; }
.product-image-wrap { display: grid; place-items: center; position: relative; aspect-ratio: 1.86; overflow: hidden; background: #e2e8f0; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; }
.product-preview.is-loading .product-image-wrap::after { content: 'Carregando tela...'; position: absolute; bottom: 16px; left: 16px; padding: 10px 16px; background: #fff; color: #334155; border-radius: 8px; box-shadow: 0 6px 20px -8px #0f172a55; font-size: 13px; }
.product-image-enter { animation: product-screen-enter 320ms cubic-bezier(.16,1,.3,1); }
@keyframes product-screen-enter { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; padding-top: 24px; }
.product-module-copy { max-width: 58ch; }
.product-module-copy h4 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.product-module-copy p { color: #475569; font-size: 14px; line-height: 1.7; }
.product-contact { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 48px; padding: 12px 20px; border-radius: 10px; background: #b91c1c; color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; transition: background-color 180ms ease; }
.product-feedback { color: #991b1b; font-size: 14px; line-height: 1.6; margin-top: 12px; }
.product-privacy-note { color: #64748b; font-size: 12px; line-height: 1.7; margin-top: 24px; }
.product-fallback { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.product-fallback a { min-height: 44px; display: inline-flex; align-items: center; color: #b91c1c; text-decoration: underline; }
#product-dialog { width: min(1600px, calc(100% - 24px)); max-height: 92dvh; margin: auto; padding: 0; border: 1px solid #cbd5e1; border-radius: 14px; overflow: auto; background: #f8fafc; color: #0f172a; }
#product-dialog::backdrop { background: #0f172acc; }
.product-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; position: sticky; top: 0; background: #fff; border-bottom: 1px solid #e2e8f0; }
.product-dialog-bar h2 { font-size: 15px; font-weight: 700; }
.product-dialog-bar button { padding: 10px 14px; min-height: 44px; border-radius: 8px; background: #e2e8f0; white-space: nowrap; }
#product-dialog-image { width: 100%; height: auto; }
@media (hover: hover) {
  .product-system-picker button:not([aria-pressed="true"]):hover { color: #0f172a; background: #f8fafc; }
  .product-modules button:not([aria-pressed="true"]):hover { border-color: #64748b; background: #f1f5f9; color: #0f172a; }
  .product-contact:hover { background: #991b1b; }
  .product-preview:hover .product-enlarge { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 767px) {
  .product-showcase { padding: 60px 0; }
  .product-system-picker { display: flex; }
  .product-system-picker button { flex: 1; padding-inline: 12px; }
  .product-heading { display: block; }
  .product-heading h3 { margin-bottom: 8px; }
  .product-modules { gap: 8px; }
  .product-modules button { padding-inline: 12px; }
  .product-screen-bar { padding: 10px 12px; font-size: 12px; gap: 12px; }
  .product-enlarge { gap: 5px; }
  .product-bottom { flex-direction: column; align-items: stretch; gap: 18px; padding-top: 20px; }
  .product-contact { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .product-image-enter { animation: none; } }
.fx-paused .product-image-enter { animation: none; }
@media (max-width: 639px) { #lead-form input, #lead-form textarea { font-size: 16px; } }
