/*
 * BI Smart Lab — custom.css
 * Complemento ao Tailwind CDN:
 * animações, efeitos de fundo, scrollbar, gradientes de texto,
 * e qualquer coisa que Tailwind não cobre via classes utilitárias.
 */

/* ── FONTES ESTILO APPLE ─────────────────────────────────────
   SF Pro Display/Text não são distribuídas livremente.
   Usamos Plus Jakarta Sans (display) + Inter (corpo) que são
   as referências open-source mais próximas do sistema Apple.
   ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text',    'Segoe UI', sans-serif;

  --deep:    #060412;
  --navy:    #0c0920;
  --primary: #4f0d9e;
  --violet:  #7c3aed;
  --purple:  #8b5cf6;
  --soft:    #a78bfa;
  --magenta: #c026d3;
  --orange:  #f97316;
  --amber:   #f59e0b;

  --grad:    linear-gradient(135deg, #4f0d9e, #c026d3);
  --grad-t:  linear-gradient(90deg,  #8b5cf6, #c026d3, #f97316);

  --border:  rgba(139, 92, 246, 0.22);
  --border-h:rgba(139, 92, 246, 0.50);
  --glass:   rgba(255, 255, 255, 0.045);
  --card:    rgba(79, 13, 158, 0.14);
  --muted:   rgba(226, 213, 255, 0.55);
  --text:    #ede8ff;
}

/* ── BASE ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.35); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.6); }

/* ── FUNDO: NOISE + ORBS ───────────────────────────────────── */
.bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.032'/%3E%3C/svg%3E");
}
.orb {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0;
  animation: orbFloat 14s ease-in-out infinite alternate;
}
.orb-1 { width:640px;height:640px;background:radial-gradient(circle,rgba(79,13,158,.55),transparent 70%);top:-220px;left:-220px; }
.orb-2 { width:500px;height:500px;background:radial-gradient(circle,rgba(192,38,211,.28),transparent 70%);bottom:-120px;right:-120px;animation-delay:-7s; }
.orb-3 { width:400px;height:400px;background:radial-gradient(circle,rgba(249,115,22,.12),transparent 70%);top:42%;left:54%;animation-delay:-3.5s; }
@keyframes orbFloat {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(28px,18px) scale(1.05); }
}

/* ── GRADIENTE DE TEXTO ────────────────────────────────────── */
.text-grad {
  background: var(--grad-t);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-grad-white {
  background: linear-gradient(90deg, #fff 40%, var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── PROGRESS BAR ──────────────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 200;
  background: linear-gradient(90deg, var(--violet), var(--orange));
  transition: width .1s linear;
}

/* ── CARD HOVER LINE ───────────────────────────────────────── */
.card-glow {
  position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card-glow::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: 0; transition: opacity .3s;
}
.card-glow:hover { transform: translateY(-4px); }
.card-glow:hover::before { opacity: 1; }

/* ── FAQ ACCORDION ─────────────────────────────────────────── */
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  padding: 0 24px;
}
.faq-answer.open { max-height: 500px; padding: 18px 24px 22px; }
.faq-icon { transition: transform .3s ease; }
.faq-question.open .faq-icon { transform: rotate(45deg); }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 4, 18, .88);
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}
.modal-overlay.open { display: flex; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.modal-box { animation: modalIn .28s ease; }

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: .35; }
}

.anim-up   { animation: fadeUp   .7s ease both; }
.anim-down { animation: fadeDown .6s ease both; }
.anim-d1   { animation-delay: .10s; }
.anim-d2   { animation-delay: .20s; }
.anim-d3   { animation-delay: .30s; }
.anim-d4   { animation-delay: .40s; }
.anim-d5   { animation-delay: .50s; }

/* Reveal on scroll */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .65s ease, transform .65s ease;
}
[data-reveal][data-delay="1"] { transition-delay: .10s; }
[data-reveal][data-delay="2"] { transition-delay: .20s; }
[data-reveal][data-delay="3"] { transition-delay: .30s; }
[data-reveal][data-delay="4"] { transition-delay: .40s; }
[data-reveal][data-delay="5"] { transition-delay: .50s; }
[data-reveal][data-delay="6"] { transition-delay: .60s; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ── TOAST ─────────────────────────────────────────────────── */
.toast {
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translateX(0); }

/* ── FORM FOCUS RING ───────────────────────────────────────── */
.field:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,.18);
}

/* ── ADMIN SIDEBAR ACTIVE ──────────────────────────────────── */
.sidebar-link.active {
  color: #fff;
  background: rgba(139,92,246,.18);
  border-left: 2px solid var(--purple);
  padding-left: 14px;
}

/* ── TABLE HOVER ───────────────────────────────────────────── */
tbody tr:hover td { background: rgba(139,92,246,.06); }

/* ── BADGE DOT PULSE ───────────────────────────────────────── */
.badge-dot { animation: pulse 1.8s ease infinite; }

/* ── NAVBAR SCROLLED ───────────────────────────────────────── */
.navbar-scrolled { padding-top: 10px !important; padding-bottom: 10px !important; }
