/* ============================================================
   Hsyst Org — Design System
   Paleta: preto profundo · roxo · verde · branco
   Visual: corporativo, sóbrio, cinematográfico
   ============================================================ */

:root {
  --hs-bg: #04040a;
  --hs-bg-ui: #0a0714;
  --hs-surface: rgba(255, 255, 255, 0.035);
  --hs-surface-2: rgba(255, 255, 255, 0.06);
  --hs-border: rgba(255, 255, 255, 0.09);
  --hs-border-strong: rgba(139, 92, 246, 0.35);
  --hs-purple: #8b5cf6;
  --hs-purple-bright: #a78bfa;
  --hs-purple-deep: #6d28d9;
  --hs-purple-deeper: #4c1d95;
  --hs-green: #10b981;
  --hs-green-bright: #34d399;
  --hs-green-deep: #047857;
  --hs-text: #ffffff;
  --hs-muted: rgba(255, 255, 255, 0.6);
  --hs-faint: rgba(255, 255, 255, 0.38);
  --hs-danger: #f43f5e;
  --hs-warning: #fbbf24;
  --hs-radius: 18px;
  --hs-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75);
  --hs-glow-purple: 0 0 30px rgba(139, 92, 246, 0.35);
  --hs-glow-green: 0 0 30px rgba(16, 185, 129, 0.35);
}

* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

html { scroll-behavior: smooth; }

body {
  background: var(--hs-bg);
  color: var(--hs-text);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .hs-display {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }

::selection { background: rgba(139, 92, 246, 0.4); color: #fff; }

/* ============================================================
   Atmosfera cinematográfica (aurora + estrelas + grade + vinheta)
   ============================================================ */

.hs-atmo {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(100% 80% at 100% 110%, rgba(16, 185, 129, 0.12), transparent 55%),
    linear-gradient(180deg, #04040a 0%, #06040f 50%, #04040a 100%);
}

.hs-orbs { position: absolute; inset: 0; z-index: -2; }

.hs-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  will-change: transform;
}

.hs-orb--purple {
  width: 620px; height: 620px;
  left: -140px; top: -160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 65%);
  animation: hsDrift 22s ease-in-out infinite alternate;
}

.hs-orb--purple2 {
  width: 480px; height: 480px;
  right: -120px; top: 22%;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.5), transparent 65%);
  animation: hsDrift 28s ease-in-out infinite alternate-reverse;
}

.hs-orb--green {
  width: 560px; height: 560px;
  left: 30%; bottom: -220px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 65%);
  animation: hsDrift 25s ease-in-out infinite alternate;
}

.hs-orb--green2 {
  width: 320px; height: 320px;
  right: 12%; bottom: 8%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.3), transparent 70%);
  animation: hsDrift 30s ease-in-out infinite alternate-reverse;
}

@keyframes hsDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.08); }
  100% { transform: translate(-50px, 50px) scale(0.96); }
}

.hs-stars { position: absolute; inset: 0; z-index: -1; }

.hs-star {
  position: absolute;
  width: 2px; height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.5;
  animation: hsTwinkle 4s ease-in-out infinite;
}

@keyframes hsTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.85; transform: scale(1.25); }
}

.hs-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 60% at 50% 30%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000 0%, transparent 100%);
}

.hs-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(110% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

/* ============================================================
   Texto gradiente animado
   ============================================================ */

.hs-grad {
  background: linear-gradient(90deg, var(--hs-purple-bright), var(--hs-green-bright) 45%, var(--hs-purple-bright) 90%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hsGradShift 6s linear infinite;
}

@keyframes hsGradShift { to { background-position: 220% center; } }

.hs-grad--static {
  background: linear-gradient(90deg, var(--hs-purple-bright), var(--hs-green-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Glass / cards
   ============================================================ */

.hs-glass {
  background: var(--hs-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
}

.hs-glass--strong {
  background: linear-gradient(160deg, rgba(20, 14, 40, 0.85), rgba(8, 6, 16, 0.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow);
}

.hs-card {
  position: relative;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.hs-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(80% 60% at 50% 0%, rgba(139, 92, 246, 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hs-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.8);
}

.hs-card:hover::after { opacity: 1; }

/* ============================================================
   Botões
   ============================================================ */

.hs-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.9rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--hs-purple-deep), var(--hs-purple) 55%, var(--hs-purple-bright));
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.35s ease, filter 0.25s ease;
  box-shadow: 0 12px 30px -10px rgba(139, 92, 246, 0.55);
  overflow: hidden;
}

.hs-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.hs-btn:hover::before { left: 130%; }

.hs-btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 18px 40px -12px rgba(139, 92, 246, 0.65); }
.hs-btn:active { transform: translateY(0) scale(0.99); }

.hs-btn--green {
  background: linear-gradient(135deg, var(--hs-green-deep), var(--hs-green) 55%, var(--hs-green-bright));
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.55);
}

.hs-btn--green:hover { box-shadow: 0 18px 40px -12px rgba(16, 185, 129, 0.6); }

.hs-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--hs-border);
  box-shadow: none;
  color: #fff;
}

.hs-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); box-shadow: none; filter: none; border-color: rgba(139, 92, 246, 0.4); }

