/* =========================
   ASTRAFLUX — STYLE SHEET
   ========================= */

/* ---- RESET/BASE ---- */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  color: var(--text);
  background: radial-gradient(1200px 800px at 70% -10%, rgba(32,211,255,.10), transparent 60%),
              radial-gradient(1000px 700px at -10% 20%, rgba(124,77,255,.12), transparent 55%),
              var(--bg);
  overflow-x: hidden;
}

/* THEME VARS (DARK DEFAULT) */
:root{
  --bg:#0b1224;
  --surface:#10193a;
  --surface-2:#0e1733;
  --glass:rgba(255,255,255,.06);
  --border:rgba(255,255,255,.12);
  --text:#e9f0ff;
  --muted:#9fb3d9;
  --brand:#7c4dff;
  --accent:#20d3ff;
  --ok:#0ce8c0; --warn:#ffb703; --bad:#ff5277;
  --shadow: 0 20px 50px rgba(0,0,0,.35);
  --radius-xl: 22px; --radius: 14px; --radius-sm: 10px;
}
body.light{
  --bg:#f6f8ff;
  --surface:#ffffff;
  --surface-2:#eef2ff;
  --glass:rgba(10,20,50,.05);
  --border:rgba(0,10,50,.12);
  --text:#151a2b;
  --muted:#4a5a81;
  --brand:#5c3ad6;
  --accent:#0aa3d6;
  --shadow: 0 16px 40px rgba(5,10,40,.12);
}

/* UTILS */
.container { width: min(1120px, 92%); margin: 0 auto; }
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,.02) 30%, transparent); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; }

.grad { background: linear-gradient(90deg, var(--accent), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid { display: grid; gap: 20px; }
.grid.cards-services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.grid.about-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px){
  .grid.cards-services { grid-template-columns: repeat(2, 1fr); }
  .grid.about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px){
  .grid.cards-services, .grid.pricing { grid-template-columns: 1fr; }
  .grid.about-grid { grid-template-columns: 1fr; }
}

/* BUTTONS & LINKS */
a { color: inherit; text-decoration: none; }
.btn-primary, .btn-ghost, .link-cta, .dock-btn {
  border: 0; cursor: pointer; font-weight: 700; letter-spacing:.2px;
  padding: 12px 18px; border-radius: 999px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: linear-gradient(90deg, var(--brand), var(--accent)); color:#fff; box-shadow: 0 10px 24px rgba(124,77,255,.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(124,77,255,.35); }
.btn-ghost { background: transparent; border:1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--glass); }
.link-cta { background: transparent; border:1px solid var(--border); }
.link-cta:hover { background: var(--glass); }

/* PROGRESS BAR */
.progress{
  position: fixed; inset: 0 auto auto 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  z-index: 9999; box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* BACKGROUND CANVAS */
#bg-dots{
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; opacity: .65; pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(32,211,255,.25));
}

/* HEADER */
.site-header{
  position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10,16,35,.70), rgba(10,16,35,.35));
  border-bottom: 1px solid var(--border);
}
body.light .site-header{
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.55));
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap: 18px; height: 72px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px; }
.brand-mark{
  display:inline-grid; place-items:center; width:38px; height:38px; border-radius:12px;
  background: linear-gradient(145deg, var(--brand), var(--accent)); color:#fff; box-shadow: var(--shadow);
}
.brand-sub{ color: var(--muted); font-weight: 700; }
.site-nav{ display:flex; gap: 18px; }
.site-nav a{ padding:8px 10px; border-radius: 10px; color: var(--muted); }
.site-nav a:hover{ color: var(--text); background: var(--glass); }
.header-actions{ display:flex; gap: 10px; }
.hamburger{ display:none; background:none; border:0; width:44px; height:44px; position:relative; border-radius: 10px; }
.hamburger span{ position:absolute; left:10px; right:10px; height:2px; background: var(--text); border-radius:1px; transition: transform .2s, top .2s, opacity .2s; }
.hamburger span:nth-child(1){ top:14px; }
.hamburger span:nth-child(2){ top:21px; }
.hamburger span:nth-child(3){ top:28px; }
.hamburger.active span:nth-child(1){ top:21px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ top:21px; transform: rotate(-45deg); }

@media (max-width: 980px){
  .site-nav{ display:none; }
  .hamburger{ display:block; }
}

