/* =====================================================================
   section-backgrounds.css — per-section background designs for index2.html
   Overrides the generic .restored-section::before/::after decoration with
   a motif that fits each section. Palette: purple / pink / blue on #09090f.
   ===================================================================== */

.restored-section::before,
.restored-section::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  inset: auto;
  top: auto;
  left: auto;
  width: auto;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
  transform: none;
  mask-image: none;
  -webkit-mask-image: none;
  background: none;
  opacity: 1;
}

.restored-section > .container,
.restored-section > .portfolio-section {
  position: relative;
  z-index: 1;
}

/* ---------- STATS — rising bars + glowing baseline (growth) ---------- */
.restored-stats::before {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(178, 140, 242, 0.05) 78px 82px),
    linear-gradient(to top, rgba(147, 51, 234, 0.16), transparent 55%);
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}
.restored-stats::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9333ea 30%, #ec4899 50%, #9333ea 70%, transparent);
  background-size: 200% 100%;
  opacity: 0.7;
  animation: sbg-flow 6s linear infinite;
}

/* ---------- ABOUT — aurora blobs + orbit rings (personal, calm) ---------- */
.restored-about::before {
  inset: -20% -10%;
  background:
    radial-gradient(38% 45% at 22% 40%, rgba(173, 170, 255, 0.16), transparent 70%),
    radial-gradient(32% 40% at 78% 65%, rgba(236, 72, 153, 0.11), transparent 70%),
    radial-gradient(28% 32% at 60% 15%, rgba(147, 51, 234, 0.14), transparent 70%);
  filter: blur(18px);
  animation: sbg-drift 22s ease-in-out infinite alternate;
}
.restored-about::after {
  right: -8%;
  top: 8%;
  width: clamp(260px, 32vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 46%, rgba(173, 170, 255, 0.28) 46.5%, transparent 47.2%),
    radial-gradient(circle, transparent 62%, rgba(236, 72, 153, 0.18) 62.5%, transparent 63.2%),
    radial-gradient(circle, transparent 78%, rgba(192, 132, 252, 0.14) 78.5%, transparent 79.2%);
  transform: rotateX(62deg) rotate(-12deg);
  opacity: 0.9;
}

/* ---------- SERVICES — isometric cube grid (building blocks) ---------- */
.restored-services::before {
  inset: 0;
  --c: rgba(220, 139, 222, 0.09);
  background-image:
    linear-gradient(30deg, var(--c) 12%, transparent 12.5%, transparent 87%, var(--c) 87.5%, var(--c)),
    linear-gradient(150deg, var(--c) 12%, transparent 12.5%, transparent 87%, var(--c) 87.5%, var(--c)),
    linear-gradient(30deg, var(--c) 12%, transparent 12.5%, transparent 87%, var(--c) 87.5%, var(--c)),
    linear-gradient(150deg, var(--c) 12%, transparent 12.5%, transparent 87%, var(--c) 87.5%, var(--c)),
    linear-gradient(60deg, rgba(220, 139, 222, 0.06) 25%, transparent 25.5%, transparent 75%, rgba(220, 139, 222, 0.06) 75%, rgba(220, 139, 222, 0.06)),
    linear-gradient(60deg, rgba(220, 139, 222, 0.06) 25%, transparent 25.5%, transparent 75%, rgba(220, 139, 222, 0.06) 75%, rgba(220, 139, 222, 0.06));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, #0009 55%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, #0009 55%, transparent 85%);
  opacity: 0.85;
}
.restored-services::after {
  left: -6%;
  top: 10%;
  width: clamp(180px, 22vw, 340px);
  aspect-ratio: 1;
  border: 1px solid rgba(220, 139, 222, 0.35);
  border-radius: 28px;
  box-shadow: inset 0 0 60px rgba(220, 139, 222, 0.07), 0 0 60px rgba(147, 51, 234, 0.12);
  transform: rotate(45deg);
  animation: sbg-spin-slow 40s linear infinite;
}