.hs-btn--danger {
  background: linear-gradient(135deg, #9f1239, var(--hs-danger));
  box-shadow: 0 12px 30px -10px rgba(244, 63, 94, 0.5);
}

.hs-btn--sm { padding: 0.5rem 1rem; font-size: 0.82rem; border-radius: 10px; }

/* ============================================================
   Formulários
   ============================================================ */

.hs-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hs-border);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hs-input::placeholder { color: var(--hs-faint); }

.hs-input:focus {
  border-color: var(--hs-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

.hs-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hs-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   Badges
   ============================================================ */

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hs-badge--purple { background: rgba(139, 92, 246, 0.14); color: var(--hs-purple-bright); border: 1px solid rgba(139, 92, 246, 0.3); }
.hs-badge--green  { background: rgba(16, 185, 129, 0.14); color: var(--hs-green-bright); border: 1px solid rgba(16, 185, 129, 0.3); }
.hs-badge--red    { background: rgba(244, 63, 94, 0.14); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }
.hs-badge--amber  { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border: 1px solid rgba(251, 191, 36, 0.3); }
.hs-badge--muted  { background: rgba(255, 255, 255, 0.06); color: var(--hs-muted); border: 1px solid var(--hs-border); }

/* ============================================================
   Toast
   ============================================================ */

.hs-toast {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 380px;
  padding: 0.95rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(26, 18, 48, 0.92), rgba(8, 6, 16, 0.95));
  border: 1px solid var(--hs-border);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  backdrop-filter: blur(14px);
}

.hs-toast.show { transform: translateX(0); opacity: 1; }

.hs-toast__icon { font-size: 1.15rem; }
.hs-toast__msg  { font-size: 0.9rem; font-weight: 500; line-height: 1.4; }

/* ============================================================
   Navbar
   ============================================================ */

.hs-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(5, 4, 12, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hs-border);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.hs-nav.scrolled {
  background: rgba(4, 4, 10, 0.9);
  box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.9);
}

.hs-nav__link {
  position: relative;
  color: var(--hs-muted);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.35rem 0.1rem;
  transition: color 0.25s ease;
}

.hs-nav__link:hover { color: #fff; }

.hs-nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hs-purple), var(--hs-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.hs-nav__link:hover::after, .hs-nav__link.active::after { transform: scaleX(1); }
.hs-nav__link.active { color: #fff; }

/* ============================================================
   Revelação on-scroll
   ============================================================ */

.hs-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hs-reveal.is-visible { opacity: 1; transform: translateY(0); }

.hs-d-1 { transition-delay: 0.08s; }
.hs-d-2 { transition-delay: 0.16s; }
.hs-d-3 { transition-delay: 0.24s; }
.hs-d-4 { transition-delay: 0.32s; }
.hs-d-5 { transition-delay: 0.4s; }
.hs-d-6 { transition-delay: 0.48s; }

/* ============================================================
   Sidebar (aplicações)
   ============================================================ */

.hs-sidebar {
  background: linear-gradient(180deg, rgba(16, 11, 32, 0.92), rgba(6, 5, 12, 0.96));
  border-right: 1px solid var(--hs-border);
  backdrop-filter: blur(18px);
}

.hs-side-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  color: var(--hs-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
}

.hs-side-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.hs-side-link.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.16), rgba(16, 185, 129, 0.08));
  color: #fff;
  border-left-color: var(--hs-purple);
  box-shadow: inset 0 0 30px -18px rgba(139, 92, 246, 0.6);
}

