/* =====================================================
   SENSOREAMENTO — main.css
   ===================================================== */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #07090f;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #07090f; }
::-webkit-scrollbar-thumb { background: #00ff88; border-radius: 2px; }

/* ── Noise texture overlay ─────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: .4;
}

/* ── Grid lines background ─────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(0,255,136,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Glow ──────────────────────────────────────────── */
.glow-neon  { text-shadow: 0 0 20px rgba(0,255,136,.6), 0 0 40px rgba(0,255,136,.3); }
.glow-cyan  { text-shadow: 0 0 20px rgba(0,212,255,.6), 0 0 40px rgba(0,212,255,.3); }
.glow-box   { box-shadow: 0 0 30px rgba(0,255,136,.15), inset 0 1px 0 rgba(0,255,136,.1); }

/* ── Gradient text ─────────────────────────────────── */
.grad-text {
  background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scanline overlay ──────────────────────────────── */
.scanline {
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,255,136,.015) 2px,
    rgba(0,255,136,.015) 4px
  );
}

/* ── Animated border ───────────────────────────────── */
.border-neon { border: 1px solid rgba(0,255,136,.25); }
.border-neon:hover { border-color: rgba(0,255,136,.6); transition: border-color .3s; }

/* ── Pulse dot ─────────────────────────────────────── */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 0 0 rgba(0,255,136,.4);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0,255,136,.6); }
  70%  { box-shadow: 0 0 0 10px rgba(0,255,136,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,136,0); }
}

/* ── Reveal on scroll ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pillar card ───────────────────────────────────── */
.pillar-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,255,136,.12);
  border-color: rgba(0,255,136,.5);
}

/* ── CTA button ────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #00ff88, #00d4ff);
  color: #07090f;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  letter-spacing: .05em;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.15);
  opacity: 0;
  transition: opacity .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,255,136,.4); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

/* ── Form inputs ───────────────────────────────────── */
.form-input {
  background: rgba(13,17,23,.8);
  border: 1px solid rgba(26,34,53,1);
  color: #e2e8f0;
  transition: border-color .3s, box-shadow .3s;
}
.form-input:focus {
  outline: none;
  border-color: rgba(0,255,136,.5);
  box-shadow: 0 0 0 3px rgba(0,255,136,.08);
}
.form-input::placeholder { color: #4a5568; }
.form-input option { background: #0d1117; color: #e2e8f0; }

/* ── Navbar ────────────────────────────────────────── */
#navbar {
  transition: background .4s, backdrop-filter .4s, border-color .4s;
}
#navbar.scrolled {
  background: rgba(7,9,15,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,255,136,.1);
}

/* ── Badge / tag ───────────────────────────────────── */
.tag {
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(0,255,136,.3);
  color: #00ff88;
  background: rgba(0,255,136,.05);
  display: inline-block;
}

/* ── Mobile menu ───────────────────────────────────── */
#mobile-menu {
  transition: max-height .4s ease, opacity .4s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
#mobile-menu.open { max-height: 400px; opacity: 1; }

/* ── Hamburger bars ────────────────────────────────── */
.bar { display: block; width: 24px; height: 2px; background: #e2e8f0; transition: all .3s; }
.bar:last-child { width: 16px; background: #00ff88; }

/* ── Toast notification ────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
  border-radius: 12px;
  padding: 14px 20px;
  max-width: 360px;
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.toast-ok   { background: linear-gradient(135deg,#064e3b,#022c22); border: 1px solid rgba(0,255,136,.3); color: #a7f3d0; }
#toast.toast-err  { background: linear-gradient(135deg,#450a0a,#1c0606); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

/* ── Spinner ───────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }

/* ── Bounce ────────────────────────────────────────── */
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-8px); }
}
.animate-bounce { animation: bounce 2s ease-in-out infinite; }

/* ── Hero radial glow ──────────────────────────────── */
.hero-glow-1 {
  position: absolute; top: 25%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(0,255,136,.06) 0%, transparent 70%);
}
.hero-glow-2 {
  position: absolute; bottom: 0; right: 0;
  width: 400px; height: 400px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,212,255,.04) 0%, transparent 70%);
}

/* ── Flow connector line ───────────────────────────── */
.flow-connector {
  width: 1px;
  background: linear-gradient(to bottom, rgba(0,255,136,.3), rgba(0,212,255,.1));
  min-height: 40px;
  flex: 1;
  margin: 8px 0;
}

/* ── Responsive utilities ──────────────────────────── */
@media (max-width: 768px) {
  .hero-glow-1 { width: 400px; height: 400px; }
  .hero-glow-2 { display: none; }
}
