/* ================================================
   Financezy — Components
   ================================================ */

/* ── Navbar ────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 72px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(10,46,82,.08);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(10,46,82,.1); }

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo img { height: 52px; width: auto; }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.navbar__links a {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-navy);
  transition: color 0.2s;
  position: relative;
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--color-green);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s var(--ease-out);
}
.navbar__links a:hover { color: var(--color-green); }
.navbar__links a:hover::after,
.navbar__links a.active::after { transform: scaleX(1); }
.navbar__links a.active { color: var(--color-green); font-weight: 600; }

.navbar__cta { margin-left: 8px; }

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.navbar__hamburger:hover { background: var(--color-gray-lt); }
.navbar__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all 0.25s;
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.navbar__mobile {
  display: none;
  position: fixed;
  top: 112px; left: 0; right: 0;
  background: white;
  padding: 24px;
  border-bottom: 1px solid rgba(10,46,82,.08);
  flex-direction: column;
  gap: 20px;
  z-index: 98;
  box-shadow: 0 8px 24px rgba(10,46,82,.1);
}
.navbar__mobile.open { display: flex; }
.navbar__mobile a {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-navy);
  font-size: var(--text-lg);
  padding: 8px 0;
  border-bottom: 1px solid rgba(10,46,82,.06);
}
.navbar__mobile a:last-child { border-bottom: none; }
.navbar__mobile .btn { width: 100% !important; justify-content: center; white-space: normal; text-align: center; }

/* ── Footer ────────────────────────────────────── */
.footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer__brand img { height: 36px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer__brand p { font-size: var(--text-sm); line-height: 1.75; color: rgba(255,255,255,0.5); max-width: 260px; }

.footer__col h4 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 12px; }
.footer__col a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--color-green); }

.footer__disclaimer {
  background: rgba(232,160,32,0.08);
  border: 1px solid rgba(232,160,32,0.25);
  border-left: 3px solid rgba(232,160,32,0.5);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 24px;
}
.footer__disclaimer-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(232,160,32,0.8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer__disclaimer-text { font-size: 0.75rem; color: rgba(255,255,255,0.38); line-height: 1.65; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p, .footer__bottom a { font-size: var(--text-xs); color: rgba(255,255,255,0.35); }
.footer__bottom a:hover { color: rgba(255,255,255,0.6); }

/* ── Hero IA card ──────────────────────────────── */
.hero-ia-card {
  background: rgba(0,133,111,0.12);
  border: 1px solid rgba(0,133,111,0.35);
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 360px;
}
.hero-ia-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #4DD4B0;
  margin-bottom: 8px;
}
.hero-ia-card__text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}
.hero-ia-card__text strong { color: rgba(255,255,255,0.9); }

/* ── Lead form ─────────────────────────────────── */
.lead-form {
  display: flex;
  gap: 0;
  max-width: 480px;
}
.lead-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(10,46,82,.15);
  border-right: none;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-navy);
  background: white;
  transition: border-color 0.2s;
}
.lead-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-green);
}
.lead-form button {
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  padding: 14px 24px;
  white-space: nowrap;
}

/* ── Progress bars ─────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--color-gray-lt);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1s var(--ease-out);
}

/* ── Market Ticker ─────────────────────────────── */
.ticker-bar {
  position: fixed;
  top: 72px; left: 0; right: 0;
  z-index: 99;
  height: 40px;
  background: var(--color-navy);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
}

.ticker-bar__badge {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px 0 18px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.10);
  height: 100%;
  flex-shrink: 0;
}

.ticker-bar__live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-green);
  flex-shrink: 0;
  animation: ticker-pulse 2s ease-in-out infinite;
}

@keyframes ticker-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(0,133,111,.7); }
  70%  { box-shadow: 0 0 0 6px rgba(0,133,111,0);  }
  100% { box-shadow: 0 0 0 0   rgba(0,133,111,0);  }
}

.ticker-bar__viewport {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

.ticker-bar__track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 35s linear infinite;
}
.ticker-bar__track:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 22px;
}

.ticker-item__label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.ticker-item__price {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}

.ticker-item__change {
  font-size: 0.72rem;
  font-weight: 700;
}

.ticker-item--up   .ticker-item__change { color: #2ED8A0; }
.ticker-item--down .ticker-item__change { color: #FF6B6B; }

.ticker-sep {
  color: rgba(255,255,255,0.14);
  font-size: 0.55rem;
  padding: 0 2px;
}

.ticker-bar__loading {
  color: rgba(255,255,255,0.3);
  font-size: 0.78rem;
  padding: 0 28px;
  letter-spacing: 0.02em;
}

/* ── Mobile responsive ─────────────────────────── */
@media (max-width: 768px) {
  .navbar__links, .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .lead-form { flex-direction: column; }
  .lead-form input[type="email"] {
    border-right: 2px solid rgba(10,46,82,.15);
    border-bottom: none;
    border-radius: var(--radius-full) var(--radius-full) 0 0;
  }
  .lead-form button { border-radius: 0 0 var(--radius-full) var(--radius-full); }
  .hero-ia-card { max-width: 100%; width: 100%; }

  /* Ticker mobile */
  .ticker-bar { height: 36px; }
  .ticker-bar__badge { display: none; }
  .ticker-bar__track { animation-duration: 28s !important; }
  .ticker-item { padding: 0 16px; gap: 5px; }
  .ticker-item__label { font-size: 0.65rem; }
  .ticker-item__price { font-size: 0.75rem; }
  .ticker-item__change { font-size: 0.67rem; }

  /* Ajuste da navbar mobile com ticker de 36px */
  .navbar__mobile { top: 108px; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__brand { grid-column: unset; }
  .hero-ia-card { padding: 14px 16px; }
}