.hs-side-link i { width: 22px; text-align: center; }

/* ============================================================
   Tabelas
   ============================================================ */

.hs-table { width: 100%; border-collapse: collapse; }

.hs-table thead th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hs-faint);
  border-bottom: 1px solid var(--hs-border);
}

.hs-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  vertical-align: middle;
}

.hs-table tbody tr { transition: background 0.2s ease; }
.hs-table tbody tr:hover { background: rgba(139, 92, 246, 0.06); }

/* ============================================================
   Tabs
   ============================================================ */

.hs-tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--hs-border); }

.hs-tab {
  position: relative;
  padding: 0.75rem 1.4rem;
  background: none;
  border: none;
  color: var(--hs-faint);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.25s ease;
}

.hs-tab:hover { color: var(--hs-muted); }

.hs-tab.active { color: var(--hs-purple-bright); }

.hs-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hs-purple), var(--hs-green));
}

/* ============================================================
   Modal
   ============================================================ */

.hs-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 2, 8, 0.8);
  backdrop-filter: blur(8px);
}

.hs-modal.open { display: flex; }

.hs-modal__panel {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: hsPop .38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hsPop {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Animations utilitárias
   ============================================================ */

.hs-fade-up { animation: hsFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes hsFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hs-float { animation: hsFloat 6s ease-in-out infinite; }

@keyframes hsFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hs-pulse-ring { position: relative; }
.hs-pulse-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5);
  animation: hsPulseRing 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes hsPulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45); }
  70%  { box-shadow: 0 0 0 26px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.hs-spin-slow { animation: hsSpin 14s linear infinite; }

@keyframes hsSpin { to { transform: rotate(360deg); } }

.hs-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), rgba(16, 185, 129, 0.5), transparent);
  border: none;
}

/* ============================================================
   Performance & mobile
   Blur em camadas grandes, blend modes e animações contínuas
   são caros em celulares/tablets — aqui desligamos com segurança.
   ============================================================ */

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

@media (hover: none), (max-width: 767px) {

  /* Orbes: sem blur de 90px, sem blend e sem animação -> viram gradientes estáticos */
  .hs-orb {
    animation: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
    will-change: auto;
  }
  .hs-orb--purple2, .hs-orb--green2 { display: none; }

  /* Estrelas: estáticas (a JS também reduz a quantidade) */
  .hs-star { animation: none !important; opacity: 0.3; }

  /* Camadas full-screen que repintam a cada scroll */
  .hs-grid-overlay, .hs-vignette { display: none; }
  .hs-atmo {
    background:
      radial-gradient(120% 90% at 50% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
      radial-gradient(100% 80% at 100% 110%, rgba(16, 185, 129, 0.14), transparent 55%);
  }

  /* Gradiente de texto: estático */
  .hs-grad, .gradient-text, .animate-gradient { animation: none !important; }

  /* Backdrop-filter é o vilão de GPU em mobile */
  .hs-nav, .hs-glass, .hs-glass--strong, .hs-sidebar,
  .hs-chip, .hs-toast, .hs-modal,
  .glass-card, .glass, .modal-backdrop,
  .captcha-popup {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .hs-nav { background: rgba(5, 4, 12, 0.92); }

  /* Animações contínuas/flutuações: dispensáveis em tela pequena */
  .hs-float, .hs-float-shape, .hs-spin-slow,
  .hs-pulse-ring::before, .hs-shine::after,
  .hs-btn::before { animation: none !important; }

  /* Nunca deixar conteúdo invisível esperando IntersectionObserver */
  .hs-reveal, [data-hs-3d] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hs-card-in { animation: none !important; opacity: 1 !important; transform: none !important; }

  /* Sem hover (não existe cursor) — evita transitions inúteis */
  .hs-card:hover, .hs-card,
  .glass-card:hover, .glass-card,
  .team-card:hover, .team-card,
  .hover-lift:hover, .hover-lift,
  .hs-btn:hover { transform: none !important; }

  /* Toast ocupa a largura útil */
  .hs-toast { left: 1rem; right: 1rem; top: 1rem; max-width: none; }

  /* Evita estouro horizontal por palavras longas */
  h1, h2, h3, h4, h5, h6, .hs-display { overflow-wrap: break-word; }
}
/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07060d; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.35); border-radius: 8px; border: 2px solid #07060d; }
::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.6); }