/* ---------- Stacked sections: each section slides over the one before it ---------- */
main > section:not(.hero) { margin-top: -40px; border-radius: 40px 40px 0 0; padding-top: calc(clamp(80px, 10vw, 130px) + 40px); }
footer { position: relative; margin-top: -40px; border-radius: 40px 40px 0 0; padding-top: 100px; }
.hero-grid, main > section > .wrap, main > section > .narrow { will-change: transform; }

/* ---------- Floating 3D shapes (cubes and rings) in the dark and blue sections ---------- */
.shapes { position: absolute; inset: 0; pointer-events: none; overflow: clip; z-index: 0; }
.drift { position: absolute; perspective: 800px; will-change: transform; }
.cube { position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; animation: spin3d 22s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1.5px solid rgba(57,198,244,.6); background: linear-gradient(135deg, rgba(57,198,244,.2), rgba(30,107,255,.08)); box-shadow: inset 0 0 26px rgba(57,198,244,.2); }
.cube i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(2) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(3) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
@keyframes spin3d { from { transform: rotateX(-24deg) rotateY(0deg) rotateZ(8deg); } to { transform: rotateX(-24deg) rotateY(360deg) rotateZ(8deg); } }
.ring3d { width: var(--s); height: var(--s); border-radius: 50%; border: 2px solid rgba(57,198,244,.5); box-shadow: 0 0 26px rgba(57,198,244,.25), inset 0 0 26px rgba(57,198,244,.15); animation: spinring 18s linear infinite; }
@keyframes spinring { from { transform: rotateX(68deg) rotateZ(0deg); } to { transform: rotateX(68deg) rotateZ(360deg); } }
.royal .cube i { border-color: rgba(255,255,255,.7); background: linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.05)); box-shadow: inset 0 0 26px rgba(255,255,255,.2); }
.royal .ring3d { border-color: rgba(255,255,255,.55); box-shadow: 0 0 26px rgba(255,255,255,.25); }
@media (max-width: 1100px) { .shapes { display: none; } }

/* ---------- Cards curve toward the middle (desktop) ---------- */
@media (min-width: 981px) {
  .steps .cell:nth-child(1) { transform: rotateY(14deg); }
  .steps .cell:nth-child(2) { transform: rotateY(5deg) translateZ(24px); }
  .steps .cell:nth-child(3) { transform: rotateY(-5deg) translateZ(24px); }
  .steps .cell:nth-child(4) { transform: rotateY(-14deg); }
  .three .cell:nth-child(1) { transform: rotateY(9deg); }
  .three .cell:nth-child(2) { transform: translateZ(40px); }
  .three .cell:nth-child(3) { transform: rotateY(-9deg); }
}
