/* ==========================================================================
   Componentes compartilhados: header, botões, progresso, modal, revelação
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.35s var(--ease-out), border-color 0.35s, background 0.35s;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  box-shadow: 0 8px 30px rgba(20, 40, 61, 0.07);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.nav-logo {
  display: inline-flex;
  flex: none;
}

.nav-logo img {
  width: 168px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-login {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 8px 12px;
}

.nav-toggle {
  display: none;
}

/* ---------- Barra de progresso ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-orange));
  pointer-events: none;
}

/* ---------- Botões ---------- */
.btn {
  --btn-bg: var(--action);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 0.95rem/1 var(--f-body);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(33, 108, 169, 0.28);
  background: var(--action-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.875rem;
}

.btn--lg {
  min-height: 58px;
  padding: 0 10px 0 26px;
  font-size: 1rem;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn--ghost:hover {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--ink-3), 0 10px 24px rgba(20, 40, 61, 0.08);
}

.btn--ghost.btn--lg {
  padding: 0 26px;
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--deep-800);
}

.btn--light:hover {
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

/* Círculo com seta (CTA principal) */
.btn-arrow {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 0.35s var(--ease-out), background 0.25s;
}

.btn-arrow svg {
  width: 18px;
  height: 18px;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
  background: var(--brand-orange);
  color: var(--deep-800);
}

/* ---------- Revelação ao rolar ---------- */
.js-reveal .reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Modal de cadastro (prévia) ---------- */
.signup-dialog {
  border: 0;
  border-radius: var(--radius-l);
  padding: 32px;
  width: min(440px, calc(100% - 32px));
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
  color: var(--ink);
}

.signup-dialog::backdrop {
  background: rgba(16, 36, 59, 0.55);
  backdrop-filter: blur(4px);
}

.signup-dialog h2 {
  font-size: 1.7rem;
}

.signup-dialog form {
  display: grid;
  gap: 12px;
}

.signup-dialog label {
  display: grid;
  gap: 6px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
}

.signup-dialog input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

.signup-dialog input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(83, 160, 221, 0.2);
}

.signup-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.signup-msg {
  min-height: 1.4em;
  font-size: var(--fs-small);
  color: var(--ok);
}

@media (max-width: 900px) {
  .nav-links,
  .nav-login {
    display: none;
  }

  .nav-logo img {
    width: 138px;
  }
}

@media (max-width: 420px) {
  .nav .btn--sm {
    padding: 0 14px;
    font-size: 0.8125rem;
  }

  .nav-logo img {
    width: 124px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .btn,
  .btn-arrow {
    transition: none;
  }
}
