/* ─── Cinematic Stage (additive layers) ──────────────────────────────────── */

.cinema-stage {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Three depth layers with starfield + nebula textures */
.cine-layer {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  will-change: transform;
}

.cine-far {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(220, 235, 255, 0.55), transparent 50%),
    radial-gradient(1px 1px at 24% 62%, rgba(200, 220, 255, 0.45), transparent 50%),
    radial-gradient(1px 1px at 38% 28%, rgba(220, 235, 255, 0.5), transparent 50%),
    radial-gradient(1px 1px at 52% 78%, rgba(180, 210, 255, 0.45), transparent 50%),
    radial-gradient(1px 1px at 68% 12%, rgba(220, 235, 255, 0.55), transparent 50%),
    radial-gradient(1px 1px at 82% 56%, rgba(200, 220, 255, 0.5), transparent 50%),
    radial-gradient(1px 1px at 92% 32%, rgba(220, 235, 255, 0.45), transparent 50%);
  background-size: 100% 100%;
  filter: blur(0.4px);
  opacity: 0.85;
}

.cine-mid {
  background-image:
    radial-gradient(2px 2px at 18% 30%, rgba(180, 210, 255, 0.7), transparent 60%),
    radial-gradient(2px 2px at 44% 64%, rgba(200, 180, 255, 0.65), transparent 60%),
    radial-gradient(2px 2px at 72% 22%, rgba(160, 200, 255, 0.7), transparent 60%),
    radial-gradient(2px 2px at 88% 78%, rgba(190, 170, 255, 0.6), transparent 60%);
  background-size: 100% 100%;
  filter: blur(0.8px);
  opacity: 0.7;
}

.cine-near {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(140, 90, 255, 0.16), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(60, 180, 255, 0.14), transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(180, 100, 255, 0.12), transparent 40%);
  filter: blur(40px);
  opacity: 0.6;
}

/* Three-point lighting */
.cine-light {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(60px);
  transition: background 0.6s ease;
  will-change: background;
}

.cine-key  { opacity: 0.95; }
.cine-rim  { opacity: 0.75; }
.cine-fill { opacity: 0.55; }

/* Soft vignette around the frame */
.cine-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0 50%, rgba(0, 0, 0, 0.45) 88%),
    linear-gradient(180deg, rgba(2, 4, 12, 0.18), rgba(2, 4, 12, 0.42));
}

/* Subtle film grain */
.cine-grain {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 0.4px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  animation: cine-grain-shift 0.7s steps(2) infinite;
}

@keyframes cine-grain-shift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(4px, -3px); }
}

/* Letterbox bars */
.cine-letterbox {
  position: fixed;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 4, 10, 0.96), rgba(2, 4, 10, 0));
  transform-origin: top center;
  will-change: transform;
}

.cine-letterbox.top    { top: 0; }
.cine-letterbox.bottom { bottom: 0; transform-origin: bottom center; transform: scaleY(1) rotate(180deg); background: linear-gradient(180deg, rgba(2,4,10,0.96), rgba(2,4,10,0)); }

/* Contact shadows under cards (sense of depth on a virtual floor) */
.contact-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 28px;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(8, 10, 30, 0.55), rgba(8, 10, 30, 0) 70%);
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.service-card:hover .contact-shadow,
.step-card:hover .contact-shadow,
.promo-card:hover .contact-shadow,
.contact-card:hover .contact-shadow {
  opacity: 1;
  transform: translateY(4px) scaleX(0.95);
}

.service-card .contact-shadow,
.step-card .contact-shadow,
.promo-card .contact-shadow,
.contact-card .contact-shadow {
  opacity: 0.55;
}

/* Make sure the app shell stays above the cinema stage but transparent */
.app-shell { isolation: isolate; }

/* Smooth section transforms — let GSAP drive 3D without flicker */
main.content > section {
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cinema-stage,
  .cine-grain,
  .cine-letterbox { display: none !important; }
}

/* Mobile — tone down for performance */
@media (max-width: 720px) {
  .cine-grain { opacity: 0.025; }
  .cine-letterbox { height: 32px; }
  .cine-light { filter: blur(40px); }
}
