/* =========================
   IDRAVA SYSTEM v4.1 (FIXED UI)
   PREMIUM SaaS STRUCTURE
========================= */

/* =========================
   COLOR SYSTEM
========================= */

:root{
  --p0:#190D26;
  --p1:#33194D;
  --p2:#663399;
  --p3:#7F40BF;
  --p4:#9966CC;
  --p5:#B28CD9;

  --bg:#0F1117;
  --panel:#141824;
  --border:#232635;

  --text:#EDEFF5;
  --muted:#A7B0C0;
}

/* =========================
   RESET
========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family: Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  position:relative;
}

/* =========================
   BACKGROUND SYSTEM
========================= */

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-3;

  background:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);

  background-size:60px 60px;
  opacity:0.42;

  animation:gridMove 30s linear infinite;
}

@keyframes gridMove{
  from{ transform:translateY(0); }
  to{ transform:translateY(60px); }
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;

  background:
    radial-gradient(circle at 20% 20%, rgba(127,64,191,0.12), transparent 42%),
    radial-gradient(circle at 75% 50%, rgba(102,51,153,0.08), transparent 48%),
    radial-gradient(circle at 45% 85%, rgba(178,140,217,0.06), transparent 55%);
}

/* =========================
   FLOATING NODES
========================= */

.field{
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

.node{
  position:absolute;
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(178,140,217,0.9);
  box-shadow:0 0 10px rgba(127,64,191,0.5);
  animation: floatVar 18s ease-in-out infinite;
}

/* stable placement */
.node:nth-child(1){ left:12%; top:18%; }
.node:nth-child(2){ left:78%; top:28%; opacity:0.4; }
.node:nth-child(3){ left:40%; top:55%; }
.node:nth-child(4){ left:82%; top:72%; opacity:0.5; }
.node:nth-child(5){ left:22%; top:78%; opacity:0.4; }
.node:nth-child(6){ left:60%; top:12%; opacity:0.3; }
.node:nth-child(7){ left:15%; top:48%; opacity:0.25; }

@keyframes floatVar{
  0%{ transform:translate(0,0); }
  50%{ transform:translate(18px,-30px); }
  100%{ transform:translate(0,0); }
}

/* =========================
   HEADER
========================= */

header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 48px;
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(12px);
  position:sticky;
  top:0;
  background:rgba(15,17,23,0.6);
}

.logo{
  font-size:18px;
  font-weight:600;
  color:var(--p5);
}

nav a{
  margin-left:20px;
  text-decoration:none;
  color:var(--muted);
}

nav a:hover{
  color:var(--text);
}

/* =========================
   HERO
========================= */

.hero{
  text-align:center;
  padding:140px 20px 100px;
}

.hero h1{
  font-size:50px;
  margin:20px 0;
  line-height:1.1;
}

.hero p{
  max-width:680px;
  margin:auto;
  color:var(--muted);
}

/* =========================
   SECTIONS (CENTER FIX)
========================= */

section{
  padding:80px 48px;
  display:flex;
  flex-direction:column;
  align-items:center; /* IMPORTANT FIX */
  gap:24px;
}

h2{
  color:var(--p5);
}

/* =========================
   GRID (FIXED CENTER + WIDTH CONTROL)
========================= */

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 320px));
  justify-content:center; /* IMPORTANT FIX */
  gap:22px;
  width:100%;
  max-width:1100px;
}

/* =========================
   CARD SYSTEM (FIXED PREMIUM LAYOUT)
========================= */

.card{
  position:relative;
  width:100%;
  min-height:220px;

  background:linear-gradient(
    180deg,
    rgba(20,24,36,0.92),
    rgba(20,24,36,0.72)
  );

  border:1px solid rgba(127,64,191,0.25);
  border-radius:16px;

  padding:22px;

  display:flex;
  flex-direction:column;
  gap:10px;

  overflow:hidden;

  transition:0.25s ease;

  /* 🔥 MAIN GLOW RESTORED */
  box-shadow:
    0 0 0 1px rgba(127,64,191,0.05),
    0 10px 40px rgba(0,0,0,0.4),
    inset 0 0 60px rgba(127,64,191,0.05);
}

/* TOP ACCENT BAR */
.card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  /* 💜 CORE PURPLE FIELD */
  background:
    radial-gradient(circle at 20% 0%, rgba(127,64,191,0.25), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(178,140,217,0.12), transparent 50%);

  opacity:0.7;
  transition:0.4s ease;
}

/* INNER GLOW */
.card::after{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;

  /* ⚡ EDGE ENERGY */
  background:linear-gradient(
    120deg,
    transparent,
    rgba(127,64,191,0.25),
    transparent
  );

  opacity:0;
  transition:0.4s ease;
}

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

.card:hover{
  transform:translateY(-6px);
  border-color:rgba(127,64,191,0.6);

  box-shadow:
    0 0 25px rgba(127,64,191,0.15),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 0 80px rgba(127,64,191,0.08);
}

.card:hover::before{
  opacity:1;
}

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

/* =========================
   TEXT STRUCTURE FIX
========================= */

.card h3{
  font-size:16px;
  margin-bottom:4px;
}

.card p{
  color:var(--muted);
  line-height:1.5;
}

/* FIX: prevents left-clumped feel */
.card > *{
  width:100%;
}

/* =========================
   LIST FIX (CLEAN + BALANCED)
========================= */

ul{
  padding-left:18px;
  margin-top:6px;
}

li{
  color:var(--muted);
  margin-bottom:4px;
}

/* =========================
   BUTTONS
========================= */

.btn{
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}

.btn.primary{
  background:var(--p2);
  color:white;
}

.btn.ghost{
  border:1px solid var(--border);
  color:var(--text);
}

/* =========================
   FIXED PROGRESS BAR (NO SPILL)
========================= */

.loader{
  height:2px;
  width:100%;
  margin-top:auto;

  background:rgba(255,255,255,0.06);
  border-radius:999px;
  overflow:hidden;
  position:relative;
}

.loader::after{
  content:"";
  position:absolute;
  height:100%;
  width:40%;
  background:var(--p3);
  animation:load 1.4s infinite;
  border-radius:999px;
}

@keyframes load{
  0%{ left:-40%; }
  100%{ left:100%; }
}

/* =========================
   TABLE FIX
========================= */

table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

th, td{
  border:1px solid var(--border);
  padding:8px;
  color:var(--muted);
}

th{
  color:var(--text);
  background:rgba(127,64,191,0.08);
}

/* =========================
   PAGE ANIMATION
========================= */

.page{
  animation:fadeIn 0.5s ease;
}

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