/* ARMANDO / CINEMATIC WORLD
   One 3D scene moves through existing sections; atmospheric fallback is CSS.
   Visual effects never block links, selection or screen readers.
*/
:root {
  --cinematic-scroll: 0;
  --cinematic-silver: #b6ceff;
  --cinematic-ultramarine: #1742ff;
}
.space {
  background:
    radial-gradient(ellipse 54vw 59vw at 78% 17%, rgba(45,89,255,.24),transparent 74%),
    radial-gradient(ellipse 55vw 47vw at 8% 65%, rgba(28,56,166,.24),transparent 70%),
    radial-gradient(ellipse 38vw 45vw at 85% 87%, rgba(23,139,221,.11),transparent 74%),
    linear-gradient(150deg,#030715 0%,#091a49 48%,#040b22 73%,#02050d 100%);
}
.space::before {
  opacity: .23;
  background-image:
    linear-gradient(rgba(125,153,255,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(125,153,255,.12) 1px,transparent 1px),
    radial-gradient(circle,rgba(213,229,255,.82) .85px,transparent 1.4px);
  background-size: 72px 72px,72px 72px,137px 137px;
  animation: cinematicGridGlide 55s linear infinite;
  mask-image: linear-gradient(180deg,#0005,#000 48%,#0004);
}
.space::after {
  opacity: .9;
  background:
    radial-gradient(ellipse 10vw 22vw at 84% 21%,rgba(80,120,255,.18),transparent 77%),
    radial-gradient(ellipse 23vw 5vw at 57% 15%,rgba(168,197,255,.08),transparent 80%),
    radial-gradient(ellipse 40vw 15vw at 22% 79%,rgba(43,80,219,.11),transparent 80%);
  animation: cinematicSky 24s ease-in-out infinite alternate;
}
.aurora-ribbon {
  filter: blur(56px) saturate(138%);
  opacity: .4;
}
#view-home .hero {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 70% 47%,rgba(64,99,251,.21),transparent 45%),
    radial-gradient(ellipse at 42% 100%,rgba(30,68,212,.26),transparent 62%),
    linear-gradient(132deg,#030816 0%,#0a1c55 65%,#07102a 100%);
}
#view-home .hero:before {
  background:linear-gradient(90deg,rgba(4,10,29,.94) 0%,rgba(5,17,47,.82) 38%,rgba(8,25,70,.12) 72%,rgba(4,13,40,.23));
  pointer-events:none;
}
#view-home .hero:after {
  opacity: .68;
  background-size: 64px 64px;
}
#view-home .hero-cinema {
  z-index: 2;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 42% 40% at 76% 43%,rgba(66,119,255,.11),transparent 83%),
    linear-gradient(145deg,transparent 58%,rgba(5,25,84,.15));
}
#view-home .hero-cinema:before {
  content:"";
  position:absolute;
  inset:-30%;
  pointer-events:none;
  background: conic-gradient(from 35deg at 65% 48%,transparent 0deg,rgba(68,103,255,.08) 59deg,rgba(178,206,255,.045) 88deg,transparent 146deg,rgba(31,78,245,.08) 216deg,transparent 280deg);
  animation: cinematicLightTurn 44s linear infinite;
  z-index: 0;
}
#view-home .hero-cinema:after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index: 3;
  background:linear-gradient(90deg,rgba(3,9,30,.35),transparent 43%,rgba(1,8,29,.19));
}
#scene.cinematic-world-canvas {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: .98;
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse 85% 93% at 59% 48%,black 36%,rgba(0,0,0,.9) 67%,transparent 99%);
  background: transparent;
  object-fit: cover;
}
#scene.cinematic-world-canvas[hidden]{display:none!important}
#view-home .hero-cinema.cinematic-stage-ready > .hero-prism {
  opacity: .08;
  filter: blur(2px);
}
#view-home .hero-cinema.cinematic-stage-ready > .hero-beam {
  opacity: .17;
}
#view-home .hero .hero-grid {
  z-index: 6;
}
#view-home .hero-portrait {
  z-index: 4;
  filter: drop-shadow(-14px 0 41px rgba(76,110,255,.17)) drop-shadow(0 38px 65px rgba(0,0,0,.75));
}
#view-home .hero-nameplate{z-index:8}
#view-home .hero-deck{backdrop-filter:blur(1px)}
/* A single renderer is physically remounted into the selected tab header. */
.tab-head.cinematic-stage-ready {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 78% at 80% 42%,rgba(50,101,245,.18),transparent 82%),
    linear-gradient(138deg,#06102c,#0a1f57 58%,#030817);
}
.tab-head.cinematic-stage-ready:before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background-image:linear-gradient(rgba(140,167,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(140,167,255,.06) 1px,transparent 1px);
  background-size: 70px 70px;
  pointer-events:none;
}
.tab-head.cinematic-stage-ready > div{
  position:relative;
  z-index:3;
}
.tab-head.cinematic-stage-ready #scene{
  z-index:1;
  opacity:.78;
  mask-image:linear-gradient(90deg,transparent,black 40%,black);
}
/* A 3D gem remains behind readable product/project case study titles. */
body[data-page="project"] .case-banner.cinematic-stage-ready {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(ellipse 54% 75% at 68% 40%,rgba(67,113,255,.3),transparent 85%),
    linear-gradient(130deg,#102765,#09183d 65%,#040917);
}
body[data-page="project"] .case-banner.cinematic-stage-ready #scene{
  z-index:1;
  opacity:.78;
}
body[data-page="project"] .case-banner.cinematic-stage-ready .orb{
  opacity:.27;
}
body.cinematic-fallback #scene,
body.cinematic-static #scene {
  display:none!important;
}
body.cinematic-fallback .hero-cinema > .hero-prism,
body.cinematic-static .hero-cinema > .hero-prism {opacity:.35}
body.cinematic-fallback #view-home .hero-cinema > .hero-beam,
body.cinematic-static #view-home .hero-cinema > .hero-beam {opacity:.27}
@keyframes cinematicGridGlide {
  from { background-position: 0 0,0 0,0 0; }
  to { background-position: 72px -36px,72px -36px,-40px 45px; }
}
@keyframes cinematicSky {
  from {transform:translateY(-1.5%) scale(1);opacity:.8}
  to {transform:translateY(1.5%) scale(1.045);opacity:1}
}
@keyframes cinematicLightTurn{
  to { transform:rotate(360deg); }
}
@media(max-width:960px){
  #view-home .hero-cinema:after{background:linear-gradient(90deg,rgba(5,13,36,.18),transparent 60%)}
  #view-home .hero-cinema{opacity:.9}
  .tab-head.cinematic-stage-ready #scene{opacity:.58}
}
@media(max-width:760px){
  #view-home .hero-cinema{opacity:.73}
  #view-home .hero-cinema:before{opacity:.55}
  #scene.cinematic-world-canvas{
    opacity:.73;
    mask-image:radial-gradient(ellipse 96% 82% at 72% 49%,black,transparent 95%);
  }
  #view-home .hero-portrait{opacity:.62}
  .space::before{opacity:.13}
  .aurora-ribbon{opacity:.23;filter:blur(36px)}
}
@media(max-width:490px){
  #view-home .hero-cinema{opacity:.6}
  #view-home .hero-cinema:after{background:linear-gradient(90deg,#040b26a1,transparent 86%)}
  #scene.cinematic-world-canvas{opacity:.6}
  .tab-head.cinematic-stage-ready #scene{opacity:.44}
}
@media(prefers-reduced-motion:reduce){
  .space::before,.space::after,#view-home .hero-cinema:before{animation:none!important;transform:none!important}
  #scene.cinematic-world-canvas{display:none!important}
  .aurora-ribbon{animation:none!important}
}