/* ---------- AI — neural network nodes + links (blue tint) ---------- */
.restored-ai::before {
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(137, 192, 238, 0.55) 1.6px, transparent 2.4px),
    linear-gradient(45deg, transparent 49.6%, rgba(137, 192, 238, 0.12) 50%, transparent 50.4%),
    linear-gradient(-45deg, transparent 49.6%, rgba(137, 192, 238, 0.12) 50%, transparent 50.4%);
  background-size: 96px 96px, 96px 96px, 96px 96px;
  background-position: 48px 48px, 0 0, 0 0;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, #0009 50%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 10%, #0009 50%, transparent 82%);
  opacity: 0.55;
}
.restored-ai::after {
  inset: 0;
  background:
    radial-gradient(28% 40% at 20% 30%, rgba(137, 192, 238, 0.14), transparent 70%),
    radial-gradient(30% 45% at 82% 70%, rgba(147, 51, 234, 0.16), transparent 70%);
  animation: sbg-pulse 7s ease-in-out infinite;
}

/* ---------- PORTFOLIO — spotlight + perspective floor grid (stage) ---------- */
.restored-portfolio::before {
  inset: 0;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(147, 51, 234, 0.22), transparent 70%),
    radial-gradient(40% 30% at 15% 50%, rgba(236, 72, 153, 0.08), transparent 70%),
    radial-gradient(40% 30% at 85% 60%, rgba(186, 145, 248, 0.08), transparent 70%);
}
.restored-portfolio::after {
  left: -20%;
  right: -20%;
  bottom: -10%;
  height: 46%;
  background-image:
    linear-gradient(rgba(186, 145, 248, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(186, 145, 248, 0.16) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 95%);
  animation: sbg-grid 8s linear infinite;
}

/* ---------- WHY CHOOSE — soft bokeh circles (trust, warmth) ---------- */
.restored-why::before {
  inset: 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(224, 148, 205, 0.18) 0 60px, transparent 61px),
    radial-gradient(circle at 26% 78%, rgba(147, 51, 234, 0.18) 0 34px, transparent 35px),
    radial-gradient(circle at 70% 20%, rgba(236, 72, 153, 0.14) 0 48px, transparent 49px),
    radial-gradient(circle at 88% 65%, rgba(192, 132, 252, 0.18) 0 80px, transparent 81px),
    radial-gradient(circle at 52% 88%, rgba(224, 148, 205, 0.12) 0 26px, transparent 27px);
  filter: blur(6px);
  animation: sbg-drift 18s ease-in-out infinite alternate;
}
.restored-why::after {
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 30%, transparent 70px, rgba(224, 148, 205, 0.25) 71px, transparent 72px),
    radial-gradient(circle at 88% 65%, transparent 96px, rgba(192, 132, 252, 0.22) 97px, transparent 98px),
    radial-gradient(circle at 70% 20%, transparent 60px, rgba(236, 72, 153, 0.18) 61px, transparent 62px);
  opacity: 0.9;
}

