/* components.css — header, navegação, botões, cards, badges, formulário e footer */

/* ===== Header / navegação ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-md);
}

.brand:hover { text-decoration: none; }

.brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.brand strong {
  font-weight: 600;
}

.brand strong span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  padding: 0;
}

.site-nav a:not(.btn) {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  position: relative;
}

.site-nav a:not(.btn):hover {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a:not(.btn).is-active {
  color: var(--color-text);
}

.site-nav a:not(.btn).is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--gradient-brand);
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    padding: var(--space-5);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-2);
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }

  .site-nav a:not(.btn) {
    display: block;
    padding: var(--space-3) var(--space-2);
    font-size: var(--text-md);
    border-radius: var(--radius-sm);
  }

  .site-nav a:not(.btn).is-active::after { display: none; }

  .site-nav .btn { margin-top: var(--space-3); justify-content: center; }
}

/* ===== Botões ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.78em 1.6em;
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}

.btn--primary:hover { box-shadow: 0 16px 44px rgb(59 123 246 / 0.42); }

.btn--ghost {
  background: transparent;
  color: var(--grad-cyan);
  box-shadow: inset 0 0 0 1.5px var(--grad-cyan);
}

.btn--ghost:hover {
  background: color-mix(in srgb, var(--grad-cyan) 12%, transparent);
}

/* ===== Badges de status ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge--scale {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--glow-brand);
}

.badge--valid {
  color: var(--grad-cyan);
  background: color-mix(in srgb, var(--grad-cyan) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--grad-cyan) 45%, transparent);
}

.badge--soon {
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

/* ===== Cards ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-1);
}

.card h3 { margin-bottom: var(--space-3); }

.card--hover {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card--hover:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--grad-blue) 55%, var(--color-border));
  box-shadow: var(--shadow-2);
}

/* ===== Formulário ===== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75em 1em;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--text-sm);
}

.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--color-text-muted) 65%, transparent); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--grad-cyan);
  outline-offset: 0;
  border-color: transparent;
}

.field textarea { resize: vertical; min-height: 140px; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: var(--space-9);
  padding-block: var(--space-7);
}

.site-footer .container > p {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-7);
}

.footer-grid h2 {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.footer-grid a {
  color: var(--color-text-muted);
}

.footer-grid a:hover { color: var(--color-text); }

.footer-tagline {
  margin-top: var(--space-4);
  max-width: 34ch;
  font-size: var(--text-sm);
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