/* DRAWER */
.drawer{
  position: fixed; inset: 72px 0 auto auto; width: min(360px, 90%); height: calc(100% - 72px);
  background: var(--surface); border-left:1px solid var(--border); transform: translateX(100%);
  transition: transform .25s ease; z-index: 1001; display:flex; flex-direction:column; justify-content:space-between;
}
.drawer.open{ transform: translateX(0); }
.drawer-nav{ display:grid; padding: 22px; gap: 12px; }
.drawer-nav a{ padding:12px 10px; border-radius:12px; border:1px solid var(--border); }
.drawer-nav a:hover{ background: var(--glass); }
.drawer-footer{ display:flex; gap: 10px; padding: 18px 22px 24px; border-top:1px solid var(--border); }

/* HERO */
.hero-inner{ display:grid; grid-template-columns: 1.1fr .9fr; align-items:center; gap: 28px; }
@media (max-width: 980px){ .hero-inner{ grid-template-columns: 1fr; } }
.hero-copy h1{ font-size: clamp(34px, 6vw, 56px); line-height:1.05; margin: 6px 0 12px; }
.lead{ color: var(--muted); font-size: clamp(16px, 2.6vw, 18px); }
.partner-badge{
  display:inline-flex; align-items:center; gap:8px; background: var(--glass); border:1px solid var(--border);
  padding:8px 12px; border-radius: 999px; font-weight:700; color: var(--muted);
}
.partner-badge .dot{ width:8px; height:8px; background: var(--ok); border-radius:999px; box-shadow: 0 0 0 4px rgba(12,232,192,.18); }
.hero-cta{ display:flex; gap: 10px; margin: 20px 0 6px; flex-wrap: wrap; }

.kpis{ display:flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.kpi{ display:grid; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border:1px solid var(--border); min-width: 120px; place-items:start; box-shadow: var(--shadow); }
.kpi-num{ font-size: 28px; font-weight: 800; }
.kpi-label{ color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }

.hero-visual{ position: relative; }
.glass{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid var(--border); backdrop-filter: blur(10px);
}
.card-analytics{
  border-radius: var(--radius-xl); padding: 16px; box-shadow: var(--shadow);
  display:grid; gap: 14px; min-height: 280px;
}
.chart-placeholder{
  border-radius: 14px; height: 160px; background:
    linear-gradient(110deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 42%, rgba(255,255,255,.1) 60%, rgba(255,255,255,.02) 70%) 0 0 / 260% 100% no-repeat;
  animation: shimmer 2.2s infinite linear;
  border:1px solid var(--border);
}
.metrics{ display:flex; gap: 16px; }
.metric{ display:grid; gap: 4px; padding: 10px 12px; background: var(--surface-2); border:1px solid var(--border); border-radius: 12px; }
.metric span{ color: var(--muted); font-size: 12px; }
.metric-val{ font-weight: 800; }

@keyframes shimmer{
  0% { background-position: 0 0; } 100% { background-position: 200% 0; }
}

/* ORBIT DECORATION */
.orbit{ position:absolute; inset: -30px -10px auto auto; width: 240px; height: 240px; border-radius: 50%; border:1px dashed rgba(32,211,255,.25); display:grid; place-items:center; }
.orbit .planet{ width: 26px; height:26px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, var(--accent)); box-shadow: 0 0 20px rgba(32,211,255,.5); }
.orbit .satellite{ position:absolute; width: 10px; height:10px; border-radius:50%; background: var(--brand); animation: spin 6s linear infinite; transform-origin: 120px 120px; }
@keyframes spin{ from{ transform: rotate(0deg) translateX(110px);} to{ transform: rotate(360deg) translateX(110px);} }

/* TRUST BAR */
.trust{ margin-top: 28px; }
.trust-inner{ display:flex; gap: 16px; align-items:center; justify-content:center; border-top:1px dashed var(--border); padding-top: 18px; }
.trust-label{ color: var(--muted); font-size: 12px; text-transform: uppercase; }
.trust-logos{ list-style:none; display:flex; gap: 14px; margin:0; padding:0; flex-wrap: wrap; }
.trust-logos .logo{ padding: 8px 12px; border-radius: 999px; background: var(--surface-2); border:1px solid var(--border); color: var(--muted); font-weight:700; }

