/* ==========================================================================
   Raio-X Financeiro - Stylesheet Oficial
   ========================================================================== */

:root {
  --bg-main: #0A0A0A;
  --bg-surface: #161616;
  --bg-surface-subtle: #121212;
  --text-primary: #E8E8E8;
  --text-secondary: #B8B8B8;
  --text-muted: #9A9A9A;
  --color-primary: #2E7CF6;
  --color-primary-hover: #5C9AF9;
  --color-primary-glow: rgba(46, 124, 246, 0.5);
  --color-success: #00D26A;
  --color-danger: #E63946;
  --color-warning: #F0A020;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.07);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

/* Overdrive: Instrumento em Aquecimento — typed custom properties so the
   browser can smoothly interpolate values CSS can't normally tween
   (gradient alpha, filter amount, a scan-line position) in one motion. */
@property --pulse-glow {
  syntax: '<number>';
  inherits: false;
  initial-value: 0.14;
}

@property --report-reveal {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 180ms ease;
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary-hover);
  outline-offset: 2px;
  border-radius: 4px;
}

.link-underline {
  text-decoration: none;
}

.link-underline:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

input, select, button {
  font-family: inherit;
}

select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Base Wrapper */
.site-wrapper {
  background: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* Common Section Layout */
.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-divider {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Typography Utilities */
.font-display {
  font-family: var(--font-display);
}

.glow-blue {
  color: var(--color-primary);
  text-shadow: 0 0 30px var(--color-primary-glow);
}

.glow-green {
  color: var(--color-success);
  text-shadow: 0 0 30px rgba(0, 210, 106, 0.45);
}

.glow-red {
  color: var(--color-danger);
  text-shadow: 0 0 30px rgba(230, 57, 70, 0.45);
}

.chip-glow-blue {
  box-shadow: 0 0 16px rgba(46, 124, 246, 0.35);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 34px rgba(46, 124, 246, 0.32);
  transition: filter 180ms ease, transform 120ms ease, opacity 220ms ease;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  filter: brightness(1.15);
  transform: scale(1.03);
}

.btn-primary:active {
  transform: scale(0.97);
  filter: brightness(1.05);
}

.btn-cta-card {
  display: block;
  text-align: center;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: 12px;
  padding: 15px 18px;
  transition: filter 180ms ease, transform 120ms ease;
  text-decoration: none;
}

.btn-cta-card:hover {
  filter: brightness(1.15);
  transform: scale(1.015);
}

.btn-cta-card:active {
  transform: scale(0.98);
  filter: brightness(1.05);
}

.btn-outline {
  display: block;
  background: transparent;
  color: var(--text-primary) !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15.5px;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease, transform 120ms ease;
  text-align: center;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.07);
}

/* Scroll Fade Animations */
[data-fade] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1), transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered entrance for sibling groups that read as a list (steps, cards, testimonials) */
.fade-group > [data-fade]:nth-child(1) { transition-delay: 0ms; }
.fade-group > [data-fade]:nth-child(2) { transition-delay: 90ms; }
.fade-group > [data-fade]:nth-child(3) { transition-delay: 180ms; }
.fade-group > [data-fade]:nth-child(4) { transition-delay: 270ms; }

/* Hover effects for pricing cards */
.pricing-card-hover {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.pricing-card-hover:hover {
  transform: translateY(-4px);
}

.pricing-card-highlight:hover {
  box-shadow: 0 26px 70px rgba(46, 124, 246, 0.18);
  border-color: rgba(46, 124, 246, 0.5);
}

.pricing-card-standard:hover {
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Form Controls */
.form-input {
  width: 100%;
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 180ms ease;
}

.form-input:focus {
  border-color: var(--color-primary);
}

.form-select {
  width: 100%;
  background: #0A0A0A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239A9A9A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
  transition: border-color 180ms ease;
}

.form-select:focus {
  border-color: var(--color-primary);
}

/* FAQ Accordion */
.faq-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0);
  border: none;
  color: var(--text-primary);
  text-align: left;
  padding: 18px 20px;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  line-height: 1.5;
  transition: background 180ms ease;
}

.faq-btn:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-btn:active {
  background: rgba(255, 255, 255, 0.05);
}

/* Interactive disclosure inside the report mock */
.report-summary {
  transition: color 180ms ease;
}

.report-summary:hover {
  color: #374151;
}

.faq-icon {
  flex: none;
  color: var(--color-primary);
  font-size: 18px;
  display: inline-block;
  transition: transform 260ms ease;
}

.faq-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms ease;
}

.faq-collapse.is-open {
  grid-template-rows: 1fr;
}

.faq-collapse-inner {
  overflow: hidden;
}

/* Calculator result bar fill (transform-based to avoid animating layout width) */
.bar-fill {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill.is-filled {
  transform: scaleX(1);
}

/* ==========================================================================
   Overdrive: Instrumento em Aquecimento
   Hero: o glow radial vira uma pulsação lenta de "energia ligada", via
   @property (sem isso, o navegador não interpola um gradiente suavemente).
   Mock de diagnóstico: em vez de só entrar com fade, o cartão "revela" —
   começa dessaturado com uma linha de varredura, resolve pra cor plena.
   Onde o navegador suporta animation-timeline:view(), a revelação é
   literalmente amarrada à posição de scroll; senão, cai no mesmo gatilho
   de IntersectionObserver que já move todo [data-fade] do site.
   ========================================================================== */

.hero-pulse {
  --pulse-glow: 0.14;
  background: radial-gradient(ellipse at center, rgba(46, 124, 246, var(--pulse-glow)), rgba(46, 124, 246, 0) 72%);
  animation: heroPulse 7s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { --pulse-glow: 0.14; }
  50% { --pulse-glow: 0.22; }
}

.report-card {
  --report-reveal: 0;
  filter: grayscale(calc(1 - var(--report-reveal))) brightness(calc(0.88 + 0.12 * var(--report-reveal)));
  transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
              --report-reveal 1400ms cubic-bezier(0.16, 1, 0.3, 1) 300ms;
}

.report-card.is-visible {
  --report-reveal: 1;
}

.report-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 0%, rgba(92, 154, 249, 0.5) 50%, transparent 100%);
  height: 45%;
  transform: translateY(calc(-45% + var(--report-reveal) * 320%));
  opacity: calc(0.9 - 0.9 * var(--report-reveal));
}

@supports (animation-timeline: view()) {
  .report-card {
    transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1), transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
    animation: reportReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
}

@keyframes reportReveal {
  from { --report-reveal: 0; }
  to { --report-reveal: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pulse {
    animation: none;
    --pulse-glow: 0.16;
  }
  .report-card {
    animation: none;
    transition: none;
    --report-reveal: 1;
    filter: none;
  }
  .report-card::before {
    display: none;
  }
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .hero-header {
    padding: 72px 16px 72px !important;
  }
}