/* ---------- PROCESS — dashed route + waypoints (journey) ---------- */
.restored-process::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(155, 42, 212, 0.12), transparent 65%),
    repeating-linear-gradient(90deg, rgba(205, 125, 234, 0.05) 0 1px, transparent 1px 120px);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.restored-process::after {
  left: 6%;
  right: 6%;
  top: 50%;
  height: 26px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 0% 50%, #ec4899 0 5px, rgba(236, 72, 153, 0.35) 6px, transparent 12px),
    radial-gradient(circle at 33.3% 50%, #c084fc 0 5px, rgba(192, 132, 252, 0.35) 6px, transparent 12px),
    radial-gradient(circle at 66.6% 50%, #c084fc 0 5px, rgba(192, 132, 252, 0.35) 6px, transparent 12px),
    radial-gradient(circle at 100% 50%, #ec4899 0 5px, rgba(236, 72, 153, 0.35) 6px, transparent 12px),
    repeating-linear-gradient(90deg, rgba(205, 125, 234, 0.35) 0 10px, transparent 10px 20px) 0 12px / 100% 2px no-repeat;
  opacity: 0.55;
}

/* ---------- PRICING — stage spotlight + light rays (choice) ---------- */
.restored-pricing::before {
  inset: 0;
  background:
    conic-gradient(from 180deg at 50% -10%, transparent 0 40%, rgba(193, 106, 226, 0.09) 43%, transparent 46%, transparent 50%, rgba(236, 72, 153, 0.08) 53%, transparent 56%, transparent 60%),
    radial-gradient(55% 60% at 50% 0%, rgba(147, 51, 234, 0.24), transparent 70%);
}
.restored-pricing::after {
  left: 50%;
  bottom: 0;
  width: 90%;
  height: 40%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(193, 106, 226, 0.22), transparent 70%);
}

/* ---------- TIPS — notebook ruled lines + lightbulb glow (ideas) ---------- */
.restored-tips::before {
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(199, 147, 242, 0.09) 39px 40px),
    linear-gradient(90deg, transparent calc(8% - 1px), rgba(236, 72, 153, 0.22) 8%, transparent calc(8% + 1px));
  mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 85%);
  opacity: 0.8;
}
.restored-tips::after {
  right: 6%;
  top: -10%;
  width: clamp(220px, 28vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.14), rgba(236, 72, 153, 0.08) 45%, transparent 70%);
  filter: blur(10px);
  animation: sbg-pulse 5s ease-in-out infinite;
}

/* ---------- FAQ — large faint question marks ---------- */
.restored-faq::before {
  content: "?";
  left: 2%;
  top: 4%;
  font: 800 clamp(220px, 30vw, 460px)/1 "Poppins", system-ui, sans-serif;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(199, 147, 242, 0.22);
  transform: rotate(-12deg);
}
.restored-faq::after {
  content: "?";
  right: 4%;
  bottom: -6%;
  font: 800 clamp(160px, 22vw, 340px)/1 "Poppins", system-ui, sans-serif;
  color: rgba(236, 72, 153, 0.06);
  -webkit-text-stroke: 1px rgba(236, 72, 153, 0.22);
  transform: rotate(14deg);
}

/* ---------- CONTACT — signal ripples + warm glow (reach out) ---------- */
.restored-contact::before {
  inset: 0;
  background:
    radial-gradient(45% 55% at 50% 100%, rgba(236, 72, 153, 0.14), transparent 70%),
    radial-gradient(35% 45% at 50% 0%, rgba(147, 51, 234, 0.16), transparent 70%);
}
.restored-contact::after {
  left: 50%;
  top: 50%;
  width: clamp(420px, 60vw, 980px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, transparent 30%, rgba(199, 147, 242, 0.22) 30.4%, transparent 31%),
    radial-gradient(circle, transparent 45%, rgba(199, 147, 242, 0.16) 45.4%, transparent 46%),
    radial-gradient(circle, transparent 60%, rgba(236, 72, 153, 0.12) 60.4%, transparent 61%),
    radial-gradient(circle, transparent 75%, rgba(199, 147, 242, 0.08) 75.4%, transparent 76%);
  animation: sbg-ripple 9s ease-in-out infinite;
}

/* ---------- keyframes ---------- */
@keyframes sbg-flow { to { background-position: -200% 0; } }
@keyframes sbg-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
@keyframes sbg-spin-slow { to { transform: rotate(405deg); } }
@keyframes sbg-pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes sbg-grid { to { background-position: 0 64px; } }
@keyframes sbg-ripple {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.04); opacity: 1; }
}

/* ---------- responsive / motion ---------- */
@media (max-width: 720px) {
  .restored-about::after,
  .restored-services::after,
  .restored-tips::after { display: none; }
  .restored-faq::before { font-size: 180px; left: -4%; }
  .restored-faq::after { font-size: 130px; }
  .restored-process::after { display: none; }
  .restored-services::before { background-size: 60px 105px; background-position: 0 0, 0 0, 30px 52.5px, 30px 52.5px, 0 0, 30px 52.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .restored-section::before,
  .restored-section::after { animation: none !important; }
}