/* CARDS (SERVIÇOS) */
.card{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); position: relative; transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover{ transform: translateY(-2px) scale(1.01); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.card.service .card-icon .icon{
  width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.5;
}
.card.service h3{ margin:10px 0 6px; }
.card.service p{ color: var(--muted); margin:0 0 8px; }
.bullets{ margin:0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 6px 0; }

/* SKELETON SHIMMER (remove com JS) */
.skeleton::after{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.08) 45%, transparent 65%);
  background-size: 250% 100%; animation: glow 1.4s infinite linear;
}
@keyframes glow{ 0%{background-position: -120% 0;} 100%{ background-position: 120% 0; } }

/* DIFERENCIAIS */
.diff-grid{ grid-template-columns: 1.15fr .85fr; align-items: stretch; }
@media (max-width: 980px){ .diff-grid{ grid-template-columns: 1fr; } }
.code-card{ border-radius: var(--radius-xl); }
.code-header{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 12px; color: var(--muted); border-bottom:1px dashed var(--border); padding-bottom: 8px; margin-bottom: 10px;
}
.code{ font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: #cfe6ff; background: #0b1022; border-radius: 12px; padding: 14px; overflow:auto; }
body.light .code{ background: #0e1640; }

/* SLIDER (CASES) */
.slider{ position:relative; }
.slides{ display:flex; overflow:hidden; }
.slide{ min-width: 100%; }
.slide .slide-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 8px; }
.pill{ display:inline-block; padding: 6px 10px; border-radius:999px; font-size:12px; background: var(--glass); border:1px solid var(--border); color: var(--muted); }
.kpi-list{ margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.slider-arrow{
  position:absolute; top: 50%; transform: translateY(-50%); width:42px; height:42px; display:grid; place-items:center;
  border-radius: 12px; background: var(--surface); border:1px solid var(--border); cursor:pointer; z-index: 2;
}
.slider-arrow:hover{ background: var(--glass); }
.slider-arrow.prev{ left: -8px; }
.slider-arrow.next{ right: -8px; }
.slider-dots{ display:flex; gap: 8px; justify-content:center; margin-top: 12px; }
.slider-dots button{
  width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255,255,255,.22);
}
.slider-dots button.active{ background: linear-gradient(90deg, var(--accent), var(--brand)); }

/* PRICING */
.price{ display:grid; align-content: start; gap: 12px; }
.price .price-tag{ color: var(--muted); margin: -2px 0 2px; }
.price.highlight{
  background: linear-gradient(180deg, rgba(124,77,255,.16), rgba(32,211,255,.08));
  border:1px solid rgba(124,77,255,.35);
  transform: translateY(-3px); box-shadow: 0 26px 60px rgba(124,77,255,.28);
}

/* ABOUT */
.about-card h3{ margin: 4px 0 6px; }
.about-card p{ margin: 0; color: var(--muted); }

/* TESTIMONIALS */
.testimonials{ display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 980px){ .testimonials{ grid-template-columns: 1fr; } }
.testimonial blockquote{ margin: 0 0 8px; color: var(--text); font-weight: 600; }

/* FORM */
.contact-form{ border-radius: var(--radius-xl); }
.form-grid{ grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-grid .full{ grid-column: 1 / -1; }
label{ display:grid; gap: 6px; font-weight: 700; color: var(--muted); }
input, select, textarea{
  font: inherit; color: var(--text); background: var(--surface-2); border:1px solid var(--border);
  border-radius: 12px; padding: 12px 12px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder{ color: #7f91b9; }
input:focus, select:focus, textarea:focus{ border-color: var(--accent); box-shadow: 0 0 0 4px rgba(32,211,255,.15); }
.form-actions{ display:flex; align-items:center; gap: 12px; margin-top: 10px; }
.form-note{ color: var(--muted); margin: 0; }

/* CONTACT DOCK */
.contact-dock{
  position: fixed; right: 20px; bottom: 18px; display:flex; gap: 10px; z-index: 1000;
  background: var(--surface); border:1px solid var(--border); border-radius: 16px; padding: 10px; box-shadow: var(--shadow);
}
.dock-btn{ background: var(--surface-2); }
#to-top{ display:none; }

/* FOOTER */
.site-footer{ padding: 28px 0 40px; border-top:1px dashed var(--border); }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap: 12px; color: var(--muted); }
@media (max-width: 720px){ .footer-inner{ flex-direction: column; text-align:center; } }

/* MODAL (dialog) */
.modal{ border: 0; padding: 0; background: transparent; }
.modal::backdrop{ background: rgba(0,0,20,.55); backdrop-filter: blur(4px); }
.modal .modal-body{
  max-width: 680px; width: calc(100vw - 40px); margin: auto; border-radius: var(--radius-xl);
}
.modal-head{ display:flex; align-items:center; justify-content:space-between; gap: 8px; margin-bottom: 12px; }
.modal-close{ background: transparent; border:0; font-size: 18px; cursor: pointer; color: var(--muted); }

/* REVEAL ANIMATIONS */
.will-reveal{ opacity: 0; transform: translateY(10px) scale(.98); }
.revealed{ opacity: 1; transform: none; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .6s ease; }

/* SMALL HELPER FOR FOCUS */
:focus-visible{ outline: 2px dashed var(--accent); outline-offset: 2px; }

/* =========================
   ADD-ON: RELATÓRIOS ECOM
   ========================= */
.filters{ display:grid; gap: 14px; border-radius: var(--radius-xl); }
.filters-row{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 980px){ .filters-row{ grid-template-columns: 1fr; } }

.flt-group{ display:grid; gap: 8px; }
.flt-group > span{ font-weight: 800; color: var(--muted); }
.dates{ display:flex; align-items:center; gap: 10px; }
.dates input{ background: var(--surface-2); border:1px solid var(--border); border-radius: 10px; padding: 10px; color: var(--text); }
.dates .sep{ color: var(--muted); }
.checks{ display:flex; flex-wrap: wrap; gap: 10px 16px; }
.checks label{ display:flex; align-items:center; gap: 8px; font-weight: 700; color: var(--text); }
.filters-actions{ display:flex; gap: 10px; justify-content:flex-end; flex-wrap: wrap; }

.kpi-eco{ grid-template-columns: repeat(7, 1fr); margin-top: 16px; }
@media (max-width: 1024px){ .kpi-eco{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px){ .kpi-eco{ grid-template-columns: repeat(2, 1fr); } }
.kpi-block{ display:grid; gap: 6px; border-radius: 16px; }
.kpi-block .lab{ color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.kpi-block strong{ font-size: 20px; }

.alerts{ margin-top: 18px; border-radius: var(--radius-xl); }
.alerts h3{ margin: 0 0 6px; }
.alerts-list{ list-style:none; margin: 0; padding: 0; display:grid; gap: 8px; }
.alerts-list li{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px; border:1px solid var(--border); border-radius: 12px;
}
.alert-ok{ border-color: rgba(12,232,192,.35); background: rgba(12,232,192,.08); }
.alert-warn{ border-color: rgba(255,183,3,.40); background: rgba(255,183,3,.10); }
.alert-bad{ border-color: rgba(255,82,119,.45); background: rgba(255,82,119,.12); }
.alert-pill{
  padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--glass); border:1px solid var(--border); color: var(--muted);
}
.muted{ color: var(--muted); }

.charts-grid{ grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
@media (max-width: 1024px){ .charts-grid{ grid-template-columns: 1fr; } }
.chart-card{ border-radius: var(--radius-xl); }
.chart-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom: 8px; }
canvas{ width: 100%; display:block; }

.table-wrap{ margin-top: 18px; border-radius: var(--radius-xl); }
.table-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 10px; }
.table-scroll{ overflow:auto; border:1px solid var(--border); border-radius: 12px; }
table{ width: 100%; border-collapse: collapse; }
thead th{
  position: sticky; top: 0; background: var(--surface-2);
  font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted);
  border-bottom:1px solid var(--border); padding: 10px;
  cursor: pointer;
}
tbody td{ padding: 10px; border-bottom:1px dashed var(--border); }
td.num{ text-align: right; }
tr:hover td{ background: var(--glass); }

.status-pill{
  display:inline-block; padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 12px;
  border: 1px solid var(--border); color: var(--muted);
}
.status-on{ background: rgba(12,232,192,.1); border-color: rgba(12,232,192,.4); color:#00c8a7; }
.status-paused{ background: rgba(255,183,3,.1); border-color: rgba(255,183,3,.45); color:#f1a602; }
.status-off{ background: rgba(255,82,119,.1); border-color: rgba(255,82,119,.45); color:#ff5277; }
